diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 000000000..4f9092ff9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,33 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: bug +assignees: '' + +--- + +# Description + +Provide a clear and concise description of the bug and what behavior you are expecting. + +## Steps to Reproduce + +Please provide detailed steps for reproducing the issue. + +1. step 1 +2. step 2 +3. see the bug... + +## Additional Context + +Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions. + +* Machine +* Compiler +* Suite Definition File or Scheme +* Reference other issues or PRs in other repositories that this is related to, and how they are related. + +## Output + +Please include any relevant log files, screenshots or other output here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 000000000..c5f7619d8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: enhancement +assignees: '' + +--- + +## Description +Provide a clear and concise description of the problem to be solved. + +## Solution +Add a clear and concise description of the proposed solution. + +## Alternatives (optional) +If applicable, add a description of any alternative solutions or features you've considered. + +## Related to (optional) +Directly reference any issues or PRs in this or other repositories that this is related to, and describe how they are related. diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md new file mode 100644 index 000000000..5968702e5 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md @@ -0,0 +1,22 @@ +## Description of Changes: +One or more paragraphs describing the problem, solution, and required changes. + +## Tests Conducted: +Explicitly state what tests were run on these changes, or if any are still pending (for README or other text-only changes, just put "None required". Make note of the compilers used, the platform/machine, and other relevant details as necessary. For more complicated changes, or those resulting in scientific changes, please be explicit! +**OR** Add any links to tests conducted. For example, "See ufs-community/ufs-weather-model/pull/" + +## Dependencies: +Add any links to parent PRs (e.g. SCM and/or UFS PRs) or submodules (e.g. rte-rrtmgp). For example: +- NCAR/ccpp-framework/pull/ +- NOAA-EMC/fv3atm/pull/ +- ufs-community/ufs-weather-model/pull/ + +## Documentation: +Does this PR add new capabilities that need to be documented or require modifications to the existing documentation? If so, brief supporting material can be provided here. Contact the CODEOWNERS if your PR requires extensive updates to the documentation. See https://github.com/NCAR/ccpp-doc for Technical Documentation or https://dtcenter.org/community-code/common-community-physics-package-ccpp/documentation for the latest Scientific Documentation. + +## Issue (optional): +If this PR is resolving or referencing one or more issues, in this repository or elewhere, list them here. For example, "Fixes issue mentioned in #123" or "Related to bug in https://github.com/NCAR/other_repository/pull/63" + +## Contributors (optional): +If others have contributed to this work aside from the PR author, list them here + diff --git a/CMakeLists.txt b/CMakeLists.txt index 7efe7bb5f..e5c756d15 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,9 +31,9 @@ set(AUTHORS "Grant Firl" "Dom Heinzeller" "Man Zhang" "Laurie Carson") if (OPENMP) include(detect_openmp) detect_openmp() - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") - set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${OpenMP_Fortran_FLAGS}") + #set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") + #set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") + #set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${OpenMP_Fortran_FLAGS}") message(STATUS "Enable OpenMP support for C/C++/Fortran compiler") else (OPENMP) message (STATUS "Disable OpenMP support for C/C++/Fortran compiler") @@ -72,7 +72,7 @@ set(TYPEDEFS $ENV{CCPP_TYPEDEFS}) if(TYPEDEFS) message(STATUS "Got CCPP TYPEDEFS from environment variable: ${TYPEDEFS}") else(TYPEDEFS) - include(./CCPP_TYPEDEFS.cmake) + include(${CMAKE_CURRENT_BINARY_DIR}/CCPP_TYPEDEFS.cmake) message(STATUS "Got CCPP TYPEDEFS from cmakefile include file: ${TYPEDEFS}") endif(TYPEDEFS) @@ -88,7 +88,7 @@ set(SCHEMES $ENV{CCPP_SCHEMES}) if(SCHEMES) message(STATUS "Got CCPP SCHEMES from environment variable: ${SCHEMES}") else(SCHEMES) - include(./CCPP_SCHEMES.cmake) + include(${CMAKE_CURRENT_BINARY_DIR}/CCPP_SCHEMES.cmake) message(STATUS "Got CCPP SCHEMES from cmakefile include file: ${SCHEMES}") endif(SCHEMES) @@ -97,7 +97,7 @@ set(CAPS $ENV{CCPP_CAPS}) if(CAPS) message(STATUS "Got CCPP CAPS from environment variable: ${CAPS}") else(CAPS) - include(./CCPP_CAPS.cmake) + include(${CMAKE_CURRENT_BINARY_DIR}/CCPP_CAPS.cmake) message(STATUS "Got CCPP CAPS from cmakefile include file: ${CAPS}") endif(CAPS) @@ -107,71 +107,130 @@ set(SCHEMES_SFX_OPT "") set(SCHEMES_SFX_PREC "") # Create a duplicate of the SCHEMES list for handling floating point precision flags set(SCHEMES2 ${SCHEMES}) + +# Schemes and caps from the CCPP code generator use full paths with symlinks +# resolved, we need to do the same here for the below logic to work +get_filename_component(FULL_PATH_TO_CMAKELISTS CMakeLists.txt REALPATH BASE_DIR ${LOCAL_CURRENT_SOURCE_DIR}) +get_filename_component(LOCAL_CURRENT_SOURCE_DIR ${FULL_PATH_TO_CMAKELISTS} DIRECTORY) + +# List of files that need to be compiled without OpenMP +set(SCHEMES_OPENMP_OFF ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rrtmgp/mo_gas_optics.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rrtmgp/mo_rrtmgp_constants.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rrtmgp/mo_rrtmgp_util_reorder.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rrtmgp/mo_gas_concentrations.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rrtmgp/kernels-openacc/mo_gas_optics_kernels.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rrtmgp/mo_rrtmgp_util_string.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rrtmgp/kernels/mo_gas_optics_kernels.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rrtmgp/kernels/mo_rrtmgp_util_reorder_kernels.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/tests/mo_testing_io.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/tests/clear_sky_regression.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/extensions/mo_rrtmgp_clr_all_sky.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/extensions/mo_fluxes_byband_kernels.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/extensions/mo_fluxes_byband.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/extensions/solar_variability/mo_solar_variability.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/extensions/mo_heating_rates.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/extensions/mo_fluxes_bygpoint.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/extensions/mo_compute_bc.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/extensions/cloud_optics/mo_cloud_sampling.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/extensions/cloud_optics/mo_cloud_optics.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/examples/mo_load_coefficients.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/examples/rfmip-clear-sky/rrtmgp_rfmip_sw.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/examples/rfmip-clear-sky/mo_rfmip_io.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/examples/rfmip-clear-sky/rrtmgp_rfmip_lw.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/examples/mo_simple_netcdf.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/examples/all-sky/rrtmgp_allsky.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/examples/all-sky/mo_load_cloud_coefficients.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/examples/all-sky/mo_garand_atmos_io.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rte/mo_rte_config.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rte/mo_source_functions.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rte/mo_rte_sw.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rte/mo_fluxes.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rte/mo_rte_lw.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rte/kernels-openacc/mo_rte_solver_kernels.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rte/kernels-openacc/mo_optical_props_kernels.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rte/mo_rte_util_array.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rte/kernels/mo_rte_solver_kernels.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rte/kernels/mo_optical_props_kernels.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rte/kernels/mo_fluxes_broadband_kernels.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rte/mo_rte_kind.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rte/mo_optical_props.F90) + #------------------------------------------------------------------------------ if (${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU") + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ffree-line-length-none") - SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/physics/module_bfmicrophysics.f - ${CMAKE_CURRENT_SOURCE_DIR}/physics/sflx.f - ${CMAKE_CURRENT_SOURCE_DIR}/physics/sfc_diff.f - ${CMAKE_CURRENT_SOURCE_DIR}/physics/sfc_diag.f - PROPERTIES COMPILE_FLAGS -fdefault-real-8) - SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/physics/module_nst_model.f90 - ${CMAKE_CURRENT_SOURCE_DIR}/physics/calpreciptype.f90 - PROPERTIES COMPILE_FLAGS "-fdefault-real-8 -ffree-form") - SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/physics/mersenne_twister.f - PROPERTIES COMPILE_FLAGS "-fdefault-real-8 -fno-range-check") - SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/physics/module_nst_water_prop.f90 - PROPERTIES COMPILE_FLAGS "-ffree-line-length-none -fdefault-real-8 -ffree-form") - SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/physics/aer_cloud.F - ${CMAKE_CURRENT_SOURCE_DIR}/physics/wv_saturation.F - ${CMAKE_CURRENT_SOURCE_DIR}/physics/cldwat2m_micro.F - ${CMAKE_CURRENT_SOURCE_DIR}/physics/surface_perturbation.F90 - PROPERTIES COMPILE_FLAGS "-fdefault-real-8 -fdefault-double-8") - SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/physics/module_mp_thompson_make_number_concentrations.F90 - PROPERTIES COMPILE_FLAGS "-fdefault-real-8 -fdefault-double-8") - SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/physics/module_SF_JSFC.F90 - ${CMAKE_CURRENT_SOURCE_DIR}/physics/module_BL_MYJPBL.F90 - PROPERTIES COMPILE_FLAGS "-fdefault-real-8 -fdefault-double-8") + + SET_SOURCE_FILES_PROPERTIES(${LOCAL_CURRENT_SOURCE_DIR}/physics/module_bfmicrophysics.f + ${LOCAL_CURRENT_SOURCE_DIR}/physics/sflx.f + ${LOCAL_CURRENT_SOURCE_DIR}/physics/sfc_diff.f + ${LOCAL_CURRENT_SOURCE_DIR}/physics/sfc_diag.f + ${LOCAL_CURRENT_SOURCE_DIR}/physics/module_nst_model.f90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/calpreciptype.f90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/mersenne_twister.f + ${LOCAL_CURRENT_SOURCE_DIR}/physics/module_nst_water_prop.f90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/aer_cloud.F + ${LOCAL_CURRENT_SOURCE_DIR}/physics/wv_saturation.F + ${LOCAL_CURRENT_SOURCE_DIR}/physics/cldwat2m_micro.F + ${LOCAL_CURRENT_SOURCE_DIR}/physics/surface_perturbation.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/module_mp_thompson_make_number_concentrations.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/module_SF_JSFC.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/module_BL_MYJPBL.F90 + PROPERTIES COMPILE_FLAGS "-fdefault-real-8 -fdefault-double-8 ${OpenMP_Fortran_FLAGS}") + if (PROJECT STREQUAL "CCPP-FV3") # Set 32-bit floating point precision flags for certain files # that are executed in the dynamics (fast physics part) if (DYN32) - if (${CMAKE_CURRENT_SOURCE_DIR}/physics/gfdl_fv_sat_adj.F90 IN_LIST SCHEMES) + if (${LOCAL_CURRENT_SOURCE_DIR}/physics/gfdl_fv_sat_adj.F90 IN_LIST SCHEMES) # Reduce floating point precision from 64-bit to 32-bit, if necessary set(CMAKE_Fortran_FLAGS_PREC32 ${CMAKE_Fortran_FLAGS_DEFAULT_PREC}) string(REPLACE "-fdefault-real-8" "" CMAKE_Fortran_FLAGS_PREC32 "${CMAKE_Fortran_FLAGS_PREC32}") string(REPLACE "-fdefault-double-8" "" CMAKE_Fortran_FLAGS_PREC32 "${CMAKE_Fortran_FLAGS_PREC32}") - SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/physics/gfdl_fv_sat_adj.F90 - APPEND_STRING PROPERTY COMPILE_FLAGS " ${CMAKE_Fortran_FLAGS_PREC32} ") + SET_PROPERTY(SOURCE ${LOCAL_CURRENT_SOURCE_DIR}/physics/gfdl_fv_sat_adj.F90 + APPEND_STRING PROPERTY COMPILE_FLAGS " ${CMAKE_Fortran_FLAGS_PREC32} ${OpenMP_Fortran_FLAGS} ") # Add all of the above files to the list of schemes with special floating point precision flags - list(APPEND SCHEMES_SFX_PREC ${CMAKE_CURRENT_SOURCE_DIR}/physics/gfdl_fv_sat_adj.F90) + list(APPEND SCHEMES_SFX_PREC ${LOCAL_CURRENT_SOURCE_DIR}/physics/gfdl_fv_sat_adj.F90) endif() endif() # Remove files with special floating point precision flags from list - # of files with standard floating point precision flags flags + # of files with standard floating point precision flags if (SCHEMES_SFX_PREC) list(REMOVE_ITEM SCHEMES2 ${SCHEMES_SFX_PREC}) - endif (SCHEMES_SFX_PREC) + endif () + + if (PROJECT STREQUAL "CCPP-FV3") + # Remove files that need to be compiled without OpenMP from list + # of files with standard compiler flags, and assign no-OpenMP flags + if (SCHEMES_OPENMP_OFF) + list(REMOVE_ITEM SCHEMES2 ${SCHEMES_OPENMP_OFF}) + endif () + # Assign standard floating point precision flags to all remaining schemes and caps + SET_PROPERTY(SOURCE ${SCHEMES_OPENMP_OFF} + APPEND_STRING PROPERTY COMPILE_FLAGS " ${CMAKE_Fortran_FLAGS_DEFAULT_PREC} ") + endif() + # Assign standard floating point precision flags to all remaining schemes and caps SET_PROPERTY(SOURCE ${SCHEMES2} ${CAPS} - APPEND_STRING PROPERTY COMPILE_FLAGS " ${CMAKE_Fortran_FLAGS_DEFAULT_PREC} ") + APPEND_STRING PROPERTY COMPILE_FLAGS " ${CMAKE_Fortran_FLAGS_DEFAULT_PREC} ${OpenMP_Fortran_FLAGS} ") + endif (PROJECT STREQUAL "CCPP-FV3") elseif (${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel") # Adjust settings for bit-for-bit reproducibility of NEMSfv3gfs if (PROJECT STREQUAL "CCPP-FV3") - if (${CMAKE_CURRENT_SOURCE_DIR}/physics/module_sf_mynn.F90 IN_LIST SCHEMES) + if (${LOCAL_CURRENT_SOURCE_DIR}/physics/module_sf_mynn.F90 IN_LIST SCHEMES) # Reduce optimization for module_sf_mynn.F90 (to avoid an apparent compiler bug with Intel 18 on Hera) - SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/physics/module_sf_mynn.F90 + SET_SOURCE_FILES_PROPERTIES(${LOCAL_CURRENT_SOURCE_DIR}/physics/module_sf_mynn.F90 PROPERTIES COMPILE_FLAGS "${CMAKE_Fortran_FLAGS_OPT} -O1") - list(APPEND SCHEMES_SFX_OPT ${CMAKE_CURRENT_SOURCE_DIR}/physics/module_sf_mynn.F90) + list(APPEND SCHEMES_SFX_OPT ${LOCAL_CURRENT_SOURCE_DIR}/physics/module_sf_mynn.F90) endif() - if (${CMAKE_CURRENT_SOURCE_DIR}/physics/radiation_aerosols.f IN_LIST SCHEMES) + if (${LOCAL_CURRENT_SOURCE_DIR}/physics/radiation_aerosols.f IN_LIST SCHEMES) # Replace -xHost or -xCORE-AVX2 with -xCORE-AVX-I for certain files set(CMAKE_Fortran_FLAGS_LOPT1 ${CMAKE_Fortran_FLAGS_OPT}) string(REPLACE "-xHOST" "-xCORE-AVX-I" @@ -183,10 +242,10 @@ elseif (${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel") string(REPLACE "-axSSE4.2,CORE-AVX2" "-axSSE4.2,CORE-AVX-I" CMAKE_Fortran_FLAGS_LOPT1 "${CMAKE_Fortran_FLAGS_LOPT1}") - SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/physics/radiation_aerosols.f + SET_SOURCE_FILES_PROPERTIES(${LOCAL_CURRENT_SOURCE_DIR}/physics/radiation_aerosols.f PROPERTIES COMPILE_FLAGS "${CMAKE_Fortran_FLAGS_LOPT1}") # Add all of the above files to the list of schemes with special compiler flags - list(APPEND SCHEMES_SFX_OPT ${CMAKE_CURRENT_SOURCE_DIR}/physics/radiation_aerosols.f) + list(APPEND SCHEMES_SFX_OPT ${LOCAL_CURRENT_SOURCE_DIR}/physics/radiation_aerosols.f) endif() # Remove files with special compiler flags from list of files with standard compiler flags @@ -200,15 +259,15 @@ elseif (${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel") # Set 32-bit floating point precision flags for certain files # that are executed in the dynamics (fast physics part) if (DYN32) - if (${CMAKE_CURRENT_SOURCE_DIR}/physics/gfdl_fv_sat_adj.F90 IN_LIST SCHEMES) - # Reduce floating point precision from 64-bit to 32-bit, if necessary - set(CMAKE_Fortran_FLAGS_PREC32 ${CMAKE_Fortran_FLAGS_DEFAULT_PREC}) - string(REPLACE "-real-size 64" "-real-size 32" - CMAKE_Fortran_FLAGS_PREC32 "${CMAKE_Fortran_FLAGS_PREC32}") - SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/physics/gfdl_fv_sat_adj.F90 - APPEND_STRING PROPERTY COMPILE_FLAGS " ${CMAKE_Fortran_FLAGS_PREC32} ") - # Add all of the above files to the list of schemes with special floating point precision flags - list(APPEND SCHEMES_SFX_PREC ${CMAKE_CURRENT_SOURCE_DIR}/physics/gfdl_fv_sat_adj.F90) + if (${LOCAL_CURRENT_SOURCE_DIR}/physics/gfdl_fv_sat_adj.F90 IN_LIST SCHEMES) + # Reduce floating point precision from 64-bit to 32-bit, if necessary + set(CMAKE_Fortran_FLAGS_PREC32 ${CMAKE_Fortran_FLAGS_DEFAULT_PREC}) + string(REPLACE "-real-size 64" "-real-size 32" + CMAKE_Fortran_FLAGS_PREC32 "${CMAKE_Fortran_FLAGS_PREC32}") + SET_PROPERTY(SOURCE ${LOCAL_CURRENT_SOURCE_DIR}/physics/gfdl_fv_sat_adj.F90 + APPEND_STRING PROPERTY COMPILE_FLAGS " ${CMAKE_Fortran_FLAGS_PREC32} ${OpenMP_Fortran_FLAGS} ") + # Add all of the above files to the list of schemes with special floating point precision flags + list(APPEND SCHEMES_SFX_PREC ${LOCAL_CURRENT_SOURCE_DIR}/physics/gfdl_fv_sat_adj.F90) endif() endif() @@ -217,86 +276,50 @@ elseif (${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel") if (SCHEMES_SFX_PREC) list(REMOVE_ITEM SCHEMES2 ${SCHEMES_SFX_PREC}) endif (SCHEMES_SFX_PREC) - # Assign standard floating point precision flags to all remaining schemes and caps - SET_PROPERTY(SOURCE ${SCHEMES2} ${CAPS} - APPEND_STRING PROPERTY COMPILE_FLAGS " ${CMAKE_Fortran_FLAGS_DEFAULT_PREC} ") - else (PROJECT STREQUAL "CCPP-FV3") - SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/physics/module_bfmicrophysics.f - ${CMAKE_CURRENT_SOURCE_DIR}/physics/sflx.f - ${CMAKE_CURRENT_SOURCE_DIR}/physics/sfc_diff.f - ${CMAKE_CURRENT_SOURCE_DIR}/physics/sfc_diag.f - PROPERTIES COMPILE_FLAGS -r8) - SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/physics/module_nst_model.f90 - ${CMAKE_CURRENT_SOURCE_DIR}/physics/calpreciptype.f90 - PROPERTIES COMPILE_FLAGS "-r8 -free") - SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/physics/mersenne_twister.f - PROPERTIES COMPILE_FLAGS "-r8 -ftz") - SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/physics/module_nst_water_prop.f90 - PROPERTIES COMPILE_FLAGS "-extend-source 132 -r8 -free") - SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/physics/aer_cloud.F - ${CMAKE_CURRENT_SOURCE_DIR}/physics/wv_saturation.F - ${CMAKE_CURRENT_SOURCE_DIR}/physics/cldwat2m_micro.F - ${CMAKE_CURRENT_SOURCE_DIR}/physics/surface_perturbation.F90 - PROPERTIES COMPILE_FLAGS "-r8") - SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/physics/module_mp_thompson_make_number_concentrations.F90 - PROPERTIES COMPILE_FLAGS "-r8") - SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/physics/module_SF_JSFC.F90 - ${CMAKE_CURRENT_SOURCE_DIR}/physics/module_BL_MYJPBL.F90 - PROPERTIES COMPILE_FLAGS "-r8") - endif (PROJECT STREQUAL "CCPP-FV3") -elseif (${CMAKE_Fortran_COMPILER_ID} STREQUAL "PGI") - SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/physics/module_bfmicrophysics.f - ${CMAKE_CURRENT_SOURCE_DIR}/physics/sflx.f - ${CMAKE_CURRENT_SOURCE_DIR}/physics/sfc_diff.f - ${CMAKE_CURRENT_SOURCE_DIR}/physics/sfc_diag.f - PROPERTIES COMPILE_FLAGS -r8) - SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/physics/module_nst_model.f90 - ${CMAKE_CURRENT_SOURCE_DIR}/physics/calpreciptype.f90 - PROPERTIES COMPILE_FLAGS "-r8 -Mfree") - SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/physics/mersenne_twister.f - PROPERTIES COMPILE_FLAGS "-r8 -Mnofptrap") - SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/physics/module_nst_water_prop.f90 - PROPERTIES COMPILE_FLAGS "-r8 -Mfree") - SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/physics/aer_cloud.F - ${CMAKE_CURRENT_SOURCE_DIR}/physics/wv_saturation.F - ${CMAKE_CURRENT_SOURCE_DIR}/physics/cldwat2m_micro.F - ${CMAKE_CURRENT_SOURCE_DIR}/physics/surface_perturbation.F90 - PROPERTIES COMPILE_FLAGS "-r8") - SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/physics/module_mp_thompson_make_number_concentrations.F90 - PROPERTIES COMPILE_FLAGS "-r8") - SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/physics/module_SF_JSFC.F90 - ${CMAKE_CURRENT_SOURCE_DIR}/physics/module_BL_MYJPBL.F90 - PROPERTIES COMPILE_FLAGS "-r8") - if (PROJECT STREQUAL "CCPP-FV3") - # Set 32-bit floating point precision flags for certain files - # that are executed in the dynamics (fast physics part) - if (DYN32) - # Reduce floating point precision from 64-bit to 32-bit, if necessary - set(CMAKE_Fortran_FLAGS_PREC32 ${CMAKE_Fortran_FLAGS_DEFAULT_PREC}) - string(REPLACE "-r8" "-r4" - CMAKE_Fortran_FLAGS_PREC32 "${CMAKE_Fortran_FLAGS_PREC32}") - SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/physics/gfdl_fv_sat_adj.F90 - APPEND_STRING PROPERTY COMPILE_FLAGS " ${CMAKE_Fortran_FLAGS_PREC32} ") - # Add all of the above files to the list of schemes with special floating point precision flags - list(APPEND SCHEMES_SFX_PREC ${CMAKE_CURRENT_SOURCE_DIR}/physics/gfdl_fv_sat_adj.F90) - endif (DYN32) + # Remove files that need to be compiled without OpenMP from list + # of files with standard compiler flags, and assign no-OpenMP flags + if (SCHEMES_OPENMP_OFF) + list(REMOVE_ITEM SCHEMES2 ${SCHEMES_OPENMP_OFF}) + # Assign standard floating point precision flags to all remaining schemes and caps + SET_PROPERTY(SOURCE ${SCHEMES_OPENMP_OFF} + APPEND_STRING PROPERTY COMPILE_FLAGS " ${CMAKE_Fortran_FLAGS_DEFAULT_PREC} ") + endif () - # Remove files with special floating point precision flags from list - # of files with standard floating point precision flags flags - if (SCHEMES_SFX_PREC) - list(REMOVE_ITEM SCHEMES2 ${SCHEMES_SFX_PREC}) - endif (SCHEMES_SFX_PREC) # Assign standard floating point precision flags to all remaining schemes and caps SET_PROPERTY(SOURCE ${SCHEMES2} ${CAPS} - APPEND_STRING PROPERTY COMPILE_FLAGS " ${CMAKE_Fortran_FLAGS_DEFAULT_PREC} ") + APPEND_STRING PROPERTY COMPILE_FLAGS " ${CMAKE_Fortran_FLAGS_DEFAULT_PREC} ${OpenMP_Fortran_FLAGS} ") + else (PROJECT STREQUAL "CCPP-FV3") + SET_SOURCE_FILES_PROPERTIES(${LOCAL_CURRENT_SOURCE_DIR}/physics/module_bfmicrophysics.f + ${LOCAL_CURRENT_SOURCE_DIR}/physics/sflx.f + ${LOCAL_CURRENT_SOURCE_DIR}/physics/sfc_diff.f + ${LOCAL_CURRENT_SOURCE_DIR}/physics/sfc_diag.f + PROPERTIES COMPILE_FLAGS "-r8 ${OpenMP_Fortran_FLAGS} ") + SET_SOURCE_FILES_PROPERTIES(${LOCAL_CURRENT_SOURCE_DIR}/physics/module_nst_model.f90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/calpreciptype.f90 + PROPERTIES COMPILE_FLAGS "-r8 -free ${OpenMP_Fortran_FLAGS} ") + SET_SOURCE_FILES_PROPERTIES(${LOCAL_CURRENT_SOURCE_DIR}/physics/mersenne_twister.f + PROPERTIES COMPILE_FLAGS "-r8 -ftz ${OpenMP_Fortran_FLAGS} ") + SET_SOURCE_FILES_PROPERTIES(${LOCAL_CURRENT_SOURCE_DIR}/physics/module_nst_water_prop.f90 + PROPERTIES COMPILE_FLAGS "-extend-source 132 -r8 -free ${OpenMP_Fortran_FLAGS} ") + SET_SOURCE_FILES_PROPERTIES(${LOCAL_CURRENT_SOURCE_DIR}/physics/aer_cloud.F + ${LOCAL_CURRENT_SOURCE_DIR}/physics/wv_saturation.F + ${LOCAL_CURRENT_SOURCE_DIR}/physics/cldwat2m_micro.F + ${LOCAL_CURRENT_SOURCE_DIR}/physics/surface_perturbation.F90 + PROPERTIES COMPILE_FLAGS "-r8 ${OpenMP_Fortran_FLAGS} ") + SET_SOURCE_FILES_PROPERTIES(${LOCAL_CURRENT_SOURCE_DIR}/physics/module_mp_thompson_make_number_concentrations.F90 + PROPERTIES COMPILE_FLAGS "-r8 ${OpenMP_Fortran_FLAGS} ") + SET_SOURCE_FILES_PROPERTIES(${LOCAL_CURRENT_SOURCE_DIR}/physics/module_SF_JSFC.F90 + ${LOCAL_CURRENT_SOURCE_DIR}/physics/module_BL_MYJPBL.F90 + PROPERTIES COMPILE_FLAGS "-r8 ${OpenMP_Fortran_FLAGS} ") endif (PROJECT STREQUAL "CCPP-FV3") -else (${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU") + +else() message ("CMAKE_Fortran_COMPILER full path: " ${CMAKE_Fortran_COMPILER}) message ("Fortran compiler: " ${CMAKE_Fortran_COMPILER_ID}) message (FATAL_ERROR "This program has only been compiled with gfortran, pgf90 and ifort. If another compiler is needed, the appropriate flags must be added in ${GFS_PHYS_SRC}/CMakeLists.txt") -endif (${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU") +endif() # The auto-generated caps can contain calls to physics schemes in # which some of the arguments (pointers, arrays) are not associated/allocated. @@ -310,12 +333,7 @@ if (${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU") set_property(SOURCE ${CAPS} APPEND_STRING PROPERTY COMPILE_FLAGS " -fcheck=no-pointer,no-bounds ") elseif (${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel") set_property(SOURCE ${CAPS} APPEND_STRING PROPERTY COMPILE_FLAGS " -check nopointers,nobounds ") -elseif (${CMAKE_Fortran_COMPILER_ID} STREQUAL "PGI") - if (CMAKE_Fortran_FLAGS MATCHES ".*chkptr.*") - message (FATAL_ERROR "PGI compiler option chkptr cannot be used for CCPP physics") - endif (CMAKE_Fortran_FLAGS MATCHES ".*chkptr.*") - set_property(SOURCE ${CAPS} APPEND_STRING PROPERTY COMPILE_FLAGS " -Mnobounds ") -endif (${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU") +endif () #------------------------------------------------------------------------------ add_library(ccppphys STATIC ${SCHEMES} ${SCHEMES_SFX_OPT} ${CAPS}) diff --git a/physics/GFS_DCNV_generic.F90 b/physics/GFS_DCNV_generic.F90 index bfe97bc70..e7dec5ca1 100644 --- a/physics/GFS_DCNV_generic.F90 +++ b/physics/GFS_DCNV_generic.F90 @@ -15,32 +15,35 @@ end subroutine GFS_DCNV_generic_pre_finalize !! \section arg_table_GFS_DCNV_generic_pre_run Argument Table !! \htmlinclude GFS_DCNV_generic_pre_run.html !! - subroutine GFS_DCNV_generic_pre_run (im, levs, ldiag3d, qdiag3d, do_cnvgwd, cplchm,& - gu0, gv0, gt0, gq0_water_vapor, & - save_u, save_v, save_t, save_qv, dqdti, & - errmsg, errflg) + subroutine GFS_DCNV_generic_pre_run (im, levs, ldiag3d, qdiag3d, do_cnvgwd, cplchm, & + gu0, gv0, gt0, gq0, nsamftrac, ntqv, & + save_u, save_v, save_t, save_q, clw, & + ntcw,ntiw,ntclamt,ntrw,ntsw,ntrnc,ntsnc,ntgl, & + ntgnc, cscnv, satmedmf, trans_trac, ras, ntrac, & + dtidx, index_of_process_dcnv, errmsg, errflg) use machine, only: kind_phys implicit none - integer, intent(in) :: im, levs + integer, intent(in) :: im, levs, nsamftrac, ntqv, index_of_process_dcnv, dtidx(:,:), & + ntcw,ntiw,ntclamt,ntrw,ntsw,ntrnc,ntsnc,ntgl,ntrac,ntgnc logical, intent(in) :: ldiag3d, qdiag3d, do_cnvgwd, cplchm - real(kind=kind_phys), dimension(im,levs), intent(in) :: gu0 - real(kind=kind_phys), dimension(im,levs), intent(in) :: gv0 - real(kind=kind_phys), dimension(im,levs), intent(in) :: gt0 - real(kind=kind_phys), dimension(im,levs), intent(inout) :: gq0_water_vapor - real(kind=kind_phys), dimension(im,levs), intent(inout) :: save_u - real(kind=kind_phys), dimension(im,levs), intent(inout) :: save_v - real(kind=kind_phys), dimension(im,levs), intent(inout) :: save_t - real(kind=kind_phys), dimension(im,levs), intent(inout) :: save_qv - ! dqdti only allocated if cplchm is .true. - real(kind=kind_phys), dimension(:,:), intent(inout) :: dqdti + real(kind=kind_phys), dimension(:,:), intent(in) :: gu0 + real(kind=kind_phys), dimension(:,:), intent(in) :: gv0 + real(kind=kind_phys), dimension(:,:), intent(in) :: gt0 + real(kind=kind_phys), dimension(:,:,:), intent(inout) :: gq0 + real(kind=kind_phys), dimension(:,:), intent(inout) :: save_u + real(kind=kind_phys), dimension(:,:), intent(inout) :: save_v + real(kind=kind_phys), dimension(:,:), intent(inout) :: save_t + real(kind=kind_phys), dimension(:,:,:), intent(inout) :: save_q character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - + logical, intent(in) :: cscnv, satmedmf, trans_trac, ras real(kind=kind_phys), parameter :: zero = 0.0d0 - integer :: i, k + real(kind=kind_phys), dimension(:,:,:), intent(in) :: clw + + integer :: i, k, n, tracers ! Initialize CCPP error handling variables errmsg = '' @@ -63,15 +66,26 @@ subroutine GFS_DCNV_generic_pre_run (im, levs, ldiag3d, qdiag3d, do_cnvgwd, cplc endif if ((ldiag3d.and.qdiag3d) .or. cplchm) then - do k=1,levs - do i=1,im - save_qv(i,k) = gq0_water_vapor(i,k) - enddo - enddo - endif - - if (cplchm) then - dqdti = zero + if (cscnv .or. satmedmf .or. trans_trac .or. ras) then + tracers = 2 + do n=2,ntrac + if ( n /= ntcw .and. n /= ntiw .and. n /= ntclamt .and. & + n /= ntrw .and. n /= ntsw .and. n /= ntrnc .and. & + n /= ntsnc .and. n /= ntgl .and. n /= ntgnc) then + tracers = tracers + 1 + if(dtidx(100+n,index_of_process_dcnv)>0) then + save_q(:,:,n) = clw(:,:,tracers) + endif + endif + enddo + else + do n=2,ntrac + if(dtidx(100+n,index_of_process_dcnv)>0) then + save_q(:,:,n) = gq0(:,:,n) + endif + enddo + endif ! end if_ras or cfscnv or samf + save_q(:,:,ntqv) = gq0(:,:,ntqv) endif end subroutine GFS_DCNV_generic_pre_run @@ -91,44 +105,51 @@ end subroutine GFS_DCNV_generic_post_finalize !> \section arg_table_GFS_DCNV_generic_post_run Argument Table !! \htmlinclude GFS_DCNV_generic_post_run.html !! - subroutine GFS_DCNV_generic_post_run (im, levs, lssav, ldiag3d, qdiag3d, ras, cscnv, & - frain, rain1, dtf, cld1d, save_u, save_v, save_t, save_qv, gu0, gv0, gt0, & - gq0_water_vapor, ud_mf, dd_mf, dt_mf, con_g, npdf3d, num_p3d, ncnvcld3d, & - rainc, cldwrk, dt3dt, dq3dt, du3dt, dv3dt, upd_mf, dwn_mf, det_mf, & - cnvw, cnvc, cnvw_phy_f3d, cnvc_phy_f3d, flag_for_dcnv_generic_tend, errmsg, errflg) + subroutine GFS_DCNV_generic_post_run (im, levs, lssav, ldiag3d, qdiag3d, ras, & + cscnv, frain, rain1, dtf, cld1d, save_u, save_v, save_t, gu0, gv0, gt0, & + ud_mf, dd_mf, dt_mf, con_g, npdf3d, num_p3d, ncnvcld3d, nsamftrac, & + rainc, cldwrk, upd_mf, dwn_mf, det_mf, dtend, dtidx, index_of_process_dcnv, & + index_of_temperature, index_of_x_wind, index_of_y_wind, ntqv, gq0, save_q, & + cnvw, cnvc, cnvw_phy_f3d, cnvc_phy_f3d, flag_for_dcnv_generic_tend, & + ntcw,ntiw,ntclamt,ntrw,ntsw,ntrnc,ntsnc,ntgl,ntgnc, ntrac,clw, & + satmedmf, trans_trac, errmsg, errflg) use machine, only: kind_phys implicit none - integer, intent(in) :: im, levs + integer, intent(in) :: im, levs, nsamftrac logical, intent(in) :: lssav, ldiag3d, qdiag3d, ras, cscnv logical, intent(in) :: flag_for_dcnv_generic_tend real(kind=kind_phys), intent(in) :: frain, dtf - real(kind=kind_phys), dimension(im), intent(in) :: rain1, cld1d - real(kind=kind_phys), dimension(im,levs), intent(in) :: save_u, save_v, save_t, save_qv - real(kind=kind_phys), dimension(im,levs), intent(in) :: gu0, gv0, gt0, gq0_water_vapor - real(kind=kind_phys), dimension(im,levs), intent(in) :: ud_mf, dd_mf, dt_mf + real(kind=kind_phys), dimension(:), intent(in) :: rain1, cld1d + real(kind=kind_phys), dimension(:,:), intent(in) :: save_u, save_v, save_t + real(kind=kind_phys), dimension(:,:), intent(in) :: gu0, gv0, gt0 + real(kind=kind_phys), dimension(:,:,:), intent(in) :: gq0, save_q + real(kind=kind_phys), dimension(:,:), intent(in) :: ud_mf, dd_mf, dt_mf real(kind=kind_phys), intent(in) :: con_g integer, intent(in) :: npdf3d, num_p3d, ncnvcld3d + logical, intent(in) :: satmedmf, trans_trac - real(kind=kind_phys), dimension(im), intent(inout) :: rainc, cldwrk - ! dt3dt, dq3dt, du3dt, dv3dt upd_mf, dwn_mf, det_mf only allocated if ldiag3d == .true. - real(kind=kind_phys), dimension(:,:), intent(inout) :: dt3dt, dq3dt, du3dt, dv3dt + real(kind=kind_phys), dimension(:), intent(inout) :: rainc, cldwrk real(kind=kind_phys), dimension(:,:), intent(inout) :: upd_mf, dwn_mf, det_mf - real(kind=kind_phys), dimension(im,levs), intent(inout) :: cnvw, cnvc - ! The following arrays may not be allocated, depending on certain flags and microphysics schemes. - ! Since Intel 15 crashes when passing unallocated arrays to arrays defined with explicit shape, - ! use assumed-shape arrays. Note that Intel 18 and GNU 6.2.0-8.1.0 tolerate explicit-shape arrays - ! as long as these do not get used when not allocated (it is still invalid Fortran code, though). + real(kind=kind_phys), dimension(:,:), intent(inout) :: cnvw, cnvc + + real(kind=kind_phys), dimension(:,:,:), intent(inout) :: dtend + integer, intent(in) :: dtidx(:,:), index_of_process_dcnv, index_of_temperature, & + index_of_x_wind, index_of_y_wind, ntqv + integer, intent(in) :: ntcw,ntiw,ntclamt,ntrw,ntsw,ntrnc,ntsnc,ntgl,ntrac,ntgnc + real(kind=kind_phys), dimension(:,:,:), intent(in) :: clw + + real(kind=kind_phys), dimension(:,:), intent(inout) :: cnvw_phy_f3d, cnvc_phy_f3d character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - integer :: i, k + integer :: i, k, n, idtend, tracers ! Initialize CCPP error handling variables errmsg = '' @@ -164,23 +185,56 @@ subroutine GFS_DCNV_generic_post_run (im, levs, lssav, ldiag3d, qdiag3d, ras, cs enddo if (ldiag3d .and. flag_for_dcnv_generic_tend) then - do k=1,levs - do i=1,im - dt3dt(i,k) = dt3dt(i,k) + (gt0(i,k)-save_t(i,k)) * frain - du3dt(i,k) = du3dt(i,k) + (gu0(i,k)-save_u(i,k)) * frain - dv3dt(i,k) = dv3dt(i,k) + (gv0(i,k)-save_v(i,k)) * frain + idtend=dtidx(index_of_temperature,index_of_process_dcnv) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + (gt0-save_t)*frain + endif + + idtend=dtidx(index_of_x_wind,index_of_process_dcnv) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + (gu0-save_u)*frain + endif -! upd_mf(i,k) = upd_mf(i,k) + ud_mf(i,k) * (con_g*frain) -! dwn_mf(i,k) = dwn_mf(i,k) + dd_mf(i,k) * (con_g*frain) -! det_mf(i,k) = det_mf(i,k) + dt_mf(i,k) * (con_g*frain) + idtend=dtidx(index_of_y_wind,index_of_process_dcnv) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + (gv0-save_v)*frain + endif + + if (cscnv .or. satmedmf .or. trans_trac .or. ras) then + tracers = 2 + do n=2,ntrac + if ( n /= ntcw .and. n /= ntiw .and. n /= ntclamt .and. & + n /= ntrw .and. n /= ntsw .and. n /= ntrnc .and. & + n /= ntsnc .and. n /= ntgl .and. n /= ntgnc) then + tracers = tracers + 1 + idtend = dtidx(100+n,index_of_process_dcnv) + if(idtend>0) then + dtend(:,:,idtend) = dtend(:,:,idtend) + clw(:,:,tracers)-save_q(:,:,n) * frain + endif + endif + enddo + else + do n=2,ntrac + idtend = dtidx(100+n,index_of_process_dcnv) + if(idtend>0) then + dtend(:,:,idtend) = dtend(:,:,idtend) + (gq0(:,:,n)-save_q(:,:,n))*frain + endif enddo - enddo + endif + idtend = dtidx(100+ntqv, index_of_process_dcnv) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + (gq0(:,:,ntqv) - save_q(:,:,ntqv)) * frain + endif + + ! convective mass fluxes if(qdiag3d) then - do k=1,levs - do i=1,im - dq3dt(i,k) = dq3dt(i,k) + (gq0_water_vapor(i,k)-save_qv(i,k)) * frain - enddo - enddo + do k=1,levs + do i=1,im + upd_mf(i,k) = upd_mf(i,k) + ud_mf(i,k) * (con_g*frain) + dwn_mf(i,k) = dwn_mf(i,k) + dd_mf(i,k) * (con_g*frain) + det_mf(i,k) = det_mf(i,k) + dt_mf(i,k) * (con_g*frain) + enddo + enddo endif endif ! if (ldiag3d) diff --git a/physics/GFS_DCNV_generic.meta b/physics/GFS_DCNV_generic.meta index ff7933f07..f9ea812b5 100644 --- a/physics/GFS_DCNV_generic.meta +++ b/physics/GFS_DCNV_generic.meta @@ -16,7 +16,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -24,7 +24,7 @@ intent = in optional = F [ldiag3d] - standard_name = flag_diagnostics_3D + standard_name = flag_for_diagnostics_3D long_name = flag for 3d diagnostic fields units = flag dimensions = () @@ -32,7 +32,7 @@ intent = in optional = F [qdiag3d] - standard_name = flag_tracer_diagnostics_3D + standard_name = flag_for_tracer_diagnostics_3D long_name = flag for 3d tracer diagnostic fields units = flag dimensions = () @@ -56,46 +56,62 @@ intent = in optional = F [gu0] - standard_name = x_wind_updated_by_physics + standard_name = x_wind_of_new_state long_name = zonal wind updated by physics units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [gv0] - standard_name = y_wind_updated_by_physics + standard_name = y_wind_of_new_state long_name = meridional wind updated by physics units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [gt0] - standard_name = air_temperature_updated_by_physics + standard_name = air_temperature_of_new_state long_name = temperature updated by physics units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F -[gq0_water_vapor] - standard_name = water_vapor_specific_humidity_updated_by_physics - long_name = water vapor specific humidity updated by physics +[gq0] + standard_name = tracer_concentration_of_new_state + long_name = tracer concentration updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = inout optional = F +[nsamftrac] + standard_name = number_of_tracers_for_samf + long_name = number of tracers for scale-aware mass flux schemes + units = count + dimensions = () + type = integer + intent = in + optional = F +[ntqv] + standard_name = index_of_specific_humidity_in_tracer_concentration_array + long_name = tracer index for water vapor (specific humidity) + units = index + dimensions = () + type = integer + intent = in + optional = F [save_u] standard_name = x_wind_save long_name = x-wind before entering a physics scheme units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -104,7 +120,7 @@ standard_name = y_wind_save long_name = y-wind before entering a physics scheme units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -113,28 +129,156 @@ standard_name = air_temperature_save long_name = air temperature before entering a physics scheme units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F -[save_qv] - standard_name = water_vapor_specific_humidity_save - long_name = water vapor specific humidity before entering a physics scheme +[save_q] + standard_name = tracer_concentration_save + long_name = tracer concentration before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys - intent = inout + intent = in + optional = F +[dtidx] + standard_name = cumulative_change_of_state_variables_outer_index + long_name = index of state-variable and process in last dimension of diagnostic tendencies array AKA cumulative_change_index + units = index + dimensions = (number_of_tracers_plus_one_hundred,number_of_cumulative_change_processes) + type = integer + intent = in + optional = F +[index_of_process_dcnv] + standard_name = index_of_deep_convection_process_process_in_cumulative_change_index + long_name = index of deep convection process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[cscnv] + standard_name = flag_for_Chikira_Sugiyama_deep_convection + long_name = flag for Chikira-Sugiyama convection + units = flag + dimensions = () + type = logical + intent = in + optional = F +[satmedmf] + standard_name = flag_for_scale_aware_TKE_moist_EDMF_PBL + long_name = flag for scale-aware TKE moist EDMF PBL scheme + units = flag + dimensions = () + type = logical + intent = in + optional = F +[trans_trac] + standard_name = flag_for_convective_transport_of_tracers + long_name = flag for convective transport of tracers + units = flag + dimensions = () + type = logical + intent = in + optional = F +[ras] + standard_name = flag_for_relaxed_arakawa_schubert_deep_convection + long_name = flag for ras convection scheme + units = flag + dimensions = () + type = logical + intent = in + optional = F +[ntcw] + standard_name = index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for cloud condensate (or liquid water) + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntiw] + standard_name = index_of_cloud_ice_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for ice water + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntclamt] + standard_name = index_of_cloud_area_fraction_in_atmosphere_layer_in_tracer_concentration_array + long_name = tracer index for cloud amount integer + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntrw] + standard_name = index_of_rain_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for rain water + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntsw] + standard_name = index_of_snow_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for snow water + units = index + dimensions = () + type = integer + intent = in optional = F -[dqdti] - standard_name = instantaneous_water_vapor_specific_humidity_tendency_due_to_convection - long_name = instantaneous moisture tendency due to convection - units = kg kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) +[ntrnc] + standard_name = index_of_mass_number_concentration_of_rain_in_tracer_concentration_array + long_name = tracer index for rain number concentration + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntsnc] + standard_name = index_of_mass_number_concentration_of_snow_in_tracer_concentration_array + long_name = tracer index for snow number concentration + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntgl] + standard_name = index_of_graupel_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for graupel + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntgnc] + standard_name = index_of_mass_number_concentration_of_graupel_in_tracer_concentration_array + long_name = tracer index for graupel number concentration + units = index + dimensions = () + type = integer + intent = in + optional = F +[clw] + standard_name = convective_transportable_tracers + long_name = array to contain cloud water and other convective trans. tracers + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers_for_convective_transport) type = real kind = kind_phys - intent = inout + intent = in + optional = F +[ntrac] + standard_name = number_of_tracers + long_name = number of tracers + units = count + dimensions = () + type = integer + intent = in optional = F [errmsg] standard_name = ccpp_error_message @@ -173,7 +317,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -181,7 +325,7 @@ intent = in optional = F [lssav] - standard_name = flag_diagnostics + standard_name = flag_for_diagnostics long_name = logical flag for storing diagnostics units = flag dimensions = () @@ -189,7 +333,7 @@ intent = in optional = F [ldiag3d] - standard_name = flag_diagnostics_3D + standard_name = flag_for_diagnostics_3D long_name = flag for 3d diagnostic fields units = flag dimensions = () @@ -197,7 +341,7 @@ intent = in optional = F [qdiag3d] - standard_name = flag_tracer_diagnostics_3D + standard_name = flag_for_tracer_diagnostics_3D long_name = flag for 3d tracer diagnostic fields units = flag dimensions = () @@ -205,21 +349,13 @@ intent = in optional = F [ras] - standard_name = flag_for_ras_deep_convection + standard_name = flag_for_relaxed_arakawa_schubert_deep_convection long_name = flag for ras convection scheme units = flag dimensions = () type = logical intent = in optional = F -[cscnv] - standard_name = flag_for_Chikira_Sugiyama_deep_convection - long_name = flag for Chikira-Sugiyama convection - units = flag - dimensions = () - type = logical - intent = in - optional = F [frain] standard_name = dynamics_to_physics_timestep_ratio long_name = ratio of dynamics timestep to physics timestep @@ -239,7 +375,7 @@ intent = in optional = F [dtf] - standard_name = time_step_for_dynamics + standard_name = timestep_for_dynamics long_name = dynamics timestep units = s dimensions = () @@ -260,7 +396,7 @@ standard_name = x_wind_save long_name = x-wind before entering a physics scheme units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -269,7 +405,7 @@ standard_name = y_wind_save long_name = y-wind before entering a physics scheme units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -278,52 +414,34 @@ standard_name = air_temperature_save long_name = air temperature before entering a physics scheme units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[save_qv] - standard_name = water_vapor_specific_humidity_save - long_name = water vapor specific humidity before entering a physics scheme - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [gu0] - standard_name = x_wind_updated_by_physics + standard_name = x_wind_of_new_state long_name = zonal wind updated by physics units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [gv0] - standard_name = y_wind_updated_by_physics + standard_name = y_wind_of_new_state long_name = meridional wind updated by physics units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [gt0] - standard_name = air_temperature_updated_by_physics + standard_name = air_temperature_of_new_state long_name = temperature updated by physics units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[gq0_water_vapor] - standard_name = water_vapor_specific_humidity_updated_by_physics - long_name = water vapor specific humidity updated by physics - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -332,7 +450,7 @@ standard_name = instantaneous_atmosphere_updraft_convective_mass_flux long_name = (updraft mass flux) * delt units = kg m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -341,7 +459,7 @@ standard_name = instantaneous_atmosphere_downdraft_convective_mass_flux long_name = (downdraft mass flux) * delt units = kg m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -350,7 +468,82 @@ standard_name = instantaneous_atmosphere_detrainment_convective_mass_flux long_name = (detrainment mass flux) * delt units = kg m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dtend] + standard_name = cumulative_change_of_state_variables + long_name = diagnostic tendencies for state variables + units = various + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_cumulative_change_processes) + type = real + kind = kind_phys + intent = inout + optional = F +[dtidx] + standard_name = cumulative_change_of_state_variables_outer_index + long_name = index of state-variable and process in last dimension of diagnostic tendencies array AKA cumulative_change_index + units = index + dimensions = (number_of_tracers_plus_one_hundred,number_of_cumulative_change_processes) + type = integer + intent = in + optional = F +[index_of_process_dcnv] + standard_name = index_of_deep_convection_process_process_in_cumulative_change_index + long_name = index of deep convection process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_temperature] + standard_name = index_of_temperature_in_cumulative_change_index + long_name = index of temperature in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_x_wind] + standard_name = index_of_x_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_y_wind] + standard_name = index_of_y_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntqv] + standard_name = index_of_specific_humidity_in_tracer_concentration_array + long_name = tracer index for water vapor (specific humidity) + units = index + dimensions = () + type = integer + intent = in + optional = F +[gq0] + standard_name = tracer_concentration_of_new_state + long_name = tracer concentration updated by physics + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) + type = real + kind = kind_phys + intent = in + optional = F +[save_q] + standard_name = tracer_concentration_save + long_name = tracer concentration before entering a physics scheme + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = in @@ -365,7 +558,7 @@ intent = in optional = F [npdf3d] - standard_name = number_of_3d_arrays_associated_with_pdf_based_clouds + standard_name = number_of_pdf_based_variables_in_xyz_dimensioned_restart_array long_name = number of 3d arrays associated with pdf based clouds/mp units = count dimensions = () @@ -373,7 +566,7 @@ intent = in optional = F [num_p3d] - standard_name = array_dimension_of_3d_arrays_for_microphysics + standard_name = number_of_microphysics_variables_in_xyz_dimensioned_restart_array long_name = number of 3D arrays needed for microphysics units = count dimensions = () @@ -381,13 +574,21 @@ intent = in optional = F [ncnvcld3d] - standard_name = number_of_convective_3d_cloud_fields + standard_name = number_of_convective_cloud_variables_in_xyz_dimensioned_restart_array long_name = number of convective 3d clouds fields units = count dimensions = () type = integer intent = in optional = F +[nsamftrac] + standard_name = number_of_tracers_for_samf + long_name = number of tracers for scale-aware mass flux schemes + units = count + dimensions = () + type = integer + intent = in + optional = F [rainc] standard_name = lwe_thickness_of_convective_precipitation_amount_on_dynamics_timestep long_name = convective rain at this time step @@ -406,47 +607,11 @@ kind = kind_phys intent = inout optional = F -[dt3dt] - standard_name = cumulative_change_in_temperature_due_to_deep_convection - long_name = cumulative change in temperature due to deep conv. - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[dq3dt] - standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_deep_convection - long_name = cumulative change in water vapor specific humidity due to deep conv. - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[du3dt] - standard_name = cumulative_change_in_x_wind_due_to_deep_convection - long_name = cumulative change in x wind due to deep convection - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[dv3dt] - standard_name = cumulative_change_in_y_wind_due_to_deep_convection - long_name = cumulative change in y wind due to deep convection - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F [upd_mf] standard_name = cumulative_atmosphere_updraft_convective_mass_flux long_name = cumulative updraft mass flux units = kg m-1 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -455,7 +620,7 @@ standard_name = cumulative_atmosphere_downdraft_convective_mass_flux long_name = cumulative downdraft mass flux units = kg m-1 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -464,7 +629,7 @@ standard_name = cumulative_atmosphere_detrainment_convective_mass_flux long_name = cumulative detrainment mass flux units = kg m-1 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -473,7 +638,7 @@ standard_name = convective_cloud_water_mixing_ratio long_name = moist convective cloud water mixing ratio units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -482,37 +647,150 @@ standard_name = convective_cloud_cover long_name = convective cloud cover units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [cnvw_phy_f3d] - standard_name = convective_cloud_water_mixing_ratio_in_phy_f3d + standard_name = convective_cloud_condensate_mixing_ratio long_name = convective cloud water mixing ratio in the phy_f3d array units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [cnvc_phy_f3d] - standard_name = convective_cloud_cover_in_phy_f3d + standard_name = convective_cloud_area_fraction long_name = convective cloud cover in the phy_f3d array units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [flag_for_dcnv_generic_tend] - standard_name = flag_for_generic_deep_convection_tendency + standard_name = flag_for_generic_tendency_due_to_deep_convection long_name = true if GFS_DCNV_generic should calculate tendencies units = flag dimensions = () type = logical intent = in optional = F +[cscnv] + standard_name = flag_for_Chikira_Sugiyama_deep_convection + long_name = flag for Chikira-Sugiyama convection + units = flag + dimensions = () + type = logical + intent = in + optional = F +[satmedmf] + standard_name = flag_for_scale_aware_TKE_moist_EDMF_PBL + long_name = flag for scale-aware TKE moist EDMF PBL scheme + units = flag + dimensions = () + type = logical + intent = in + optional = F +[trans_trac] + standard_name = flag_for_convective_transport_of_tracers + long_name = flag for convective transport of tracers + units = flag + dimensions = () + type = logical + intent = in + optional = F +[ntcw] + standard_name = index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for cloud condensate (or liquid water) + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntiw] + standard_name = index_of_cloud_ice_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for ice water + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntclamt] + standard_name = index_of_cloud_area_fraction_in_atmosphere_layer_in_tracer_concentration_array + long_name = tracer index for cloud amount integer + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntrw] + standard_name = index_of_rain_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for rain water + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntsw] + standard_name = index_of_snow_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for snow water + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntrnc] + standard_name = index_of_mass_number_concentration_of_rain_in_tracer_concentration_array + long_name = tracer index for rain number concentration + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntsnc] + standard_name = index_of_mass_number_concentration_of_snow_in_tracer_concentration_array + long_name = tracer index for snow number concentration + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntgl] + standard_name = index_of_graupel_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for graupel + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntgnc] + standard_name = index_of_mass_number_concentration_of_graupel_in_tracer_concentration_array + long_name = tracer index for graupel number concentration + units = index + dimensions = () + type = integer + intent = in + optional = F +[clw] + standard_name = convective_transportable_tracers + long_name = array to contain cloud water and other convective trans. tracers + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers_for_convective_transport) + type = real + kind = kind_phys + intent = in + optional = F +[ntrac] + standard_name = number_of_tracers + long_name = number of tracers + units = count + dimensions = () + type = integer + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/GFS_GWD_generic.F90 b/physics/GFS_GWD_generic.F90 index 2ab0fb37a..a2c869e6a 100644 --- a/physics/GFS_GWD_generic.F90 +++ b/physics/GFS_GWD_generic.F90 @@ -1,4 +1,4 @@ -!> \file GFS_GWD_generic.f +!> \file GFS_GWD_generic.F90 !! This file contains the CCPP-compliant orographic gravity wave !! drag pre interstitial codes. @@ -6,6 +6,9 @@ module GFS_GWD_generic_pre contains +!! \section arg_table_GFS_GWD_generic_pre_init Argument Table +!! \htmlinclude GFS_GWD_generic_pre_init.html +!! subroutine GFS_GWD_generic_pre_init() end subroutine GFS_GWD_generic_pre_init @@ -20,30 +23,34 @@ subroutine GFS_GWD_generic_pre_run( & & oc, oa4, clx, theta, & & varss, ocss, oa4ss, clxss, & & sigma, gamma, elvmax, lssav, ldiag3d, & - & dudt, dvdt, dtdt, du3dt, dv3dt, dt3dt, dtf, & + & dtend, dtidx, index_of_temperature, index_of_x_wind, & + & index_of_y_wind, index_of_process_orographic_gwd, & + & dudt, dvdt, dtdt, dtf, & & flag_for_gwd_generic_tend, errmsg, errflg) use machine, only : kind_phys implicit none integer, intent(in) :: im, levs, nmtvr - real(kind=kind_phys), intent(in) :: mntvar(im,nmtvr) + real(kind=kind_phys), intent(in) :: mntvar(:,:) real(kind=kind_phys), intent(out) :: & - & oc(im), oa4(im,4), clx(im,4), & + & oc(:), oa4(:,:), clx(:,:), & & varss(:), ocss(:), oa4ss(:,:), clxss(:,:), & - & theta(im), sigma(im), gamma(im), elvmax(im) + & theta(:), sigma(:), gamma(:), elvmax(:) logical, intent(in) :: lssav, ldiag3d, flag_for_gwd_generic_tend - real(kind=kind_phys), intent(in) :: dtdt(im,levs), dudt(im,levs), dvdt(im,levs) - ! dt3dt only allocated only if ldiag3d is .true. - real(kind=kind_phys), intent(inout) :: dt3dt(:,:), du3dt(:,:), dv3dt(:,:) + real(kind=kind_phys), intent(in) :: dtdt(:,:), dudt(:,:), dvdt(:,:) + ! dtend only allocated only if ldiag3d is .true. + real(kind=kind_phys), intent(inout) :: dtend(:,:,:) + integer, intent(in) :: dtidx(:,:), index_of_temperature, & + & index_of_x_wind, index_of_y_wind, index_of_process_orographic_gwd real(kind=kind_phys), intent(in) :: dtf character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - integer :: i, k + integer :: i, k, idtend ! Initialize CCPP error handling variables errmsg = '' @@ -117,21 +124,29 @@ subroutine GFS_GWD_generic_pre_run( & elvmax = 0 endif ! end if_nmtvr - if (lssav) then - if (ldiag3d .and. flag_for_gwd_generic_tend) then - do k=1,levs - do i=1,im - dt3dt(i,k) = dt3dt(i,k) - dtdt(i,k)*dtf - du3dt(i,k) = du3dt(i,k) - dudt(i,k)*dtf - dv3dt(i,k) = dv3dt(i,k) - dvdt(i,k)*dtf - enddo - enddo + if (lssav .and. ldiag3d .and. flag_for_gwd_generic_tend) then + idtend = dtidx(index_of_temperature, index_of_process_orographic_gwd) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) - dtdt*dtf + endif + + idtend = dtidx(index_of_x_wind, index_of_process_orographic_gwd) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) - dudt*dtf + endif + + idtend = dtidx(index_of_y_wind, index_of_process_orographic_gwd) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) - dvdt*dtf endif endif end subroutine GFS_GWD_generic_pre_run !> @} +!! \section arg_table_GFS_GWD_generic_pre_finalize Argument Table +!! \htmlinclude GFS_GWD_generic_pre_finalize.html +!! subroutine GFS_GWD_generic_pre_finalize() end subroutine GFS_GWD_generic_pre_finalize @@ -154,7 +169,8 @@ end subroutine GFS_GWD_generic_post_init !! \section detailed Detailed Algorithm !! @{ subroutine GFS_GWD_generic_post_run(lssav, ldiag3d, dtf, dusfcg, dvsfcg, dudt, dvdt, dtdt, & - & dugwd, dvgwd, du3dt, dv3dt, dt3dt, flag_for_gwd_generic_tend, errmsg, errflg) + & dugwd, dvgwd, flag_for_gwd_generic_tend, dtend, dtidx, index_of_temperature, index_of_x_wind, & + & index_of_y_wind, index_of_process_orographic_gwd, errmsg, errflg) use machine, only : kind_phys implicit none @@ -166,11 +182,17 @@ subroutine GFS_GWD_generic_post_run(lssav, ldiag3d, dtf, dusfcg, dvsfcg, dudt, d real(kind=kind_phys), intent(in) :: dtf real(kind=kind_phys), intent(inout) :: dugwd(:), dvgwd(:) - real(kind=kind_phys), intent(inout) :: du3dt(:,:), dv3dt(:,:), dt3dt(:,:) + + ! dtend only allocated only if ldiag3d is .true. + real(kind=kind_phys), intent(inout) :: dtend(:,:,:) + integer, intent(in) :: dtidx(:,:), index_of_temperature, & + & index_of_x_wind, index_of_y_wind, index_of_process_orographic_gwd character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg + integer :: idtend + ! Initialize CCPP error handling variables errmsg = '' errflg = 0 @@ -180,15 +202,29 @@ subroutine GFS_GWD_generic_post_run(lssav, ldiag3d, dtf, dusfcg, dvsfcg, dudt, d dvgwd(:) = dvgwd(:) + dvsfcg(:)*dtf if (ldiag3d .and. flag_for_gwd_generic_tend) then - du3dt(:,:) = du3dt(:,:) + dudt(:,:) * dtf - dv3dt(:,:) = dv3dt(:,:) + dvdt(:,:) * dtf - dt3dt(:,:) = dt3dt(:,:) + dtdt(:,:) * dtf + idtend = dtidx(index_of_temperature, index_of_process_orographic_gwd) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + dtdt*dtf + endif + + idtend = dtidx(index_of_x_wind, index_of_process_orographic_gwd) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + dudt*dtf + endif + + idtend = dtidx(index_of_y_wind, index_of_process_orographic_gwd) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + dvdt*dtf + endif endif endif end subroutine GFS_GWD_generic_post_run !> @} +!! \section arg_table_GFS_GWD_generic_post_finalize Argument Table +!! \htmlinclude GFS_GWD_generic_post_finalize.html +!! subroutine GFS_GWD_generic_post_finalize() end subroutine GFS_GWD_generic_post_finalize diff --git a/physics/GFS_GWD_generic.meta b/physics/GFS_GWD_generic.meta index dc7ed7a70..adaa9a077 100644 --- a/physics/GFS_GWD_generic.meta +++ b/physics/GFS_GWD_generic.meta @@ -16,7 +16,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -25,15 +25,15 @@ optional = F [nmtvr] standard_name = number_of_statistical_measures_of_subgrid_orography - long_name = number of statistical measures of subgrid orography + long_name = number of statistical measures of subgrid height_above_mean_sea_level units = count dimensions = () type = integer intent = in optional = F [mntvar] - standard_name = statistical_measures_of_subgrid_orography - long_name = array of statistical measures of subgrid orography + standard_name = statistical_measures_of_subgrid_orography_collection_array + long_name = array of statistical measures of subgrid height_above_mean_sea_level units = various dimensions = (horizontal_loop_extent,number_of_statistical_measures_of_subgrid_orography) type = real @@ -42,7 +42,7 @@ optional = F [oc] standard_name = convexity_of_subgrid_orography - long_name = convexity of subgrid orography + long_name = convexity of subgrid height_above_mean_sea_level units = none dimensions = (horizontal_loop_extent) type = real @@ -51,7 +51,7 @@ optional = F [oa4] standard_name = asymmetry_of_subgrid_orography - long_name = asymmetry of subgrid orography + long_name = asymmetry of subgrid height_above_mean_sea_level units = none dimensions = (horizontal_loop_extent,4) type = real @@ -60,7 +60,7 @@ optional = F [clx] standard_name = fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height - long_name = horizontal fraction of grid box covered by subgrid orography higher than critical height + long_name = horizontal fraction of grid box covered by subgrid height_above_mean_sea_level higher than critical height units = frac dimensions = (horizontal_loop_extent,4) type = real @@ -78,7 +78,7 @@ optional = F [varss] standard_name = standard_deviation_of_subgrid_orography_small_scale - long_name = standard deviation of subgrid orography small scale + long_name = standard deviation of subgrid height_above_mean_sea_level small scale units = m dimensions = (horizontal_loop_extent) type = real @@ -87,7 +87,7 @@ optional = F [ocss] standard_name = convexity_of_subgrid_orography_small_scale - long_name = convexity of subgrid orography small scale + long_name = convexity of subgrid height_above_mean_sea_level small scale units = none dimensions = (horizontal_loop_extent) type = real @@ -96,7 +96,7 @@ optional = F [oa4ss] standard_name = asymmetry_of_subgrid_orography_small_scale - long_name = asymmetry of subgrid orography small scale + long_name = asymmetry of subgrid height_above_mean_sea_level small scale units = none dimensions = (horizontal_loop_extent,4) type = real @@ -105,7 +105,7 @@ optional = F [clxss] standard_name = fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height_small_scale - long_name = horizontal fraction of grid box covered by subgrid orography higher than critical height small scale + long_name = horizontal fraction of grid box covered by subgrid height_above_mean_sea_level higher than critical height small scale units = frac dimensions = (horizontal_loop_extent,4) type = real @@ -114,7 +114,7 @@ optional = F [sigma] standard_name = slope_of_subgrid_orography - long_name = slope of subgrid orography + long_name = slope of subgrid height_above_mean_sea_level units = none dimensions = (horizontal_loop_extent) type = real @@ -123,7 +123,7 @@ optional = F [gamma] standard_name = anisotropy_of_subgrid_orography - long_name = anisotropy of subgrid orography + long_name = anisotropy of subgrid height_above_mean_sea_level units = none dimensions = (horizontal_loop_extent) type = real @@ -132,7 +132,7 @@ optional = F [elvmax] standard_name = maximum_subgrid_orography - long_name = maximum of subgrid orography + long_name = maximum of subgrid height_above_mean_sea_level units = m dimensions = (horizontal_loop_extent) type = real @@ -140,7 +140,7 @@ intent = out optional = F [lssav] - standard_name = flag_diagnostics + standard_name = flag_for_diagnostics long_name = logical flag for storing diagnostics units = flag dimensions = () @@ -148,7 +148,7 @@ intent = in optional = F [ldiag3d] - standard_name = flag_diagnostics_3D + standard_name = flag_for_diagnostics_3D long_name = flag for 3d diagnostic fields units = flag dimensions = () @@ -156,61 +156,83 @@ intent = in optional = F [dudt] - standard_name = tendency_of_x_wind_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_x_wind long_name = zonal wind tendency due to model physics units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys - intent = inout + intent = in optional = F [dvdt] - standard_name = tendency_of_y_wind_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_y_wind long_name = meridional wind tendency due to model physics units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys - intent = inout + intent = in optional = F [dtdt] - standard_name = tendency_of_air_temperature_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_air_temperature long_name = updated tendency of the temperature units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F -[du3dt] - standard_name = cumulative_change_in_x_wind_due_to_orographic_gravity_wave_drag - long_name = cumulative change in x wind due to orographic gravity wave drag - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) +[dtend] + standard_name = cumulative_change_of_state_variables + long_name = diagnostic tendencies for state variables + units = various + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_cumulative_change_processes) type = real kind = kind_phys intent = inout optional = F -[dv3dt] - standard_name = cumulative_change_in_y_wind_due_to_orographic_gravity_wave_drag - long_name = cumulative change in y wind due to orographic gravity wave drag - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[dtidx] + standard_name = cumulative_change_of_state_variables_outer_index + long_name = index of state-variable and process in last dimension of diagnostic tendencies array AKA cumulative_change_index + units = index + dimensions = (number_of_tracers_plus_one_hundred,number_of_cumulative_change_processes) + type = integer + intent = in optional = F -[dt3dt] - standard_name = cumulative_change_in_temperature_due_to_orographic_gravity_wave_drag - long_name = cumulative change in temperature due to orographic gravity wave drag - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[index_of_temperature] + standard_name = index_of_temperature_in_cumulative_change_index + long_name = index of temperature in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_x_wind] + standard_name = index_of_x_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_y_wind] + standard_name = index_of_y_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_process_orographic_gwd] + standard_name = index_of_orographic_gravity_wave_drag_process_in_cumulative_change_index + long_name = index of orographic gravity wave drag process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in optional = F [dtf] - standard_name = time_step_for_dynamics + standard_name = timestep_for_dynamics long_name = dynamics timestep units = s dimensions = () @@ -219,7 +241,7 @@ intent = in optional = F [flag_for_gwd_generic_tend] - standard_name = flag_for_generic_gravity_wave_drag_tendency + standard_name = flag_for_generic_tendency_due_to_gravity_wave_drag long_name = true if GFS_GWD_generic should calculate tendencies units = flag dimensions = () @@ -255,7 +277,7 @@ name = GFS_GWD_generic_post_run type = scheme [lssav] - standard_name = flag_diagnostics + standard_name = flag_for_diagnostics long_name = flag for calculating diagnostic fields units = flag dimensions = () @@ -263,7 +285,7 @@ intent = in optional = F [ldiag3d] - standard_name = flag_diagnostics_3D + standard_name = flag_for_diagnostics_3D long_name = flag for calculating 3-D diagnostic fields units = flag dimensions = () @@ -271,7 +293,7 @@ intent = in optional = F [dtf] - standard_name = time_step_for_dynamics + standard_name = timestep_for_dynamics long_name = dynamics time step units = s dimensions = () @@ -298,28 +320,28 @@ intent = in optional = F [dudt] - standard_name = tendency_of_x_wind_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_x_wind long_name = zonal wind tendency due to model physics units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [dvdt] - standard_name = tendency_of_y_wind_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_y_wind long_name = meridional wind tendency due to model physics units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [dtdt] - standard_name = tendency_of_air_temperature_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_air_temperature long_name = air temperature tendency due to model physics units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -342,35 +364,57 @@ kind = kind_phys intent = inout optional = F -[du3dt] - standard_name = cumulative_change_in_x_wind_due_to_orographic_gravity_wave_drag - long_name = cumulative change in zonal wind due to orographic gravity wave drag - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) +[dtend] + standard_name = cumulative_change_of_state_variables + long_name = diagnostic tendencies for state variables + units = various + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_cumulative_change_processes) type = real kind = kind_phys intent = inout optional = F -[dv3dt] - standard_name = cumulative_change_in_y_wind_due_to_orographic_gravity_wave_drag - long_name = cumulative change in meridional wind due to orographic gravity wave drag - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[dtidx] + standard_name = cumulative_change_of_state_variables_outer_index + long_name = index of state-variable and process in last dimension of diagnostic tendencies array AKA cumulative_change_index + units = index + dimensions = (number_of_tracers_plus_one_hundred,number_of_cumulative_change_processes) + type = integer + intent = in optional = F -[dt3dt] - standard_name = cumulative_change_in_temperature_due_to_orographic_gravity_wave_drag - long_name = cumulative change in temperature due to orographic gravity wave drag - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[index_of_temperature] + standard_name = index_of_temperature_in_cumulative_change_index + long_name = index of temperature in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_x_wind] + standard_name = index_of_x_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_y_wind] + standard_name = index_of_y_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_process_orographic_gwd] + standard_name = index_of_orographic_gravity_wave_drag_process_in_cumulative_change_index + long_name = index of orographic gravity wave drag process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in optional = F [flag_for_gwd_generic_tend] - standard_name = flag_for_generic_gravity_wave_drag_tendency + standard_name = flag_for_generic_tendency_due_to_gravity_wave_drag long_name = true if GFS_GWD_generic should calculate tendencies units = flag dimensions = () diff --git a/physics/GFS_MP_generic.F90 b/physics/GFS_MP_generic.F90 index af5a4d178..6a8d3bfcb 100644 --- a/physics/GFS_MP_generic.F90 +++ b/physics/GFS_MP_generic.F90 @@ -12,18 +12,19 @@ end subroutine GFS_MP_generic_pre_init !> \section arg_table_GFS_MP_generic_pre_run Argument Table !! \htmlinclude GFS_MP_generic_pre_run.html !! - subroutine GFS_MP_generic_pre_run(im, levs, ldiag3d, qdiag3d, do_aw, ntcw, nncl, ntrac, gt0, gq0, save_t, save_qv, save_q, errmsg, errflg) + subroutine GFS_MP_generic_pre_run(im, levs, ldiag3d, qdiag3d, do_aw, ntcw, nncl, & + ntrac, gt0, gq0, save_t, save_q, errmsg, errflg) ! use machine, only: kind_phys implicit none - integer, intent(in) :: im, levs, ntcw, nncl, ntrac - logical, intent(in) :: ldiag3d, qdiag3d, do_aw - real(kind=kind_phys), dimension(im, levs), intent(in) :: gt0 - real(kind=kind_phys), dimension(im, levs, ntrac), intent(in) :: gq0 + integer, intent(in) :: im, levs, ntcw, nncl, ntrac + logical, intent(in) :: ldiag3d, qdiag3d, do_aw + real(kind=kind_phys), dimension(:,:), intent(in) :: gt0 + real(kind=kind_phys), dimension(:,:,:), intent(in) :: gq0 - real(kind=kind_phys), dimension(im, levs), intent(inout) :: save_t, save_qv - real(kind=kind_phys), dimension(im, levs, ntrac), intent(inout) :: save_q + real(kind=kind_phys), dimension(:,:), intent(inout) :: save_t + real(kind=kind_phys), dimension(:,:,:), intent(inout) :: save_q character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -41,16 +42,15 @@ subroutine GFS_MP_generic_pre_run(im, levs, ldiag3d, qdiag3d, do_aw, ntcw, nncl, enddo enddo if(qdiag3d) then - do k=1,levs - do i=1,im - ! Here, gq0(...,1) is used instead of gq0_water_vapor - ! to be consistent with the GFS_MP_generic_post_run - ! code. - save_qv(i,k) = gq0(i,k,1) + do n=1,ntrac + do k=1,levs + do i=1,im + save_q(i,k,n) = gq0(i,k,n) + enddo enddo enddo - endif - if(do_aw) then + else if(do_aw) then + ! if qdiag3d, all q are saved already save_q(1:im,:,1) = gq0(1:im,:,1) do n=ntcw,ntcw+nncl-1 save_q(1:im,:,n) = gq0(1:im,:,n) @@ -84,61 +84,61 @@ end subroutine GFS_MP_generic_post_init !! !> \section gfs_mp_gen GFS MP Generic Post General Algorithm !> @{ - subroutine GFS_MP_generic_post_run(im, levs, kdt, nrcm, ncld, nncl, ntcw, ntrac, imp_physics, imp_physics_gfdl, & - imp_physics_thompson, imp_physics_mg, imp_physics_fer_hires, cal_pre, lssav, ldiag3d, qdiag3d, cplflx, cplchm, con_g, rainmin, dtf, frain, rainc, rain1, & - rann, xlat, xlon, gt0, gq0, prsl, prsi, phii, tsfc, ice, snow, graupel, save_t, save_qv, rain0, ice0, snow0, & + subroutine GFS_MP_generic_post_run( & + im, levs, kdt, nrcm, nncl, ntcw, ntrac, imp_physics, imp_physics_gfdl, imp_physics_thompson, & + imp_physics_mg, imp_physics_fer_hires, cal_pre, cplflx, cplchm, con_g, rainmin, dtf, frain, rainc, & + rain1, rann, xlat, xlon, gt0, gq0, prsl, prsi, phii, tsfc, ice, snow, graupel, save_t, save_q, rain0, ice0, snow0,& graupel0, del, rain, domr_diag, domzr_diag, domip_diag, doms_diag, tprcp, srflag, sr, cnvprcp, totprcp, totice, & - totsnw, totgrp, cnvprcpb, totprcpb, toticeb, totsnwb, totgrpb, dt3dt, dq3dt, rain_cpl, rainc_cpl, snow_cpl, pwat, & - do_sppt, ca_global, dtdtr, dtdtc, drain_cpl, dsnow_cpl, lsm, lsm_ruc, lsm_noahmp, raincprv, rainncprv, iceprv, snowprv, & - graupelprv, draincprv, drainncprv, diceprv, dsnowprv, dgraupelprv, dtp, errmsg, errflg) + totsnw, totgrp, cnvprcpb, totprcpb, toticeb, totsnwb, totgrpb, rain_cpl, rainc_cpl, snow_cpl, pwat, & + drain_cpl, dsnow_cpl, lsm, lsm_ruc, lsm_noahmp, raincprv, rainncprv, iceprv, snowprv, & + graupelprv, draincprv, drainncprv, diceprv, dsnowprv, dgraupelprv, dtp, & + dtend, dtidx, index_of_temperature, index_of_process_mp,ldiag3d, qdiag3d, lssav, & + errmsg, errflg) ! use machine, only: kind_phys implicit none - integer, intent(in) :: im, levs, kdt, nrcm, ncld, nncl, ntcw, ntrac + integer, intent(in) :: im, levs, kdt, nrcm, nncl, ntcw, ntrac integer, intent(in) :: imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_mg, imp_physics_fer_hires logical, intent(in) :: cal_pre, lssav, ldiag3d, qdiag3d, cplflx, cplchm - - real(kind=kind_phys), intent(in) :: dtf, frain, con_g, rainmin - real(kind=kind_phys), dimension(im), intent(in) :: rain1, xlat, xlon, tsfc - real(kind=kind_phys), dimension(im), intent(inout) :: ice, snow, graupel, rainc - real(kind=kind_phys), dimension(im), intent(in) :: rain0, ice0, snow0, graupel0 - real(kind=kind_phys), dimension(im,nrcm), intent(in) :: rann - real(kind=kind_phys), dimension(im,levs), intent(in) :: gt0, prsl, save_t, save_qv, del - real(kind=kind_phys), dimension(im,levs+1), intent(in) :: prsi, phii - real(kind=kind_phys), dimension(im,levs,ntrac), intent(in) :: gq0 - - real(kind=kind_phys), dimension(im), intent(in ) :: sr - real(kind=kind_phys), dimension(im), intent(inout) :: rain, domr_diag, domzr_diag, domip_diag, doms_diag, tprcp, & - srflag, cnvprcp, totprcp, totice, totsnw, totgrp, cnvprcpb, & - totprcpb, toticeb, totsnwb, totgrpb, rain_cpl, rainc_cpl, & - snow_cpl, pwat - - real(kind=kind_phys), dimension(:,:), intent(inout) :: dt3dt ! only if ldiag3d - real(kind=kind_phys), dimension(:,:), intent(inout) :: dq3dt ! only if ldiag3d and qdiag3d + integer, intent(in) :: index_of_temperature,index_of_process_mp + + real(kind=kind_phys), intent(in) :: dtf, frain, con_g, rainmin + real(kind=kind_phys), dimension(:), intent(in) :: rain1, xlat, xlon, tsfc + real(kind=kind_phys), dimension(:), intent(inout) :: ice, snow, graupel, rainc + real(kind=kind_phys), dimension(:), intent(in) :: rain0, ice0, snow0, graupel0 + real(kind=kind_phys), dimension(:,:), intent(in) :: rann + real(kind=kind_phys), dimension(:,:), intent(in) :: gt0, prsl, save_t, del + real(kind=kind_phys), dimension(:,:), intent(in) :: prsi, phii + real(kind=kind_phys), dimension(:,:,:), intent(in) :: gq0, save_q + + real(kind=kind_phys), dimension(:), intent(in ) :: sr + real(kind=kind_phys), dimension(:), intent(inout) :: rain, domr_diag, domzr_diag, domip_diag, doms_diag, tprcp, & + srflag, cnvprcp, totprcp, totice, totsnw, totgrp, cnvprcpb, & + totprcpb, toticeb, totsnwb, totgrpb, pwat + real(kind=kind_phys), dimension(:), intent(inout) :: rain_cpl, rainc_cpl, snow_cpl + + real(kind=kind_phys), dimension(:,:,:), intent(inout) :: dtend + integer, dimension(:,:), intent(in) :: dtidx ! Stochastic physics / surface perturbations - logical, intent(in) :: do_sppt, ca_global - real(kind=kind_phys), dimension(im,levs), intent(inout) :: dtdtr - real(kind=kind_phys), dimension(im,levs), intent(in) :: dtdtc - real(kind=kind_phys), dimension(im), intent(inout) :: drain_cpl - real(kind=kind_phys), dimension(im), intent(inout) :: dsnow_cpl + real(kind=kind_phys), dimension(:), intent(inout) :: drain_cpl, dsnow_cpl ! Rainfall variables previous time step integer, intent(in) :: lsm, lsm_ruc, lsm_noahmp - real(kind=kind_phys), dimension(im), intent(inout) :: raincprv - real(kind=kind_phys), dimension(im), intent(inout) :: rainncprv - real(kind=kind_phys), dimension(im), intent(inout) :: iceprv - real(kind=kind_phys), dimension(im), intent(inout) :: snowprv - real(kind=kind_phys), dimension(im), intent(inout) :: graupelprv - real(kind=kind_phys), dimension(im), intent(inout) :: draincprv - real(kind=kind_phys), dimension(im), intent(inout) :: drainncprv - real(kind=kind_phys), dimension(im), intent(inout) :: diceprv - real(kind=kind_phys), dimension(im), intent(inout) :: dsnowprv - real(kind=kind_phys), dimension(im), intent(inout) :: dgraupelprv - - real(kind=kind_phys), intent(in) :: dtp + real(kind=kind_phys), dimension(:), intent(inout) :: raincprv + real(kind=kind_phys), dimension(:), intent(inout) :: rainncprv + real(kind=kind_phys), dimension(:), intent(inout) :: iceprv + real(kind=kind_phys), dimension(:), intent(inout) :: snowprv + real(kind=kind_phys), dimension(:), intent(inout) :: graupelprv + real(kind=kind_phys), dimension(:), intent(inout) :: draincprv + real(kind=kind_phys), dimension(:), intent(inout) :: drainncprv + real(kind=kind_phys), dimension(:), intent(inout) :: diceprv + real(kind=kind_phys), dimension(:), intent(inout) :: dsnowprv + real(kind=kind_phys), dimension(:), intent(inout) :: dgraupelprv + + real(kind=kind_phys), intent(in) :: dtp ! CCPP error handling character(len=*), intent(out) :: errmsg @@ -150,7 +150,7 @@ subroutine GFS_MP_generic_post_run(im, levs, kdt, nrcm, ncld, nncl, ntcw, ntrac, real(kind=kind_phys), parameter :: p850 = 85000.0_kind_phys ! *DH - integer :: i, k, ic + integer :: i, k, ic, itrac, idtend real(kind=kind_phys), parameter :: zero = 0.0_kind_phys, one = 1.0_kind_phys real(kind=kind_phys) :: crain, csnow, onebg, tem, total_precip, tem1, tem2 @@ -321,7 +321,7 @@ subroutine GFS_MP_generic_post_run(im, levs, kdt, nrcm, ncld, nncl, ntcw, ntrac, endif endif - if (lssav) then + if_save_fields: if (lssav) then ! if (Model%me == 0) print *,'in phys drive, kdt=',Model%kdt, & ! 'totprcpb=', Diag%totprcpb(1),'totprcp=',Diag%totprcp(1), & ! 'rain=',Diag%rain(1) @@ -339,21 +339,29 @@ subroutine GFS_MP_generic_post_run(im, levs, kdt, nrcm, ncld, nncl, ntcw, ntrac, totgrpb (i) = totgrpb (i) + graupel(i) enddo - if (ldiag3d) then - do k=1,levs - do i=1,im - dt3dt(i,k) = dt3dt(i,k) + (gt0(i,k)-save_t(i,k)) * frain - enddo - enddo - if (qdiag3d) then - do k=1,levs - do i=1,im - dq3dt(i,k) = dq3dt(i,k) + (gq0(i,k,1)-save_qv(i,k)) * frain - enddo - enddo - endif - endif - endif + if_tendency_diagnostics: if (ldiag3d) then + idtend = dtidx(index_of_temperature,index_of_process_mp) + if(idtend>=1) then + do k=1,levs + do i=1,im + dtend(i,k,idtend) = dtend(i,k,idtend) + (gt0(i,k)-save_t(i,k)) * frain + enddo + enddo + endif + if_tracer_diagnostics: if (qdiag3d) then + dtend_q: do itrac=1,ntrac + idtend = dtidx(itrac+100,index_of_process_mp) + if(idtend>=1) then + do k=1,levs + do i=1,im + dtend(i,k,idtend) = dtend(i,k,idtend) + (gq0(i,k,itrac)-save_q(i,k,itrac)) * frain + enddo + enddo + endif + enddo dtend_q + endif if_tracer_diagnostics + endif if_tendency_diagnostics + endif if_save_fields if (cplflx .or. cplchm) then do i = 1, im @@ -375,7 +383,7 @@ subroutine GFS_MP_generic_post_run(im, levs, kdt, nrcm, ncld, nncl, ntcw, ntrac, do i=1, im work1(i) = zero enddo - if (ncld > 0) then + if (nncl > 0) then do ic = ntcw, ntcw+nncl-1 do i=1,im work1(i) = work1(i) + gq0(i,k,ic) @@ -390,11 +398,6 @@ subroutine GFS_MP_generic_post_run(im, levs, kdt, nrcm, ncld, nncl, ntcw, ntrac, pwat(i) = pwat(i) * onebg enddo - ! Stochastic physics / surface perturbations - if (do_sppt .or. ca_global) then -!--- radiation heating rate - dtdtr(1:im,:) = dtdtr(1:im,:) + dtdtc(1:im,:)*dtf - endif end subroutine GFS_MP_generic_post_run !> @} diff --git a/physics/GFS_MP_generic.meta b/physics/GFS_MP_generic.meta index 2ddbdee55..30de79201 100644 --- a/physics/GFS_MP_generic.meta +++ b/physics/GFS_MP_generic.meta @@ -16,7 +16,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -24,7 +24,7 @@ intent = in optional = F [ldiag3d] - standard_name = flag_diagnostics_3D + standard_name = flag_for_diagnostics_3D long_name = logical flag for 3D diagnostics units = flag dimensions = () @@ -32,7 +32,7 @@ intent = in optional = F [qdiag3d] - standard_name = flag_tracer_diagnostics_3D + standard_name = flag_for_tracer_diagnostics_3D long_name = logical flag for 3D tracer diagnostics units = flag dimensions = () @@ -48,7 +48,7 @@ intent = in optional = F [ntcw] - standard_name = index_for_liquid_cloud_condensate + standard_name = index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array long_name = tracer index for cloud condensate (or liquid water) units = index dimensions = () @@ -56,8 +56,8 @@ intent = in optional = F [nncl] - standard_name = number_of_tracers_for_cloud_condensate - long_name = number of tracers for cloud condensate + standard_name = number_of_condensate_species + long_name = number of cloud condensate types units = count dimensions = () type = integer @@ -72,19 +72,19 @@ intent = in optional = F [gt0] - standard_name = air_temperature_updated_by_physics + standard_name = air_temperature_of_new_state long_name = temperature updated by physics units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [gq0] - standard_name = tracer_concentration_updated_by_physics + standard_name = tracer_concentration_of_new_state long_name = tracer concentration updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = in @@ -93,25 +93,16 @@ standard_name = air_temperature_save long_name = air temperature before entering a physics scheme units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F -[save_qv] - standard_name = water_vapor_specific_humidity_save - long_name = water vapor specific humidity before entering a physics scheme - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = out - optional = F [save_q] standard_name = tracer_concentration_save long_name = tracer concentration before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = inout @@ -153,7 +144,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -161,7 +152,7 @@ intent = in optional = F [kdt] - standard_name = index_of_time_step + standard_name = index_of_timestep long_name = current time step index units = index dimensions = () @@ -178,31 +169,23 @@ intent = in optional = F [nrcm] - standard_name = array_dimension_of_random_number + standard_name = number_of_random_numbers long_name = second dimension of random number stream for RAS units = count dimensions = () type = integer intent = in optional = F -[ncld] - standard_name = number_of_hydrometeors - long_name = choice of cloud scheme / number of hydrometeors - units = count - dimensions = () - type = integer - intent = in - optional = F [nncl] - standard_name = number_of_tracers_for_cloud_condensate - long_name = number of tracers for cloud condensate + standard_name = number_of_condensate_species + long_name = number of cloud condensate types units = count dimensions = () type = integer intent = in optional = F [ntcw] - standard_name = index_for_liquid_cloud_condensate + standard_name = index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array long_name = tracer index for cloud condensate (or liquid water) units = index dimensions = () @@ -218,7 +201,7 @@ intent = in optional = F [imp_physics] - standard_name = flag_for_microphysics_scheme + standard_name = control_for_microphysics_scheme long_name = choice of microphysics scheme units = flag dimensions = () @@ -226,7 +209,7 @@ intent = in optional = F [imp_physics_gfdl] - standard_name = flag_for_gfdl_microphysics_scheme + standard_name = identifier_for_gfdl_microphysics_scheme long_name = choice of GFDL microphysics scheme units = flag dimensions = () @@ -234,7 +217,7 @@ intent = in optional = F [imp_physics_thompson] - standard_name = flag_for_thompson_microphysics_scheme + standard_name = identifier_for_thompson_microphysics_scheme long_name = choice of Thompson microphysics scheme units = flag dimensions = () @@ -242,7 +225,7 @@ intent = in optional = F [imp_physics_mg] - standard_name = flag_for_morrison_gettelman_microphysics_scheme + standard_name = identifier_for_morrison_gettelman_microphysics_scheme long_name = choice of Morrison-Gettelman microphysics scheme units = flag dimensions = () @@ -250,7 +233,7 @@ intent = in optional = F [imp_physics_fer_hires] - standard_name = flag_for_fer_hires_microphysics_scheme + standard_name = identifier_for_fer_hires_microphysics_scheme long_name = choice of Ferrier-Aligo microphysics scheme units = flag dimensions = () @@ -258,39 +241,15 @@ intent = in optional = F [cal_pre] - standard_name = flag_for_precipitation_type_algorithm + standard_name = flag_for_dominant_precipitation_type_partition long_name = flag controls precip type algorithm units = flag dimensions = () type = logical intent = in optional = F -[lssav] - standard_name = flag_diagnostics - long_name = logical flag for storing diagnostics - units = flag - dimensions = () - type = logical - intent = in - optional = F -[ldiag3d] - standard_name = flag_diagnostics_3D - long_name = flag for 3d diagnostic fields - units = flag - dimensions = () - type = logical - intent = in - optional = F -[qdiag3d] - standard_name = flag_tracer_diagnostics_3D - long_name = logical flag for 3D tracer diagnostics - units = flag - dimensions = () - type = logical - intent = in - optional = F [cplflx] - standard_name = flag_for_flux_coupling + standard_name = flag_for_surface_flux_coupling long_name = flag controlling cplflx collection (default off) units = flag dimensions = () @@ -315,7 +274,7 @@ intent = in optional = F [dtf] - standard_name = time_step_for_dynamics + standard_name = timestep_for_dynamics long_name = dynamics timestep units = s dimensions = () @@ -339,7 +298,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = in + intent = inout optional = F [rain1] standard_name = lwe_thickness_of_explicit_precipitation_amount @@ -351,10 +310,10 @@ intent = in optional = F [rann] - standard_name = random_number_array + standard_name = random_number long_name = random number array (0-1) units = none - dimensions = (horizontal_loop_extent,array_dimension_of_random_number) + dimensions = (horizontal_loop_extent,number_of_random_numbers) type = real kind = kind_phys intent = in @@ -378,19 +337,19 @@ intent = in optional = F [gt0] - standard_name = air_temperature_updated_by_physics + standard_name = air_temperature_of_new_state long_name = temperature updated by physics units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [gq0] - standard_name = tracer_concentration_updated_by_physics + standard_name = tracer_concentration_of_new_state long_name = tracer concentration updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = in @@ -399,7 +358,7 @@ standard_name = air_pressure long_name = layer mean pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -408,7 +367,7 @@ standard_name = air_pressure_at_interface long_name = pressure at layer interface units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -417,7 +376,7 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -462,19 +421,19 @@ standard_name = air_temperature_save long_name = air temperature before entering a physics scheme units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F -[save_qv] - standard_name = water_vapor_specific_humidity_save - long_name = water vapor specific humidity before entering a physics scheme +[save_q] + standard_name = tracer_concentration_save + long_name = tracer concentration before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys - intent = in + intent = inout optional = F [rain0] standard_name = lwe_thickness_of_explicit_rain_amount @@ -516,7 +475,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = air pressure difference between midlayers units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -576,7 +535,7 @@ intent = inout optional = F [srflag] - standard_name = flag_for_precipitation_type + standard_name = precipitation_type long_name = snow/rain flag for precipitation units = flag dimensions = (horizontal_loop_extent) @@ -683,26 +642,8 @@ kind = kind_phys intent = inout optional = F -[dt3dt] - standard_name = cumulative_change_in_temperature_due_to_microphysics - long_name = cumulative change in temperature due to microphysics - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[dq3dt] - standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_microphysics - long_name = cumulative change in water vapor specific humidity due to microphysics - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F [rain_cpl] - standard_name = lwe_thickness_of_precipitation_amount_for_coupling + standard_name = cumulative_lwe_thickness_of_precipitation_amount_for_coupling long_name = total rain precipitation units = m dimensions = (horizontal_loop_extent) @@ -711,7 +652,7 @@ intent = inout optional = F [rainc_cpl] - standard_name = lwe_thickness_of_convective_precipitation_amount_for_coupling + standard_name = cumulative_lwe_thickness_of_convective_precipitation_amount_for_coupling long_name = total convective precipitation units = m dimensions = (horizontal_loop_extent) @@ -720,7 +661,7 @@ intent = inout optional = F [snow_cpl] - standard_name = lwe_thickness_of_snow_amount_for_coupling + standard_name = cumulative_lwe_thickness_of_snow_amount_for_coupling long_name = total snow precipitation units = m dimensions = (horizontal_loop_extent) @@ -737,42 +678,8 @@ kind = kind_phys intent = inout optional = F -[do_sppt] - standard_name = flag_for_stochastic_physics_perturbations - long_name = flag for stochastic physics perturbations - units = flag - dimensions = () - type = logical - intent = in - optional = F -[ca_global] - standard_name = flag_for_global_cellular_automata - long_name = switch for global ca - units = flag - dimensions = () - type = logical - intent = in - optional = F -[dtdtr] - standard_name = tendency_of_air_temperature_due_to_radiative_heating_on_physics_time_step - long_name = temp. change due to radiative heating per time step - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[dtdtc] - standard_name = tendency_of_air_temperature_due_to_radiative_heating_assuming_clear_sky - long_name = clear sky radiative (shortwave + longwave) heating rate at current time - units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F [drain_cpl] - standard_name = tendency_of_lwe_thickness_of_precipitation_amount_for_coupling + standard_name = tendency_of_lwe_thickness_of_rain_amount_on_dynamics_timestep_for_coupling long_name = change in rain_cpl (coupling_type) units = m dimensions = (horizontal_loop_extent) @@ -781,7 +688,7 @@ intent = inout optional = F [dsnow_cpl] - standard_name = tendency_of_lwe_thickness_of_snow_amount_for_coupling + standard_name = tendency_of_lwe_thickness_of_snowfall_amount_on_dynamics_timestep_for_coupling long_name = change in show_cpl (coupling_type) units = m dimensions = (horizontal_loop_extent) @@ -790,7 +697,7 @@ intent = inout optional = F [lsm] - standard_name = flag_for_land_surface_scheme + standard_name = control_for_land_surface_scheme long_name = flag for land surface model units = flag dimensions = () @@ -798,7 +705,7 @@ intent = in optional = F [lsm_ruc] - standard_name = flag_for_ruc_land_surface_scheme + standard_name = identifier_for_ruc_land_surface_scheme long_name = flag for RUC land surface model units = flag dimensions = () @@ -806,7 +713,7 @@ intent = in optional = F [lsm_noahmp] - standard_name = flag_for_noahmp_land_surface_scheme + standard_name = identifier_for_noahmp_land_surface_scheme long_name = flag for NOAH MP land surface model units = flag dimensions = () @@ -814,7 +721,7 @@ intent = in optional = F [raincprv] - standard_name = lwe_thickness_of_convective_precipitation_amount_from_previous_timestep + standard_name = lwe_thickness_of_convective_precipitation_amount_on_previous_timestep long_name = convective_precipitation_amount from previous timestep units = m dimensions = (horizontal_loop_extent) @@ -823,7 +730,7 @@ intent = inout optional = F [rainncprv] - standard_name = lwe_thickness_of_explicit_rainfall_amount_from_previous_timestep + standard_name = lwe_thickness_of_explicit_precipitation_amount_on_previous_timestep long_name = explicit rainfall from previous timestep units = m dimensions = (horizontal_loop_extent) @@ -832,7 +739,7 @@ intent = inout optional = F [iceprv] - standard_name = lwe_thickness_of_ice_amount_from_previous_timestep + standard_name = lwe_thickness_of_ice_precipitation_amount_on_previous_timestep long_name = ice amount from previous timestep units = m dimensions = (horizontal_loop_extent) @@ -841,7 +748,7 @@ intent = inout optional = F [snowprv] - standard_name = lwe_thickness_of_snow_amount_from_previous_timestep + standard_name = snow_mass_on_previous_timestep long_name = snow amount from previous timestep units = m dimensions = (horizontal_loop_extent) @@ -850,7 +757,7 @@ intent = inout optional = F [graupelprv] - standard_name = lwe_thickness_of_graupel_amount_from_previous_timestep + standard_name = lwe_thickness_of_graupel_amount_on_previous_timestep long_name = graupel amount from previous timestep units = m dimensions = (horizontal_loop_extent) @@ -859,7 +766,7 @@ intent = inout optional = F [draincprv] - standard_name = convective_precipitation_rate_from_previous_timestep + standard_name = convective_precipitation_rate_on_previous_timestep long_name = convective precipitation rate from previous timestep units = mm s-1 dimensions = (horizontal_loop_extent) @@ -868,7 +775,7 @@ intent = inout optional = F [drainncprv] - standard_name = explicit_rainfall_rate_from_previous_timestep + standard_name = explicit_precipitation_rate_on_previous_timestep long_name = explicit rainfall rate previous timestep units = mm s-1 dimensions = (horizontal_loop_extent) @@ -877,7 +784,7 @@ intent = inout optional = F [diceprv] - standard_name = ice_precipitation_rate_from_previous_timestep + standard_name = ice_precipitation_rate_on_previous_timestep long_name = ice precipitation rate from previous timestep units = mm s-1 dimensions = (horizontal_loop_extent) @@ -886,7 +793,7 @@ intent = inout optional = F [dsnowprv] - standard_name = snow_precipitation_rate_from_previous_timestep + standard_name = snowfall_rate_on_previous_timestep long_name = snow precipitation rate from previous timestep units = mm s-1 dimensions = (horizontal_loop_extent) @@ -895,7 +802,7 @@ intent = inout optional = F [dgraupelprv] - standard_name = graupel_precipitation_rate_from_previous_timestep + standard_name = graupel_precipitation_rate_on_previous_timestep long_name = graupel precipitation rate from previous timestep units = mm s-1 dimensions = (horizontal_loop_extent) @@ -904,7 +811,7 @@ intent = inout optional = F [dtp] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics timestep units = s dimensions = () @@ -912,6 +819,63 @@ kind = kind_phys intent = in optional = F +[dtend] + standard_name = cumulative_change_of_state_variables + long_name = diagnostic tendencies for state variables + units = various + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_cumulative_change_processes) + type = real + kind = kind_phys + intent = inout + optional = F +[dtidx] + standard_name = cumulative_change_of_state_variables_outer_index + long_name = index of state-variable and process in last dimension of diagnostic tendencies array AKA cumulative_change_index + units = index + dimensions = (number_of_tracers_plus_one_hundred,number_of_causes) + type = integer + intent = in + optional = F +[index_of_temperature] + standard_name = index_of_temperature_in_cumulative_change_index + long_name = index of temperature in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_process_mp] + standard_name = index_of_microphysics_process_process_in_cumulative_change_index + long_name = index of microphysics transport process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[ldiag3d] + standard_name = flag_for_diagnostics_3D + long_name = flag for 3d diagnostic fields + units = flag + dimensions = () + type = logical + intent = in + optional = F +[qdiag3d] + standard_name = flag_for_tracer_diagnostics_3D + long_name = logical flag for 3D tracer diagnostics + units = flag + dimensions = () + type = logical + intent = in + optional = F +[lssav] + standard_name = flag_for_diagnostics + long_name = logical flag for storing diagnostics + units = flag + dimensions = () + type = logical + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/GFS_PBL_generic.F90 b/physics/GFS_PBL_generic.F90 index 357309b2a..63e622204 100644 --- a/physics/GFS_PBL_generic.F90 +++ b/physics/GFS_PBL_generic.F90 @@ -79,33 +79,34 @@ end subroutine GFS_PBL_generic_pre_finalize !! \section arg_table_GFS_PBL_generic_pre_run Argument Table !! \htmlinclude GFS_PBL_generic_pre_run.html !! - subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, & + subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, rtg_ozone_index, & ntqv, ntcw, ntiw, ntrw, ntsw, ntlnc, ntinc, ntrnc, ntsnc, ntgnc, & ntwa, ntia, ntgl, ntoz, ntke, ntkev, nqrimef, trans_aero, ntchs, ntchm, & imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6, & - imp_physics_zhao_carr, imp_physics_mg, imp_physics_fer_hires, cplchm, ltaerosol, & + imp_physics_zhao_carr, imp_physics_mg, imp_physics_fer_hires, ltaerosol, & hybedmf, do_shoc, satmedmf, qgrs, vdftra, save_u, save_v, save_t, save_q, & - ldiag3d, qdiag3d, lssav, ugrs, vgrs, tgrs, errmsg, errflg) - + flag_for_pbl_generic_tend, ldiag3d, qdiag3d, lssav, ugrs, vgrs, tgrs, errmsg, errflg) + use machine, only : kind_phys use GFS_PBL_generic_common, only : set_aerosol_tracer_index implicit none integer, parameter :: kp = kind_phys + integer, intent(out) :: rtg_ozone_index integer, intent(in) :: im, levs, nvdiff, ntrac integer, intent(in) :: ntqv, ntcw, ntiw, ntrw, ntsw, ntlnc, ntinc, ntrnc, ntsnc, ntgnc integer, intent(in) :: ntwa, ntia, ntgl, ntoz, ntke, ntkev, nqrimef,ntchs, ntchm logical, intent(in) :: trans_aero, ldiag3d, qdiag3d, lssav integer, intent(in) :: imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6 integer, intent(in) :: imp_physics_zhao_carr, imp_physics_mg, imp_physics_fer_hires - logical, intent(in) :: cplchm, ltaerosol, hybedmf, do_shoc, satmedmf + logical, intent(in) :: ltaerosol, hybedmf, do_shoc, satmedmf, flag_for_pbl_generic_tend - real(kind=kind_phys), dimension(im, levs, ntrac), intent(in) :: qgrs - real(kind=kind_phys), dimension(im, levs), intent(in) :: ugrs, vgrs, tgrs - real(kind=kind_phys), dimension(im, levs, nvdiff), intent(inout) :: vdftra - real(kind=kind_phys), dimension(im, levs), intent(out) :: save_u, save_v, save_t - real(kind=kind_phys), dimension(im, levs, ntrac), intent(out) :: save_q + real(kind=kind_phys), dimension(:,:,:), intent(in) :: qgrs + real(kind=kind_phys), dimension(:,:), intent(in) :: ugrs, vgrs, tgrs + real(kind=kind_phys), dimension(:,:, :), intent(inout) :: vdftra + real(kind=kind_phys), dimension(:,:), intent(out) :: save_u, save_v, save_t + real(kind=kind_phys), dimension(:,:, :), intent(out) :: save_q ! CCPP error handling variables character(len=*), intent(out) :: errmsg @@ -120,9 +121,11 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, errmsg = '' errflg = 0 + rtg_ozone_index=-1 !DH: dvdftra is only used if nvdiff != ntrac or (nvdiff == ntrac .and. ) if (nvdiff == ntrac .and. (hybedmf .or. do_shoc .or. satmedmf)) then vdftra = qgrs + rtg_ozone_index = ntoz else if (imp_physics == imp_physics_wsm6) then ! WSM6 @@ -134,6 +137,7 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, vdftra(i,k,4) = qgrs(i,k,ntoz) enddo enddo + rtg_ozone_index = 4 ! Ferrier-Aligo elseif (imp_physics == imp_physics_fer_hires) then @@ -147,6 +151,7 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, vdftra(i,k,6) = qgrs(i,k,ntoz) enddo enddo + rtg_ozone_index = 6 elseif (imp_physics == imp_physics_thompson) then ! Thompson @@ -167,6 +172,7 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, vdftra(i,k,12) = qgrs(i,k,ntia) enddo enddo + rtg_ozone_index = 10 else do k=1,levs do i=1,im @@ -181,6 +187,7 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, vdftra(i,k,9) = qgrs(i,k,ntoz) enddo enddo + rtg_ozone_index = 9 endif ! MG elseif (imp_physics == imp_physics_mg) then ! MG3/2 @@ -201,6 +208,7 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, vdftra(i,k,12) = qgrs(i,k,ntoz) enddo enddo + rtg_ozone_index = 12 else ! MG2 do k=1,levs do i=1,im @@ -216,6 +224,7 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, vdftra(i,k,10) = qgrs(i,k,ntoz) enddo enddo + rtg_ozone_index = 10 endif elseif (imp_physics == imp_physics_gfdl) then ! GFDL MP @@ -230,6 +239,7 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, vdftra(i,k,7) = qgrs(i,k,ntoz) enddo enddo + rtg_ozone_index = 7 elseif (imp_physics == imp_physics_zhao_carr) then ! Zhao/Carr/Sundqvist do k=1,levs @@ -239,6 +249,7 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, vdftra(i,k,3) = qgrs(i,k,ntoz) enddo enddo + rtg_ozone_index = 3 endif ! if (trans_aero) then @@ -247,7 +258,7 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, imp_physics_mg, ntgl, imp_physics_gfdl, & imp_physics_zhao_carr, kk, & errmsg, errflg) - if (.not.errflg==1) return + if (errflg /= 0) return ! k1 = kk do n=ntchs,ntchm+ntchs-1 @@ -270,7 +281,7 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, ! endif - if(ldiag3d .and. lssav) then + if(ldiag3d .and. lssav .and. flag_for_pbl_generic_tend) then do k=1,levs do i=1,im save_t(i,k) = tgrs(i,k) @@ -285,6 +296,13 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, save_q(i,k,ntoz) = qgrs(i,k,ntoz) enddo enddo + if(ntke>0) then + do k=1,levs + do i=1,im + save_q(i,k,ntke) = qgrs(i,k,ntke) + enddo + enddo + endif endif endif @@ -311,13 +329,13 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, trans_aero, ntchs, ntchm, & imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6, imp_physics_zhao_carr, imp_physics_mg, & imp_physics_fer_hires, & - ltaerosol, cplflx, cplchm, lssav, flag_for_pbl_generic_tend, ldiag3d, qdiag3d, lsidea, hybedmf, do_shoc, satmedmf, & + ltaerosol, cplflx, cplchm, lssav, flag_for_pbl_generic_tend, ldiag3d, lsidea, hybedmf, do_shoc, satmedmf, & shinhong, do_ysu, dvdftra, dusfc1, dvsfc1, dtsfc1, dqsfc1, dtf, dudt, dvdt, dtdt, htrsw, htrlw, xmu, & - dqdt, dusfc_cpl, dvsfc_cpl, dtsfc_cpl, & - dqsfc_cpl, dusfci_cpl, dvsfci_cpl, dtsfci_cpl, dqsfci_cpl, dusfc_diag, dvsfc_diag, dtsfc_diag, dqsfc_diag, & - dusfci_diag, dvsfci_diag, dtsfci_diag, dqsfci_diag, dt3dt, du3dt_PBL, du3dt_OGWD, dv3dt_PBL, dv3dt_OGWD, dq3dt, & - dq3dt_ozone, rd, cp, fvirt, hvap, t1, q1, prsl, hflx, ushfsfci, oceanfrac, flag_cice, dusfc_cice, dvsfc_cice, & - dtsfc_cice, dqsfc_cice, wet, dry, icy, wind, stress_wat, hflx_wat, evap_wat, ugrs1, vgrs1, dkt_cpl, dkt, hffac, hefac, & + dqdt, dusfc_cpl, dvsfc_cpl, dtsfc_cpl, dtend, dtidx, index_of_temperature, index_of_x_wind, index_of_y_wind, & + index_of_process_pbl, dqsfc_cpl, dusfci_cpl, dvsfci_cpl, dtsfci_cpl, dqsfci_cpl, dusfc_diag, dvsfc_diag, dtsfc_diag, & + dqsfc_diag, dusfci_diag, dvsfci_diag, dtsfci_diag, dqsfci_diag, & + rd, cp, fvirt, hvap, t1, q1, prsl, hflx, ushfsfci, oceanfrac, kdt, dusfc_cice, dvsfc_cice, & + dtsfc_cice, dqsfc_cice, wet, dry, icy, wind, stress_wat, hflx_wat, evap_wat, ugrs1, vgrs1, hffac, & ugrs, vgrs, tgrs, qgrs, save_u, save_v, save_t, save_q, errmsg, errflg) use machine, only : kind_phys @@ -326,18 +344,17 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, implicit none integer, parameter :: kp = kind_phys - integer, intent(in) :: im, levs, nvdiff, ntrac, ntchs, ntchm + integer, intent(in) :: im, levs, nvdiff, ntrac, ntchs, ntchm, kdt integer, intent(in) :: ntqv, ntcw, ntiw, ntrw, ntsw, ntlnc, ntinc, ntrnc, ntsnc, ntgnc, ntwa, ntia, ntgl, ntoz, ntke, ntkev, nqrimef logical, intent(in) :: trans_aero integer, intent(in) :: imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6 integer, intent(in) :: imp_physics_zhao_carr, imp_physics_mg, imp_physics_fer_hires - logical, intent(in) :: ltaerosol, cplflx, cplchm, lssav, ldiag3d, qdiag3d, lsidea + logical, intent(in) :: ltaerosol, cplflx, cplchm, lssav, ldiag3d, lsidea logical, intent(in) :: hybedmf, do_shoc, satmedmf, shinhong, do_ysu - logical, dimension(:), intent(in) :: flag_cice logical, intent(in) :: flag_for_pbl_generic_tend - real(kind=kind_phys), dimension(im, levs), intent(in) :: save_u, save_v, save_t - real(kind=kind_phys), dimension(im, levs, ntrac), intent(in) :: save_q + real(kind=kind_phys), dimension(:,:), intent(in) :: save_u, save_v, save_t + real(kind=kind_phys), dimension(:,:, :), intent(in) :: save_q real(kind=kind_phys), intent(in) :: dtf real(kind=kind_phys), intent(in) :: rd, cp, fvirt, hvap @@ -346,31 +363,30 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, real(kind=kind_phys), dimension(:), intent(in) :: dusfc_cice, dvsfc_cice, dtsfc_cice, dqsfc_cice, & wind, stress_wat, hflx_wat, evap_wat, ugrs1, vgrs1 - real(kind=kind_phys), dimension(im, levs, ntrac), intent(in) :: qgrs - real(kind=kind_phys), dimension(im, levs), intent(in) :: ugrs, vgrs, tgrs + real(kind=kind_phys), dimension(:,:, :), intent(in) :: qgrs + real(kind=kind_phys), dimension(:,:), intent(in) :: ugrs, vgrs, tgrs - real(kind=kind_phys), dimension(im, levs, nvdiff), intent(in) :: dvdftra - real(kind=kind_phys), dimension(im), intent(in) :: dusfc1, dvsfc1, dtsfc1, dqsfc1, xmu - real(kind=kind_phys), dimension(im, levs), intent(in) :: dudt, dvdt, dtdt, htrsw, htrlw + real(kind=kind_phys), dimension(:,:, :), intent(in) :: dvdftra + real(kind=kind_phys), dimension(:), intent(in) :: dusfc1, dvsfc1, dtsfc1, dqsfc1, xmu + real(kind=kind_phys), dimension(:,:), intent(in) :: dudt, dvdt, dtdt, htrsw, htrlw - real(kind=kind_phys), dimension(im, levs, ntrac), intent(inout) :: dqdt + real(kind=kind_phys), dimension(:,:, :), intent(inout) :: dqdt ! The following arrays may not be allocated, depending on certain flags (cplflx, ...). ! Since Intel 15 crashes when passing unallocated arrays to arrays defined with explicit shape, ! use assumed-shape arrays. Note that Intel 18 and GNU 6.2.0-8.1.0 tolerate explicit-shape arrays ! as long as these do not get used when not allocated. - real(kind=kind_phys), dimension(:,:), intent(inout) :: dt3dt, du3dt_PBL, du3dt_OGWD, dv3dt_PBL, dv3dt_OGWD, dq3dt, dq3dt_ozone real(kind=kind_phys), dimension(:), intent(inout) :: dusfc_cpl, dvsfc_cpl, dtsfc_cpl, dqsfc_cpl, dusfci_cpl, dvsfci_cpl, & dtsfci_cpl, dqsfci_cpl, dusfc_diag, dvsfc_diag, dtsfc_diag, dqsfc_diag, dusfci_diag, dvsfci_diag, dtsfci_diag, dqsfci_diag + real(kind=kind_phys), intent(inout), optional :: dtend(:,:,:) + integer, intent(in) :: dtidx(:,:) + integer, intent(in) :: index_of_temperature, index_of_x_wind, index_of_y_wind, index_of_process_pbl logical, dimension(:),intent(in) :: wet, dry, icy real(kind=kind_phys), dimension(:), intent(out) :: ushfsfci - real(kind=kind_phys), dimension(:,:), intent(inout) :: dkt_cpl - real(kind=kind_phys), dimension(:,:), intent(in) :: dkt - ! From canopy heat storage - reduction factors in latent/sensible heat flux due to surface roughness - real(kind=kind_phys), dimension(im), intent(in) :: hffac, hefac + real(kind=kind_phys), dimension(:), intent(in) :: hffac character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -380,7 +396,8 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, real(kind=kind_phys), parameter :: qmin = 1.0e-8_kp integer :: i, k, kk, k1, n real(kind=kind_phys) :: tem, rho - + integer :: idtend + ! Initialize CCPP error handling variables errmsg = '' errflg = 0 @@ -404,7 +421,7 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, imp_physics_mg, ntgl, imp_physics_gfdl, & imp_physics_zhao_carr, kk, & errmsg, errflg) - if (.not.errflg==1) return + if (errflg /= 0) return ! k1 = kk do n=ntchs,ntchm+ntchs-1 @@ -533,31 +550,21 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, endif ! nvdiff == ntrac - if (cplchm) then - do i = 1, im - tem = prsl(i,1) / (rd*t1(i)*(one+fvirt*max(q1(i), qmin))) - ushfsfci(i) = -cp * tem * hflx(i) ! upward sensible heat flux - enddo - ! dkt_cpl has dimensions (1:im,1:levs), but dkt has (1:im,1:levs-1) - dkt_cpl(1:im,1:levs-1) = dkt(1:im,1:levs-1) - endif - - ! --- ... coupling insertion if (cplflx) then do i=1,im - if (oceanfrac(i) > zero) then ! Ocean only, NO LAKES + if (oceanfrac(i) > zero) then ! Ocean only, NO LAKES if ( .not. wet(i)) then ! no open water - if (flag_cice(i)) then !use results from CICE + if (kdt > 1) then !use results from CICE dusfci_cpl(i) = dusfc_cice(i) dvsfci_cpl(i) = dvsfc_cice(i) dtsfci_cpl(i) = dtsfc_cice(i) dqsfci_cpl(i) = dqsfc_cice(i) - else !use PBL fluxes when CICE fluxes is unavailable + else !use PBL fluxes when CICE fluxes is unavailable dusfci_cpl(i) = dusfc1(i) dvsfci_cpl(i) = dvsfc1(i) - dtsfci_cpl(i) = dtsfc1(i) + dtsfci_cpl(i) = dtsfc1(i)*hffac(i) dqsfci_cpl(i) = dqsfc1(i) end if elseif (icy(i) .or. dry(i)) then ! use stress_ocean from sfc_diff for opw component at mixed point @@ -576,7 +583,7 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, dusfci_cpl(i) = dusfc1(i) dvsfci_cpl(i) = dvsfc1(i) dtsfci_cpl(i) = dtsfc1(i)*hffac(i) - dqsfci_cpl(i) = dqsfc1(i)*hefac(i) + dqsfci_cpl(i) = dqsfc1(i) endif ! dusfc_cpl (i) = dusfc_cpl(i) + dusfci_cpl(i) * dtf @@ -594,6 +601,24 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, enddo endif + if (cplchm) then + if (cplflx) then + do i = 1, im + if (oceanfrac(i) > zero) then + ushfsfci(i) = dtsfci_cpl(i) + else + rho = prsl(i,1) / (rd*t1(i)*(one+fvirt*max(q1(i), qmin))) + ushfsfci(i) = cp * rho * hflx(i) + end if + end do + else + do i = 1, im + rho = prsl(i,1) / (rd*t1(i)*(one+fvirt*max(q1(i), qmin))) + ushfsfci(i) = cp * rho * hflx(i) + end do + end if + end if + !-------------------------------------------------------lssav if loop ---------- if (lssav) then do i=1,im @@ -602,34 +627,42 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, dusfci_diag(i) = dusfc1(i) dvsfci_diag(i) = dvsfc1(i) dtsfci_diag(i) = dtsfc1(i)*hffac(i) - dqsfci_diag(i) = dqsfc1(i)*hefac(i) + dqsfci_diag(i) = dqsfc1(i) dtsfc_diag (i) = dtsfc_diag(i) + dtsfci_diag(i) * dtf dqsfc_diag (i) = dqsfc_diag(i) + dqsfci_diag(i) * dtf enddo - if (ldiag3d .and. flag_for_pbl_generic_tend .and. lssav) then + if (ldiag3d .and. flag_for_pbl_generic_tend) then if (lsidea) then - dt3dt(1:im,:) = dt3dt(1:im,:) + dtdt(1:im,:)*dtf + idtend = dtidx(index_of_temperature, index_of_process_pbl) + if(idtend>=1) then + dtend(1:im,1:levs,idtend) = dtend(1:im,1:levs,idtend) + dtdt(1:im,1:levs)*dtf + endif else - do k=1,levs - do i=1,im - dt3dt(i,k) = dt3dt(i,k) + (tgrs(i,k) - save_t(i,k)) - enddo - enddo + idtend = dtidx(index_of_temperature, index_of_process_pbl) + if(idtend>=1) then + dtend(1:im,1:levs,idtend) = dtend(1:im,1:levs,idtend) + (tgrs(1:im,1:levs) - save_t(1:im,1:levs)) + endif endif - do k=1,levs - do i=1,im - du3dt_PBL(i,k) = du3dt_PBL(i,k) + (ugrs(i,k) - save_u(i,k)) - dv3dt_PBL(i,k) = dv3dt_PBL(i,k) + (vgrs(i,k) - save_v(i,k)) - enddo - enddo - if(qdiag3d) then - do k=1,levs - do i=1,im - dq3dt (i,k) = dq3dt (i,k) + (qgrs(i,k,ntqv)-save_q(i,k,ntqv)) - dq3dt_ozone(i,k) = dq3dt_ozone(i,k) + (qgrs(i,k,ntoz)-save_q(i,k,ntoz)) - enddo - enddo + idtend = dtidx(index_of_x_wind, index_of_process_pbl) + if(idtend>=1) then + dtend(1:im,1:levs,idtend) = dtend(1:im,1:levs,idtend) + (ugrs(1:im,1:levs) - save_u(1:im,1:levs)) + endif + idtend = dtidx(index_of_y_wind, index_of_process_pbl) + if(idtend>=1) then + dtend(1:im,1:levs,idtend) = dtend(1:im,1:levs,idtend) + (vgrs(1:im,1:levs) - save_v(1:im,1:levs)) + endif + idtend = dtidx(100+ntqv, index_of_process_pbl) + if(idtend>=1) then + dtend(1:im,1:levs,idtend) = dtend(1:im,1:levs,idtend) + qgrs(1:im,1:levs,ntqv) - save_q(1:im,1:levs,ntqv) + endif + idtend = dtidx(100+ntoz, index_of_process_pbl) + if(idtend>=1) then + dtend(1:im,1:levs,idtend) = dtend(1:im,1:levs,idtend) + qgrs(1:im,1:levs,ntoz) - save_q(1:im,1:levs,ntoz) + endif + idtend = dtidx(100+ntke, index_of_process_pbl) + if(idtend>=1) then + dtend(1:im,1:levs,idtend) = dtend(1:im,1:levs,idtend) + (qgrs(1:im,1:levs,ntke) - save_q(1:im,1:levs,ntke)) endif endif diff --git a/physics/GFS_PBL_generic.meta b/physics/GFS_PBL_generic.meta index 5e83b8ad4..074ab5b43 100644 --- a/physics/GFS_PBL_generic.meta +++ b/physics/GFS_PBL_generic.meta @@ -16,7 +16,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -39,8 +39,16 @@ type = integer intent = in optional = F +[rtg_ozone_index] + standard_name = vertically_diffused_tracer_index_of_ozone + long_name = number of tracers + units = count + dimensions = () + type = integer + intent = out + optional = F [ntqv] - standard_name = index_for_water_vapor + standard_name = index_of_specific_humidity_in_tracer_concentration_array long_name = tracer index for water vapor (specific humidity) units = index dimensions = () @@ -48,7 +56,7 @@ intent = in optional = F [ntcw] - standard_name = index_for_liquid_cloud_condensate + standard_name = index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array long_name = tracer index for cloud condensate (or liquid water) units = index dimensions = () @@ -56,7 +64,7 @@ intent = in optional = F [ntiw] - standard_name = index_for_ice_cloud_condensate + standard_name = index_of_cloud_ice_mixing_ratio_in_tracer_concentration_array long_name = tracer index for ice water units = index dimensions = () @@ -64,7 +72,7 @@ intent = in optional = F [ntrw] - standard_name = index_for_rain_water + standard_name = index_of_rain_mixing_ratio_in_tracer_concentration_array long_name = tracer index for rain water units = index dimensions = () @@ -72,7 +80,7 @@ intent = in optional = F [ntsw] - standard_name = index_for_snow_water + standard_name = index_of_snow_mixing_ratio_in_tracer_concentration_array long_name = tracer index for snow water units = index dimensions = () @@ -80,7 +88,7 @@ intent = in optional = F [ntlnc] - standard_name = index_for_liquid_cloud_number_concentration + standard_name = index_of_mass_number_concentration_of_cloud_droplets_in_tracer_concentration_array long_name = tracer index for liquid number concentration units = index dimensions = () @@ -88,7 +96,7 @@ intent = in optional = F [ntinc] - standard_name = index_for_ice_cloud_number_concentration + standard_name = index_of_mass_number_concentration_of_cloud_ice_in_tracer_concentration_array long_name = tracer index for ice number concentration units = index dimensions = () @@ -96,7 +104,7 @@ intent = in optional = F [ntrnc] - standard_name = index_for_rain_number_concentration + standard_name = index_of_mass_number_concentration_of_rain_in_tracer_concentration_array long_name = tracer index for rain number concentration units = index dimensions = () @@ -104,7 +112,7 @@ intent = in optional = F [ntsnc] - standard_name = index_for_snow_number_concentration + standard_name = index_of_mass_number_concentration_of_snow_in_tracer_concentration_array long_name = tracer index for snow number concentration units = index dimensions = () @@ -112,7 +120,7 @@ intent = in optional = F [ntgnc] - standard_name = index_for_graupel_number_concentration + standard_name = index_of_mass_number_concentration_of_graupel_in_tracer_concentration_array long_name = tracer index for graupel number concentration units = index dimensions = () @@ -120,7 +128,7 @@ intent = in optional = F [ntwa] - standard_name = index_for_water_friendly_aerosols + standard_name = index_of_mass_number_concentration_of_hygroscopic_aerosols_in_tracer_concentration_array long_name = tracer index for water friendly aerosol units = index dimensions = () @@ -128,7 +136,7 @@ intent = in optional = F [ntia] - standard_name = index_for_ice_friendly_aerosols + standard_name = index_of_mass_number_concentration_of_nonhygroscopic_ice_nucleating_aerosols_in_tracer_concentration_array long_name = tracer index for ice friendly aerosol units = index dimensions = () @@ -136,7 +144,7 @@ intent = in optional = F [ntgl] - standard_name = index_for_graupel + standard_name = index_of_graupel_mixing_ratio_in_tracer_concentration_array long_name = tracer index for graupel units = index dimensions = () @@ -144,7 +152,7 @@ intent = in optional = F [ntoz] - standard_name = index_for_ozone + standard_name = index_of_ozone_mixing_ratio_in_tracer_concentration_array long_name = tracer index for ozone mixing ratio units = index dimensions = () @@ -152,7 +160,7 @@ intent = in optional = F [ntke] - standard_name = index_for_turbulent_kinetic_energy + standard_name = index_of_turbulent_kinetic_energy_in_tracer_concentration_array long_name = tracer index for turbulent kinetic energy units = index dimensions = () @@ -168,7 +176,7 @@ intent = in optional = F [nqrimef] - standard_name = index_for_mass_weighted_rime_factor + standard_name = index_of_mass_weighted_rime_factor_in_tracer_concentration_array long_name = tracer index for mass weighted rime factor units = index dimensions = () @@ -184,7 +192,7 @@ intent = in optional = F [ntchs] - standard_name = index_for_first_chemical_tracer + standard_name = index_of_first_chemical_tracer_in_tracer_concentration_array long_name = tracer index for first chemical tracer units = index dimensions = () @@ -200,7 +208,7 @@ intent = in optional = F [imp_physics] - standard_name = flag_for_microphysics_scheme + standard_name = control_for_microphysics_scheme long_name = choice of microphysics scheme units = flag dimensions = () @@ -208,7 +216,7 @@ intent = in optional = F [imp_physics_gfdl] - standard_name = flag_for_gfdl_microphysics_scheme + standard_name = identifier_for_gfdl_microphysics_scheme long_name = choice of GFDL microphysics scheme units = flag dimensions = () @@ -216,7 +224,7 @@ intent = in optional = F [imp_physics_thompson] - standard_name = flag_for_thompson_microphysics_scheme + standard_name = identifier_for_thompson_microphysics_scheme long_name = choice of Thompson microphysics scheme units = flag dimensions = () @@ -224,7 +232,7 @@ intent = in optional = F [imp_physics_wsm6] - standard_name = flag_for_wsm6_microphysics_scheme + standard_name = identifier_for_wsm6_microphysics_scheme long_name = choice of WSM6 microphysics scheme units = flag dimensions = () @@ -232,7 +240,7 @@ intent = in optional = F [imp_physics_zhao_carr] - standard_name = flag_for_zhao_carr_microphysics_scheme + standard_name = identifier_for_zhao_carr_microphysics_scheme long_name = choice of Zhao-Carr microphysics scheme units = flag dimensions = () @@ -240,7 +248,7 @@ intent = in optional = F [imp_physics_mg] - standard_name = flag_for_morrison_gettelman_microphysics_scheme + standard_name = identifier_for_morrison_gettelman_microphysics_scheme long_name = choice of Morrison-Gettelman microphysics scheme units = flag dimensions = () @@ -248,21 +256,13 @@ intent = in optional = F [imp_physics_fer_hires] - standard_name = flag_for_fer_hires_microphysics_scheme + standard_name = identifier_for_fer_hires_microphysics_scheme long_name = choice of Ferrier-Aligo microphysics scheme units = flag dimensions = () type = integer intent = in optional = F -[cplchm] - standard_name = flag_for_chemistry_coupling - long_name = flag controlling cplchm collection (default off) - units = flag - dimensions = () - type = logical - intent = in - optional = F [ltaerosol] standard_name = flag_for_aerosol_physics long_name = flag for aerosol physics @@ -272,7 +272,7 @@ intent = in optional = F [hybedmf] - standard_name = flag_for_hedmf + standard_name = flag_for_hybrid_edmf_pbl_scheme long_name = flag for hybrid edmf pbl scheme (moninedmf) units = flag dimensions = () @@ -299,7 +299,7 @@ standard_name = tracer_concentration long_name = model layer mean tracer concentration units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = in @@ -308,7 +308,7 @@ standard_name = vertically_diffused_tracer_concentration long_name = tracer concentration diffused by PBL scheme units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_vertical_diffusion_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_vertical_diffusion_tracers) type = real kind = kind_phys intent = inout @@ -317,7 +317,7 @@ standard_name = x_wind_save long_name = x-wind before entering a physics scheme units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -326,7 +326,7 @@ standard_name = y_wind_save long_name = y-wind before entering a physics scheme units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -335,7 +335,7 @@ standard_name = air_temperature_save long_name = air temperature before entering a physics scheme units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -344,13 +344,21 @@ standard_name = tracer_concentration_save long_name = tracer concentration before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = out optional = F +[flag_for_pbl_generic_tend] + standard_name = flag_for_generic_tendency_due_to_planetary_boundary_layer + long_name = true if GFS_PBL_generic should calculate tendencies + units = flag + dimensions = () + type = logical + intent = in + optional = F [ldiag3d] - standard_name = flag_diagnostics_3D + standard_name = flag_for_diagnostics_3D long_name = flag for 3d diagnostic fields units = flag dimensions = () @@ -358,7 +366,7 @@ intent = in optional = F [qdiag3d] - standard_name = flag_tracer_diagnostics_3D + standard_name = flag_for_tracer_diagnostics_3D long_name = flag for 3d tracer diagnostic fields units = flag dimensions = () @@ -366,7 +374,7 @@ intent = in optional = F [lssav] - standard_name = flag_diagnostics + standard_name = flag_for_diagnostics long_name = logical flag for storing diagnostics units = flag dimensions = () @@ -377,7 +385,7 @@ standard_name = x_wind long_name = zonal wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -386,7 +394,7 @@ standard_name = y_wind long_name = meridional wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -395,7 +403,7 @@ standard_name = air_temperature long_name = model layer mean temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -437,7 +445,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -461,7 +469,7 @@ intent = in optional = F [ntqv] - standard_name = index_for_water_vapor + standard_name = index_of_specific_humidity_in_tracer_concentration_array long_name = tracer index for water vapor (specific humidity) units = index dimensions = () @@ -469,7 +477,7 @@ intent = in optional = F [ntcw] - standard_name = index_for_liquid_cloud_condensate + standard_name = index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array long_name = tracer index for cloud condensate (or liquid water) units = index dimensions = () @@ -477,7 +485,7 @@ intent = in optional = F [ntiw] - standard_name = index_for_ice_cloud_condensate + standard_name = index_of_cloud_ice_mixing_ratio_in_tracer_concentration_array long_name = tracer index for ice water units = index dimensions = () @@ -485,7 +493,7 @@ intent = in optional = F [ntrw] - standard_name = index_for_rain_water + standard_name = index_of_rain_mixing_ratio_in_tracer_concentration_array long_name = tracer index for rain water units = index dimensions = () @@ -493,7 +501,7 @@ intent = in optional = F [ntsw] - standard_name = index_for_snow_water + standard_name = index_of_snow_mixing_ratio_in_tracer_concentration_array long_name = tracer index for snow water units = index dimensions = () @@ -501,7 +509,7 @@ intent = in optional = F [ntlnc] - standard_name = index_for_liquid_cloud_number_concentration + standard_name = index_of_mass_number_concentration_of_cloud_droplets_in_tracer_concentration_array long_name = tracer index for liquid number concentration units = index dimensions = () @@ -509,7 +517,7 @@ intent = in optional = F [ntinc] - standard_name = index_for_ice_cloud_number_concentration + standard_name = index_of_mass_number_concentration_of_cloud_ice_in_tracer_concentration_array long_name = tracer index for ice number concentration units = index dimensions = () @@ -517,7 +525,7 @@ intent = in optional = F [ntrnc] - standard_name = index_for_rain_number_concentration + standard_name = index_of_mass_number_concentration_of_rain_in_tracer_concentration_array long_name = tracer index for rain number concentration units = index dimensions = () @@ -525,7 +533,7 @@ intent = in optional = F [ntsnc] - standard_name = index_for_snow_number_concentration + standard_name = index_of_mass_number_concentration_of_snow_in_tracer_concentration_array long_name = tracer index for snow number concentration units = index dimensions = () @@ -533,7 +541,7 @@ intent = in optional = F [ntgnc] - standard_name = index_for_graupel_number_concentration + standard_name = index_of_mass_number_concentration_of_graupel_in_tracer_concentration_array long_name = tracer index for graupel number concentration units = index dimensions = () @@ -541,7 +549,7 @@ intent = in optional = F [ntwa] - standard_name = index_for_water_friendly_aerosols + standard_name = index_of_mass_number_concentration_of_hygroscopic_aerosols_in_tracer_concentration_array long_name = tracer index for water friendly aerosol units = index dimensions = () @@ -549,7 +557,7 @@ intent = in optional = F [ntia] - standard_name = index_for_ice_friendly_aerosols + standard_name = index_of_mass_number_concentration_of_nonhygroscopic_ice_nucleating_aerosols_in_tracer_concentration_array long_name = tracer index for ice friendly aerosol units = index dimensions = () @@ -557,7 +565,7 @@ intent = in optional = F [ntgl] - standard_name = index_for_graupel + standard_name = index_of_graupel_mixing_ratio_in_tracer_concentration_array long_name = tracer index for graupel units = index dimensions = () @@ -565,7 +573,7 @@ intent = in optional = F [ntoz] - standard_name = index_for_ozone + standard_name = index_of_ozone_mixing_ratio_in_tracer_concentration_array long_name = tracer index for ozone mixing ratio units = index dimensions = () @@ -573,7 +581,7 @@ intent = in optional = F [ntke] - standard_name = index_for_turbulent_kinetic_energy + standard_name = index_of_turbulent_kinetic_energy_in_tracer_concentration_array long_name = tracer index for turbulent kinetic energy units = index dimensions = () @@ -589,7 +597,7 @@ intent = in optional = F [nqrimef] - standard_name = index_for_mass_weighted_rime_factor + standard_name = index_of_mass_weighted_rime_factor_in_tracer_concentration_array long_name = tracer index for mass weighted rime factor units = index dimensions = () @@ -605,7 +613,7 @@ intent = in optional = F [ntchs] - standard_name = index_for_first_chemical_tracer + standard_name = index_of_first_chemical_tracer_in_tracer_concentration_array long_name = tracer index for first chemical tracer units = index dimensions = () @@ -621,7 +629,7 @@ intent = in optional = F [imp_physics] - standard_name = flag_for_microphysics_scheme + standard_name = control_for_microphysics_scheme long_name = choice of microphysics scheme units = flag dimensions = () @@ -629,7 +637,7 @@ intent = in optional = F [imp_physics_gfdl] - standard_name = flag_for_gfdl_microphysics_scheme + standard_name = identifier_for_gfdl_microphysics_scheme long_name = choice of GFDL microphysics scheme units = flag dimensions = () @@ -637,7 +645,7 @@ intent = in optional = F [imp_physics_thompson] - standard_name = flag_for_thompson_microphysics_scheme + standard_name = identifier_for_thompson_microphysics_scheme long_name = choice of Thompson microphysics scheme units = flag dimensions = () @@ -645,7 +653,7 @@ intent = in optional = F [imp_physics_wsm6] - standard_name = flag_for_wsm6_microphysics_scheme + standard_name = identifier_for_wsm6_microphysics_scheme long_name = choice of WSM6 microphysics scheme units = flag dimensions = () @@ -653,7 +661,7 @@ intent = in optional = F [imp_physics_zhao_carr] - standard_name = flag_for_zhao_carr_microphysics_scheme + standard_name = identifier_for_zhao_carr_microphysics_scheme long_name = choice of Zhao-Carr microphysics scheme units = flag dimensions = () @@ -661,7 +669,7 @@ intent = in optional = F [imp_physics_mg] - standard_name = flag_for_morrison_gettelman_microphysics_scheme + standard_name = identifier_for_morrison_gettelman_microphysics_scheme long_name = choice of Morrison-Gettelman microphysics scheme units = flag dimensions = () @@ -669,7 +677,7 @@ intent = in optional = F [imp_physics_fer_hires] - standard_name = flag_for_fer_hires_microphysics_scheme + standard_name = identifier_for_fer_hires_microphysics_scheme long_name = choice of Ferrier-Aligo microphysics scheme units = flag dimensions = () @@ -685,7 +693,7 @@ intent = in optional = F [cplflx] - standard_name = flag_for_flux_coupling + standard_name = flag_for_surface_flux_coupling long_name = flag controlling cplflx collection (default off) units = flag dimensions = () @@ -701,7 +709,7 @@ intent = in optional = F [lssav] - standard_name = flag_diagnostics + standard_name = flag_for_diagnostics long_name = logical flag for storing diagnostics units = flag dimensions = () @@ -709,7 +717,7 @@ intent = in optional = F [flag_for_pbl_generic_tend] - standard_name = flag_for_generic_planetary_boundary_layer_tendency + standard_name = flag_for_generic_tendency_due_to_planetary_boundary_layer long_name = true if GFS_PBL_generic should calculate tendencies units = flag dimensions = () @@ -717,23 +725,15 @@ intent = in optional = F [ldiag3d] - standard_name = flag_diagnostics_3D + standard_name = flag_for_diagnostics_3D long_name = flag for 3d diagnostic fields units = flag dimensions = () type = logical intent = in optional = F -[qdiag3d] - standard_name = flag_tracer_diagnostics_3D - long_name = flag for 3d tracer diagnostic fields - units = flag - dimensions = () - type = logical - intent = in - optional = F [lsidea] - standard_name = flag_idealized_physics + standard_name = flag_for_integrated_dynamics_through_earths_atmosphere long_name = flag for idealized physics units = flag dimensions = () @@ -741,7 +741,7 @@ intent = in optional = F [hybedmf] - standard_name = flag_for_hedmf + standard_name = flag_for_hybrid_edmf_pbl_scheme long_name = flag for hybrid edmf pbl scheme (moninedmf) units = flag dimensions = () @@ -773,7 +773,7 @@ intent = in optional = F [do_ysu] - standard_name = flag_for_ysu + standard_name = flag_for_ysu_pbl_scheme long_name = flag for YSU PBL scheme units = flag dimensions = () @@ -784,7 +784,7 @@ standard_name = tendency_of_vertically_diffused_tracer_concentration long_name = updated tendency of the tracers due to vertical diffusion in PBL scheme units = kg kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_vertical_diffusion_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_vertical_diffusion_tracers) type = real kind = kind_phys intent = in @@ -816,6 +816,55 @@ kind = kind_phys intent = in optional = F +[dtend] + standard_name = cumulative_change_of_state_variables + long_name = diagnostic tendencies for state variables + units = various + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_cumulative_change_processes) + type = real + kind = kind_phys + intent = inout + optional = F +[dtidx] + standard_name = cumulative_change_of_state_variables_outer_index + long_name = index of state-variable and process in last dimension of diagnostic tendencies array AKA cumulative_change_index + units = index + dimensions = (number_of_tracers_plus_one_hundred,number_of_cumulative_change_processes) + type = integer + intent = in + optional = F +[index_of_temperature] + standard_name = index_of_temperature_in_cumulative_change_index + long_name = index of temperature in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_x_wind] + standard_name = index_of_x_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_y_wind] + standard_name = index_of_y_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_process_pbl] + standard_name = index_of_subgrid_scale_vertical_mixing_process_in_cumulative_change_index + long_name = index of subgrid scale vertical mixing process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F [dqsfc1] standard_name = instantaneous_surface_upward_latent_heat_flux long_name = surface upward latent heat flux valid for current call @@ -826,7 +875,7 @@ intent = in optional = F [dtf] - standard_name = time_step_for_dynamics + standard_name = timestep_for_dynamics long_name = dynamics timestep units = s dimensions = () @@ -835,46 +884,46 @@ intent = in optional = F [dudt] - standard_name = tendency_of_x_wind_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_x_wind long_name = updated tendency of the x wind units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [dvdt] - standard_name = tendency_of_y_wind_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_y_wind long_name = updated tendency of the y wind units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [dtdt] - standard_name = tendency_of_air_temperature_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_air_temperature long_name = updated tendency of the temperature units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [htrsw] - standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_timestep long_name = total sky sw heating rate units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [htrlw] - standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step + standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_timestep long_name = total sky lw heating rate units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -889,10 +938,10 @@ intent = in optional = F [dqdt] - standard_name = tendency_of_tracers_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_tracers long_name = updated tendency of the tracers due to model physics units = kg kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = inout @@ -934,7 +983,7 @@ intent = inout optional = F [dusfci_cpl] - standard_name = instantaneous_surface_x_momentum_flux_for_coupling + standard_name = surface_x_momentum_flux_for_coupling long_name = instantaneous sfc u momentum flux units = Pa dimensions = (horizontal_loop_extent) @@ -943,7 +992,7 @@ intent = inout optional = F [dvsfci_cpl] - standard_name = instantaneous_surface_y_momentum_flux_for_coupling + standard_name = surface_y_momentum_flux_for_coupling long_name = instantaneous sfc v momentum flux units = Pa dimensions = (horizontal_loop_extent) @@ -952,7 +1001,7 @@ intent = inout optional = F [dtsfci_cpl] - standard_name = instantaneous_surface_upward_sensible_heat_flux_for_coupling + standard_name = surface_upward_sensible_heat_flux_for_coupling long_name = instantaneous sfc sensible heat flux units = W m-2 dimensions = (horizontal_loop_extent) @@ -961,7 +1010,7 @@ intent = inout optional = F [dqsfci_cpl] - standard_name = instantaneous_surface_upward_latent_heat_flux_for_coupling + standard_name = surface_upward_latent_heat_flux_for_coupling long_name = instantaneous sfc latent heat flux units = W m-2 dimensions = (horizontal_loop_extent) @@ -1041,71 +1090,8 @@ kind = kind_phys intent = inout optional = F -[dt3dt] - standard_name = cumulative_change_in_temperature_due_to_PBL - long_name = cumulative change in temperature due to PBL - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[du3dt_PBL] - standard_name = cumulative_change_in_x_wind_due_to_PBL - long_name = cumulative change in x wind due to PBL - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[du3dt_OGWD] - standard_name = cumulative_change_in_x_wind_due_to_orographic_gravity_wave_drag - long_name = cumulative change in x wind due to orographic gravity wave drag - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[dv3dt_PBL] - standard_name = cumulative_change_in_y_wind_due_to_PBL - long_name = cumulative change in y wind due to PBL - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[dv3dt_OGWD] - standard_name = cumulative_change_in_y_wind_due_to_orographic_gravity_wave_drag - long_name = cumulative change in y wind due to orographic gravity wave drag - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[dq3dt] - standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL - long_name = cumulative change in water vapor specific humidity due to PBL - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[dq3dt_ozone] - standard_name = cumulative_change_in_ozone_mixing_ratio_due_to_PBL - long_name = cumulative change in ozone mixing ratio due to PBL - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F [rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -1162,13 +1148,13 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [hflx] - standard_name = kinematic_surface_upward_sensible_heat_flux + standard_name = surface_upward_temperature_flux long_name = kinematic surface upward sensible heat flux units = K m s-1 dimensions = (horizontal_loop_extent) @@ -1177,7 +1163,7 @@ intent = in optional = F [ushfsfci] - standard_name = instantaneous_surface_upward_sensible_heat_flux_for_chemistry_coupling + standard_name = surface_upward_sensible_heat_flux_for_chemistry_coupling long_name = instantaneous upward sensible heat flux for chemistry coupling units = W m-2 dimensions = (horizontal_loop_extent) @@ -1194,16 +1180,16 @@ kind = kind_phys intent = in optional = F -[flag_cice] - standard_name = flag_for_cice - long_name = flag for cice - units = flag - dimensions = (horizontal_loop_extent) - type = logical +[kdt] + standard_name = index_of_timestep + long_name = current forecast iteration + units = index + dimensions = () + type = integer intent = in optional = F [dusfc_cice] - standard_name = surface_x_momentum_flux_for_coupling + standard_name = surface_x_momentum_flux_from_coupled_process long_name = sfc x momentum flux for coupling units = Pa dimensions = (horizontal_loop_extent) @@ -1212,7 +1198,7 @@ intent = in optional = F [dvsfc_cice] - standard_name = surface_y_momentum_flux_for_coupling + standard_name = surface_y_momentum_flux_from_coupled_process long_name = sfc y momentum flux for coupling units = Pa dimensions = (horizontal_loop_extent) @@ -1221,7 +1207,7 @@ intent = in optional = F [dtsfc_cice] - standard_name = surface_upward_sensible_heat_flux_for_coupling + standard_name = surface_upward_sensible_heat_flux_from_coupled_process long_name = sfc sensible heat flux for coupling units = W m-2 dimensions = (horizontal_loop_extent) @@ -1230,7 +1216,7 @@ intent = in optional = F [dqsfc_cice] - standard_name = surface_upward_latent_heat_flux_for_coupling + standard_name = surface_upward_latent_heat_flux_from_coupled_process long_name = sfc latent heat flux for coupling units = W m-2 dimensions = (horizontal_loop_extent) @@ -1272,8 +1258,8 @@ intent = in optional = F [stress_wat] - standard_name = surface_wind_stress_over_ocean - long_name = surface wind stress over ocean + standard_name = surface_wind_stress_over_water + long_name = surface wind stress over water units = m2 s-2 dimensions = (horizontal_loop_extent) type = real @@ -1281,8 +1267,8 @@ intent = in optional = F [hflx_wat] - standard_name = kinematic_surface_upward_sensible_heat_flux_over_ocean - long_name = kinematic surface upward sensible heat flux over ocean + standard_name = kinematic_surface_upward_sensible_heat_flux_over_water + long_name = kinematic surface upward sensible heat flux over water units = K m s-1 dimensions = (horizontal_loop_extent) type = real @@ -1290,8 +1276,8 @@ intent = in optional = F [evap_wat] - standard_name = kinematic_surface_upward_latent_heat_flux_over_ocean - long_name = kinematic surface upward latent heat flux over ocean + standard_name = kinematic_surface_upward_latent_heat_flux_over_water + long_name = kinematic surface upward latent heat flux over water units = kg kg-1 m s-1 dimensions = (horizontal_loop_extent) type = real @@ -1299,7 +1285,7 @@ intent = in optional = F [ugrs1] - standard_name = x_wind_at_lowest_model_layer + standard_name = x_wind_at_surface_adjacent_layer long_name = zonal wind at lowest model layer units = m s-1 dimensions = (horizontal_loop_extent) @@ -1308,7 +1294,7 @@ intent = in optional = F [vgrs1] - standard_name = y_wind_at_lowest_model_layer + standard_name = y_wind_at_surface_adjacent_layer long_name = meridional wind at lowest model layer units = m s-1 dimensions = (horizontal_loop_extent) @@ -1316,33 +1302,6 @@ kind = kind_phys intent = in optional = F -[dkt_cpl] - standard_name = instantaneous_atmosphere_heat_diffusivity - long_name = instantaneous atmospheric heat diffusivity - units = m2 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[dkt] - standard_name = atmosphere_heat_diffusivity - long_name = diffusivity for heat - units = m2 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension_minus_one) - type = real - kind = kind_phys - intent = in - optional = F -[hefac] - standard_name = surface_upward_latent_heat_flux_reduction_factor - long_name = surface upward latent heat flux reduction factor from canopy heat storage - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F [hffac] standard_name = surface_upward_sensible_heat_flux_reduction_factor long_name = surface upward sensible heat flux reduction factor from canopy heat storage @@ -1356,7 +1315,7 @@ standard_name = x_wind long_name = zonal wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -1365,7 +1324,7 @@ standard_name = y_wind long_name = meridional wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -1374,7 +1333,7 @@ standard_name = air_temperature long_name = model layer mean temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -1383,7 +1342,7 @@ standard_name = tracer_concentration long_name = model layer mean tracer concentration units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = in @@ -1392,7 +1351,7 @@ standard_name = x_wind_save long_name = x-wind before entering a physics scheme units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -1401,7 +1360,7 @@ standard_name = y_wind_save long_name = y-wind before entering a physics scheme units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -1410,7 +1369,7 @@ standard_name = air_temperature_save long_name = air temperature before entering a physics scheme units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -1419,7 +1378,7 @@ standard_name = tracer_concentration_save long_name = tracer concentration before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = in diff --git a/physics/GFS_SCNV_generic.F90 b/physics/GFS_SCNV_generic.F90 index ae8fac5f9..2440d9bc7 100644 --- a/physics/GFS_SCNV_generic.F90 +++ b/physics/GFS_SCNV_generic.F90 @@ -14,22 +14,28 @@ end subroutine GFS_SCNV_generic_pre_finalize !> \section arg_table_GFS_SCNV_generic_pre_run Argument Table !! \htmlinclude GFS_SCNV_generic_pre_run.html !! - subroutine GFS_SCNV_generic_pre_run (im, levs, ldiag3d, qdiag3d, gu0, gv0, gt0, gq0_water_vapor, & - save_u, save_v, save_t, save_qv, flag_for_scnv_generic_tend, errmsg, errflg) + subroutine GFS_SCNV_generic_pre_run (im, levs, ldiag3d, qdiag3d, gu0, gv0, gt0, gq0, & + save_u, save_v, save_t, save_q, ntqv, nsamftrac, flag_for_scnv_generic_tend, & + dtidx, index_of_process_scnv, ntcw,ntiw,ntclamt,ntrw,ntsw,ntrnc,ntsnc,ntgl,ntgnc, & + cscnv, satmedmf, trans_trac, ras, ntrac, clw, errmsg, errflg) use machine, only: kind_phys implicit none - integer, intent(in) :: im, levs + integer, intent(in) :: im, levs, ntqv, nsamftrac, index_of_process_scnv, dtidx(:,:) + integer, intent(in) :: ntcw,ntiw,ntclamt,ntrw,ntsw,ntrnc,ntsnc,ntgl,ntgnc,ntrac logical, intent(in) :: ldiag3d, qdiag3d, flag_for_scnv_generic_tend - real(kind=kind_phys), dimension(im,levs), intent(in) :: gu0, gv0, gt0, gq0_water_vapor - - real(kind=kind_phys), dimension(im,levs), intent(inout) :: save_u, save_v, save_t, save_qv + real(kind=kind_phys), dimension(:,:), intent(in) :: gu0, gv0, gt0 + real(kind=kind_phys), dimension(:,:,:), intent(in) :: gq0 + real(kind=kind_phys), dimension(:,:,:), intent(inout) :: save_q + real(kind=kind_phys), dimension(:,:), intent(inout) :: save_u, save_v, save_t character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg + logical, intent(in) :: cscnv, satmedmf, trans_trac, ras + real(kind=kind_phys), dimension(:,:,:), intent(in) :: clw - integer :: i, k + integer :: i, k, n, tracers ! Initialize CCPP error handling variables errmsg = '' @@ -44,13 +50,28 @@ subroutine GFS_SCNV_generic_pre_run (im, levs, ldiag3d, qdiag3d, gu0, gv0, gt0, enddo enddo if (qdiag3d) then - do k=1,levs - do i=1,im - save_qv(i,k) = gq0_water_vapor(i,k) + if (cscnv .or. satmedmf .or. trans_trac .or. ras) then + tracers = 2 + do n=2,ntrac + if ( n /= ntcw .and. n /= ntiw .and. n /= ntclamt .and. & + n /= ntrw .and. n /= ntsw .and. n /= ntrnc .and. & + n /= ntsnc .and. n /= ntgl .and. n /= ntgnc) then + tracers = tracers + 1 + if(dtidx(100+n,index_of_process_scnv)>0) then + save_q(:,:,n) = clw(:,:,tracers) + endif + endif enddo - enddo + else + do n=2,ntrac + if(dtidx(100+n,index_of_process_scnv)>0) then + save_q(:,:,n) = gq0(:,:,n) + endif + enddo + endif ! end if_ras or cfscnv or samf + save_q(:,:,ntqv) = gq0(:,:,ntqv) endif - endif + endif end subroutine GFS_SCNV_generic_pre_run @@ -70,45 +91,52 @@ end subroutine GFS_SCNV_generic_post_finalize !> \section arg_table_GFS_SCNV_generic_post_run Argument Table !! \htmlinclude GFS_SCNV_generic_post_run.html !! - subroutine GFS_SCNV_generic_post_run (im, levs, nn, lssav, ldiag3d, qdiag3d, cplchm, & - frain, gu0, gv0, gt0, gq0_water_vapor, save_u, save_v, save_t, save_qv, dqdti, du3dt, dv3dt, dt3dt, dq3dt, clw, & - shcnvcw, rain1, npdf3d, num_p3d, ncnvcld3d, cnvc, cnvw, & - rainc, cnvprcp, cnvprcpb, cnvw_phy_f3d, cnvc_phy_f3d, & - flag_for_scnv_generic_tend, & - imfshalcnv, imfshalcnv_sas, imfshalcnv_samf, errmsg, errflg) + subroutine GFS_SCNV_generic_post_run (im, levs, nn, lssav, ldiag3d, qdiag3d, & + frain, gu0, gv0, gt0, gq0, save_u, save_v, save_t, save_q, & + clw, shcnvcw, rain1, npdf3d, num_p3d, ncnvcld3d, cnvc, cnvw, nsamftrac, & + rainc, cnvprcp, cnvprcpb, cnvw_phy_f3d, cnvc_phy_f3d, & + dtend, dtidx, index_of_temperature, index_of_x_wind, index_of_y_wind, & + index_of_process_scnv, ntqv, flag_for_scnv_generic_tend, & + ntcw,ntiw,ntclamt,ntrw,ntsw,ntrnc,ntsnc,ntgl,ntgnc, & + imfshalcnv, imfshalcnv_sas, imfshalcnv_samf, ntrac, & + cscnv, satmedmf, trans_trac, ras, errmsg, errflg) use machine, only: kind_phys implicit none - integer, intent(in) :: im, levs, nn - logical, intent(in) :: lssav, ldiag3d, qdiag3d, cplchm, flag_for_scnv_generic_tend + integer, intent(in) :: im, levs, nn, ntqv, nsamftrac + integer, intent(in) :: ntcw,ntiw,ntclamt,ntrw,ntsw,ntrnc,ntsnc,ntgl,ntgnc,ntrac + logical, intent(in) :: lssav, ldiag3d, qdiag3d, flag_for_scnv_generic_tend real(kind=kind_phys), intent(in) :: frain - real(kind=kind_phys), dimension(im,levs), intent(in) :: gu0, gv0, gt0, gq0_water_vapor - real(kind=kind_phys), dimension(im,levs), intent(in) :: save_u, save_v, save_t, save_qv + real(kind=kind_phys), dimension(:,:), intent(in) :: gu0, gv0, gt0 + real(kind=kind_phys), dimension(:,:), intent(in) :: save_u, save_v, save_t + real(kind=kind_phys), dimension(:,:,:), intent(in) :: save_q, gq0 - ! dqdti, dt3dt, dq3dt, only allocated if ldiag3d == .true. - real(kind=kind_phys), dimension(:,:), intent(inout) :: dqdti - real(kind=kind_phys), dimension(:,:), intent(inout) :: du3dt, dv3dt, dt3dt, dq3dt - real(kind=kind_phys), dimension(im,levs,nn), intent(inout) :: clw + ! dtend only allocated if ldiag3d == .true. + real(kind=kind_phys), intent(inout) :: dtend(:,:,:) + integer, intent(in) :: dtidx(:,:) + integer, intent(in) :: index_of_temperature, index_of_x_wind, index_of_y_wind, index_of_process_scnv + real(kind=kind_phys), dimension(:,:,:), intent(inout) :: clw ! Post code for SAS/SAMF integer, intent(in) :: npdf3d, num_p3d, ncnvcld3d logical, intent(in) :: shcnvcw - real(kind=kind_phys), dimension(im), intent(in) :: rain1 - real(kind=kind_phys), dimension(im,levs), intent(in) :: cnvw, cnvc - real(kind=kind_phys), dimension(im), intent(inout) :: rainc, cnvprcp, cnvprcpb + real(kind=kind_phys), dimension(:), intent(in) :: rain1 + real(kind=kind_phys), dimension(:, :), intent(in) :: cnvw, cnvc + real(kind=kind_phys), dimension(:), intent(inout) :: rainc, cnvprcp, cnvprcpb ! The following arrays may not be allocated, depending on certain flags and microphysics schemes. ! Since Intel 15 crashes when passing unallocated arrays to arrays defined with explicit shape, ! use assumed-shape arrays. Note that Intel 18 and GNU 6.2.0-8.1.0 tolerate explicit-shape arrays ! as long as these do not get used when not allocated. real(kind=kind_phys), dimension(:,:), intent(inout) :: cnvw_phy_f3d, cnvc_phy_f3d integer, intent(in) :: imfshalcnv, imfshalcnv_sas, imfshalcnv_samf + logical, intent(in) :: cscnv, satmedmf, trans_trac, ras character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - integer :: i, k + integer :: i, k, n, idtend, tracers real(kind=kind_phys) :: tem ! Initialize CCPP error handling variables @@ -138,31 +166,48 @@ subroutine GFS_SCNV_generic_post_run (im, levs, nn, lssav, ldiag3d, qdiag3d, cpl if (lssav .and. flag_for_scnv_generic_tend) then if (ldiag3d) then - do k=1,levs - do i=1,im - du3dt(i,k) = du3dt(i,k) + (gu0(i,k) - save_u(i,k)) * frain - dv3dt(i,k) = dv3dt(i,k) + (gv0(i,k) - save_v(i,k)) * frain - dt3dt(i,k) = dt3dt(i,k) + (gt0(i,k) - save_t(i,k)) * frain - enddo - enddo - if (qdiag3d) then - do k=1,levs - do i=1,im - dq3dt(i,k) = dq3dt(i,k) + (gq0_water_vapor(i,k) - save_qv(i,k)) * frain - enddo + idtend = dtidx(index_of_temperature, index_of_process_scnv) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + (gt0 - save_t) * frain + endif + + idtend = dtidx(index_of_x_wind, index_of_process_scnv) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + (gu0 - save_u) * frain + endif + + idtend = dtidx(index_of_y_wind, index_of_process_scnv) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + (gv0 - save_v) * frain + endif + + if (cscnv .or. satmedmf .or. trans_trac .or. ras) then + tracers = 2 + do n=2,ntrac + if ( n /= ntcw .and. n /= ntiw .and. n /= ntclamt .and. & + n /= ntrw .and. n /= ntsw .and. n /= ntrnc .and. & + n /= ntsnc .and. n /= ntgl .and. n /= ntgnc) then + tracers = tracers + 1 + idtend = dtidx(100+n,index_of_process_scnv) + if(idtend>0) then + dtend(:,:,idtend) = dtend(:,:,idtend) + clw(:,:,tracers)-save_q(:,:,n) * frain + endif + endif enddo + else + do n=2,ntrac + idtend = dtidx(100+n,index_of_process_scnv) + if(idtend>0) then + dtend(:,:,idtend) = dtend(:,:,idtend) + (gq0(:,:,n)-save_q(:,:,n))*frain + endif + enddo + endif + idtend = dtidx(100+ntqv, index_of_process_scnv) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + (gq0(:,:,ntqv) - save_q(:,:,ntqv)) * frain endif endif endif -! - if (cplchm) then - do k=1,levs - do i=1,im - tem = (gq0_water_vapor(i,k)-save_qv(i,k)) * frain - dqdti(i,k) = dqdti(i,k) + tem - enddo - enddo - endif ! do k=1,levs do i=1,im diff --git a/physics/GFS_SCNV_generic.meta b/physics/GFS_SCNV_generic.meta index a3122da71..5bed0b907 100644 --- a/physics/GFS_SCNV_generic.meta +++ b/physics/GFS_SCNV_generic.meta @@ -16,7 +16,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -24,7 +24,7 @@ intent = in optional = F [ldiag3d] - standard_name = flag_diagnostics_3D + standard_name = flag_for_diagnostics_3D long_name = flag for 3d diagnostic fields units = flag dimensions = () @@ -32,7 +32,7 @@ intent = in optional = F [qdiag3d] - standard_name = flag_tracer_diagnostics_3D + standard_name = flag_for_tracer_diagnostics_3D long_name = flag for 3d tracer diagnostic fields units = flag dimensions = () @@ -40,37 +40,37 @@ intent = in optional = F [gu0] - standard_name = x_wind_updated_by_physics + standard_name = x_wind_of_new_state long_name = updated x-direction wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [gv0] - standard_name = y_wind_updated_by_physics + standard_name = y_wind_of_new_state long_name = updated y-direction wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [gt0] - standard_name = air_temperature_updated_by_physics + standard_name = air_temperature_of_new_state long_name = temperature updated by physics units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F -[gq0_water_vapor] - standard_name = water_vapor_specific_humidity_updated_by_physics - long_name = water vapor specific humidity updated by physics +[gq0] + standard_name = tracer_concentration_of_new_state + long_name = tracer concentration updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = in @@ -79,46 +79,199 @@ standard_name = x_wind_save long_name = x-wind before entering a physics scheme units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys - intent = out + intent = inout optional = F [save_v] standard_name = y_wind_save long_name = y-wind before entering a physics scheme units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys - intent = out + intent = inout optional = F [save_t] standard_name = air_temperature_save long_name = air temperature before entering a physics scheme units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys - intent = out + intent = inout optional = F -[save_qv] - standard_name = water_vapor_specific_humidity_save - long_name = water vapor specific humidity before entering a physics scheme +[save_q] + standard_name = tracer_concentration_save + long_name = tracer concentration before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys - intent = out + intent = in + optional = F +[ntqv] + standard_name = index_of_specific_humidity_in_tracer_concentration_array + long_name = tracer index for water vapor (specific humidity) + units = index + dimensions = () + type = integer + intent = in + optional = F +[nsamftrac] + standard_name = number_of_tracers_for_samf + long_name = number of tracers for scale-aware mass flux schemes + units = count + dimensions = () + type = integer + intent = in optional = F [flag_for_scnv_generic_tend] - standard_name = flag_for_generic_shallow_convection_tendency + standard_name = flag_for_generic_tendency_due_to_shallow_convection long_name = true if GFS_SCNV_generic should calculate tendencies units = flag dimensions = () type = logical intent = in optional = F +[dtidx] + standard_name = cumulative_change_of_state_variables_outer_index + long_name = index of state-variable and process in last dimension of diagnostic tendencies array AKA cumulative_change_index + units = index + dimensions = (number_of_tracers_plus_one_hundred,number_of_cumulative_change_processes) + type = integer + intent = in + optional = F +[index_of_process_scnv] + standard_name = index_of_shallow_convection_process_process_in_cumulative_change_index + long_name = index of shallow convection process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[cscnv] + standard_name = flag_for_Chikira_Sugiyama_deep_convection + long_name = flag for Chikira-Sugiyama convection + units = flag + dimensions = () + type = logical + intent = in + optional = F +[satmedmf] + standard_name = flag_for_scale_aware_TKE_moist_EDMF_PBL + long_name = flag for scale-aware TKE moist EDMF PBL scheme + units = flag + dimensions = () + type = logical + intent = in + optional = F +[trans_trac] + standard_name = flag_for_convective_transport_of_tracers + long_name = flag for convective transport of tracers + units = flag + dimensions = () + type = logical + intent = in + optional = F +[ras] + standard_name = flag_for_relaxed_arakawa_schubert_deep_convection + long_name = flag for ras convection scheme + units = flag + dimensions = () + type = logical + intent = in + optional = F +[ntcw] + standard_name = index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for cloud condensate (or liquid water) + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntiw] + standard_name = index_of_cloud_ice_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for ice water + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntclamt] + standard_name = index_of_cloud_area_fraction_in_atmosphere_layer_in_tracer_concentration_array + long_name = tracer index for cloud amount integer + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntrw] + standard_name = index_of_rain_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for rain water + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntsw] + standard_name = index_of_snow_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for snow water + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntrnc] + standard_name = index_of_mass_number_concentration_of_rain_in_tracer_concentration_array + long_name = tracer index for rain number concentration + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntsnc] + standard_name = index_of_mass_number_concentration_of_snow_in_tracer_concentration_array + long_name = tracer index for snow number concentration + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntgl] + standard_name = index_of_graupel_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for graupel + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntgnc] + standard_name = index_of_mass_number_concentration_of_graupel_in_tracer_concentration_array + long_name = tracer index for graupel number concentration + units = index + dimensions = () + type = integer + intent = in + optional = F +[clw] + standard_name = convective_transportable_tracers + long_name = array to contain cloud water and other convective trans. tracers + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers_for_convective_transport) + type = real + kind = kind_phys + intent = in + optional = F +[ntrac] + standard_name = number_of_tracers + long_name = number of tracers + units = count + dimensions = () + type = integer + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP @@ -156,7 +309,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -172,32 +325,24 @@ intent = in optional = F [lssav] - standard_name = flag_diagnostics + standard_name = flag_for_diagnostics long_name = logical flag for storing diagnostics units = flag dimensions = () type = logical intent = in optional = F -[qdiag3d] - standard_name = flag_tracer_diagnostics_3D - long_name = flag for 3d tracer diagnostic fields - units = flag - dimensions = () - type = logical - intent = in - optional = F [ldiag3d] - standard_name = flag_diagnostics_3D + standard_name = flag_for_diagnostics_3D long_name = flag for 3d diagnostic fields units = flag dimensions = () type = logical intent = in optional = F -[cplchm] - standard_name = flag_for_chemistry_coupling - long_name = flag controlling cplchm collection (default off) +[qdiag3d] + standard_name = flag_for_tracer_diagnostics_3D + long_name = flag for 3d tracer diagnostic fields units = flag dimensions = () type = logical @@ -213,37 +358,37 @@ intent = in optional = F [gu0] - standard_name = x_wind_updated_by_physics + standard_name = x_wind_of_new_state long_name = updated x-direction wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [gv0] - standard_name = y_wind_updated_by_physics + standard_name = y_wind_of_new_state long_name = updated y-direction wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [gt0] - standard_name = air_temperature_updated_by_physics + standard_name = air_temperature_of_new_state long_name = temperature updated by physics units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F -[gq0_water_vapor] - standard_name = water_vapor_specific_humidity_updated_by_physics - long_name = water vapor specific humidity updated by physics +[gq0] + standard_name = tracer_concentration_of_new_state + long_name = tracer concentration updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = in @@ -252,7 +397,7 @@ standard_name = x_wind_save long_name = x-wind before entering a physics scheme units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -261,7 +406,7 @@ standard_name = y_wind_save long_name = y-wind before entering a physics scheme units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -270,76 +415,88 @@ standard_name = air_temperature_save long_name = air temperature before entering a physics scheme units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F -[save_qv] - standard_name = water_vapor_specific_humidity_save - long_name = water vapor specific humidity before entering a physics scheme +[save_q] + standard_name = tracer_concentration_save + long_name = tracer concentration before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = in optional = F -[dqdti] - standard_name = instantaneous_water_vapor_specific_humidity_tendency_due_to_convection - long_name = instantaneous moisture tendency due to convection - units = kg kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) +[dtend] + standard_name = cumulative_change_of_state_variables + long_name = diagnostic tendencies for state variables + units = various + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_cumulative_change_processes) type = real kind = kind_phys intent = inout optional = F -[du3dt] - standard_name = cumulative_change_in_x_wind_due_to_shallow_convection - long_name = cumulative change in x wind due to shallow convection - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[dtidx] + standard_name = cumulative_change_of_state_variables_outer_index + long_name = index of state-variable and process in last dimension of diagnostic tendencies array AKA cumulative_change_index + units = index + dimensions = (number_of_tracers_plus_one_hundred,number_of_cumulative_change_processes) + type = integer + intent = in optional = F -[dv3dt] - standard_name = cumulative_change_in_y_wind_due_to_shallow_convection - long_name = cumulative change in y wind due to shallow convection - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[index_of_temperature] + standard_name = index_of_temperature_in_cumulative_change_index + long_name = index of temperature in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in optional = F -[dt3dt] - standard_name = cumulative_change_in_temperature_due_to_shallow_convection - long_name = cumulative change in temperature due to shal conv. - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[index_of_x_wind] + standard_name = index_of_x_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in optional = F -[dq3dt] - standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_shallow_convection - long_name = cumulative change in water vapor specific humidity due to shal conv. - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[index_of_y_wind] + standard_name = index_of_y_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_process_scnv] + standard_name = index_of_shallow_convection_process_process_in_cumulative_change_index + long_name = index of shallow convection process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntqv] + standard_name = index_of_specific_humidity_in_tracer_concentration_array + long_name = tracer index for water vapor (specific humidity) + units = index + dimensions = () + type = integer + intent = in optional = F [clw] standard_name = convective_transportable_tracers long_name = array to contain cloud water and other convective trans. tracers units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers_for_convective_transport) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers_for_convective_transport) type = real kind = kind_phys intent = inout optional = F [shcnvcw] - standard_name = flag_shallow_convective_cloud + standard_name = flag_for_saving_shallow_convective_cloud_area_fraction long_name = flag for shallow convective cloud units = dimensions = () @@ -356,7 +513,7 @@ intent = in optional = F [npdf3d] - standard_name = number_of_3d_arrays_associated_with_pdf_based_clouds + standard_name = number_of_pdf_based_variables_in_xyz_dimensioned_restart_array long_name = number of 3d arrays associated with pdf based clouds/mp units = count dimensions = () @@ -364,7 +521,7 @@ intent = in optional = F [num_p3d] - standard_name = array_dimension_of_3d_arrays_for_microphysics + standard_name = number_of_microphysics_variables_in_xyz_dimensioned_restart_array long_name = number of 3D arrays needed for microphysics units = count dimensions = () @@ -372,7 +529,7 @@ intent = in optional = F [ncnvcld3d] - standard_name = number_of_convective_3d_cloud_fields + standard_name = number_of_convective_cloud_variables_in_xyz_dimensioned_restart_array long_name = number of convective 3d clouds fields units = count dimensions = () @@ -383,7 +540,7 @@ standard_name = convective_cloud_cover long_name = convective cloud cover units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -392,11 +549,19 @@ standard_name = convective_cloud_water_mixing_ratio long_name = moist convective cloud water mixing ratio units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F +[nsamftrac] + standard_name = number_of_tracers_for_samf + long_name = number of tracers for scale-aware mass flux schemes + units = count + dimensions = () + type = integer + intent = in + optional = F [rainc] standard_name = lwe_thickness_of_convective_precipitation_amount_on_dynamics_timestep long_name = convective rain at this time step @@ -425,25 +590,25 @@ intent = inout optional = F [cnvw_phy_f3d] - standard_name = convective_cloud_water_mixing_ratio_in_phy_f3d + standard_name = convective_cloud_condensate_mixing_ratio long_name = convective cloud water mixing ratio in the phy_f3d array units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [cnvc_phy_f3d] - standard_name = convective_cloud_cover_in_phy_f3d + standard_name = convective_cloud_area_fraction long_name = convective cloud cover in the phy_f3d array units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [flag_for_scnv_generic_tend] - standard_name = flag_for_generic_shallow_convection_tendency + standard_name = flag_for_generic_tendency_due_to_shallow_convection long_name = true if GFS_SCNV_generic should calculate tendencies units = flag dimensions = () @@ -451,7 +616,7 @@ intent = in optional = F [imfshalcnv] - standard_name = flag_for_mass_flux_shallow_convection_scheme + standard_name = control_for_shallow_convection_scheme long_name = flag for mass-flux shallow convection scheme units = flag dimensions = () @@ -459,7 +624,7 @@ intent = in optional = F [imfshalcnv_sas] - standard_name = flag_for_sas_shallow_convection_scheme + standard_name = identifier_for_simplified_arakawa_schubert_shallow_convection long_name = flag for SAS shallow convection scheme units = flag dimensions = () @@ -467,13 +632,125 @@ intent = in optional = F [imfshalcnv_samf] - standard_name = flag_for_samf_shallow_convection_scheme + standard_name = identifier_for_scale_aware_mass_flux_shallow_convection long_name = flag for SAMF shallow convection scheme units = flag dimensions = () type = integer intent = in optional = F +[cscnv] + standard_name = flag_for_Chikira_Sugiyama_deep_convection + long_name = flag for Chikira-Sugiyama convection + units = flag + dimensions = () + type = logical + intent = in + optional = F +[satmedmf] + standard_name = flag_for_scale_aware_TKE_moist_EDMF_PBL + long_name = flag for scale-aware TKE moist EDMF PBL scheme + units = flag + dimensions = () + type = logical + intent = in + optional = F +[trans_trac] + standard_name = flag_for_convective_transport_of_tracers + long_name = flag for convective transport of tracers + units = flag + dimensions = () + type = logical + intent = in + optional = F +[ras] + standard_name = flag_for_relaxed_arakawa_schubert_deep_convection + long_name = flag for ras convection scheme + units = flag + dimensions = () + type = logical + intent = in + optional = F +[ntcw] + standard_name = index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for cloud condensate (or liquid water) + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntiw] + standard_name = index_of_cloud_ice_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for ice water + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntclamt] + standard_name = index_of_cloud_area_fraction_in_atmosphere_layer_in_tracer_concentration_array + long_name = tracer index for cloud amount integer + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntrw] + standard_name = index_of_rain_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for rain water + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntsw] + standard_name = index_of_snow_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for snow water + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntrnc] + standard_name = index_of_mass_number_concentration_of_rain_in_tracer_concentration_array + long_name = tracer index for rain number concentration + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntsnc] + standard_name = index_of_mass_number_concentration_of_snow_in_tracer_concentration_array + long_name = tracer index for snow number concentration + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntgl] + standard_name = index_of_graupel_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for graupel + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntgnc] + standard_name = index_of_mass_number_concentration_of_graupel_in_tracer_concentration_array + long_name = tracer index for graupel number concentration + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntrac] + standard_name = number_of_tracers + long_name = number of tracers + units = count + dimensions = () + type = integer + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/GFS_cloud_diagnostics.F90 b/physics/GFS_cloud_diagnostics.F90 index 1a7258b10..215143bb2 100644 --- a/physics/GFS_cloud_diagnostics.F90 +++ b/physics/GFS_cloud_diagnostics.F90 @@ -41,7 +41,7 @@ end subroutine GFS_cloud_diagnostics_init !! subroutine GFS_cloud_diagnostics_run(nCol, nLev, lsswr, lslwr, lat, de_lgth, p_lay, & cld_frac, p_lev, deltaZ, cloud_overlap_param, precip_overlap_param, con_pi, & - mbota, mtopa, cldsa, errmsg, errflg) + mtopa, mbota, cldsa, errmsg, errflg) implicit none ! Inputs @@ -53,15 +53,15 @@ subroutine GFS_cloud_diagnostics_run(nCol, nLev, lsswr, lslwr, lat, de_lgth, p_l lslwr ! Call LW radiation real(kind_phys), intent(in) :: & con_pi ! Physical constant: pi - real(kind_phys), dimension(nCol), intent(in) :: & + real(kind_phys), dimension(:), intent(in) :: & lat, & ! Latitude de_lgth ! Decorrelation length - real(kind_phys), dimension(nCol,nLev), intent(in) :: & + real(kind_phys), dimension(:,:), intent(in) :: & p_lay, & ! Pressure at model-layer cld_frac ! Total cloud fraction - real(kind_phys), dimension(nCol,nLev+1), intent(in) :: & + real(kind_phys), dimension(:,:), intent(in) :: & p_lev ! Pressure at model interfaces - real(kind_phys), dimension(nCol,nLev), intent(in) :: & + real(kind_phys), dimension(:,:), intent(in) :: & deltaZ, & ! Layer thickness (km) cloud_overlap_param, & ! Cloud-overlap parameter precip_overlap_param ! Precipitation overlap parameter @@ -71,10 +71,10 @@ subroutine GFS_cloud_diagnostics_run(nCol, nLev, lsswr, lslwr, lat, de_lgth, p_l errmsg ! Error message integer, intent(out) :: & errflg ! Error flag - integer,dimension(ncol,3),intent(out) :: & + integer,dimension(:,:),intent(out) :: & mbota, & ! Vertical indices for cloud tops mtopa ! Vertical indices for cloud bases - real(kind_phys), dimension(ncol,5), intent(out) :: & + real(kind_phys), dimension(:,:), intent(out) :: & cldsa ! Fraction of clouds for low, middle, high, total and BL ! Local variables @@ -136,7 +136,7 @@ subroutine hml_cloud_diagnostics_initialize(imp_physics, imp_physics_fer_hires, integer, intent(in) :: & nLev, & ! Number of vertical-layers mpi_rank - real(kind_phys), dimension(nLev+1), intent(in) :: & + real(kind_phys), dimension(:), intent(in) :: & sigmainit ! Outputs integer, intent(out) :: & diff --git a/physics/GFS_cloud_diagnostics.meta b/physics/GFS_cloud_diagnostics.meta index 840b3b21a..6b72ef23a 100644 --- a/physics/GFS_cloud_diagnostics.meta +++ b/physics/GFS_cloud_diagnostics.meta @@ -15,7 +15,7 @@ intent = in optional = F [nLev] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () @@ -23,7 +23,7 @@ intent = in optional = F [lsswr] - standard_name = flag_to_calc_sw + standard_name = flag_for_calling_shortwave_radiation long_name = logical flags for sw radiation calls units = flag dimensions = () @@ -31,7 +31,7 @@ intent = in optional = F [lslwr] - standard_name = flag_to_calc_lw + standard_name = flag_for_calling_longwave_radiation long_name = logical flags for lw radiation calls units = flag dimensions = () @@ -47,11 +47,20 @@ intent = in kind = kind_phys optional = F +[de_lgth] + standard_name = cloud_decorrelation_length + long_name = cloud decorrelation length + units = km + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F [p_lay] standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure at vertical layer for radiation calculation units = hPa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -60,7 +69,7 @@ standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -69,41 +78,16 @@ standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure at vertical interface for radiation calculation units = hPa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in optional = F -[mtopa] - standard_name = model_layer_number_at_cloud_top - long_name = vertical indices for low, middle and high cloud tops - units = index - dimensions = (horizontal_loop_extent,3) - type = integer - intent = out - optional = F -[mbota] - standard_name = model_layer_number_at_cloud_base - long_name = vertical indices for low, middle and high cloud bases - units = index - dimensions = (horizontal_loop_extent,3) - type = integer - intent = out - optional = F -[de_lgth] - standard_name = cloud_decorrelation_length - long_name = cloud decorrelation length - units = km - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F [deltaZ] standard_name = layer_thickness long_name = layer_thickness units = m - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -112,7 +96,7 @@ standard_name = cloud_overlap_param long_name = cloud overlap parameter units = km - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -121,7 +105,7 @@ standard_name = precip_overlap_param long_name = precipitation overlap parameter units = km - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -135,6 +119,22 @@ kind = kind_phys intent = in optional = F +[mtopa] + standard_name = model_layer_number_at_cloud_top + long_name = vertical indices for low, middle and high cloud tops + units = index + dimensions = (horizontal_loop_extent,3) + type = integer + intent = out + optional = F +[mbota] + standard_name = model_layer_number_at_cloud_base + long_name = vertical indices for low, middle and high cloud bases + units = index + dimensions = (horizontal_loop_extent,3) + type = integer + intent = out + optional = F [cldsa] standard_name = cloud_area_fraction_for_radiation long_name = fraction of clouds for low, middle, high, total and BL @@ -160,4 +160,4 @@ dimensions = () type = integer intent = out - optional = F \ No newline at end of file + optional = F diff --git a/physics/GFS_debug.F90 b/physics/GFS_debug.F90 index 9adb35118..43f48dfed 100644 --- a/physics/GFS_debug.F90 +++ b/physics/GFS_debug.F90 @@ -307,7 +307,7 @@ module GFS_diagtoscreen private - public GFS_diagtoscreen_init, GFS_diagtoscreen_run, GFS_diagtoscreen_finalize + public GFS_diagtoscreen_init, GFS_diagtoscreen_timestep_init, GFS_diagtoscreen_run, GFS_diagtoscreen_finalize contains @@ -344,6 +344,39 @@ subroutine GFS_diagtoscreen_init (Model, Data, Interstitial, errmsg, errflg) end subroutine GFS_diagtoscreen_init +!> \section arg_table_GFS_diagtoscreen_timestep_init Argument Table +!! \htmlinclude GFS_diagtoscreen_timestep_init.html +!! + subroutine GFS_diagtoscreen_timestep_init (Model, Data, Interstitial, errmsg, errflg) + + use GFS_typedefs, only: GFS_control_type, GFS_data_type, & + GFS_interstitial_type + + implicit none + + !--- interface variables + type(GFS_control_type), intent(in) :: Model + type(GFS_data_type), intent(in) :: Data(:) + type(GFS_interstitial_type), intent(in) :: Interstitial(:) + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + !--- local variables + integer :: i + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + do i=1,size(Data) + call GFS_diagtoscreen_run (Model, Data(i)%Statein, Data(i)%Stateout, Data(i)%Sfcprop, & + Data(i)%Coupling, Data(i)%Grid, Data(i)%Tbd, Data(i)%Cldprop, & + Data(i)%Radtend, Data(i)%Intdiag, Interstitial(1), & + size(Interstitial), i, errmsg, errflg) + end do + + end subroutine GFS_diagtoscreen_timestep_init + subroutine GFS_diagtoscreen_finalize () end subroutine GFS_diagtoscreen_finalize @@ -387,7 +420,7 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling, integer, intent(out) :: errflg !--- local variables - integer :: impi, iomp, ierr, n + integer :: impi, iomp, ierr, n, idtend, iprocess, itracer integer :: mpirank, mpisize, mpicomm integer :: omprank, ompsize @@ -434,8 +467,10 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling, call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%tisfc' , Sfcprop%tisfc) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%snowd' , Sfcprop%snowd) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%zorl' , Sfcprop%zorl) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%zorlo' , Sfcprop%zorlo) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%zorlw' , Sfcprop%zorlw) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%zorll' , Sfcprop%zorll) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%zorli' , Sfcprop%zorli) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%zorlwav' , Sfcprop%zorlwav) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%fice' , Sfcprop%fice) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%hprime' , Sfcprop%hprime) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%sncovr' , Sfcprop%sncovr) @@ -491,18 +526,39 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling, end if ! CCPP/RUC only if (Model%lsm == Model%lsm_ruc) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Model%zs', Model%zs) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%sh2o', Sfcprop%sh2o) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%smois', Sfcprop%smois) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%tslb', Sfcprop%tslb) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%clw_surf', Sfcprop%clw_surf) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%qwv_surf', Sfcprop%qwv_surf) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%cndm_surf', Sfcprop%cndm_surf) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%flag_frsoil', Sfcprop%flag_frsoil) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%rhofr', Sfcprop%rhofr) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%tsnow', Sfcprop%tsnow) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%snowfallac ', Sfcprop%snowfallac) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%acsnow ', Sfcprop%acsnow) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%sh2o', Sfcprop%sh2o) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%smois', Sfcprop%smois) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%tslb', Sfcprop%tslb) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%clw_surf_land', Sfcprop%clw_surf_land) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%clw_surf_ice', Sfcprop%clw_surf_ice) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%qwv_surf_land', Sfcprop%qwv_surf_land) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%qwv_surf_ice', Sfcprop%qwv_surf_ice) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%flag_frsoil', Sfcprop%flag_frsoil) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%rhofr', Sfcprop%rhofr) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%tsnow_land', Sfcprop%tsnow_land) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%tsnow_ice', Sfcprop%tsnow_ice) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%snowfallac_land', Sfcprop%snowfallac_land) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%snowfallac_ice', Sfcprop%snowfallac_ice) + end if + ! Revised surface albedo and emissivity calculation + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%emis_lnd', Sfcprop%emis_lnd) + ! NoahMP and RUC + if (Model%lsm == Model%lsm_ruc .or. Model%lsm == Model%lsm_noahmp) then + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%albdvis_lnd', Sfcprop%albdvis_lnd) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%albdnir_lnd', Sfcprop%albdnir_lnd) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%albivis_lnd', Sfcprop%albivis_lnd) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%albinir_lnd', Sfcprop%albinir_lnd) + end if + ! RUC only + if (Model%lsm == Model%lsm_ruc) then + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%emis_ice', Sfcprop%emis_ice) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%albdvis_ice', Sfcprop%albdvis_ice) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%albdnir_ice', Sfcprop%albdnir_ice) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%albivis_ice', Sfcprop%albivis_ice) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%albinir_ice', Sfcprop%albinir_ice) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%sfalb_lnd', Sfcprop%sfalb_lnd) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%sfalb_ice', Sfcprop%sfalb_ice) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%sfalb_lnd_bck', Sfcprop%sfalb_lnd_bck) end if ! Radtend call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%sfcfsw%upfxc', Radtend%sfcfsw(:)%upfxc) @@ -534,7 +590,7 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling, call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%acvt' , Tbd%acvt) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%hpbl' , Tbd%hpbl) if (Model%do_sppt) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%dtdtr' , Tbd%dtdtr) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%dtdtnp' , Tbd%dtdtnp) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%dtotprcp' , Tbd%dtotprcp) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%dcnvprcp' , Tbd%dcnvprcp) end if @@ -611,6 +667,16 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling, call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%v1 ', Diag%v1) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%chh ', Diag%chh) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%cmm ', Diag%cmm) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dlwsfci ', Diag%dlwsfci) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%ulwsfci ', Diag%ulwsfci) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dswsfci ', Diag%dswsfci) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%nswsfci ', Diag%nswsfci) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%uswsfci ', Diag%uswsfci) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dusfci ', Diag%dusfci) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dvsfci ', Diag%dvsfci) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dtsfci ', Diag%dtsfci) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dqsfci ', Diag%dqsfci) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%gfluxi ', Diag%gfluxi) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%epi ', Diag%epi) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%smcwlt2 ', Diag%smcwlt2) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%smcref2 ', Diag%smcref2) @@ -631,30 +697,27 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling, call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%shum_wts ', Diag%shum_wts) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%zmtnblck ', Diag%zmtnblck) if (Model%ldiag3d) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%du3dt ', Diag%du3dt) - do n=1,size(Diag%du3dt(1,1,:)) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%du3dt_n ', Diag%du3dt(:,:,n)) - end do - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dv3dt ', Diag%dv3dt) - do n=1,size(Diag%dv3dt(1,1,:)) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dv3dt_n ', Diag%dv3dt(:,:,n)) - end do - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dt3dt ', Diag%dt3dt) - do n=1,size(Diag%dt3dt(1,1,:)) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dt3dt_n ', Diag%dt3dt(:,:,n)) - end do - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dq3dt ', Diag%dq3dt) - do n=1,size(Diag%dq3dt(1,1,:)) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dq3dt_n ', Diag%dq3dt(:,:,n)) - end do - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%upd_mf ', Diag%upd_mf) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dwn_mf ', Diag%dwn_mf) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%det_mf ', Diag%det_mf) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%cldcov ', Diag%cldcov) + !do itracer=2,Model%ntracp100 + ! do iprocess=1,Model%nprocess + ! idtend = Model%dtidx(itracer,iprocess) + ! if(idtend>=1) then + ! call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, & + ! 'dtend_'//Model%dtend_tracer_labels(itracer)//'_' & + ! //Model%dtend_cause_labels(iprocess), Diag%dtend(1,1,idtend)) + ! endif + ! enddo + !enddo + if (Model%qdiag3d) then + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%upd_mf ', Diag%upd_mf) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dwn_mf ', Diag%dwn_mf) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%det_mf ', Diag%det_mf) + end if end if if(Model%lradar) then call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%refl_10cm ', Diag%refl_10cm) end if + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dkt ', Diag%dkt) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dku ', Diag%dku) ! CCPP/MYNNPBL only if (Model%do_mynnedmf) then if (Model%bl_mynn_output .ne. 0) then @@ -675,6 +738,31 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling, call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%exch_h ', Diag%exch_h) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%exch_m ', Diag%exch_m) end if + ! UGWP - incomplete list + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dudt_gw ', Diag%dudt_gw) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dvdt_gw ', Diag%dvdt_gw) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dtdt_gw ', Diag%dtdt_gw) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%kdis_gw ', Diag%kdis_gw) + if (Model%do_ugwp_v1 .or. Model%gwd_opt==33 .or. Model%gwd_opt==22) then + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dudt_ogw ', Diag%dudt_ogw ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dvdt_ogw ', Diag%dvdt_ogw ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dudt_obl ', Diag%dudt_obl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dvdt_obl ', Diag%dvdt_obl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dudt_oss ', Diag%dudt_oss ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dvdt_oss ', Diag%dvdt_oss ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dudt_ofd ', Diag%dudt_ofd ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dvdt_ofd ', Diag%dvdt_ofd ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%du_ogwcol ', Diag%du_ogwcol) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dv_ogwcol ', Diag%dv_ogwcol) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%du_oblcol ', Diag%du_oblcol) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dv_oblcol ', Diag%dv_oblcol) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%du_osscol ', Diag%du_osscol) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dv_osscol ', Diag%dv_osscol) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%du_ofdcol ', Diag%du_ofdcol) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dv_ofdcol ', Diag%dv_ofdcol) + else + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dudt_ogw ', Diag%dudt_ogw) + end if ! Statein call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Statein%phii' , Statein%phii) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Statein%prsi' , Statein%prsi) @@ -778,8 +866,8 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling, if (Model%cplchm) then call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%rainc_cpl', Coupling%rainc_cpl) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%ushfsfci ', Coupling%ushfsfci ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dkt ', Coupling%dkt ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dqdti ', Coupling%dqdti ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%pfi_lsan', Coupling%pfi_lsan ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%pfl_lsan', Coupling%pfl_lsan ) end if if (Model%do_sppt) then call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%sppt_wts', Coupling%sppt_wts) @@ -806,6 +894,13 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling, call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nwfa2d', Coupling%nwfa2d) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nifa2d', Coupling%nifa2d) end if + if (Model%do_RRTMGP) then + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%fluxlwUP_jac', Coupling%fluxlwUP_jac) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%fluxlwUP_allsky', Coupling%fluxlwUP_allsky) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%fluxlwDOWN_allsky', Coupling%fluxlwDOWN_allsky) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%htrlw', Coupling%htrlw) + end if + ! ! Grid call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%xlon ', Grid%xlon ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%xlat ', Grid%xlat ) @@ -814,18 +909,22 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling, call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%coslat', Grid%coslat) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%area ', Grid%area ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%dx ', Grid%dx ) - if (Model%ntoz > 0) then + if (Model%kdt>0 .and. Model%ntoz>0) then call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%ddy_o3 ', Grid%ddy_o3 ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%jindx1_o3', Grid%jindx1_o3) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%jindx2_o3', Grid%jindx2_o3) endif - if (Model%h2o_phys) then + if (Model%kdt>0 .and. Model%h2o_phys) then call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%ddy_h ', Grid%ddy_h ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%jindx1_h', Grid%jindx1_h) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%jindx2_h', Grid%jindx2_h) endif - ! Model/Control - ! not yet + if (Model%kdt>0 .and. Model%do_ugwp_v1) then + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%ddy_j1tau ', Grid%ddy_j1tau ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%ddy_j2tau ', Grid%ddy_j2tau ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%jindx1_tau', Grid%jindx1_tau ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%jindx2_tau', Grid%jindx2_tau ) + endif end if #ifdef OPENMP !$OMP BARRIER @@ -856,10 +955,13 @@ module GFS_interstitialtoscreen private - public GFS_interstitialtoscreen_init, GFS_interstitialtoscreen_run, GFS_interstitialtoscreen_finalize + public GFS_interstitialtoscreen_init, GFS_interstitialtoscreen_timestep_init, GFS_interstitialtoscreen_run, GFS_interstitialtoscreen_finalize contains +!> \section arg_table_GFS_interstitialtoscreen_init Argument Table +!! \htmlinclude GFS_interstitialtoscreen_init.html +!! subroutine GFS_interstitialtoscreen_init (Model, Data, Interstitial, errmsg, errflg) use GFS_typedefs, only: GFS_control_type, GFS_data_type, & @@ -891,6 +993,40 @@ subroutine GFS_interstitialtoscreen_init (Model, Data, Interstitial, errmsg, err end subroutine GFS_interstitialtoscreen_init +!> \section arg_table_GFS_interstitialtoscreen_timestep_init Argument Table +!! \htmlinclude GFS_interstitialtoscreen_timestep_init.html +!! + subroutine GFS_interstitialtoscreen_timestep_init (Model, Data, Interstitial, errmsg, errflg) + + use GFS_typedefs, only: GFS_control_type, GFS_data_type, & + GFS_interstitial_type + + implicit none + + !--- interface variables + type(GFS_control_type), intent(in) :: Model + type(GFS_data_type), intent(in) :: Data(:) + type(GFS_interstitial_type), intent(in) :: Interstitial(:) + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + !--- local variables + integer :: i + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + + do i=1,size(Interstitial) + call GFS_interstitialtoscreen_run (Model, Data(1)%Statein, Data(1)%Stateout, Data(1)%Sfcprop, & + Data(1)%Coupling, Data(1)%Grid, Data(1)%Tbd, Data(1)%Cldprop, & + Data(1)%Radtend, Data(1)%Intdiag, Interstitial(i), & + size(Interstitial), -999, errmsg, errflg) + end do + + end subroutine GFS_interstitialtoscreen_timestep_init + subroutine GFS_interstitialtoscreen_finalize () end subroutine GFS_interstitialtoscreen_finalize @@ -993,7 +1129,7 @@ subroutine GFS_interstitialtoscreen_run (Model, Statein, Stateout, Sfcprop, Coup ! Print all other variables call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%adjsfculw_land ', Interstitial%adjsfculw_land ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%adjsfculw_ice ', Interstitial%adjsfculw_ice ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%adjsfculw_ocean ', Interstitial%adjsfculw_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%adjsfculw_water ', Interstitial%adjsfculw_water ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%adjnirbmd ', Interstitial%adjnirbmd ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%adjnirbmu ', Interstitial%adjnirbmu ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%adjnirdfd ', Interstitial%adjnirdfd ) @@ -1008,14 +1144,14 @@ subroutine GFS_interstitialtoscreen_run (Model, Statein, Stateout, Sfcprop, Coup call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cd ', Interstitial%cd ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cd_ice ', Interstitial%cd_ice ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cd_land ', Interstitial%cd_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cd_ocean ', Interstitial%cd_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cd_water ', Interstitial%cd_water ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cdq ', Interstitial%cdq ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cdq_ice ', Interstitial%cdq_ice ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cdq_land ', Interstitial%cdq_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cdq_ocean ', Interstitial%cdq_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cdq_water ', Interstitial%cdq_water ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%chh_ice ', Interstitial%chh_ice ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%chh_land ', Interstitial%chh_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%chh_ocean ', Interstitial%chh_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%chh_water ', Interstitial%chh_water ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cldf ', Interstitial%cldf ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cldsa ', Interstitial%cldsa ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cldtaulw ', Interstitial%cldtaulw ) @@ -1026,7 +1162,7 @@ subroutine GFS_interstitialtoscreen_run (Model, Statein, Stateout, Sfcprop, Coup call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%clouds ', Interstitial%clouds ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cmm_ice ', Interstitial%cmm_ice ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cmm_land ', Interstitial%cmm_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cmm_ocean ', Interstitial%cmm_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cmm_water ', Interstitial%cmm_water ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cnvc ', Interstitial%cnvc ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cnvw ', Interstitial%cnvw ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ctei_r ', Interstitial%ctei_r ) @@ -1037,13 +1173,11 @@ subroutine GFS_interstitialtoscreen_run (Model, Statein, Stateout, Sfcprop, Coup call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%del ', Interstitial%del ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%del_gz ', Interstitial%del_gz ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%delr ', Interstitial%delr ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dkt ', Interstitial%dkt ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dlength ', Interstitial%dlength ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dqdt ', Interstitial%dqdt ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dqsfc1 ', Interstitial%dqsfc1 ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%drain ', Interstitial%drain ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dtdt ', Interstitial%dtdt ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dtdtc ', Interstitial%dtdtc ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dtsfc1 ', Interstitial%dtsfc1 ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dtzm ', Interstitial%dtzm ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dt_mf ', Interstitial%dt_mf ) @@ -1059,32 +1193,31 @@ subroutine GFS_interstitialtoscreen_run (Model, Statein, Stateout, Sfcprop, Coup call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ep1d ', Interstitial%ep1d ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ep1d_ice ', Interstitial%ep1d_ice ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ep1d_land ', Interstitial%ep1d_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ep1d_ocean ', Interstitial%ep1d_ocean ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%evapq ', Interstitial%evapq ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ep1d_water ', Interstitial%ep1d_water ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%evap_ice ', Interstitial%evap_ice ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%evap_land ', Interstitial%evap_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%evap_ocean ', Interstitial%evap_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%evap_water ', Interstitial%evap_water ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%evbs ', Interstitial%evbs ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%evcw ', Interstitial%evcw ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%faerlw ', Interstitial%faerlw ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%faersw ', Interstitial%faersw ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ffhh_ice ', Interstitial%ffhh_ice ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ffhh_land ', Interstitial%ffhh_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ffhh_ocean ', Interstitial%ffhh_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ffhh_water ', Interstitial%ffhh_water ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fh2 ', Interstitial%fh2 ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fh2_ice ', Interstitial%fh2_ice ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fh2_land ', Interstitial%fh2_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fh2_ocean ', Interstitial%fh2_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fh2_water ', Interstitial%fh2_water ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%flag_cice ', Interstitial%flag_cice ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%flag_guess ', Interstitial%flag_guess ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%flag_iter ', Interstitial%flag_iter ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ffmm_ice ', Interstitial%ffmm_ice ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ffmm_land ', Interstitial%ffmm_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ffmm_ocean ', Interstitial%ffmm_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ffmm_water ', Interstitial%ffmm_water ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fm10 ', Interstitial%fm10 ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fm10_ice ', Interstitial%fm10_ice ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fm10_land ', Interstitial%fm10_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fm10_ocean ', Interstitial%fm10_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fm10_water ', Interstitial%fm10_water ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%frain ', Interstitial%frain ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%frland ', Interstitial%frland ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fscav ', Interstitial%fscav ) @@ -1092,7 +1225,7 @@ subroutine GFS_interstitialtoscreen_run (Model, Statein, Stateout, Sfcprop, Coup call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gabsbdlw ', Interstitial%gabsbdlw ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gabsbdlw_ice ', Interstitial%gabsbdlw_ice ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gabsbdlw_land ', Interstitial%gabsbdlw_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gabsbdlw_ocean ', Interstitial%gabsbdlw_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gabsbdlw_water ', Interstitial%gabsbdlw_water ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gamma ', Interstitial%gamma ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gamq ', Interstitial%gamq ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gamt ', Interstitial%gamt ) @@ -1100,15 +1233,15 @@ subroutine GFS_interstitialtoscreen_run (Model, Statein, Stateout, Sfcprop, Coup call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gflx ', Interstitial%gflx ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gflx_ice ', Interstitial%gflx_ice ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gflx_land ', Interstitial%gflx_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gflx_ocean ', Interstitial%gflx_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gflx_water ', Interstitial%gflx_water ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gwdcu ', Interstitial%gwdcu ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gwdcv ', Interstitial%gwdcv ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%hefac ', Interstitial%hefac ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%zvfun ', Interstitial%zvfun ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%hffac ', Interstitial%hffac ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%hflxq ', Interstitial%hflxq ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%hflx_ice ', Interstitial%hflx_ice ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%hflx_land ', Interstitial%hflx_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%hflx_ocean ', Interstitial%hflx_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%hflx_water ', Interstitial%hflx_water ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%htlwc ', Interstitial%htlwc ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%htlw0 ', Interstitial%htlw0 ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%htswc ', Interstitial%htswc ) @@ -1142,7 +1275,7 @@ subroutine GFS_interstitialtoscreen_run (Model, Statein, Stateout, Sfcprop, Coup call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%qlyr ', Interstitial%qlyr ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%qss_ice ', Interstitial%qss_ice ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%qss_land ', Interstitial%qss_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%qss_ocean ', Interstitial%qss_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%qss_water ', Interstitial%qss_water ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%radar_reset ', Interstitial%radar_reset ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%raddt ', Interstitial%raddt ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%raincd ', Interstitial%raincd ) @@ -1152,7 +1285,7 @@ subroutine GFS_interstitialtoscreen_run (Model, Statein, Stateout, Sfcprop, Coup call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%rb ', Interstitial%rb ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%rb_ice ', Interstitial%rb_ice ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%rb_land ', Interstitial%rb_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%rb_ocean ', Interstitial%rb_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%rb_water ', Interstitial%rb_water ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%reset ', Interstitial%reset ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%rhc ', Interstitial%rhc ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%runoff ', Interstitial%runoff ) @@ -1170,7 +1303,7 @@ subroutine GFS_interstitialtoscreen_run (Model, Statein, Stateout, Sfcprop, Coup call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%scmpsw%visdf ', Interstitial%scmpsw%visdf ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%semis_ice ', Interstitial%semis_ice ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%semis_land ', Interstitial%semis_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%semis_ocean ', Interstitial%semis_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%semis_water ', Interstitial%semis_water ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%sfcalb ', Interstitial%sfcalb ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%sigma ', Interstitial%sigma ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%sigmaf ', Interstitial%sigmaf ) @@ -1179,44 +1312,43 @@ subroutine GFS_interstitialtoscreen_run (Model, Statein, Stateout, Sfcprop, Coup call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%slopetype ', Interstitial%slopetype ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%snowc ', Interstitial%snowc ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%snowd_ice ', Interstitial%snowd_ice ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%snowd_land ', Interstitial%snowd_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%snowd_ocean ', Interstitial%snowd_ocean ) +! call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%snowd_land ', Interstitial%snowd_land ) +! call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%snowd_water ', Interstitial%snowd_water ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%snohf ', Interstitial%snohf ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%snowmt ', Interstitial%snowmt ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%soiltype ', Interstitial%soiltype ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%stress ', Interstitial%stress ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%stress_ice ', Interstitial%stress_ice ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%stress_land ', Interstitial%stress_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%stress_ocean ', Interstitial%stress_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%stress_water ', Interstitial%stress_water ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%theta ', Interstitial%theta ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tice ', Interstitial%tice ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tlvl ', Interstitial%tlvl ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tlyr ', Interstitial%tlyr ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tprcp_ice ', Interstitial%tprcp_ice ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tprcp_land ', Interstitial%tprcp_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tprcp_ocean ', Interstitial%tprcp_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tprcp_water ', Interstitial%tprcp_water ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%trans ', Interstitial%trans ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tseal ', Interstitial%tseal ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tsfa ', Interstitial%tsfa ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tsfc_ice ', Interstitial%tsfc_ice ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tsfc_land ', Interstitial%tsfc_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tsfc_ocean ', Interstitial%tsfc_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tsfc_water ', Interstitial%tsfc_water ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tsfg ', Interstitial%tsfg ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tsurf ', Interstitial%tsurf ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tsurf_ice ', Interstitial%tsurf_ice ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tsurf_land ', Interstitial%tsurf_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tsurf_ocean ', Interstitial%tsurf_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tsurf_water ', Interstitial%tsurf_water ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ud_mf ', Interstitial%ud_mf ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%uustar_ice ', Interstitial%uustar_ice ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%uustar_land ', Interstitial%uustar_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%uustar_ocean ', Interstitial%uustar_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%uustar_water ', Interstitial%uustar_water ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%vdftra ', Interstitial%vdftra ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%vegf1d ', Interstitial%vegf1d ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%vegtype ', Interstitial%vegtype ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%wcbmax ', Interstitial%wcbmax ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%weasd_ice ', Interstitial%weasd_ice ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%weasd_land ', Interstitial%weasd_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%weasd_ocean ', Interstitial%weasd_ocean ) +! call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%weasd_land ', Interstitial%weasd_land ) +! call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%weasd_water ', Interstitial%weasd_water ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%wind ', Interstitial%wind ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%work1 ', Interstitial%work1 ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%work2 ', Interstitial%work2 ) @@ -1225,27 +1357,32 @@ subroutine GFS_interstitialtoscreen_run (Model, Statein, Stateout, Sfcprop, Coup call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%xlai1d ', Interstitial%xlai1d ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%xmu ', Interstitial%xmu ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%z01d ', Interstitial%z01d ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%zorl_ice ', Interstitial%zorl_ice ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%zorl_land ', Interstitial%zorl_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%zorl_ocean ', Interstitial%zorl_ocean ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%zt1d ', Interstitial%zt1d ) - ! CIRES UGWP v0 - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gw_dudt ', Interstitial%gw_dudt ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gw_dvdt ', Interstitial%gw_dvdt ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gw_dtdt ', Interstitial%gw_dtdt ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gw_kdis ', Interstitial%gw_kdis ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ztmax_ice ', Interstitial%ztmax_ice ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ztmax_land ', Interstitial%ztmax_land ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ztmax_water ', Interstitial%ztmax_water ) + ! UGWP call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tau_mtb ', Interstitial%tau_mtb ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tau_ogw ', Interstitial%tau_ogw ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tau_tofd ', Interstitial%tau_tofd ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tau_ngw ', Interstitial%tau_ngw ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tau_oss ', Interstitial%tau_oss ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dudt_mtb ', Interstitial%dudt_mtb ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dudt_tms ', Interstitial%dudt_tms ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%zmtb ', Interstitial%zmtb ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%zlwb ', Interstitial%zlwb ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%zogw ', Interstitial%zogw ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dudt_mtb ', Interstitial%dudt_mtb ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dudt_ogw ', Interstitial%dudt_ogw ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dudt_tms ', Interstitial%dudt_tms ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%zngw ', Interstitial%zngw ) + ! UGWP v1 + if (Model%do_ugwp_v1) then + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dudt_ngw ', Interstitial%dudt_ngw ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dvdt_ngw ', Interstitial%dvdt_ngw ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dtdt_ngw ', Interstitial%dtdt_ngw ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%kdis_ngw ', Interstitial%kdis_ngw ) + end if !-- GSD drag suite - if (Model%gwd_opt==3 .or. Model%gwd_opt==33) then + if (Model%gwd_opt==3 .or. Model%gwd_opt==33 .or. & + Model%gwd_opt==2 .or. Model%gwd_opt==22) then call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%varss ', Interstitial%varss ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ocss ', Interstitial%ocss ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%oa4ss ', Interstitial%oa4ss ) @@ -1312,8 +1449,6 @@ subroutine GFS_interstitialtoscreen_run (Model, Statein, Stateout, Sfcprop, Coup call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%precip_frac ', Interstitial%precip_frac ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%icseed_lw ', Interstitial%icseed_lw ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%icseed_sw ', Interstitial%icseed_sw ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fluxlwUP_allsky ', Interstitial%fluxlwUP_allsky ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fluxlwDOWN_allsky ', Interstitial%fluxlwDOWN_allsky ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fluxlwUP_clrsky ', Interstitial%fluxlwUP_clrsky ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fluxlwDOWN_clrsky ', Interstitial%fluxlwDOWN_clrsky ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fluxswUP_allsky ', Interstitial%fluxswUP_allsky ) @@ -1417,7 +1552,8 @@ end subroutine GFS_checkland_finalize subroutine GFS_checkland_run (me, master, blkno, im, kdt, iter, flag_iter, flag_guess, & flag_init, flag_restart, frac_grid, isot, ivegsrc, stype, vtype, slope, & soiltyp, vegtype, slopetyp, dry, icy, wet, lake, ocean, & - oceanfrac, landfrac, lakefrac, slmsk, islmsk, errmsg, errflg ) + oceanfrac, landfrac, lakefrac, slmsk, islmsk, & + zorl, zorlw, zorll, zorli, fice, errmsg, errflg ) use machine, only: kind_phys @@ -1453,6 +1589,11 @@ subroutine GFS_checkland_run (me, master, blkno, im, kdt, iter, flag_iter, flag_ real(kind_phys), intent(in ) :: lakefrac(im) real(kind_phys), intent(in ) :: slmsk(im) integer, intent(in ) :: islmsk(im) + real(kind_phys), intent(in ) :: zorl(im) + real(kind_phys), intent(in ) :: zorlw(im) + real(kind_phys), intent(in ) :: zorll(im) + real(kind_phys), intent(in ) :: zorli(im) + real(kind_phys), intent(in ) :: fice(im) character(len=*), intent( out) :: errmsg integer, intent( out) :: errflg @@ -1475,6 +1616,7 @@ subroutine GFS_checkland_run (me, master, blkno, im, kdt, iter, flag_iter, flag_ write(0,'(a,i5)') 'YYY: ivegsrc :', ivegsrc do i=1,im + !if (fice(i)>0.999) then !if (vegtype(i)==15) then write(0,'(a,2i5,1x,1x,l)') 'YYY: i, blk, flag_iter(i) :', i, blkno, flag_iter(i) write(0,'(a,2i5,1x,1x,l)') 'YYY: i, blk, flag_guess(i) :', i, blkno, flag_guess(i) @@ -1492,11 +1634,15 @@ subroutine GFS_checkland_run (me, master, blkno, im, kdt, iter, flag_iter, flag_ write(0,'(a,2i5,1x,e16.7)')'YYY: i, blk, oceanfrac(i) :', i, blkno, oceanfrac(i) write(0,'(a,2i5,1x,e16.7)')'YYY: i, blk, landfrac(i) :', i, blkno, landfrac(i) write(0,'(a,2i5,1x,e16.7)')'YYY: i, blk, lakefrac(i) :', i, blkno, lakefrac(i) + write(0,'(a,2i5,1x,e16.7)')'YYY: i, blk, fice(i) :', i, blkno, fice(i) write(0,'(a,2i5,1x,e16.7)')'YYY: i, blk, slmsk(i) :', i, blkno, slmsk(i) write(0,'(a,2i5,1x,i5)') 'YYY: i, blk, islmsk(i) :', i, blkno, islmsk(i) + write(0,'(a,2i5,1x,e16.7)')'YYY: i, blk, zorl(i) :', i, blkno, zorl(i) + write(0,'(a,2i5,1x,e16.7)')'YYY: i, blk, zorlw(i) :', i, blkno, zorlw(i) + write(0,'(a,2i5,1x,e16.7)')'YYY: i, blk, zorli(i) :', i, blkno, zorli(i) + write(0,'(a,2i5,1x,e16.7)')'YYY: i, blk, zorll(i) :', i, blkno, zorll(i) !end if end do end subroutine GFS_checkland_run - end module GFS_checkland diff --git a/physics/GFS_debug.meta b/physics/GFS_debug.meta index 3b044904b..4615e163a 100644 --- a/physics/GFS_debug.meta +++ b/physics/GFS_debug.meta @@ -27,7 +27,53 @@ standard_name = GFS_interstitial_type_instance_all_threads long_name = instance of derived type GFS_interstitial_type units = DDT - dimensions = (omp_threads) + dimensions = (number_of_openmp_threads) + type = GFS_interstitial_type + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + +######################################################################## +[ccpp-arg-table] + name = GFS_diagtoscreen_timestep_init + type = scheme +[Model] + standard_name = GFS_control_type_instance + long_name = instance of derived type GFS_control_type in FV3 + units = DDT + dimensions = () + type = GFS_control_type + intent = in + optional = F +[Data] + standard_name = GFS_data_type_instance_all_blocks + long_name = instance of derived type GFS_data_type + units = DDT + dimensions = (ccpp_block_count) + type = GFS_data_type + intent = in + optional = F +[Interstitial] + standard_name = GFS_interstitial_type_instance_all_threads + long_name = instance of derived type GFS_interstitial_type + units = DDT + dimensions = (number_of_openmp_threads) type = GFS_interstitial_type intent = in optional = F @@ -142,7 +188,7 @@ intent = in optional = F [nthreads] - standard_name = omp_threads + standard_name = number_of_openmp_threads long_name = number of OpenMP threads or fast physics schemes units = count dimensions = () @@ -205,7 +251,53 @@ standard_name = GFS_interstitial_type_instance_all_threads long_name = instance of derived type GFS_interstitial_type units = DDT - dimensions = (omp_threads) + dimensions = (number_of_openmp_threads) + type = GFS_interstitial_type + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + +######################################################################## +[ccpp-arg-table] + name = GFS_interstitialtoscreen_timestep_init + type = scheme +[Model] + standard_name = GFS_control_type_instance + long_name = instance of derived type GFS_control_type in FV3 + units = DDT + dimensions = () + type = GFS_control_type + intent = in + optional = F +[Data] + standard_name = GFS_data_type_instance_all_blocks + long_name = instance of derived type GFS_data_type + units = DDT + dimensions = (ccpp_block_count) + type = GFS_data_type + intent = in + optional = F +[Interstitial] + standard_name = GFS_interstitial_type_instance_all_threads + long_name = instance of derived type GFS_interstitial_type + units = DDT + dimensions = (number_of_openmp_threads) type = GFS_interstitial_type intent = in optional = F @@ -320,7 +412,7 @@ intent = in optional = F [nthreads] - standard_name = omp_threads + standard_name = number_of_openmp_threads long_name = number of OpenMP threads or fast physics schemes units = count dimensions = () @@ -440,7 +532,7 @@ intent = in optional = F [kdt] - standard_name = index_of_time_step + standard_name = index_of_timestep long_name = current number of time steps units = index dimensions = () @@ -472,7 +564,7 @@ intent = in optional = F [flag_init] - standard_name = flag_for_first_time_step + standard_name = flag_for_first_timestep long_name = flag signaling first time step for time integration loop units = flag dimensions = () @@ -488,7 +580,7 @@ intent = in optional = F [frac_grid] - standard_name = flag_for_fractional_grid + standard_name = flag_for_fractional_landmask long_name = flag for fractional grid units = flag dimensions = () @@ -496,7 +588,7 @@ intent = in optional = F [isot] - standard_name = soil_type_dataset_choice + standard_name = control_for_soil_type_dataset long_name = soil type dataset choice units = index dimensions = () @@ -504,7 +596,7 @@ intent = in optional = F [ivegsrc] - standard_name = vegetation_type_dataset_choice + standard_name = control_for_vegetation_dataset long_name = land use dataset choice units = index dimensions = () @@ -630,7 +722,7 @@ intent = in optional = F [slmsk] - standard_name = sea_land_ice_mask_real + standard_name = area_type long_name = landmask: sea/land/ice=0/1/2 units = flag dimensions = (horizontal_loop_extent) @@ -646,6 +738,51 @@ type = integer intent = in optional = F +[zorl] + standard_name = surface_roughness_length + long_name = surface roughness length + units = cm + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[zorlw] + standard_name = surface_roughness_length_over_water + long_name = surface roughness length over water + units = cm + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[zorll] + standard_name = surface_roughness_length_over_land + long_name = surface roughness length over land + units = cm + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[zorli] + standard_name = surface_roughness_length_over_ice + long_name = surface roughness length over ice + units = cm + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[fice] + standard_name = sea_ice_area_fraction_of_sea_area_fraction + long_name = ice fraction over open water + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/GFS_phys_time_vary.fv3.F90 b/physics/GFS_phys_time_vary.fv3.F90 index 8f0bc50d9..20c6c68c3 100644 --- a/physics/GFS_phys_time_vary.fv3.F90 +++ b/physics/GFS_phys_time_vary.fv3.F90 @@ -2,8 +2,8 @@ !! Contains code related to GFS physics suite setup (physics part of time_vary_step) !>\defgroup mod_GFS_phys_time_vary GFS Physics Time Update -!! This module contains GFS physics time vary subroutines including ozone, stratospheric water vapor, -!! aerosol, IN&CCN and surface properties updates. +!! This module contains GFS physics time vary subroutines including ozone, stratospheric water vapor, +!! aerosol, IN&CCN and surface properties updates. !> @{ module GFS_phys_time_vary @@ -22,17 +22,26 @@ module GFS_phys_time_vary use h2ointerp, only : read_h2odata, setindxh2o, h2ointerpol use aerclm_def, only : aerin, aer_pres, ntrcaer, ntrcaerm - use aerinterp, only : read_aerdata, setindxaer, aerinterpol + use aerinterp, only : read_aerdata, setindxaer, aerinterpol, read_aerdataf use iccn_def, only : ciplin, ccnin, ci_pres use iccninterp, only : read_cidata, setindxci, ciinterpol use gcycle_mod, only : gcycle -#if 0 + use cires_tauamf_data, only: cires_indx_ugwp, read_tau_amf, tau_amf_interp + use cires_tauamf_data, only: tau_limb, days_limb, ugwp_taulat + !--- variables needed for calculating 'sncovr' use namelist_soilveg, only: salp_data, snupx -#endif + use set_soilveg_mod, only: set_soilveg + + ! --- needed for Noah MP init + use noahmp_tables, only: laim_table,saim_table,sla_table, & + bexp_table,smcmax_table,smcwlt_table, & + dwsat_table,dksat_table,psisat_table, & + isurban_table,isbarren_table, & + isice_table,iswater_table implicit none @@ -42,9 +51,13 @@ module GFS_phys_time_vary logical :: is_initialized = .false. - real(kind=kind_phys), parameter :: con_hr = 3600.0_kind_phys - real(kind=kind_phys), parameter :: con_99 = 99.0_kind_phys - real(kind=kind_phys), parameter :: con_100 = 100.0_kind_phys + real(kind=kind_phys), parameter :: con_hr = 3600.0_kind_phys + real(kind=kind_phys), parameter :: con_99 = 99.0_kind_phys + real(kind=kind_phys), parameter :: con_100 = 100.0_kind_phys + real(kind=kind_phys), parameter :: missing_value = 9.99e20_kind_phys + real(kind=kind_phys), parameter :: drythresh = 1.e-4_kind_phys + real(kind=kind_phys), parameter :: zero = 0.0_kind_phys + real(kind=kind_phys), parameter :: one = 1.0_kind_phys contains @@ -58,13 +71,22 @@ subroutine GFS_phys_time_vary_init ( jindx1_o3, jindx2_o3, ddy_o3, ozpl, jindx1_h, jindx2_h, ddy_h, h2opl, & jindx1_aer, jindx2_aer, ddy_aer, iindx1_aer, iindx2_aer, ddx_aer, aer_nm, & jindx1_ci, jindx2_ci, ddy_ci, iindx1_ci, iindx2_ci, ddx_ci, imap, jmap, & - nthrds, errmsg, errflg) + do_ugwp_v1, jindx1_tau, jindx2_tau, ddy_j1tau, ddy_j2tau, & + isot, ivegsrc, nlunit, sncovr, sncovr_ice, lsm, lsm_noahmp, lsm_ruc, min_seaice, & + fice, landfrac, vtype, weasd, lsoil, zs, dzs, lsnow_lsm_lbound, lsnow_lsm_ubound, & + tvxy, tgxy, tahxy, canicexy, canliqxy, eahxy, cmxy, chxy, fwetxy, sneqvoxy, alboldxy,& + qsnowxy, wslakexy, albdvis_lnd, albdnir_lnd, albivis_lnd, albinir_lnd, albdvis_ice, & + albdnir_ice, albivis_ice, albinir_ice, emiss_lnd, emiss_ice, taussxy, waxy, wtxy, & + zwtxy, xlaixy, xsaixy, lfmassxy, stmassxy, rtmassxy, woodxy, stblcpxy, fastcpxy, & + smcwtdxy, deeprechxy, rechxy, snowxy, snicexy, snliqxy, tsnoxy , smoiseq, zsnsoxy, & + slc, smc, stc, tsfcl, snowd, canopy, tg3, stype, con_t0c, flag_restart, nthrds, & + errmsg, errflg) implicit none ! Interface variables integer, intent(in) :: me, master, ntoz, iccn, iflip, im, nx, ny - logical, intent(in) :: h2o_phys, iaerclm + logical, intent(in) :: h2o_phys, iaerclm, flag_restart integer, intent(in) :: idate(:) real(kind_phys), intent(in) :: xlat_d(:), xlon_d(:) @@ -77,35 +99,120 @@ subroutine GFS_phys_time_vary_init ( integer, intent(inout) :: jindx1_ci(:), jindx2_ci(:), iindx1_ci(:), iindx2_ci(:) real(kind_phys), intent(inout) :: ddy_ci(:), ddx_ci(:) integer, intent(inout) :: imap(:), jmap(:) + logical, intent(in) :: do_ugwp_v1 + real(kind_phys), intent(inout) :: ddy_j1tau(:), ddy_j2tau(:) + integer, intent(inout) :: jindx1_tau(:), jindx2_tau(:) + + integer, intent(in) :: isot, ivegsrc, nlunit + real(kind_phys), intent(inout) :: sncovr(:), sncovr_ice(:) + integer, intent(in) :: lsm, lsm_noahmp, lsm_ruc + real(kind_phys), intent(in) :: min_seaice, fice(:) + real(kind_phys), intent(in) :: landfrac(:), vtype(:) + real(kind_phys), intent(inout) :: weasd(:) + + ! NoahMP - only allocated when NoahMP is used + integer, intent(in) :: lsoil, lsnow_lsm_lbound, lsnow_lsm_ubound + real(kind_phys), intent(in) :: zs(:) + real(kind_phys), intent(in) :: dzs(:) + real(kind_phys), intent(inout) :: tvxy(:) + real(kind_phys), intent(inout) :: tgxy(:) + real(kind_phys), intent(inout) :: tahxy(:) + real(kind_phys), intent(inout) :: canicexy(:) + real(kind_phys), intent(inout) :: canliqxy(:) + real(kind_phys), intent(inout) :: eahxy(:) + real(kind_phys), intent(inout) :: cmxy(:) + real(kind_phys), intent(inout) :: chxy(:) + real(kind_phys), intent(inout) :: fwetxy(:) + real(kind_phys), intent(inout) :: sneqvoxy(:) + real(kind_phys), intent(inout) :: alboldxy(:) + real(kind_phys), intent(inout) :: qsnowxy(:) + real(kind_phys), intent(inout) :: wslakexy(:) + real(kind_phys), intent(inout) :: albdvis_lnd(:) + real(kind_phys), intent(inout) :: albdnir_lnd(:) + real(kind_phys), intent(inout) :: albivis_lnd(:) + real(kind_phys), intent(inout) :: albinir_lnd(:) + real(kind_phys), intent(inout) :: albdvis_ice(:) + real(kind_phys), intent(inout) :: albdnir_ice(:) + real(kind_phys), intent(inout) :: albivis_ice(:) + real(kind_phys), intent(inout) :: albinir_ice(:) + real(kind_phys), intent(inout) :: emiss_lnd(:) + real(kind_phys), intent(inout) :: emiss_ice(:) + real(kind_phys), intent(inout) :: taussxy(:) + real(kind_phys), intent(inout) :: waxy(:) + real(kind_phys), intent(inout) :: wtxy(:) + real(kind_phys), intent(inout) :: zwtxy(:) + real(kind_phys), intent(inout) :: xlaixy(:) + real(kind_phys), intent(inout) :: xsaixy(:) + real(kind_phys), intent(inout) :: lfmassxy(:) + real(kind_phys), intent(inout) :: stmassxy(:) + real(kind_phys), intent(inout) :: rtmassxy(:) + real(kind_phys), intent(inout) :: woodxy(:) + real(kind_phys), intent(inout) :: stblcpxy(:) + real(kind_phys), intent(inout) :: fastcpxy(:) + real(kind_phys), intent(inout) :: smcwtdxy(:) + real(kind_phys), intent(inout) :: deeprechxy(:) + real(kind_phys), intent(inout) :: rechxy(:) + real(kind_phys), intent(inout) :: snowxy(:) + real(kind_phys), intent(inout) :: snicexy(:,lsnow_lsm_lbound:) + real(kind_phys), intent(inout) :: snliqxy(:,lsnow_lsm_lbound:) + real(kind_phys), intent(inout) :: tsnoxy (:,lsnow_lsm_lbound:) + real(kind_phys), intent(inout) :: smoiseq(:,:) + real(kind_phys), intent(inout) :: zsnsoxy(:,lsnow_lsm_lbound:) + real(kind_phys), intent(inout) :: slc(:,:) + real(kind_phys), intent(inout) :: smc(:,:) + real(kind_phys), intent(inout) :: stc(:,:) + real(kind_phys), intent(in) :: tsfcl(:) + real(kind_phys), intent(in) :: snowd(:) + real(kind_phys), intent(in) :: canopy(:) + real(kind_phys), intent(in) :: tg3(:) + real(kind_phys), intent(in) :: stype(:) + real(kind_phys), intent(in) :: con_t0c integer, intent(in) :: nthrds character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! Local variables - integer :: i, j, ix + integer :: i, j, ix, vegtyp, iamin, iamax, jamin, jamax + real(kind_phys) :: rsnow + + !--- Noah MP + integer :: soiltyp, isnow, is, imn + real(kind=kind_phys) :: masslai, masssai, snd + real(kind=kind_phys) :: bexp, ddz, smcmax, smcwlt, dwsat, dksat, psisat + + real(kind=kind_phys), dimension(:), allocatable :: dzsno + real(kind=kind_phys), dimension(:), allocatable :: dzsnso ! Initialize CCPP error handling variables errmsg = '' errflg = 0 if (is_initialized) return + iamin=999 + iamax=-999 + jamin=999 + jamax=-999 !$OMP parallel num_threads(nthrds) default(none) & !$OMP shared (me,master,ntoz,h2o_phys,im,nx,ny,idate) & !$OMP shared (xlat_d,xlon_d,imap,jmap,errmsg,errflg) & !$OMP shared (levozp,oz_coeff,oz_pres,ozpl) & !$OMP shared (levh2o,h2o_coeff,h2o_pres,h2opl) & +!$OMP shared (iamin, iamax, jamin, jamax) & !$OMP shared (iaerclm,ntrcaer,aer_nm,iflip,iccn) & !$OMP shared (jindx1_o3,jindx2_o3,ddy_o3,jindx1_h,jindx2_h,ddy_h) & !$OMP shared (jindx1_aer,jindx2_aer,ddy_aer,iindx1_aer,iindx2_aer,ddx_aer) & !$OMP shared (jindx1_ci,jindx2_ci,ddy_ci,iindx1_ci,iindx2_ci,ddx_ci) & -!$OMP private (ix,i,j) +!$OMP shared (do_ugwp_v1,jindx1_tau,jindx2_tau,ddy_j1tau,ddy_j2tau) & +!$OMP shared (isot,ivegsrc,nlunit,sncovr,sncovr_ice,lsm,lsm_ruc) & +!$OMP shared (min_seaice,fice,landfrac,vtype,weasd,snupx,salp_data) & +!$OMP private (ix,i,j,rsnow,vegtyp) !$OMP sections !$OMP section -!> - Call read_o3data() to read ozone data +!> - Call read_o3data() to read ozone data call read_o3data (ntoz, me, master) ! Consistency check that the hardcoded values for levozp and @@ -177,6 +284,16 @@ subroutine GFS_phys_time_vary_init ( ! hardcoded in module iccn_def.F and GFS_typedefs.F90 endif +!$OMP section +!> - Call tau_amf dats for ugwp_v1 + if (do_ugwp_v1) then + call read_tau_amf(me, master, errmsg, errflg) + endif + +!$OMP section +!> - Initialize soil vegetation (needed for sncovr calculation further down) + call set_soilveg(me, isot, ivegsrc, nlunit) + !$OMP end sections ! Need an OpenMP barrier here (implicit in "end sections") @@ -202,6 +319,10 @@ subroutine GFS_phys_time_vary_init ( jindx2_aer, ddy_aer, xlon_d, & iindx1_aer, iindx2_aer, ddx_aer, & me, master) + iamin = min(minval(iindx1_aer), iamin) + iamax = max(maxval(iindx2_aer), iamax) + jamin = min(minval(jindx1_aer), jamin) + jamax = max(maxval(jindx2_aer), jamax) endif !$OMP section @@ -212,6 +333,13 @@ subroutine GFS_phys_time_vary_init ( iindx1_ci, iindx2_ci, ddx_ci) endif +!$OMP section +!> - Call cires_indx_ugwp to read monthly-mean GW-tau diagnosed from FV3GFS-runs that can resolve GWs + if (do_ugwp_v1) then + call cires_indx_ugwp (im, me, master, xlat_d, jindx1_tau, jindx2_tau, & + ddy_j1tau, ddy_j2tau) + endif + !$OMP section !--- initial calculation of maps local ix -> global i and j ix = 0 @@ -223,37 +351,359 @@ subroutine GFS_phys_time_vary_init ( enddo enddo +!$OMP section + !--- if sncovr does not exist in the restart, need to create it + if (all(sncovr < zero)) then + if (me == master ) write(0,'(a)') 'GFS_phys_time_vary_init: compute sncovr from weasd and soil vegetation parameters' + !--- compute sncovr from existing variables + !--- code taken directly from read_fix.f + sncovr(:) = zero + do ix=1,im + if (landfrac(ix) >= drythresh .or. fice(ix) >= min_seaice) then + vegtyp = vtype(ix) + if (vegtyp == 0) vegtyp = 7 + rsnow = 0.001_kind_phys*weasd(ix)/snupx(vegtyp) + if (0.001_kind_phys*weasd(ix) < snupx(vegtyp)) then + sncovr(ix) = one - (exp(-salp_data*rsnow) - rsnow*exp(-salp_data)) + else + sncovr(ix) = one + endif + endif + enddo + endif + + !--- For RUC LSM: create sncovr_ice from sncovr + if (lsm == lsm_ruc) then + if (all(sncovr_ice < zero)) then + if (me == master ) write(0,'(a)') 'GFS_phys_time_vary_init: fill sncovr_ice with sncovr for RUC LSM' + sncovr_ice(:) = sncovr(:) + endif + endif + !$OMP end sections !$OMP end parallel -#if 0 - !Calculate sncovr if it was read in but empty (from FV3/io/FV3GFS_io.F90/sfc_prop_restart_read) - if (first_time_step) then - if (nint(Data(1)%Sfcprop%sncovr(1)) == -9999) then - !--- compute sncovr from existing variables - !--- code taken directly from read_fix.f - do nb = 1, nblks - do ix = 1, Model%blksz(nb) - Data(nb)%Sfcprop%sncovr(ix) = 0.0 - if (Data(nb)%Sfcprop%slmsk(ix) > 0.001) then - vegtyp = Data(nb)%Sfcprop%vtype(ix) - if (vegtyp == 0) vegtyp = 7 - rsnow = 0.001*Data(nb)%Sfcprop%weasd(ix)/snupx(vegtyp) - if (0.001*Data(nb)%Sfcprop%weasd(ix) < snupx(vegtyp)) then - Data(nb)%Sfcprop%sncovr(ix) = 1.0 - (exp(-salp_data*rsnow) - rsnow*exp(-salp_data)) - else - Data(nb)%Sfcprop%sncovr(ix) = 1.0 - endif - endif - enddo - enddo - endif - endif -#endif + if (errflg/=0) return + + if (iaerclm) then + call read_aerdataf (iamin, iamax, jamin, jamax, me, master, iflip, & + idate, errmsg, errflg) + if (errflg/=0) return + end if + + !--- For Noah MP or RUC LSMs: initialize four components of albedo for + !--- land and ice - not for restart runs + lsm_init: if (.not.flag_restart) then + if (lsm == lsm_noahmp .or. lsm == lsm_ruc) then + if (me == master ) write(0,'(a)') 'GFS_phys_time_vary_init: initialize albedo for land and ice' + do ix=1,im + albdvis_lnd(ix) = 0.2_kind_phys + albdnir_lnd(ix) = 0.2_kind_phys + albivis_lnd(ix) = 0.2_kind_phys + albinir_lnd(ix) = 0.2_kind_phys + emiss_lnd(ix) = 0.95_kind_phys + enddo + endif + if (lsm == lsm_ruc) then + do ix=1,im + albdvis_ice(ix) = 0.6_kind_phys + albdnir_ice(ix) = 0.6_kind_phys + albivis_ice(ix) = 0.6_kind_phys + albinir_ice(ix) = 0.6_kind_phys + emiss_ice(ix) = 0.97_kind_phys + enddo + endif + + noahmp_init: if (lsm == lsm_noahmp) then + allocate(dzsno (lsnow_lsm_lbound:lsnow_lsm_ubound)) + allocate(dzsnso(lsnow_lsm_lbound:lsoil) ) + dzsno(:) = missing_value + dzsnso(:) = missing_value + + tvxy(:) = missing_value + tgxy(:) = missing_value + tahxy(:) = missing_value + canicexy(:) = missing_value + canliqxy(:) = missing_value + eahxy(:) = missing_value + cmxy(:) = missing_value + chxy(:) = missing_value + fwetxy(:) = missing_value + sneqvoxy(:) = missing_value + alboldxy(:) = missing_value + qsnowxy(:) = missing_value + wslakexy(:) = missing_value + taussxy(:) = missing_value + waxy(:) = missing_value + wtxy(:) = missing_value + zwtxy(:) = missing_value + xlaixy(:) = missing_value + xsaixy(:) = missing_value + + lfmassxy(:) = missing_value + stmassxy(:) = missing_value + rtmassxy(:) = missing_value + woodxy(:) = missing_value + stblcpxy(:) = missing_value + fastcpxy(:) = missing_value + smcwtdxy(:) = missing_value + deeprechxy(:) = missing_value + rechxy(:) = missing_value + + snowxy (:) = missing_value + snicexy(:,:) = missing_value + snliqxy(:,:) = missing_value + tsnoxy (:,:) = missing_value + smoiseq(:,:) = missing_value + zsnsoxy(:,:) = missing_value + + imn = idate(2) + +!$OMP parallel do num_threads(nthrds) default(none) & +!$OMP shared(im,lsoil,con_t0c,landfrac,tsfcl,tvxy,tgxy,tahxy) & +!$OMP shared(snowd,canicexy,canliqxy,canopy,eahxy,cmxy,chxy) & +!$OMP shared(fwetxy,sneqvoxy,weasd,alboldxy,qsnowxy,wslakexy) & +!$OMP shared(taussxy) & +!$OMP shared(waxy,wtxy,zwtxy,imn,vtype,xlaixy,xsaixy,lfmassxy) & +!$OMP shared(stmassxy,rtmassxy,woodxy,stblcpxy,fastcpxy) & +!$OMP shared(isbarren_table,isice_table,isurban_table) & +!$omp shared(iswater_table,laim_table,sla_table,bexp_table) & +!$omp shared(stc,smc,slc,tg3,snowxy,tsnoxy,snicexy,snliqxy) & +!$omp shared(zsnsoxy,STYPE,SMCMAX_TABLE,SMCWLT_TABLE,zs,dzs) & +!$omp shared(DWSAT_TABLE,DKSAT_TABLE,PSISAT_TABLE,smoiseq) & +!$OMP shared(smcwtdxy,deeprechxy,rechxy,errmsg,errflg) & +!$OMP private(vegtyp,masslai,masssai,snd,dzsno,dzsnso,isnow) & +!$OMP private(soiltyp,bexp,smcmax,smcwlt,dwsat,dksat,psisat,ddz) + do ix=1,im + if (landfrac(ix) >= drythresh) then + tvxy(ix) = tsfcl(ix) + tgxy(ix) = tsfcl(ix) + tahxy(ix) = tsfcl(ix) + + if (snowd(ix) > 0.01_kind_phys .and. tsfcl(ix) > con_t0c ) then + tvxy(ix) = con_t0c + tgxy(ix) = con_t0c + tahxy(ix) = con_t0c + end if + + canicexy(ix) = 0.0_kind_phys + canliqxy(ix) = canopy(ix) + + eahxy(ix) = 2000.0_kind_phys + + cmxy(ix) = zero + chxy(ix) = zero + fwetxy(ix) = zero + sneqvoxy(ix) = weasd(ix) ! mm + alboldxy(ix) = 0.65_kind_phys + qsnowxy(ix) = zero + +! if (srflag(ix) > 0.001) qsnowxy(ix) = tprcp(ix)/dtp + ! already set to 0.0 + wslakexy(ix) = zero + taussxy(ix) = zero + + waxy(ix) = 4900.0_kind_phys + wtxy(ix) = waxy(ix) + zwtxy(ix) = (25.0_kind_phys + 2.0_kind_phys) - waxy(ix) / 1000.0_kind_phys / 0.2_kind_phys + + vegtyp = vtype(ix) + if (vegtyp == 0) vegtyp = 7 + + if ((vegtyp == isbarren_table) .or. (vegtyp == isice_table) .or. (vegtyp == isurban_table) .or. (vegtyp == iswater_table)) then + + xlaixy(ix) = zero + xsaixy(ix) = zero + + lfmassxy(ix) = zero + stmassxy(ix) = zero + rtmassxy(ix) = zero + + woodxy (ix) = zero + stblcpxy (ix) = zero + fastcpxy (ix) = zero + + else + + xlaixy(ix) = max(laim_table(vegtyp, imn),0.05_kind_phys) +! xsaixy(ix) = max(saim_table(vegtyp, imn),0.05) + xsaixy(ix) = max(xlaixy(ix)*0.1_kind_phys,0.05_kind_phys) + + masslai = 1000.0_kind_phys / max(sla_table(vegtyp),one) + lfmassxy(ix) = xlaixy(ix)*masslai + masssai = 1000.0_kind_phys / 3.0_kind_phys + stmassxy(ix) = xsaixy(ix)* masssai + + rtmassxy(ix) = 500.0_kind_phys + + woodxy(ix) = 500.0_kind_phys + stblcpxy(ix) = 1000.0_kind_phys + fastcpxy(ix) = 1000.0_kind_phys + + endif ! non urban ... + + if (vegtyp == isice_table) then + do is = 1,lsoil + stc(ix,is) = min(stc(ix,is),min(tg3(ix),263.15_kind_phys)) + smc(ix,is) = one + slc(ix,is) = zero + enddo + endif + + snd = snowd(ix)/1000.0_kind_phys ! go to m from snwdph + + if (weasd(ix) /= zero .and. snd == zero ) then + snd = weasd(ix)/1000.0 + endif + + if (vegtyp == 15) then ! land ice in MODIS/IGBP + if (weasd(ix) < 0.1_kind_phys) then + weasd(ix) = 0.1_kind_phys + snd = 0.01_kind_phys + endif + endif + + if (snd < 0.025_kind_phys ) then + snowxy(ix) = zero + dzsno(-2:0) = zero + elseif (snd >= 0.025_kind_phys .and. snd <= 0.05_kind_phys ) then + snowxy(ix) = -1.0_kind_phys + dzsno(0) = snd + elseif (snd > 0.05_kind_phys .and. snd <= 0.10_kind_phys ) then + snowxy(ix) = -2.0_kind_phys + dzsno(-1) = 0.5_kind_phys*snd + dzsno(0) = 0.5_kind_phys*snd + elseif (snd > 0.10_kind_phys .and. snd <= 0.25_kind_phys ) then + snowxy(ix) = -2.0_kind_phys + dzsno(-1) = 0.05_kind_phys + dzsno(0) = snd - 0.05_kind_phys + elseif (snd > 0.25_kind_phys .and. snd <= 0.45_kind_phys ) then + snowxy(ix) = -3.0_kind_phys + dzsno(-2) = 0.05_kind_phys + dzsno(-1) = 0.5_kind_phys*(snd-0.05_kind_phys) + dzsno(0) = 0.5_kind_phys*(snd-0.05_kind_phys) + elseif (snd > 0.45_kind_phys) then + snowxy(ix) = -3.0_kind_phys + dzsno(-2) = 0.05_kind_phys + dzsno(-1) = 0.20_kind_phys + dzsno(0) = snd - 0.05_kind_phys - 0.20_kind_phys + else + errmsg = 'Error in GFS_phys_time_vary.fv3.F90: Problem with the logic assigning snow layers in Noah MP initialization' + errflg = 1 + endif + +! Now we have the snowxy field +! snice + snliq + tsno allocation and compute them from what we have + + tsnoxy(ix,:) = zero + snicexy(ix,:) = zero + snliqxy(ix,:) = zero + zsnsoxy(ix,:) = zero + + isnow = nint(snowxy(ix))+1 ! snowxy <=0.0, dzsno >= 0.0 + + do is = isnow,0 + tsnoxy(ix,is) = tgxy(ix) + snliqxy(ix,is) = zero + snicexy(ix,is) = one * dzsno(is) * weasd(ix)/snd + enddo +! +!zsnsoxy, all negative ? +! + do is = isnow,0 + dzsnso(is) = -dzsno(is) + enddo + + do is = 1,4 + dzsnso(is) = -dzs(is) + enddo +! +! Assign to zsnsoxy +! + zsnsoxy(ix,isnow) = dzsnso(isnow) + do is = isnow+1,4 + zsnsoxy(ix,is) = zsnsoxy(ix,is-1) + dzsnso(is) + enddo +! +! smoiseq +! Init water table related quantities here +! + soiltyp = stype(ix) + if (soiltyp /= 0) then + bexp = bexp_table(soiltyp) + smcmax = smcmax_table(soiltyp) + smcwlt = smcwlt_table(soiltyp) + dwsat = dwsat_table(soiltyp) + dksat = dksat_table(soiltyp) + psisat = -psisat_table(soiltyp) + endif + + if (vegtyp == isurban_table) then + smcmax = 0.45_kind_phys + smcwlt = 0.40_kind_phys + endif + + if ((bexp > zero) .and. (smcmax > zero) .and. (-psisat > zero)) then + do is = 1, lsoil + if ( is == 1 )then + ddz = -zs(is+1) * 0.5_kind_phys + elseif ( is < lsoil ) then + ddz = ( zs(is-1) - zs(is+1) ) * 0.5_kind_phys + else + ddz = zs(is-1) - zs(is) + endif + smoiseq(ix,is) = min(max(find_eq_smc(bexp, dwsat, dksat, ddz, smcmax),1.e-4_kind_phys),smcmax*0.99_kind_phys) + enddo + else ! bexp <= 0.0 + smoiseq(ix,1:4) = smcmax + endif ! end the bexp condition + + smcwtdxy(ix) = smcmax + deeprechxy(ix) = zero + rechxy(ix) = zero + + endif + + enddo ! ix +!$OMP end parallel do + + if (errflg/=0) return + + deallocate(dzsno) + deallocate(dzsnso) + + endif noahmp_init + endif lsm_init is_initialized = .true. + contains + +! +! Use newton-raphson method to find eq soil moisture +! + function find_eq_smc(bexp, dwsat, dksat, ddz, smcmax) result(smc) + implicit none + real(kind=kind_phys), intent(in) :: bexp, dwsat, dksat, ddz, smcmax + real(kind=kind_phys) :: smc + real(kind=kind_phys) :: expon, aa, bb, func, dfunc, dx + integer :: iter + ! + expon = bexp + 1. + aa = dwsat / ddz + bb = dksat / smcmax ** expon + smc = 0.5 * smcmax + ! + do iter = 1,100 + func = (smc - smcmax) * aa + bb * smc ** expon + dfunc = aa + bb * expon * smc ** bexp + dx = func / dfunc + smc = smc - dx + if ( abs (dx) < 1.e-6_kind_phys) return + enddo + end function find_eq_smc + end subroutine GFS_phys_time_vary_init !! @} @@ -273,7 +723,8 @@ subroutine GFS_phys_time_vary_timestep_init ( lakefrac, min_seaice, min_lakeice, smc, slc, stc, smois, sh2o, tslb, tiice, tg3, tref, & tsfc, tsfco, tisfc, hice, fice, facsf, facwf, alvsf, alvwf, alnsf, alnwf, zorli, zorll, & zorlo, weasd, slope, snoalb, canopy, vfrac, vtype, stype, shdmin, shdmax, snowd, & - cv, cvb, cvt, oro, oro_uf, xlat_d, xlon_d, slmsk, errmsg, errflg) + cv, cvb, cvt, oro, oro_uf, xlat_d, xlon_d, slmsk, landfrac, & + do_ugwp_v1, jindx1_tau, jindx2_tau, ddy_j1tau, ddy_j2tau, tau_amf, errmsg, errflg) implicit none @@ -297,13 +748,19 @@ subroutine GFS_phys_time_vary_timestep_init ( real(kind_phys), intent(in) :: prsl(:,:) integer, intent(in) :: seed0 real(kind_phys), intent(inout) :: rann(:,:) + + logical, intent(in) :: do_ugwp_v1 + integer, intent(in) :: jindx1_tau(:), jindx2_tau(:) + real(kind_phys), intent(in) :: ddy_j1tau(:), ddy_j2tau(:) + real(kind_phys), intent(inout) :: tau_amf(:) + ! For gcycle only integer, intent(in) :: nthrds, nx, ny, nsst, tile_num, nlunit, lsoil integer, intent(in) :: lsoil_lsm, kice, ialb, isot, ivegsrc character(len=*), intent(in) :: input_nml_file(:) logical, intent(in) :: use_ufo, nst_anl, frac_grid real(kind_phys), intent(in) :: fhcyc, phour, lakefrac(:), min_seaice, min_lakeice, & - xlat_d(:), xlon_d(:) + xlat_d(:), xlon_d(:), landfrac(:) real(kind_phys), intent(inout) :: smc(:,:), slc(:,:), stc(:,:), smois(:,:), sh2o(:,:), & tslb(:,:), tiice(:,:), tg3(:), tref(:), & tsfc(:), tsfco(:), tisfc(:), hice(:), fice(:), & @@ -311,7 +768,7 @@ subroutine GFS_phys_time_vary_timestep_init ( zorli(:), zorll(:), zorlo(:), weasd(:), slope(:), snoalb(:), & canopy(:), vfrac(:), vtype(:), stype(:), shdmin(:), shdmax(:), & snowd(:), cv(:), cvb(:), cvt(:), oro(:), oro_uf(:), slmsk(:) - ! + character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -332,6 +789,20 @@ subroutine GFS_phys_time_vary_timestep_init ( return end if +!$OMP parallel num_threads(nthrds) default(none) & +!$OMP shared(kdt,nsswr,lsswr,clstp,imfdeepcnv,cal_pre,random_clds) & +!$OMP shared(fhswr,fhour,seed0,cnx,cny,nrcm,wrk,rannie,rndval) & +!$OMP shared(rann,im,isc,jsc,imap,jmap,ntoz,me,idate,jindx1_o3,jindx2_o3) & +!$OMP shared(ozpl,ddy_o3,h2o_phys,jindx1_h,jindx2_h,h2opl,ddy_h,iaerclm,master) & +!$OMP shared(levs,prsl,iccn,jindx1_ci,jindx2_ci,ddy_ci,iindx1_ci,iindx2_ci) & +!$OMP shared(ddx_ci,in_nm,ccn_nm,do_ugwp_v1,jindx1_tau,jindx2_tau,ddy_j1tau) & +!$OMP shared(ddy_j2tau,tau_amf) & +!$OMP private(iseed,iskip,i,j,k) + +!$OMP sections + +!$OMP section + !--- switch for saving convective clouds - cnvc90.f !--- aka Ken Campana/Yu-Tai Hou legacy if ((mod(kdt,nsswr) == 0) .and. (lsswr)) then @@ -348,6 +819,8 @@ subroutine GFS_phys_time_vary_timestep_init ( clstp = 0100 endif +!$OMP section + !--- random number needed for RAS and old SAS and when cal_pre=.true. ! imfdeepcnv < 0 when ras = .true. if ( (imfdeepcnv <= 0 .or. cal_pre) .and. random_clds ) then @@ -373,6 +846,7 @@ subroutine GFS_phys_time_vary_timestep_init ( endif ! imfdeepcnv, cal_re, random_clds +!$OMP section !> - Call ozinterpol() to make ozone interpolation if (ntoz > 0) then call ozinterpol (me, im, idate, fhour, & @@ -380,6 +854,7 @@ subroutine GFS_phys_time_vary_timestep_init ( ozpl, ddy_o3) endif +!$OMP section !> - Call h2ointerpol() to make stratospheric water vapor data interpolation if (h2o_phys) then call h2ointerpol (me, im, idate, fhour, & @@ -387,34 +862,48 @@ subroutine GFS_phys_time_vary_timestep_init ( h2opl, ddy_h) endif -!> - Call aerinterpol() to make aerosol interpolation - if (iaerclm) then - call aerinterpol (me, master, im, idate, fhour, & - jindx1_aer, jindx2_aer, & - ddy_aer, iindx1_aer, & - iindx2_aer, ddx_aer, & - levs, prsl, aer_nm) - endif - +!$OMP section !> - Call ciinterpol() to make IN and CCN data interpolation if (iccn == 1) then - call ciinterpol (me, im, idate, fhour, & - jindx1_ci, jindx2_ci, & - ddy_ci, iindx1_ci, & - iindx2_ci, ddx_ci, & + call ciinterpol (me, im, idate, fhour, & + jindx1_ci, jindx2_ci, & + ddy_ci, iindx1_ci, & + iindx2_ci, ddx_ci, & levs, prsl, in_nm, ccn_nm) endif +!$OMP section +!> - Call cires_indx_ugwp to read monthly-mean GW-tau diagnosed from FV3GFS-runs that resolve GW-activ + if (do_ugwp_v1) then + call tau_amf_interp(me, master, im, idate, fhour, & + jindx1_tau, jindx2_tau, & + ddy_j1tau, ddy_j2tau, tau_amf) + endif + +!$OMP end sections +!$OMP end parallel + +!> - Call aerinterpol() to make aerosol interpolation + if (iaerclm) then + ! aerinterpol is using threading inside, don't + ! move into OpenMP parallel section above + call aerinterpol (me, master, nthrds, im, idate, & + fhour, jindx1_aer, jindx2_aer, & + ddy_aer, iindx1_aer, & + iindx2_aer, ddx_aer, & + levs, prsl, aer_nm) + endif + !> - Call gcycle() to repopulate specific time-varying surface properties for AMIP/forecast runs if (nscyc > 0) then if (mod(kdt,nscyc) == 1) THEN - call gcycle (me, nthrds, nx, ny, isc, jsc, nsst, tile_num, nlunit, & - input_nml_file, lsoil, lsoil_lsm, kice, idate, ialb, isot, ivegsrc, & - use_ufo, nst_anl, fhcyc, phour, lakefrac, min_seaice, min_lakeice, & - frac_grid, smc, slc, stc, smois, sh2o, tslb, tiice, tg3, tref, tsfc, & - tsfco, tisfc, hice, fice, facsf, facwf, alvsf, alvwf, alnsf, alnwf, & - zorli, zorll, zorlo, weasd, slope, snoalb, canopy, vfrac, vtype, & - stype, shdmin, shdmax, snowd, cv, cvb, cvt, oro, oro_uf, & + call gcycle (me, nthrds, nx, ny, isc, jsc, nsst, tile_num, nlunit, & + input_nml_file, lsoil, lsoil_lsm, kice, idate, ialb, isot, ivegsrc, & + use_ufo, nst_anl, fhcyc, phour, landfrac, lakefrac, min_seaice, min_lakeice,& + frac_grid, smc, slc, stc, smois, sh2o, tslb, tiice, tg3, tref, tsfc, & + tsfco, tisfc, hice, fice, facsf, facwf, alvsf, alvwf, alnsf, alnwf, & + zorli, zorll, zorlo, weasd, slope, snoalb, canopy, vfrac, vtype, & + stype, shdmin, shdmax, snowd, cv, cvb, cvt, oro, oro_uf, & xlat_d, xlon_d, slmsk, imap, jmap) endif endif @@ -480,6 +969,11 @@ subroutine GFS_phys_time_vary_finalize(errmsg, errflg) if (allocated(ccnin) ) deallocate(ccnin) if (allocated(ci_pres) ) deallocate(ci_pres) + ! Deallocate UGWP-input arrays + if (allocated(ugwp_taulat)) deallocate(ugwp_taulat) + if (allocated(tau_limb )) deallocate(tau_limb) + if (allocated(days_limb )) deallocate(days_limb) + is_initialized = .false. end subroutine GFS_phys_time_vary_finalize diff --git a/physics/GFS_phys_time_vary.fv3.meta b/physics/GFS_phys_time_vary.fv3.meta index 7ae6b4948..3fb2473bd 100644 --- a/physics/GFS_phys_time_vary.fv3.meta +++ b/physics/GFS_phys_time_vary.fv3.meta @@ -1,7 +1,8 @@ [ccpp-table-properties] name = GFS_phys_time_vary type = scheme - dependencies = aerclm_def.F,aerinterp.F90,gcycle.F90,h2o_def.f,h2ointerp.f90,iccn_def.F,iccninterp.F90,machine.F,mersenne_twister.f,namelist_soilveg.f,ozinterp.f90,ozne_def.f,sfcsub.F + dependencies = aerclm_def.F,aerinterp.F90,gcycle.F90,h2o_def.f,h2ointerp.f90,iccn_def.F,iccninterp.F90,machine.F,mersenne_twister.f + dependencies = namelist_soilveg.f,set_soilveg.f,ozinterp.f90,ozne_def.f,sfcsub.F,cires_tauamf_data.F90,noahmp_tables.f90 ######################################################################## [ccpp-arg-table] @@ -25,7 +26,7 @@ intent = in optional = F [ntoz] - standard_name = index_for_ozone + standard_name = index_of_ozone_mixing_ratio_in_tracer_concentration_array long_name = tracer index for ozone mixing ratio units = index dimensions = () @@ -49,7 +50,7 @@ intent = in optional = F [iccn] - standard_name = flag_for_in_ccn_forcing_for_morrison_gettelman_microphysics + standard_name = control_for_ice_cloud_condensation_nuclei_forcing long_name = flag for IN and CCN forcing for morrison gettelman microphysics units = none dimensions = () @@ -57,7 +58,7 @@ intent = in optional = F [iflip] - standard_name = flag_for_vertical_index_direction_control + standard_name = control_for_vertical_index_direction long_name = iflip - is not the same as flipv units = flag dimensions = () @@ -89,7 +90,7 @@ intent = in optional = F [idate] - standard_name = date_and_time_at_model_initialization_reordered + standard_name = date_and_time_at_model_initialization_in_united_states_order long_name = initial date with different size and ordering units = none dimensions = (4) @@ -115,7 +116,7 @@ intent = in optional = F [jindx1_o3] - standard_name = lower_ozone_interpolation_index + standard_name = lower_latitude_index_of_ozone_forcing_for_interpolation long_name = interpolation low index for ozone units = index dimensions = (horizontal_dimension) @@ -123,7 +124,7 @@ intent = inout optional = F [jindx2_o3] - standard_name = upper_ozone_interpolation_index + standard_name = upper_latitude_index_of_ozone_forcing_for_interpolation long_name = interpolation high index for ozone units = index dimensions = (horizontal_dimension) @@ -131,7 +132,7 @@ intent = inout optional = F [ddy_o3] - standard_name = ozone_interpolation_weight + standard_name = latitude_interpolation_weight_for_ozone_forcing long_name = interpolation high index for ozone units = none dimensions = (horizontal_dimension) @@ -149,7 +150,7 @@ intent = in optional = F [jindx1_h] - standard_name = lower_water_vapor_interpolation_index + standard_name = lower_latitude_index_of_stratospheric_water_vapor_forcing_for_interpolation long_name = interpolation low index for stratospheric water vapor units = index dimensions = (horizontal_dimension) @@ -157,7 +158,7 @@ intent = inout optional = F [jindx2_h] - standard_name = upper_water_vapor_interpolation_index + standard_name = upper_latitude_index_of_stratospheric_water_vapor_forcing_for_interpolation long_name = interpolation high index for stratospheric water vapor units = index dimensions = (horizontal_dimension) @@ -165,7 +166,7 @@ intent = inout optional = F [ddy_h] - standard_name = water_vapor_interpolation_weight + standard_name = latitude_interpolation_weight_for_stratospheric_water_vapor_forcing long_name = interpolation high index for stratospheric water vapor units = none dimensions = (horizontal_dimension) @@ -174,7 +175,7 @@ intent = inout optional = F [h2opl] - standard_name = h2o_forcing + standard_name = stratospheric_water_vapor_forcing long_name = water forcing data units = various dimensions = (horizontal_dimension,vertical_dimension_of_h2o_forcing_data,number_of_coefficients_in_h2o_forcing_data) @@ -183,7 +184,7 @@ intent = in optional = F [jindx1_aer] - standard_name = lower_aerosol_y_interpolation_index + standard_name = lower_latitude_index_of_aerosol_forcing_for_interpolation long_name = interpolation low index for prescribed aerosols in the y direction units = index dimensions = (horizontal_dimension) @@ -191,7 +192,7 @@ intent = inout optional = F [jindx2_aer] - standard_name = upper_aerosol_y_interpolation_index + standard_name = upper_latitude_index_of_aerosol_forcing_for_interpolation long_name = interpolation high index for prescribed aerosols in the y direction units = index dimensions = (horizontal_dimension) @@ -199,7 +200,7 @@ intent = inout optional = F [ddy_aer] - standard_name = aerosol_y_interpolation_weight + standard_name = latitude_interpolation_weight_for_aerosol_forcing long_name = interpolation high index for prescribed aerosols in the y direction units = none dimensions = (horizontal_dimension) @@ -208,7 +209,7 @@ intent = inout optional = F [iindx1_aer] - standard_name = lower_aerosol_x_interpolation_index + standard_name = lower_longitude_index_of_aerosol_forcing_for_interpolation long_name = interpolation low index for prescribed aerosols in the x direction units = index dimensions = (horizontal_dimension) @@ -216,7 +217,7 @@ intent = inout optional = F [iindx2_aer] - standard_name = upper_aerosol_x_interpolation_index + standard_name = upper_longitude_index_of_aerosol_forcing_for_interpolation long_name = interpolation high index for prescribed aerosols in the x direction units = index dimensions = (horizontal_dimension) @@ -224,7 +225,7 @@ intent = inout optional = F [ddx_aer] - standard_name = aerosol_x_interpolation_weight + standard_name = longitude_interpolation_weight_for_aerosol_forcing long_name = interpolation high index for prescribed aerosols in the x direction units = none dimensions = (horizontal_dimension) @@ -233,16 +234,16 @@ intent = inout optional = F [aer_nm] - standard_name = aerosol_number_concentration_from_gocart_aerosol_climatology + standard_name = mass_number_concentration_of_aerosol_from_gocart_climatology long_name = GOCART aerosol climatology number concentration units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_aerosol_tracers_MG) + dimensions = (horizontal_dimension,vertical_layer_dimension,number_of_aerosol_tracers_MG) type = real kind = kind_phys intent = in optional = F [jindx1_ci] - standard_name = lower_cloud_nuclei_y_interpolation_index + standard_name = lower_latitude_index_of_cloud_nuclei_forcing_for_interpolation long_name = interpolation low index for ice and cloud condensation nuclei in the y direction units = index dimensions = (horizontal_dimension) @@ -250,7 +251,7 @@ intent = inout optional = F [jindx2_ci] - standard_name = upper_cloud_nuclei_y_interpolation_index + standard_name = upper_latitude_index_of_cloud_nuclei_forcing_for_interpolation long_name = interpolation high index for ice and cloud condensation nuclei in the y direction units = index dimensions = (horizontal_dimension) @@ -258,7 +259,7 @@ intent = inout optional = F [ddy_ci] - standard_name = cloud_nuclei_y_interpolation_weight + standard_name = latitude_interpolation_weight_for_cloud_nuclei_forcing long_name = interpolation high index for ice and cloud condensation nuclei in the y direction units = none dimensions = (horizontal_dimension) @@ -267,7 +268,7 @@ intent = inout optional = F [iindx1_ci] - standard_name = lower_cloud_nuclei_x_interpolation_index + standard_name = lower_longitude_index_of_cloud_nuclei_forcing_for_interpolation long_name = interpolation low index for ice and cloud condensation nuclei in the x direction units = index dimensions = (horizontal_dimension) @@ -275,7 +276,7 @@ intent = inout optional = F [iindx2_ci] - standard_name = upper_cloud_nuclei_x_interpolation_index + standard_name = upper_longitude_index_of_cloud_nuclei_forcing_for_interpolation long_name = interpolation high index for ice and cloud condensation nuclei in the x direction units = index dimensions = (horizontal_dimension) @@ -283,7 +284,7 @@ intent = inout optional = F [ddx_ci] - standard_name = cloud_nuclei_x_interpolation_weight + standard_name = longitude_interpolation_weight_for_cloud_nuclei_forcing long_name = interpolation high index for ice and cloud condensation nuclei in the x direction units = none dimensions = (horizontal_dimension) @@ -307,8 +308,688 @@ type = integer intent = inout optional = F +[do_ugwp_v1] + standard_name = flag_for_ugwp_version_1 + long_name = flag to activate ver 1 CIRES UGWP + units = flag + dimensions = () + type = logical + intent = in + optional = F +[jindx1_tau] + standard_name = lower_latitude_index_of_absolute_momentum_flux_due_to_nonorographic_gravity_wave_drag_for_interpolation + long_name = index1 for weight1 for tau NGWs + units = none + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[jindx2_tau] + standard_name = upper_latitude_index_of_absolute_momentum_flux_due_to_nonorographic_gravity_wave_drag_for_interpolation + long_name = index2 for weight2 for tau NGWs + units = none + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[ddy_j1tau] + standard_name = latitude_interpolation_weight_complement_for_absolute_momentum_flux_due_to_nonorographic_gravity_wave_drag + long_name = interpolation weight1 for tau NGWs + units = none + dimensions = (horizontal_dimension) + type = real + intent = inout + kind = kind_phys + optional = F +[ddy_j2tau] + standard_name = latitude_interpolation_weight_for_absolute_momentum_flux_due_to_nonorographic_gravity_wave_drag + long_name = interpolation weight2 for tau NGWs + units = none + dimensions = (horizontal_dimension) + type = real + intent = inout + kind = kind_phys + optional = F +[isot] + standard_name = control_for_soil_type_dataset + long_name = soil type dataset choice + units = index + dimensions = () + type = integer + intent = in + optional = F +[ivegsrc] + standard_name = control_for_vegetation_dataset + long_name = land use dataset choice + units = index + dimensions = () + type = integer + intent = in + optional = F +[nlunit] + standard_name = iounit_of_namelist + long_name = fortran unit number for file opens + units = none + dimensions = () + type = integer + intent = in + optional = F +[sncovr] + standard_name = surface_snow_area_fraction_over_land + long_name = surface snow area fraction + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[sncovr_ice] + standard_name = surface_snow_area_fraction_over_ice + long_name = surface snow area fraction over ice + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[lsm] + standard_name = control_for_land_surface_scheme + long_name = flag for land surface model + units = flag + dimensions = () + type = integer + intent = in + optional = F +[lsm_noahmp] + standard_name = identifier_for_noahmp_land_surface_scheme + long_name = flag for NOAH MP land surface model + units = flag + dimensions = () + type = integer + intent = in + optional = F +[lsm_ruc] + standard_name = identifier_for_ruc_land_surface_scheme + long_name = flag for RUC land surface model + units = flag + dimensions = () + type = integer + intent = in + optional = F +[min_seaice] + standard_name = min_sea_ice_area_fraction + long_name = minimum sea ice value + units = frac + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[fice] + standard_name = sea_ice_area_fraction_of_sea_area_fraction + long_name = ice fraction over open water + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[landfrac] + standard_name = land_area_fraction + long_name = fraction of horizontal grid area occupied by land + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[vtype] + standard_name = vegetation_type_classification_real + long_name = vegetation type for lsm + units = index + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[weasd] + standard_name = lwe_thickness_of_surface_snow_amount + long_name = water equiv of acc snow depth over land and sea ice + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[lsoil] + standard_name = vertical_dimension_of_soil + long_name = number of soil layers + units = count + dimensions = () + type = integer + intent = in + optional = F +[zs] + standard_name = depth_of_soil_layers + long_name = depth of soil levels for land surface model + units = m + dimensions = (vertical_dimension_of_soil_internal_to_land_surface_scheme) + type = real + kind = kind_phys + intent = in + optional = F +[dzs] + standard_name = thickness_of_soil_layers_for_land_surface_model + long_name = thickness of soil levels for land surface model + units = m + dimensions = (vertical_dimension_of_soil_internal_to_land_surface_scheme) + type = real + kind = kind_phys + intent = in + optional = F +[lsnow_lsm_lbound] + standard_name = lower_bound_of_vertical_dimension_of_surface_snow + long_name = lower bound of of snow-related arrays for land surface model + units = count + dimensions = () + type = integer + intent = in + optional = F +[lsnow_lsm_ubound] + standard_name = upper_bound_of_vertical_dimension_of_surface_snow + long_name = upper bound of of snow-related arrays for land surface model + units = count + dimensions = () + type = integer + intent = in + optional = F +[tvxy] + standard_name = canopy_temperature + long_name = vegetation temperature + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[tgxy] + standard_name = ground_temperature + long_name = ground temperature for noahmp + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[tahxy] + standard_name = air_temperature_in_canopy + long_name = canopy air temperature + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[canicexy] + standard_name = canopy_intercepted_ice_mass + long_name = canopy intercepted ice mass + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[canliqxy] + standard_name = canopy_intercepted_liquid_water + long_name = canopy intercepted liquid water + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[eahxy] + standard_name = air_vapor_pressure_in_canopy + long_name = canopy air vapor pressure + units = Pa + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[cmxy] + standard_name = surface_drag_coefficient_for_momentum_for_noahmp + long_name = surface drag coefficient for momentum for noahmp + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[chxy] + standard_name = surface_drag_coefficient_for_heat_and_moisture_for_noahmp + long_name = surface exchange coeff heat & moisture for noahmp + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[fwetxy] + standard_name = wet_canopy_area_fraction + long_name = area fraction of canopy that is wetted/snowed + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[sneqvoxy] + standard_name = lwe_thickness_of_snowfall_amount_on_previous_timestep + long_name = snow mass at previous time step + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[alboldxy] + standard_name = surface_albedo_assuming_deep_snow_on_previous_timestep + long_name = snow albedo at previous time step + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qsnowxy] + standard_name = lwe_snowfall_rate + long_name = snow precipitation rate at surface + units = mm s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[wslakexy] + standard_name = water_storage_in_lake + long_name = lake water storage + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[taussxy] + standard_name = dimensionless_age_of_surface_snow + long_name = non-dimensional snow age + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[waxy] + standard_name = water_storage_in_aquifer + long_name = water storage in aquifer + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[wtxy] + standard_name = water_storage_in_aquifer_and_saturated_soil + long_name = water storage in aquifer and saturated soil + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[zwtxy] + standard_name = water_table_depth + long_name = water table depth + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[xlaixy] + standard_name = leaf_area_index + long_name = leaf area index + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[xsaixy] + standard_name = stem_area_index + long_name = stem area index + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[lfmassxy] + standard_name = leaf_mass_content + long_name = leaf mass + units = g m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[stmassxy] + standard_name = stem_mass_content + long_name = stem mass + units = g m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[rtmassxy] + standard_name = fine_root_mass_content + long_name = fine root mass + units = g m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[woodxy] + standard_name = wood_mass_content + long_name = wood mass including woody roots + units = g m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[stblcpxy] + standard_name = slow_soil_pool_mass_content_of_carbon + long_name = stable carbon in deep soil + units = g m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[fastcpxy] + standard_name = fast_soil_pool_mass_content_of_carbon + long_name = short-lived carbon in shallow soil + units = g m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[smcwtdxy] + standard_name = volumetric_soil_moisture_between_soil_bottom_and_water_table + long_name = soil water content between the bottom of the soil and the water table + units = m3 m-3 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[deeprechxy] + standard_name = water_table_recharge_assuming_deep + long_name = recharge to or from the water table when deep + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[rechxy] + standard_name = water_table_recharge_assuming_shallow + long_name = recharge to or from the water table when shallow + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[albdvis_lnd] + standard_name = surface_albedo_direct_visible_over_land + long_name = direct surface albedo visible band over land + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[albdnir_lnd] + standard_name = surface_albedo_direct_NIR_over_land + long_name = direct surface albedo NIR band over land + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[albivis_lnd] + standard_name = surface_albedo_diffuse_visible_over_land + long_name = diffuse surface albedo visible band over land + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[albinir_lnd] + standard_name = surface_albedo_diffuse_NIR_over_land + long_name = diffuse surface albedo NIR band over land + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[albdvis_ice] + standard_name = surface_albedo_direct_visible_over_ice + long_name = direct surface albedo visible band over ice + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[albdnir_ice] + standard_name = surface_albedo_direct_NIR_over_ice + long_name = direct surface albedo NIR band over ice + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[albivis_ice] + standard_name = surface_albedo_diffuse_visible_over_ice + long_name = diffuse surface albedo visible band over ice + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[albinir_ice] + standard_name = surface_albedo_diffuse_NIR_over_ice + long_name = diffuse surface albedo NIR band over ice + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[emiss_lnd] + standard_name = surface_longwave_emissivity_over_land + long_name = surface lw emissivity in fraction over land + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[emiss_ice] + standard_name = surface_longwave_emissivity_over_ice + long_name = surface lw emissivity in fraction over ice + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[snowxy] + standard_name = number_of_snow_layers + long_name = number of snow layers + units = count + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[snicexy] + standard_name = lwe_thickness_of_ice_in_surface_snow + long_name = snow layer ice + units = mm + dimensions = (horizontal_dimension,lower_bound_of_vertical_dimension_of_surface_snow:upper_bound_of_vertical_dimension_of_surface_snow) + type = real + kind = kind_phys + intent = inout + optional = F +[snliqxy] + standard_name = lwe_thickness_of_liquid_water_in_surface_snow + long_name = snow layer liquid water + units = mm + dimensions = (horizontal_dimension,lower_bound_of_vertical_dimension_of_surface_snow:upper_bound_of_vertical_dimension_of_surface_snow) + type = real + kind = kind_phys + intent = inout + optional = F +[tsnoxy] + standard_name = temperature_in_surface_snow + long_name = temperature_in_surface_snow + units = K + dimensions = (horizontal_dimension,lower_bound_of_vertical_dimension_of_surface_snow:upper_bound_of_vertical_dimension_of_surface_snow) + type = real + kind = kind_phys + intent = inout + optional = F +[smoiseq] + standard_name = volumetric_equilibrium_soil_moisture + long_name = equilibrium soil water content + units = m3 m-3 + dimensions = (horizontal_dimension,vertical_dimension_of_soil_internal_to_land_surface_scheme) + type = real + kind = kind_phys + intent = inout + optional = F +[zsnsoxy] + standard_name = depth_from_snow_surface_at_bottom_interface + long_name = depth from the top of the snow surface at the bottom of the layer + units = m + dimensions = (horizontal_dimension,lower_bound_of_vertical_dimension_of_surface_snow:vertical_dimension_of_soil_internal_to_land_surface_scheme) + type = real + kind = kind_phys + intent = inout + optional = F +[slc] + standard_name = volume_fraction_of_unfrozen_water_in_soil + long_name = liquid soil moisture + units = frac + dimensions = (horizontal_dimension,vertical_dimension_of_soil) + type = real + kind = kind_phys + intent = inout + optional = F +[smc] + standard_name = volume_fraction_of_condensed_water_in_soil + long_name = total soil moisture + units = frac + dimensions = (horizontal_dimension,vertical_dimension_of_soil) + type = real + kind = kind_phys + intent = inout + optional = F +[stc] + standard_name = soil_temperature + long_name = soil temperature + units = K + dimensions = (horizontal_dimension,vertical_dimension_of_soil) + type = real + kind = kind_phys + intent = inout + optional = F +[tsfcl] + standard_name = surface_skin_temperature_over_land + long_name = surface skin temperature over land + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[snowd] + standard_name = lwe_surface_snow + long_name = water equivalent snow depth + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[canopy] + standard_name = canopy_water_amount + long_name = canopy water amount + units = kg m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[tg3] + standard_name = deep_soil_temperature + long_name = deep soil temperature + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[stype] + standard_name = soil_type_classification_real + long_name = soil type for lsm + units = index + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[con_t0c] + standard_name = temperature_at_zero_celsius + long_name = temperature at 0 degree Celsius + units = K + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[flag_restart] + standard_name = flag_for_restart + long_name = flag for restart (warmstart) or coldstart + units = flag + dimensions = () + type = logical + intent = in + optional = F [nthrds] - standard_name = omp_threads + standard_name = number_of_openmp_threads long_name = number of OpenMP threads available for physics schemes units = count dimensions = () @@ -376,7 +1057,7 @@ intent = in optional = F [cnx] - standard_name = number_of_points_in_x_direction_for_this_cubed_sphere_face + standard_name = number_of_x_points_for_current_cubed_sphere_tile long_name = number of points in x direction for this cubed sphere face units = count dimensions = () @@ -384,7 +1065,7 @@ intent = in optional = F [cny] - standard_name = number_of_points_in_y_direction_for_this_cubed_sphere_face + standard_name = number_of_y_points_for_current_cubed_sphere_tile long_name = number of points in y direction for this cubed sphere face units = count dimensions = () @@ -408,7 +1089,7 @@ intent = in optional = F [nrcm] - standard_name = array_dimension_of_random_number + standard_name = number_of_random_numbers long_name = second dimension of random number stream for RAS units = count dimensions = () @@ -424,7 +1105,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () @@ -432,7 +1113,7 @@ intent = in optional = F [kdt] - standard_name = index_of_time_step + standard_name = index_of_timestep long_name = current forecast iteration units = index dimensions = () @@ -440,7 +1121,7 @@ intent = in optional = F [idate] - standard_name = date_and_time_at_model_initialization_reordered + standard_name = date_and_time_at_model_initialization_in_united_states_order long_name = initial date with different size and ordering units = none dimensions = (4) @@ -450,13 +1131,13 @@ [nsswr] standard_name = number_of_timesteps_between_shortwave_radiation_calls long_name = number of timesteps between shortwave radiation calls - units = + units = dimensions = () type = integer intent = in optional = F [fhswr] - standard_name = frequency_for_shortwave_radiation + standard_name = period_of_shortwave_radiation_calls long_name = frequency for shortwave radiation units = s dimensions = () @@ -465,7 +1146,7 @@ intent = in optional = F [lsswr] - standard_name = flag_to_calc_sw + standard_name = flag_for_calling_shortwave_radiation long_name = logical flags for sw radiation calls units = flag dimensions = () @@ -482,7 +1163,7 @@ intent = in optional = F [imfdeepcnv] - standard_name = flag_for_mass_flux_deep_convection_scheme + standard_name = control_for_deep_convection_scheme long_name = flag for mass-flux deep convection scheme units = flag dimensions = () @@ -490,7 +1171,7 @@ intent = in optional = F [cal_pre] - standard_name = flag_for_precipitation_type_algorithm + standard_name = flag_for_dominant_precipitation_type_partition long_name = flag controls precip type algorithm units = flag dimensions = () @@ -514,7 +1195,7 @@ intent = in optional = F [ntoz] - standard_name = index_for_ozone + standard_name = index_of_ozone_mixing_ratio_in_tracer_concentration_array long_name = tracer index for ozone mixing ratio units = index dimensions = () @@ -538,7 +1219,7 @@ intent = in optional = F [iccn] - standard_name = flag_for_in_ccn_forcing_for_morrison_gettelman_microphysics + standard_name = control_for_ice_cloud_condensation_nuclei_forcing long_name = flag for IN and CCN forcing for morrison gettelman microphysics units = none dimensions = () @@ -546,7 +1227,7 @@ intent = in optional = F [clstp] - standard_name = convective_cloud_switch + standard_name = control_for_convective_cloud_diagnostics long_name = index used by cnvc90 (for convective clouds) units = none dimensions = () @@ -555,7 +1236,7 @@ intent = out optional = F [jindx1_o3] - standard_name = lower_ozone_interpolation_index + standard_name = lower_latitude_index_of_ozone_forcing_for_interpolation long_name = interpolation low index for ozone units = index dimensions = (horizontal_dimension) @@ -563,7 +1244,7 @@ intent = in optional = F [jindx2_o3] - standard_name = upper_ozone_interpolation_index + standard_name = upper_latitude_index_of_ozone_forcing_for_interpolation long_name = interpolation high index for ozone units = index dimensions = (horizontal_dimension) @@ -571,7 +1252,7 @@ intent = in optional = F [ddy_o3] - standard_name = ozone_interpolation_weight + standard_name = latitude_interpolation_weight_for_ozone_forcing long_name = interpolation high index for ozone units = none dimensions = (horizontal_dimension) @@ -589,7 +1270,7 @@ intent = inout optional = F [jindx1_h] - standard_name = lower_water_vapor_interpolation_index + standard_name = lower_latitude_index_of_stratospheric_water_vapor_forcing_for_interpolation long_name = interpolation low index for stratospheric water vapor units = index dimensions = (horizontal_dimension) @@ -597,7 +1278,7 @@ intent = in optional = F [jindx2_h] - standard_name = upper_water_vapor_interpolation_index + standard_name = upper_latitude_index_of_stratospheric_water_vapor_forcing_for_interpolation long_name = interpolation high index for stratospheric water vapor units = index dimensions = (horizontal_dimension) @@ -605,7 +1286,7 @@ intent = in optional = F [ddy_h] - standard_name = water_vapor_interpolation_weight + standard_name = latitude_interpolation_weight_for_stratospheric_water_vapor_forcing long_name = interpolation high index for stratospheric water vapor units = none dimensions = (horizontal_dimension) @@ -614,7 +1295,7 @@ intent = in optional = F [h2opl] - standard_name = h2o_forcing + standard_name = stratospheric_water_vapor_forcing long_name = water forcing data units = various dimensions = (horizontal_dimension,vertical_dimension_of_h2o_forcing_data,number_of_coefficients_in_h2o_forcing_data) @@ -623,7 +1304,7 @@ intent = inout optional = F [jindx1_aer] - standard_name = lower_aerosol_y_interpolation_index + standard_name = lower_latitude_index_of_aerosol_forcing_for_interpolation long_name = interpolation low index for prescribed aerosols in the y direction units = index dimensions = (horizontal_dimension) @@ -631,7 +1312,7 @@ intent = in optional = F [jindx2_aer] - standard_name = upper_aerosol_y_interpolation_index + standard_name = upper_latitude_index_of_aerosol_forcing_for_interpolation long_name = interpolation high index for prescribed aerosols in the y direction units = index dimensions = (horizontal_dimension) @@ -639,7 +1320,7 @@ intent = in optional = F [ddy_aer] - standard_name = aerosol_y_interpolation_weight + standard_name = latitude_interpolation_weight_for_aerosol_forcing long_name = interpolation high index for prescribed aerosols in the y direction units = none dimensions = (horizontal_dimension) @@ -648,7 +1329,7 @@ intent = in optional = F [iindx1_aer] - standard_name = lower_aerosol_x_interpolation_index + standard_name = lower_longitude_index_of_aerosol_forcing_for_interpolation long_name = interpolation low index for prescribed aerosols in the x direction units = index dimensions = (horizontal_dimension) @@ -656,7 +1337,7 @@ intent = in optional = F [iindx2_aer] - standard_name = upper_aerosol_x_interpolation_index + standard_name = upper_longitude_index_of_aerosol_forcing_for_interpolation long_name = interpolation high index for prescribed aerosols in the x direction units = index dimensions = (horizontal_dimension) @@ -664,7 +1345,7 @@ intent = in optional = F [ddx_aer] - standard_name = aerosol_x_interpolation_weight + standard_name = longitude_interpolation_weight_for_aerosol_forcing long_name = interpolation high index for prescribed aerosols in the x direction units = none dimensions = (horizontal_dimension) @@ -673,16 +1354,16 @@ intent = in optional = F [aer_nm] - standard_name = aerosol_number_concentration_from_gocart_aerosol_climatology + standard_name = mass_number_concentration_of_aerosol_from_gocart_climatology long_name = GOCART aerosol climatology number concentration units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_aerosol_tracers_MG) + dimensions = (horizontal_dimension,vertical_layer_dimension,number_of_aerosol_tracers_MG) type = real kind = kind_phys intent = inout optional = F [jindx1_ci] - standard_name = lower_cloud_nuclei_y_interpolation_index + standard_name = lower_latitude_index_of_cloud_nuclei_forcing_for_interpolation long_name = interpolation low index for ice and cloud condensation nuclei in the y direction units = index dimensions = (horizontal_dimension) @@ -690,7 +1371,7 @@ intent = in optional = F [jindx2_ci] - standard_name = upper_cloud_nuclei_y_interpolation_index + standard_name = upper_latitude_index_of_cloud_nuclei_forcing_for_interpolation long_name = interpolation high index for ice and cloud condensation nuclei in the y direction units = index dimensions = (horizontal_dimension) @@ -698,7 +1379,7 @@ intent = in optional = F [ddy_ci] - standard_name = cloud_nuclei_y_interpolation_weight + standard_name = latitude_interpolation_weight_for_cloud_nuclei_forcing long_name = interpolation high index for ice and cloud condensation nuclei in the y direction units = none dimensions = (horizontal_dimension) @@ -707,7 +1388,7 @@ intent = in optional = F [iindx1_ci] - standard_name = lower_cloud_nuclei_x_interpolation_index + standard_name = lower_longitude_index_of_cloud_nuclei_forcing_for_interpolation long_name = interpolation low index for ice and cloud condensation nuclei in the x direction units = index dimensions = (horizontal_dimension) @@ -715,7 +1396,7 @@ intent = in optional = F [iindx2_ci] - standard_name = upper_cloud_nuclei_x_interpolation_index + standard_name = upper_longitude_index_of_cloud_nuclei_forcing_for_interpolation long_name = interpolation high index for ice and cloud condensation nuclei in the x direction units = index dimensions = (horizontal_dimension) @@ -723,7 +1404,7 @@ intent = in optional = F [ddx_ci] - standard_name = cloud_nuclei_x_interpolation_weight + standard_name = longitude_interpolation_weight_for_cloud_nuclei_forcing long_name = interpolation high index for ice and cloud condensation nuclei in the x direction units = none dimensions = (horizontal_dimension) @@ -732,19 +1413,19 @@ intent = in optional = F [in_nm] - standard_name = ice_nucleation_number + standard_name = ice_nucleation_number_from_climatology long_name = ice nucleation number in MG MP units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [ccn_nm] - standard_name = tendency_of_ccn_activated_number + standard_name = tendency_of_activated_cloud_condensation_nuclei_from_climatology long_name = tendency of ccn activated number units = kg-1 s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -769,7 +1450,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -783,16 +1464,16 @@ intent = in optional = F [rann] - standard_name = random_number_array + standard_name = random_number long_name = random number array (0-1) units = none - dimensions = (horizontal_dimension,array_dimension_of_random_number) + dimensions = (horizontal_dimension,number_of_random_numbers) type = real kind = kind_phys intent = inout optional = F [nthrds] - standard_name = omp_threads + standard_name = number_of_openmp_threads long_name = number of OpenMP threads available for physics schemes units = count dimensions = () @@ -816,7 +1497,7 @@ intent = in optional = F [nsst] - standard_name = flag_for_nsstm_run + standard_name = control_for_nsstm long_name = NSSTM flag: off/uncoupled/coupled=0/1/2 units = flag dimensions = () @@ -824,7 +1505,7 @@ intent = in optional = F [tile_num] - standard_name = number_of_tile + standard_name = index_of_cubed_sphere_tile long_name = tile number units = none dimensions = () @@ -832,7 +1513,7 @@ intent = in optional = F [nlunit] - standard_name = iounit_namelist + standard_name = iounit_of_namelist long_name = fortran unit number for file opens units = none dimensions = () @@ -840,7 +1521,7 @@ intent = in optional = F [lsoil] - standard_name = soil_vertical_dimension + standard_name = vertical_dimension_of_soil long_name = number of soil layers units = count dimensions = () @@ -848,7 +1529,7 @@ intent = in optional = F [lsoil_lsm] - standard_name = soil_vertical_dimension_for_land_surface_model + standard_name = vertical_dimension_of_soil_internal_to_land_surface_scheme long_name = number of soil layers internal to land surface model units = count dimensions = () @@ -856,7 +1537,7 @@ intent = in optional = F [kice] - standard_name = ice_vertical_dimension + standard_name = vertical_dimension_of_sea_ice long_name = vertical loop extent for ice levels, start at 1 units = count dimensions = () @@ -864,7 +1545,7 @@ intent = in optional = F [ialb] - standard_name = flag_for_using_climatology_albedo + standard_name = control_for_surface_albedo long_name = flag for using climatology alb, based on sfc type units = flag dimensions = () @@ -872,7 +1553,7 @@ intent = in optional = F [isot] - standard_name = soil_type_dataset_choice + standard_name = control_for_soil_type_dataset long_name = soil type dataset choice units = index dimensions = () @@ -880,7 +1561,7 @@ intent = in optional = F [ivegsrc] - standard_name = vegetation_type_dataset_choice + standard_name = control_for_vegetation_dataset long_name = land use dataset choice units = index dimensions = () @@ -888,10 +1569,10 @@ intent = in optional = F [input_nml_file] - standard_name = namelist_filename_for_internal_file_reads + standard_name = filename_of_internal_namelist long_name = namelist filename for internal file reads units = none - dimensions = (number_of_lines_of_namelist_filename_for_internal_file_reads) + dimensions = (number_of_lines_in_internal_namelist) type = character kind = len=256 intent = in @@ -913,7 +1594,7 @@ intent = in optional = F [frac_grid] - standard_name = flag_for_fractional_grid + standard_name = flag_for_fractional_landmask long_name = flag for fractional grid units = flag dimensions = () @@ -930,7 +1611,7 @@ intent = in optional = F [phour] - standard_name = forecast_time_at_previous_timestep + standard_name = forecast_time_on_previous_timestep long_name = forecast time at the previous timestep units = h dimensions = () @@ -948,7 +1629,7 @@ intent = in optional = F [min_seaice] - standard_name = sea_ice_minimum + standard_name = min_sea_ice_area_fraction long_name = minimum sea ice value units = frac dimensions = () @@ -957,7 +1638,7 @@ intent = in optional = F [min_lakeice] - standard_name = lake_ice_minimum + standard_name = min_lake_ice_area_fraction long_name = minimum lake ice value units = frac dimensions = () @@ -966,19 +1647,19 @@ intent = in optional = F [smc] - standard_name = volume_fraction_of_soil_moisture + standard_name = volume_fraction_of_condensed_water_in_soil long_name = total soil moisture units = frac - dimensions = (horizontal_dimension,soil_vertical_dimension) + dimensions = (horizontal_dimension,vertical_dimension_of_soil) type = real kind = kind_phys intent = inout optional = F [slc] - standard_name = volume_fraction_of_unfrozen_soil_moisture + standard_name = volume_fraction_of_unfrozen_water_in_soil long_name = liquid soil moisture units = frac - dimensions = (horizontal_dimension,soil_vertical_dimension) + dimensions = (horizontal_dimension,vertical_dimension_of_soil) type = real kind = kind_phys intent = inout @@ -987,7 +1668,7 @@ standard_name = soil_temperature long_name = soil temperature units = K - dimensions = (horizontal_dimension,soil_vertical_dimension) + dimensions = (horizontal_dimension,vertical_dimension_of_soil) type = real kind = kind_phys intent = inout @@ -996,7 +1677,7 @@ standard_name = volume_fraction_of_soil_moisture_for_land_surface_model long_name = volumetric fraction of soil moisture for lsm units = frac - dimensions = (horizontal_loop_extent,soil_vertical_dimension_for_land_surface_model) + dimensions = (horizontal_dimension,vertical_dimension_of_soil_internal_to_land_surface_scheme) type = real kind = kind_phys intent = inout @@ -1005,7 +1686,7 @@ standard_name = volume_fraction_of_unfrozen_soil_moisture_for_land_surface_model long_name = volume fraction of unfrozen soil moisture for lsm units = frac - dimensions = (horizontal_loop_extent,soil_vertical_dimension_for_land_surface_model) + dimensions = (horizontal_dimension,vertical_dimension_of_soil_internal_to_land_surface_scheme) type = real kind = kind_phys intent = inout @@ -1014,16 +1695,16 @@ standard_name = soil_temperature_for_land_surface_model long_name = soil temperature for land surface model units = K - dimensions = (horizontal_loop_extent,soil_vertical_dimension_for_land_surface_model) + dimensions = (horizontal_dimension,vertical_dimension_of_soil_internal_to_land_surface_scheme) type = real kind = kind_phys intent = inout optional = F [tiice] - standard_name = internal_ice_temperature + standard_name = temperature_in_ice_layer long_name = sea ice internal temperature units = K - dimensions = (horizontal_dimension,ice_vertical_dimension) + dimensions = (horizontal_dimension,vertical_dimension_of_sea_ice) type = real kind = kind_phys intent = inout @@ -1038,13 +1719,12 @@ intent = inout optional = F [tref] - standard_name = sea_surface_reference_temperature + standard_name = reference_sea_surface_temperature long_name = sea surface reference temperature units = K dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_nsstm_run > 0) intent = inout optional = F [tsfc] @@ -1084,7 +1764,7 @@ intent = inout optional = F [fice] - standard_name = sea_ice_concentration + standard_name = sea_ice_area_fraction_of_sea_area_fraction long_name = ice fraction over open water units = frac dimensions = (horizontal_dimension) @@ -1093,7 +1773,7 @@ intent = inout optional = F [facsf] - standard_name =fractional_coverage_with_strong_cosz_dependency + standard_name =strong_cosz_area_fraction long_name = fractional coverage with strong cosz dependency units = frac dimensions = (horizontal_dimension) @@ -1102,7 +1782,7 @@ intent = inout optional = F [facwf] - standard_name = fractional_coverage_with_weak_cosz_dependency + standard_name = weak_cosz_area_fraction long_name = fractional coverage with weak cosz dependency units = frac dimensions = (horizontal_dimension) @@ -1111,7 +1791,7 @@ intent = inout optional = F [alvsf] - standard_name = mean_vis_albedo_with_strong_cosz_dependency + standard_name = vis_albedo_strong_cosz long_name = mean vis albedo with strong cosz dependency units = frac dimensions = (horizontal_dimension) @@ -1120,7 +1800,7 @@ intent = inout optional = F [alvwf] - standard_name = mean_vis_albedo_with_weak_cosz_dependency + standard_name = vis_albedo_weak_cosz long_name = mean vis albedo with weak cosz dependency units = frac dimensions = (horizontal_dimension) @@ -1129,7 +1809,7 @@ intent = inout optional = F [alnsf] - standard_name = mean_nir_albedo_with_strong_cosz_dependency + standard_name = nir_albedo_strong_cosz long_name = mean nir albedo with strong cosz dependency units = frac dimensions = (horizontal_dimension) @@ -1138,7 +1818,7 @@ intent = inout optional = F [alnwf] - standard_name = mean_nir_albedo_with_weak_cosz_dependency + standard_name = nir_albedo_weak_cosz long_name = mean nir albedo with weak cosz dependency units = frac dimensions = (horizontal_dimension) @@ -1165,8 +1845,8 @@ intent = inout optional = F [zorlo] - standard_name = surface_roughness_length_over_ocean - long_name = surface roughness length over ocean + standard_name = surface_roughness_length_over_water + long_name = surface roughness length over water units = cm dimensions = (horizontal_dimension) type = real @@ -1174,7 +1854,7 @@ intent = inout optional = F [weasd] - standard_name = water_equivalent_accumulated_snow_depth + standard_name = lwe_thickness_of_surface_snow_amount long_name = water equiv of acc snow depth over land and sea ice units = mm dimensions = (horizontal_dimension) @@ -1192,7 +1872,7 @@ intent = inout optional = F [snoalb] - standard_name = upper_bound_on_max_albedo_over_deep_snow + standard_name = upper_bound_of_max_albedo_assuming_deep_snow long_name = maximum snow albedo units = frac dimensions = (horizontal_dimension) @@ -1237,7 +1917,7 @@ intent = inout optional = F [shdmin] - standard_name = minimum_vegetation_area_fraction + standard_name = min_vegetation_area_fraction long_name = min fractional coverage of green vegetation units = frac dimensions = (horizontal_dimension) @@ -1246,7 +1926,7 @@ intent = inout optional = F [shdmax] - standard_name = maximum_vegetation_area_fraction + standard_name = max_vegetation_area_fraction long_name = max fractional coverage of green vegetation units = frac dimensions = (horizontal_dimension) @@ -1255,7 +1935,7 @@ intent = inout optional = F [snowd] - standard_name = surface_snow_thickness_water_equivalent + standard_name = lwe_surface_snow long_name = water equivalent snow depth units = mm dimensions = (horizontal_dimension) @@ -1264,7 +1944,7 @@ intent = inout optional = F [cv] - standard_name = fraction_of_convective_cloud + standard_name = convective_cloud_area_fraction_between_sw_radiation_calls_from_cnvc90 long_name = fraction of convective cloud units = frac dimensions = (horizontal_dimension) @@ -1273,7 +1953,7 @@ intent = inout optional = F [cvb] - standard_name = pressure_at_bottom_of_convective_cloud + standard_name = pressure_at_convective_cloud_base_between_sw_radiation_calls_from_cnvc90 long_name = convective cloud bottom pressure units = Pa dimensions = (horizontal_dimension) @@ -1282,7 +1962,7 @@ intent = inout optional = F [cvt] - standard_name = pressure_at_top_of_convective_cloud + standard_name = pressure_at_convective_cloud_top_between_sw_radiation_calls_from_cnvc90 long_name = convective cloud top pressure units = Pa dimensions = (horizontal_dimension) @@ -1291,8 +1971,8 @@ intent = inout optional = F [oro] - standard_name = orography - long_name = orography + standard_name = height_above_mean_sea_level + long_name = height_above_mean_sea_level units = m dimensions = (horizontal_dimension) type = real @@ -1300,8 +1980,8 @@ intent = inout optional = F [oro_uf] - standard_name = orography_unfiltered - long_name = unfiltered orography + standard_name = unfiltered_height_above_mean_sea_level + long_name = unfiltered height_above_mean_sea_level units = m dimensions = (horizontal_dimension) type = real @@ -1326,8 +2006,17 @@ kind = kind_phys intent = inout optional = F +[landfrac] + standard_name = land_area_fraction + long_name = fraction of horizontal grid area occupied by land + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F [slmsk] - standard_name = sea_land_ice_mask_real + standard_name = area_type long_name = landmask: sea/land/ice=0/1/2 units = flag dimensions = (horizontal_dimension) @@ -1335,6 +2024,57 @@ kind = kind_phys intent = inout optional = F +[do_ugwp_v1] + standard_name = flag_for_ugwp_version_1 + long_name = flag to activate ver 1 CIRES UGWP + units = flag + dimensions = () + type = logical + intent = in + optional = F +[jindx1_tau] + standard_name = lower_latitude_index_of_absolute_momentum_flux_due_to_nonorographic_gravity_wave_drag_for_interpolation + long_name = index1 for weight1 for tau NGWs + units = none + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[jindx2_tau] + standard_name = upper_latitude_index_of_absolute_momentum_flux_due_to_nonorographic_gravity_wave_drag_for_interpolation + long_name = index2 for weight2 for tau NGWs + units = none + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[ddy_j1tau] + standard_name = latitude_interpolation_weight_complement_for_absolute_momentum_flux_due_to_nonorographic_gravity_wave_drag + long_name = interpolation weight1 for tau NGWs + units = none + dimensions = (horizontal_dimension) + type = real + intent = in + kind = kind_phys + optional = F +[ddy_j2tau] + standard_name = latitude_interpolation_weight_for_absolute_momentum_flux_due_to_nonorographic_gravity_wave_drag + long_name = interpolation weight2 for tau NGWs + units = none + dimensions = (horizontal_dimension) + type = real + intent = in + kind = kind_phys + optional = F +[tau_amf] + standard_name = absolute_momentum_flux_due_to_nonorographic_gravity_wave_drag + long_name = ngw_absolute_momentum_flux + units = various + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/GFS_phys_time_vary.scm.F90 b/physics/GFS_phys_time_vary.scm.F90 index be62e5052..e0f380276 100644 --- a/physics/GFS_phys_time_vary.scm.F90 +++ b/physics/GFS_phys_time_vary.scm.F90 @@ -1,398 +1,878 @@ -!> \file GFS_phys_time_vary.F90 +!> \file GFS_phys_time_vary.scm.F90 !! Contains code related to GFS physics suite setup (physics part of time_vary_step) +!>\defgroup mod_GFS_phys_time_vary GFS Physics Time Update +!! This module contains GFS physics time vary subroutines including ozone, stratospheric water vapor, +!! aerosol, IN&CCN and surface properties updates. +!> @{ module GFS_phys_time_vary + + use machine, only : kind_phys - use ozne_def, only : levozp, oz_coeff, oz_lat, oz_pres, oz_time, ozplin - use ozinterp, only : read_o3data, setindxoz, ozinterpol + use mersenne_twister, only: random_setseed, random_number - use h2o_def, only : levh2o, h2o_coeff, h2o_lat, h2o_pres, h2o_time, h2oplin - use h2ointerp, only : read_h2odata, setindxh2o, h2ointerpol + use ozne_def, only : levozp, oz_coeff, oz_lat, oz_pres, oz_time, ozplin + use ozinterp, only : read_o3data, setindxoz, ozinterpol - use aerclm_def, only : aerin, aer_pres, ntrcaer, ntrcaerm - use aerinterp, only : read_aerdata, setindxaer, aerinterpol + use h2o_def, only : levh2o, h2o_coeff, h2o_lat, h2o_pres, h2o_time, h2oplin + use h2ointerp, only : read_h2odata, setindxh2o, h2ointerpol - use iccn_def, only : ciplin, ccnin, ci_pres - use iccninterp, only : read_cidata, setindxci, ciinterpol + use aerclm_def, only : aerin, aer_pres, ntrcaer, ntrcaerm + use aerinterp, only : read_aerdata, setindxaer, aerinterpol, read_aerdataf + + use iccn_def, only : ciplin, ccnin, ci_pres + use iccninterp, only : read_cidata, setindxci, ciinterpol + + use cires_tauamf_data, only: cires_indx_ugwp, read_tau_amf, tau_amf_interp + use cires_tauamf_data, only: tau_limb, days_limb, ugwp_taulat -#if 0 !--- variables needed for calculating 'sncovr' use namelist_soilveg, only: salp_data, snupx -#endif + use set_soilveg_mod, only: set_soilveg + + ! --- needed for Noah MP init + use noahmp_tables, only: laim_table,saim_table,sla_table, & + bexp_table,smcmax_table,smcwlt_table, & + dwsat_table,dksat_table,psisat_table, & + isurban_table,isbarren_table, & + isice_table,iswater_table implicit none private - public GFS_phys_time_vary_init, GFS_phys_time_vary_run, GFS_phys_time_vary_finalize + public GFS_phys_time_vary_init, GFS_phys_time_vary_timestep_init, GFS_phys_time_vary_timestep_finalize, GFS_phys_time_vary_finalize logical :: is_initialized = .false. + real(kind=kind_phys), parameter :: con_hr = 3600.0_kind_phys + real(kind=kind_phys), parameter :: con_99 = 99.0_kind_phys + real(kind=kind_phys), parameter :: con_100 = 100.0_kind_phys + real(kind=kind_phys), parameter :: missing_value = 9.99e20_kind_phys + real(kind=kind_phys), parameter :: drythresh = 1.e-4_kind_phys + real(kind=kind_phys), parameter :: zero = 0.0_kind_phys + real(kind=kind_phys), parameter :: one = 1.0_kind_phys + contains !> \section arg_table_GFS_phys_time_vary_init Argument Table !! \htmlinclude GFS_phys_time_vary_init.html !! - subroutine GFS_phys_time_vary_init (Grid, Model, Interstitial, Tbd, errmsg, errflg) - - use GFS_typedefs, only: GFS_control_type, GFS_grid_type, & - GFS_Tbd_type, GFS_interstitial_type +!>\section gen_GFS_phys_time_vary_init GFS_phys_time_vary_init General Algorithm +!! @{ + subroutine GFS_phys_time_vary_init ( & + me, master, ntoz, h2o_phys, iaerclm, iccn, iflip, im, nx, ny, idate, xlat_d, xlon_d, & + jindx1_o3, jindx2_o3, ddy_o3, ozpl, jindx1_h, jindx2_h, ddy_h, h2opl, & + jindx1_aer, jindx2_aer, ddy_aer, iindx1_aer, iindx2_aer, ddx_aer, aer_nm, & + jindx1_ci, jindx2_ci, ddy_ci, iindx1_ci, iindx2_ci, ddx_ci, imap, jmap, & + do_ugwp_v1, jindx1_tau, jindx2_tau, ddy_j1tau, ddy_j2tau, & + isot, ivegsrc, nlunit, sncovr, sncovr_ice, lsm, lsm_noahmp, lsm_ruc, min_seaice, & + fice, landfrac, vtype, weasd, lsoil, zs, dzs, lsnow_lsm_lbound, lsnow_lsm_ubound, & + tvxy, tgxy, tahxy, canicexy, canliqxy, eahxy, cmxy, chxy, fwetxy, sneqvoxy, alboldxy,& + qsnowxy, wslakexy, albdvis_lnd, albdnir_lnd, albivis_lnd, albinir_lnd, albdvis_ice, & + albdnir_ice, albivis_ice, albinir_ice, emiss_lnd, emiss_ice, taussxy, waxy, wtxy, & + zwtxy, xlaixy, xsaixy, lfmassxy, stmassxy, rtmassxy, woodxy, stblcpxy, fastcpxy, & + smcwtdxy, deeprechxy, rechxy, snowxy, snicexy, snliqxy, tsnoxy , smoiseq, zsnsoxy, & + slc, smc, stc, tsfcl, snowd, canopy, tg3, stype, con_t0c, flag_restart, nthrds, & + errmsg, errflg) implicit none ! Interface variables - type(GFS_grid_type), intent(inout) :: Grid - type(GFS_control_type), intent(in) :: Model - type(GFS_interstitial_type), intent(inout) :: Interstitial - type(GFS_tbd_type), intent(in) :: Tbd - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg + integer, intent(in) :: me, master, ntoz, iccn, iflip, im, nx, ny + logical, intent(in) :: h2o_phys, iaerclm, flag_restart + integer, intent(in) :: idate(:) + real(kind_phys), intent(in) :: xlat_d(:), xlon_d(:) + + integer, intent(inout) :: jindx1_o3(:), jindx2_o3(:), jindx1_h(:), jindx2_h(:) + real(kind_phys), intent(inout) :: ddy_o3(:), ddy_h(:) + real(kind_phys), intent(in) :: ozpl(:,:,:), h2opl(:,:,:) + integer, intent(inout) :: jindx1_aer(:), jindx2_aer(:), iindx1_aer(:), iindx2_aer(:) + real(kind_phys), intent(inout) :: ddy_aer(:), ddx_aer(:) + real(kind_phys), intent(in) :: aer_nm(:,:,:) + integer, intent(inout) :: jindx1_ci(:), jindx2_ci(:), iindx1_ci(:), iindx2_ci(:) + real(kind_phys), intent(inout) :: ddy_ci(:), ddx_ci(:) + integer, intent(inout) :: imap(:), jmap(:) + logical, intent(in) :: do_ugwp_v1 + real(kind_phys), intent(inout) :: ddy_j1tau(:), ddy_j2tau(:) + integer, intent(inout) :: jindx1_tau(:), jindx2_tau(:) + + integer, intent(in) :: isot, ivegsrc, nlunit + real(kind_phys), intent(inout) :: sncovr(:), sncovr_ice(:) + integer, intent(in) :: lsm, lsm_noahmp, lsm_ruc + real(kind_phys), intent(in) :: min_seaice, fice(:) + real(kind_phys), intent(in) :: landfrac(:), vtype(:) + real(kind_phys), intent(inout) :: weasd(:) + + ! NoahMP - only allocated when NoahMP is used + integer, intent(in) :: lsoil, lsnow_lsm_lbound, lsnow_lsm_ubound + real(kind_phys), intent(in) :: zs(:) + real(kind_phys), intent(in) :: dzs(:) + real(kind_phys), intent(inout) :: tvxy(:) + real(kind_phys), intent(inout) :: tgxy(:) + real(kind_phys), intent(inout) :: tahxy(:) + real(kind_phys), intent(inout) :: canicexy(:) + real(kind_phys), intent(inout) :: canliqxy(:) + real(kind_phys), intent(inout) :: eahxy(:) + real(kind_phys), intent(inout) :: cmxy(:) + real(kind_phys), intent(inout) :: chxy(:) + real(kind_phys), intent(inout) :: fwetxy(:) + real(kind_phys), intent(inout) :: sneqvoxy(:) + real(kind_phys), intent(inout) :: alboldxy(:) + real(kind_phys), intent(inout) :: qsnowxy(:) + real(kind_phys), intent(inout) :: wslakexy(:) + real(kind_phys), intent(inout) :: albdvis_lnd(:) + real(kind_phys), intent(inout) :: albdnir_lnd(:) + real(kind_phys), intent(inout) :: albivis_lnd(:) + real(kind_phys), intent(inout) :: albinir_lnd(:) + real(kind_phys), intent(inout) :: albdvis_ice(:) + real(kind_phys), intent(inout) :: albdnir_ice(:) + real(kind_phys), intent(inout) :: albivis_ice(:) + real(kind_phys), intent(inout) :: albinir_ice(:) + real(kind_phys), intent(inout) :: emiss_lnd(:) + real(kind_phys), intent(inout) :: emiss_ice(:) + real(kind_phys), intent(inout) :: taussxy(:) + real(kind_phys), intent(inout) :: waxy(:) + real(kind_phys), intent(inout) :: wtxy(:) + real(kind_phys), intent(inout) :: zwtxy(:) + real(kind_phys), intent(inout) :: xlaixy(:) + real(kind_phys), intent(inout) :: xsaixy(:) + real(kind_phys), intent(inout) :: lfmassxy(:) + real(kind_phys), intent(inout) :: stmassxy(:) + real(kind_phys), intent(inout) :: rtmassxy(:) + real(kind_phys), intent(inout) :: woodxy(:) + real(kind_phys), intent(inout) :: stblcpxy(:) + real(kind_phys), intent(inout) :: fastcpxy(:) + real(kind_phys), intent(inout) :: smcwtdxy(:) + real(kind_phys), intent(inout) :: deeprechxy(:) + real(kind_phys), intent(inout) :: rechxy(:) + real(kind_phys), intent(inout) :: snowxy(:) + real(kind_phys), intent(inout) :: snicexy(:,lsnow_lsm_lbound:) + real(kind_phys), intent(inout) :: snliqxy(:,lsnow_lsm_lbound:) + real(kind_phys), intent(inout) :: tsnoxy (:,lsnow_lsm_lbound:) + real(kind_phys), intent(inout) :: smoiseq(:,:) + real(kind_phys), intent(inout) :: zsnsoxy(:,lsnow_lsm_lbound:) + real(kind_phys), intent(inout) :: slc(:,:) + real(kind_phys), intent(inout) :: smc(:,:) + real(kind_phys), intent(inout) :: stc(:,:) + real(kind_phys), intent(in) :: tsfcl(:) + real(kind_phys), intent(in) :: snowd(:) + real(kind_phys), intent(in) :: canopy(:) + real(kind_phys), intent(in) :: tg3(:) + real(kind_phys), intent(in) :: stype(:) + real(kind_phys), intent(in) :: con_t0c + + integer, intent(in) :: nthrds + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg ! Local variables - integer :: i, j, ix, nb, nt + integer :: i, j, ix, vegtyp, iamin, iamax, jamin, jamax + real(kind_phys) :: rsnow + + !--- Noah MP + integer :: soiltyp, isnow, is, imn + real(kind=kind_phys) :: masslai, masssai, snd + real(kind=kind_phys) :: bexp, ddz, smcmax, smcwlt, dwsat, dksat, psisat + + real(kind=kind_phys), dimension(:), allocatable :: dzsno + real(kind=kind_phys), dimension(:), allocatable :: dzsnso ! Initialize CCPP error handling variables errmsg = '' errflg = 0 if (is_initialized) return + iamin=999 + iamax=-999 + jamin=999 + jamax=-999 - nb = 1 - nt = 1 - - call read_o3data (Model%ntoz, Model%me, Model%master) +!> - Call read_o3data() to read ozone data + call read_o3data (ntoz, me, master) ! Consistency check that the hardcoded values for levozp and ! oz_coeff in GFS_typedefs.F90 match what is set by read_o3data - ! in GFS_typedefs.F90: allocate (Tbd%ozpl (IM,levozp,oz_coeff)) - if (size(Tbd%ozpl, dim=2).ne.levozp) then + ! in GFS_typedefs.F90: allocate (Tbd%ozpl (IM,levozp,oz_coeff)) + if (size(ozpl, dim=2).ne.levozp) then write(errmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", & "levozp from read_o3data does not match value in GFS_typedefs.F90: ", & - levozp, " /= ", size(Tbd%ozpl, dim=2) + levozp, " /= ", size(ozpl, dim=2) errflg = 1 end if - if (size(Tbd%ozpl, dim=3).ne.oz_coeff) then + if (size(ozpl, dim=3).ne.oz_coeff) then write(errmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", & "oz_coeff from read_o3data does not match value in GFS_typedefs.F90: ", & - oz_coeff, " /= ", size(Tbd%ozpl, dim=3) + oz_coeff, " /= ", size(ozpl, dim=3) errflg = 1 end if - - call read_h2odata (Model%h2o_phys, Model%me, Model%master) - + +!> - Call read_h2odata() to read stratospheric water vapor data + call read_h2odata (h2o_phys, me, master) + ! Consistency check that the hardcoded values for levh2o and ! h2o_coeff in GFS_typedefs.F90 match what is set by read_o3data ! in GFS_typedefs.F90: allocate (Tbd%h2opl (IM,levh2o,h2o_coeff)) - if (size(Tbd%h2opl, dim=2).ne.levh2o) then + if (size(h2opl, dim=2).ne.levh2o) then write(errmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", & "levh2o from read_h2odata does not match value in GFS_typedefs.F90: ", & - levh2o, " /= ", size(Tbd%h2opl, dim=2) + levh2o, " /= ", size(h2opl, dim=2) errflg = 1 end if - if (size(Tbd%h2opl, dim=3).ne.h2o_coeff) then + if (size(h2opl, dim=3).ne.h2o_coeff) then write(errmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", & "h2o_coeff from read_h2odata does not match value in GFS_typedefs.F90: ", & - h2o_coeff, " /= ", size(Tbd%h2opl, dim=3) + h2o_coeff, " /= ", size(h2opl, dim=3) errflg = 1 - end if - - if (Model%iaerclm) then - ! Consistency check that the value for ntrcaerm set in GFS_typedefs.F90 - ! and used to allocate Tbd%aer_nm matches the value defined in aerclm_def - if (size(Tbd%aer_nm, dim=3).ne.ntrcaerm) then - write(errmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", & - "ntrcaerm from aerclm_def does not match value in GFS_typedefs.F90: ", & - ntrcaerm, " /= ", size(Tbd%aer_nm, dim=3) - errflg = 1 - else - ! Update the value of ntrcaer in aerclm_def with the value defined - ! in GFS_typedefs.F90 that is used to allocate the Tbd DDT. - ! If Model%iaerclm is .true., then ntrcaer == ntrcaerm - ntrcaer = size(Tbd%aer_nm, dim=3) - ! Read aerosol climatology - call read_aerdata (Model%me,Model%master,Model%iflip,Model%idate,errmsg,errflg) - if (errflg/=0) return - endif + end if + +!> - Call read_aerdata() to read aerosol climatology + if (iaerclm) then + ! Consistency check that the value for ntrcaerm set in GFS_typedefs.F90 + ! and used to allocate aer_nm matches the value defined in aerclm_def + if (size(aer_nm, dim=3).ne.ntrcaerm) then + write(errmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", & + "ntrcaerm from aerclm_def does not match value in GFS_typedefs.F90: ", & + ntrcaerm, " /= ", size(aer_nm, dim=3) + errflg = 1 + else + ! Update the value of ntrcaer in aerclm_def with the value defined + ! in GFS_typedefs.F90 that is used to allocate the Tbd DDT. + ! If iaerclm is .true., then ntrcaer == ntrcaerm + ntrcaer = size(aer_nm, dim=3) + ! Read aerosol climatology + call read_aerdata (me,master,iflip,idate,errmsg,errflg) + endif else ! Update the value of ntrcaer in aerclm_def with the value defined ! in GFS_typedefs.F90 that is used to allocate the Tbd DDT. - ! If Model%iaerclm is .false., then ntrcaer == 1 - ntrcaer = size(Tbd%aer_nm, dim=3) + ! If iaerclm is .false., then ntrcaer == 1 + ntrcaer = size(aer_nm, dim=3) endif - - if (Model%iccn == 1) then - call read_cidata ( Model%me, Model%master) - ! No consistency check needed for in/ccn data, all values are - ! hardcoded in module iccn_def.F and GFS_typedefs.F90 + +!> - Call read_cidata() to read IN and CCN data + if (iccn == 1) then + call read_cidata (me,master) + ! No consistency check needed for in/ccn data, all values are + ! hardcoded in module iccn_def.F and GFS_typedefs.F90 endif - - ! Update values of oz_pres in Interstitial data type for all threads - if (Model%ntoz > 0) then - Interstitial%oz_pres = oz_pres - end if - ! Update values of h2o_pres in Interstitial data type for all threads - if (Model%h2o_phys) then - Interstitial%h2o_pres = h2o_pres - end if - - - !--- read in and initialize ozone - if (Model%ntoz > 0) then - call setindxoz (Model%blksz(nb), Grid%xlat_d, Grid%jindx1_o3, & - Grid%jindx2_o3, Grid%ddy_o3) +!> - Call tau_amf dats for ugwp_v1 + if (do_ugwp_v1) then + call read_tau_amf(me, master, errmsg, errflg) endif - !--- read in and initialize stratospheric water - if (Model%h2o_phys) then - call setindxh2o (Model%blksz(nb), Grid%xlat_d, Grid%jindx1_h, & - Grid%jindx2_h, Grid%ddy_h) +!> - Initialize soil vegetation (needed for sncovr calculation further down) + call set_soilveg(me, isot, ivegsrc, nlunit) + +!> - Call setindxoz() to initialize ozone data + if (ntoz > 0) then + call setindxoz (im, xlat_d, jindx1_o3, jindx2_o3, ddy_o3) endif - !--- read in and initialize aerosols - if (Model%iaerclm) then - call setindxaer (Model%blksz(nb), Grid%xlat_d, Grid%jindx1_aer, & - Grid%jindx2_aer, Grid%ddy_aer, Grid%xlon_d, & - Grid%iindx1_aer, Grid%iindx2_aer, Grid%ddx_aer, & - Model%me, Model%master) +!> - Call setindxh2o() to initialize stratospheric water vapor data + if (h2o_phys) then + call setindxh2o (im, xlat_d, jindx1_h, jindx2_h, ddy_h) endif - !--- read in and initialize IN and CCN - if (Model%iccn == 1) then - call setindxci (Model%blksz(nb), Grid%xlat_d, Grid%jindx1_ci, & - Grid%jindx2_ci, Grid%ddy_ci, Grid%xlon_d, & - Grid%iindx1_ci, Grid%iindx2_ci, Grid%ddx_ci) + +!> - Call setindxaer() to initialize aerosols data + if (iaerclm) then + call setindxaer (im, xlat_d, jindx1_aer, & + jindx2_aer, ddy_aer, xlon_d, & + iindx1_aer, iindx2_aer, ddx_aer, & + me, master) + iamin = min(minval(iindx1_aer), iamin) + iamax = max(maxval(iindx2_aer), iamax) + jamin = min(minval(jindx1_aer), jamin) + jamax = max(maxval(jindx2_aer), jamax) endif - - !--- initial calculation of maps local ix -> global i and j, store in Tbd + +!> - Call setindxci() to initialize IN and CCN data + if (iccn == 1) then + call setindxci (im, xlat_d, jindx1_ci, & + jindx2_ci, ddy_ci, xlon_d, & + iindx1_ci, iindx2_ci, ddx_ci) + endif + +!> - Call cires_indx_ugwp to read monthly-mean GW-tau diagnosed from FV3GFS-runs that can resolve GWs + if (do_ugwp_v1) then + call cires_indx_ugwp (im, me, master, xlat_d, jindx1_tau, jindx2_tau, & + ddy_j1tau, ddy_j2tau) + endif + + !--- initial calculation of maps local ix -> global i and j ix = 0 - nb = 1 - do j = 1,Model%ny - do i = 1,Model%nx + do j = 1,ny + do i = 1,nx ix = ix + 1 - if (ix .gt. Model%blksz(nb)) then - ix = 1 - nb = nb + 1 - endif - Tbd%jmap(ix) = j - Tbd%imap(ix) = i + jmap(ix) = j + imap(ix) = i enddo enddo - is_initialized = .true. + !--- if sncovr does not exist in the restart, need to create it + if (all(sncovr < zero)) then + if (me == master ) write(0,'(a)') 'GFS_phys_time_vary_init: compute sncovr from weasd and soil vegetation parameters' + !--- compute sncovr from existing variables + !--- code taken directly from read_fix.f + sncovr(:) = zero + do ix=1,im + if (landfrac(ix) >= drythresh .or. fice(ix) >= min_seaice) then + vegtyp = vtype(ix) + if (vegtyp == 0) vegtyp = 7 + rsnow = 0.001_kind_phys*weasd(ix)/snupx(vegtyp) + if (0.001_kind_phys*weasd(ix) < snupx(vegtyp)) then + sncovr(ix) = one - (exp(-salp_data*rsnow) - rsnow*exp(-salp_data)) + else + sncovr(ix) = one + endif + endif + enddo + endif + + !--- For RUC LSM: create sncovr_ice from sncovr + if (lsm == lsm_ruc) then + if (all(sncovr_ice < zero)) then + if (me == master ) write(0,'(a)') 'GFS_phys_time_vary_init: fill sncovr_ice with sncovr for RUC LSM' + sncovr_ice(:) = sncovr(:) + endif + endif + if (errflg/=0) return + + if (iaerclm) then + call read_aerdataf (iamin, iamax, jamin, jamax, me, master, iflip, & + idate, errmsg, errflg) + if (errflg/=0) return + end if + + !--- For Noah MP or RUC LSMs: initialize four components of albedo for + !--- land and ice - not for restart runs + lsm_init: if (.not.flag_restart) then + if (lsm == lsm_noahmp .or. lsm == lsm_ruc) then + if (me == master ) write(0,'(a)') 'GFS_phys_time_vary_init: initialize albedo for land and ice' + do ix=1,im + albdvis_lnd(ix) = 0.2_kind_phys + albdnir_lnd(ix) = 0.2_kind_phys + albivis_lnd(ix) = 0.2_kind_phys + albinir_lnd(ix) = 0.2_kind_phys + emiss_lnd(ix) = 0.95_kind_phys + enddo + endif + if (lsm == lsm_ruc) then + do ix=1,im + albdvis_ice(ix) = 0.6_kind_phys + albdnir_ice(ix) = 0.6_kind_phys + albivis_ice(ix) = 0.6_kind_phys + albinir_ice(ix) = 0.6_kind_phys + emiss_ice(ix) = 0.97_kind_phys + enddo + endif + + noahmp_init: if (lsm == lsm_noahmp) then + allocate(dzsno (lsnow_lsm_lbound:lsnow_lsm_ubound)) + allocate(dzsnso(lsnow_lsm_lbound:lsoil) ) + dzsno(:) = missing_value + dzsnso(:) = missing_value + + tvxy(:) = missing_value + tgxy(:) = missing_value + tahxy(:) = missing_value + canicexy(:) = missing_value + canliqxy(:) = missing_value + eahxy(:) = missing_value + cmxy(:) = missing_value + chxy(:) = missing_value + fwetxy(:) = missing_value + sneqvoxy(:) = missing_value + alboldxy(:) = missing_value + qsnowxy(:) = missing_value + wslakexy(:) = missing_value + taussxy(:) = missing_value + waxy(:) = missing_value + wtxy(:) = missing_value + zwtxy(:) = missing_value + xlaixy(:) = missing_value + xsaixy(:) = missing_value + + lfmassxy(:) = missing_value + stmassxy(:) = missing_value + rtmassxy(:) = missing_value + woodxy(:) = missing_value + stblcpxy(:) = missing_value + fastcpxy(:) = missing_value + smcwtdxy(:) = missing_value + deeprechxy(:) = missing_value + rechxy(:) = missing_value + + snowxy (:) = missing_value + snicexy(:,:) = missing_value + snliqxy(:,:) = missing_value + tsnoxy (:,:) = missing_value + smoiseq(:,:) = missing_value + zsnsoxy(:,:) = missing_value + + imn = idate(2) + + do ix=1,im + if (landfrac(ix) >= drythresh) then + tvxy(ix) = tsfcl(ix) + tgxy(ix) = tsfcl(ix) + tahxy(ix) = tsfcl(ix) + + if (snowd(ix) > 0.01_kind_phys .and. tsfcl(ix) > con_t0c ) then + tvxy(ix) = con_t0c + tgxy(ix) = con_t0c + tahxy(ix) = con_t0c + end if + + canicexy(ix) = 0.0_kind_phys + canliqxy(ix) = canopy(ix) + + eahxy(ix) = 2000.0_kind_phys + + cmxy(ix) = zero + chxy(ix) = zero + fwetxy(ix) = zero + sneqvoxy(ix) = weasd(ix) ! mm + alboldxy(ix) = 0.65_kind_phys + qsnowxy(ix) = zero + +! if (srflag(ix) > 0.001) qsnowxy(ix) = tprcp(ix)/dtp + ! already set to 0.0 + wslakexy(ix) = zero + taussxy(ix) = zero + + waxy(ix) = 4900.0_kind_phys + wtxy(ix) = waxy(ix) + zwtxy(ix) = (25.0_kind_phys + 2.0_kind_phys) - waxy(ix) / 1000.0_kind_phys / 0.2_kind_phys + + vegtyp = vtype(ix) + if (vegtyp == 0) vegtyp = 7 + + if ((vegtyp == isbarren_table) .or. (vegtyp == isice_table) .or. (vegtyp == isurban_table) .or. (vegtyp == iswater_table)) then + + xlaixy(ix) = zero + xsaixy(ix) = zero + + lfmassxy(ix) = zero + stmassxy(ix) = zero + rtmassxy(ix) = zero + + woodxy (ix) = zero + stblcpxy (ix) = zero + fastcpxy (ix) = zero + + else + + xlaixy(ix) = max(laim_table(vegtyp, imn),0.05_kind_phys) +! xsaixy(ix) = max(saim_table(vegtyp, imn),0.05) + xsaixy(ix) = max(xlaixy(ix)*0.1_kind_phys,0.05_kind_phys) + + masslai = 1000.0_kind_phys / max(sla_table(vegtyp),one) + lfmassxy(ix) = xlaixy(ix)*masslai + masssai = 1000.0_kind_phys / 3.0_kind_phys + stmassxy(ix) = xsaixy(ix)* masssai + + rtmassxy(ix) = 500.0_kind_phys + + woodxy(ix) = 500.0_kind_phys + stblcpxy(ix) = 1000.0_kind_phys + fastcpxy(ix) = 1000.0_kind_phys + + endif ! non urban ... + + if (vegtyp == isice_table) then + do is = 1,lsoil + stc(ix,is) = min(stc(ix,is),min(tg3(ix),263.15_kind_phys)) + smc(ix,is) = one + slc(ix,is) = zero + enddo + endif + + snd = snowd(ix)/1000.0_kind_phys ! go to m from snwdph + + if (weasd(ix) /= zero .and. snd == zero ) then + snd = weasd(ix)/1000.0 + endif + + if (vegtyp == 15) then ! land ice in MODIS/IGBP + if (weasd(ix) < 0.1_kind_phys) then + weasd(ix) = 0.1_kind_phys + snd = 0.01_kind_phys + endif + endif + + if (snd < 0.025_kind_phys ) then + snowxy(ix) = zero + dzsno(-2:0) = zero + elseif (snd >= 0.025_kind_phys .and. snd <= 0.05_kind_phys ) then + snowxy(ix) = -1.0_kind_phys + dzsno(0) = snd + elseif (snd > 0.05_kind_phys .and. snd <= 0.10_kind_phys ) then + snowxy(ix) = -2.0_kind_phys + dzsno(-1) = 0.5_kind_phys*snd + dzsno(0) = 0.5_kind_phys*snd + elseif (snd > 0.10_kind_phys .and. snd <= 0.25_kind_phys ) then + snowxy(ix) = -2.0_kind_phys + dzsno(-1) = 0.05_kind_phys + dzsno(0) = snd - 0.05_kind_phys + elseif (snd > 0.25_kind_phys .and. snd <= 0.45_kind_phys ) then + snowxy(ix) = -3.0_kind_phys + dzsno(-2) = 0.05_kind_phys + dzsno(-1) = 0.5_kind_phys*(snd-0.05_kind_phys) + dzsno(0) = 0.5_kind_phys*(snd-0.05_kind_phys) + elseif (snd > 0.45_kind_phys) then + snowxy(ix) = -3.0_kind_phys + dzsno(-2) = 0.05_kind_phys + dzsno(-1) = 0.20_kind_phys + dzsno(0) = snd - 0.05_kind_phys - 0.20_kind_phys + else + errmsg = 'Error in GFS_phys_time_vary.scm.F90: Problem with the logic assigning snow layers in Noah MP initialization' + errflg = 1 + endif + +! Now we have the snowxy field +! snice + snliq + tsno allocation and compute them from what we have + + tsnoxy(ix,:) = zero + snicexy(ix,:) = zero + snliqxy(ix,:) = zero + zsnsoxy(ix,:) = zero + + isnow = nint(snowxy(ix))+1 ! snowxy <=0.0, dzsno >= 0.0 + + do is = isnow,0 + tsnoxy(ix,is) = tgxy(ix) + snliqxy(ix,is) = zero + snicexy(ix,is) = one * dzsno(is) * weasd(ix)/snd + enddo +! +!zsnsoxy, all negative ? +! + do is = isnow,0 + dzsnso(is) = -dzsno(is) + enddo + + do is = 1,4 + dzsnso(is) = -dzs(is) + enddo +! +! Assign to zsnsoxy +! + zsnsoxy(ix,isnow) = dzsnso(isnow) + do is = isnow+1,4 + zsnsoxy(ix,is) = zsnsoxy(ix,is-1) + dzsnso(is) + enddo +! +! smoiseq +! Init water table related quantities here +! + soiltyp = stype(ix) + if (soiltyp /= 0) then + bexp = bexp_table(soiltyp) + smcmax = smcmax_table(soiltyp) + smcwlt = smcwlt_table(soiltyp) + dwsat = dwsat_table(soiltyp) + dksat = dksat_table(soiltyp) + psisat = -psisat_table(soiltyp) + endif + + if (vegtyp == isurban_table) then + smcmax = 0.45_kind_phys + smcwlt = 0.40_kind_phys + endif + + if ((bexp > zero) .and. (smcmax > zero) .and. (-psisat > zero)) then + do is = 1, lsoil + if ( is == 1 )then + ddz = -zs(is+1) * 0.5_kind_phys + elseif ( is < lsoil ) then + ddz = ( zs(is-1) - zs(is+1) ) * 0.5_kind_phys + else + ddz = zs(is-1) - zs(is) + endif + smoiseq(ix,is) = min(max(find_eq_smc(bexp, dwsat, dksat, ddz, smcmax),1.e-4_kind_phys),smcmax*0.99_kind_phys) + enddo + else ! bexp <= 0.0 + smoiseq(ix,1:4) = smcmax + endif ! end the bexp condition + + smcwtdxy(ix) = smcmax + deeprechxy(ix) = zero + rechxy(ix) = zero + + endif + + enddo ! ix + + if (errflg/=0) return + + deallocate(dzsno) + deallocate(dzsnso) + + endif noahmp_init + endif lsm_init + + is_initialized = .true. + + contains + +! +! Use newton-raphson method to find eq soil moisture +! + function find_eq_smc(bexp, dwsat, dksat, ddz, smcmax) result(smc) + implicit none + real(kind=kind_phys), intent(in) :: bexp, dwsat, dksat, ddz, smcmax + real(kind=kind_phys) :: smc + real(kind=kind_phys) :: expon, aa, bb, func, dfunc, dx + integer :: iter + ! + expon = bexp + 1. + aa = dwsat / ddz + bb = dksat / smcmax ** expon + smc = 0.5 * smcmax + ! + do iter = 1,100 + func = (smc - smcmax) * aa + bb * smc ** expon + dfunc = aa + bb * expon * smc ** bexp + dx = func / dfunc + smc = smc - dx + if ( abs (dx) < 1.e-6_kind_phys) return + enddo + end function find_eq_smc + end subroutine GFS_phys_time_vary_init +!! @} + +!> \section arg_table_GFS_phys_time_vary_timestep_init Argument Table +!! \htmlinclude GFS_phys_time_vary_timestep_init.html +!! +!>\section gen_GFS_phys_time_vary_timestep_init GFS_phys_time_vary_timestep_init General Algorithm +!! @{ + subroutine GFS_phys_time_vary_timestep_init ( & + me, master, cnx, cny, isc, jsc, nrcm, im, levs, kdt, idate, nsswr, fhswr, lsswr, fhour, & + imfdeepcnv, cal_pre, random_clds, ntoz, h2o_phys, iaerclm, iccn, clstp, & + jindx1_o3, jindx2_o3, ddy_o3, ozpl, jindx1_h, jindx2_h, ddy_h, h2opl, & + jindx1_aer, jindx2_aer, ddy_aer, iindx1_aer, iindx2_aer, ddx_aer, aer_nm, & + jindx1_ci, jindx2_ci, ddy_ci, iindx1_ci, iindx2_ci, ddx_ci, in_nm, ccn_nm, & + imap, jmap, prsl, seed0, rann, do_ugwp_v1, jindx1_tau, jindx2_tau, ddy_j1tau, ddy_j2tau,& + tau_amf, nthrds, errmsg, errflg) + + implicit none + + ! Interface variables + integer, intent(in) :: me, master, cnx, cny, isc, jsc, nrcm, im, levs, kdt, & + nsswr, imfdeepcnv, iccn, ntoz + integer, intent(in) :: idate(:) + real(kind_phys), intent(in) :: fhswr, fhour + logical, intent(in) :: lsswr, cal_pre, random_clds, h2o_phys, iaerclm + real(kind_phys), intent(out) :: clstp + integer, intent(in) :: jindx1_o3(:), jindx2_o3(:), jindx1_h(:), jindx2_h(:) + real(kind_phys), intent(in) :: ddy_o3(:), ddy_h(:) + real(kind_phys), intent(inout) :: ozpl(:,:,:), h2opl(:,:,:) + integer, intent(in) :: jindx1_aer(:), jindx2_aer(:), iindx1_aer(:), iindx2_aer(:) + real(kind_phys), intent(in) :: ddy_aer(:), ddx_aer(:) + real(kind_phys), intent(inout) :: aer_nm(:,:,:) + integer, intent(in) :: jindx1_ci(:), jindx2_ci(:), iindx1_ci(:), iindx2_ci(:) + real(kind_phys), intent(in) :: ddy_ci(:), ddx_ci(:) + real(kind_phys), intent(inout) :: in_nm(:,:), ccn_nm(:,:) + integer, intent(in) :: imap(:), jmap(:) + real(kind_phys), intent(in) :: prsl(:,:) + integer, intent(in) :: seed0 + real(kind_phys), intent(inout) :: rann(:,:) + + logical, intent(in) :: do_ugwp_v1 + integer, intent(in) :: jindx1_tau(:), jindx2_tau(:) + real(kind_phys), intent(in) :: ddy_j1tau(:), ddy_j2tau(:) + real(kind_phys), intent(inout) :: tau_amf(:) + integer, intent(in) :: nthrds + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Local variables + integer :: i, j, k, iseed, iskip, ix + real(kind=kind_phys) :: wrk(1) + real(kind=kind_phys) :: rannie(cny) + real(kind=kind_phys) :: rndval(cnx*cny*nrcm) + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + ! Check initialization status + if (.not.is_initialized) then + write(errmsg,'(*(a))') "Logic error: GFS_phys_time_vary_timestep_init called before GFS_phys_time_vary_init" + errflg = 1 + return + end if + + !--- switch for saving convective clouds - cnvc90.f + !--- aka Ken Campana/Yu-Tai Hou legacy + if ((mod(kdt,nsswr) == 0) .and. (lsswr)) then + !--- initialize,accumulate,convert + clstp = 1100 + min(fhswr/con_hr,fhour,con_99) + elseif (mod(kdt,nsswr) == 0) then + !--- accumulate,convert + clstp = 0100 + min(fhswr/con_hr,fhour,con_99) + elseif (lsswr) then + !--- initialize,accumulate + clstp = 1100 + else + !--- accumulate + clstp = 0100 + endif + + !--- random number needed for RAS and old SAS and when cal_pre=.true. + ! imfdeepcnv < 0 when ras = .true. + if ( (imfdeepcnv <= 0 .or. cal_pre) .and. random_clds ) then + + iseed = mod(con_100*sqrt(fhour*con_hr),1.0d9) + seed0 + call random_setseed(iseed) + call random_number(wrk) + do i = 1,cnx*nrcm + iseed = iseed + nint(wrk(1)*1000.0) * i + call random_setseed(iseed) + call random_number(rannie) + rndval(1+(i-1)*cny:i*cny) = rannie(1:cny) + enddo + + do k = 1,nrcm + iskip = (k-1)*cnx*cny + do ix=1,im + j = jmap(ix) + i = imap(ix) + rann(ix,k) = rndval(i+isc-1 + (j+jsc-2)*cnx + iskip) + enddo + enddo + + endif ! imfdeepcnv, cal_re, random_clds + +!> - Call ozinterpol() to make ozone interpolation + if (ntoz > 0) then + call ozinterpol (me, im, idate, fhour, & + jindx1_o3, jindx2_o3, & + ozpl, ddy_o3) + endif + +!> - Call h2ointerpol() to make stratospheric water vapor data interpolation + if (h2o_phys) then + call h2ointerpol (me, im, idate, fhour, & + jindx1_h, jindx2_h, & + h2opl, ddy_h) + endif + +!> - Call ciinterpol() to make IN and CCN data interpolation + if (iccn == 1) then + call ciinterpol (me, im, idate, fhour, & + jindx1_ci, jindx2_ci, & + ddy_ci, iindx1_ci, & + iindx2_ci, ddx_ci, & + levs, prsl, in_nm, ccn_nm) + endif + +!> - Call cires_indx_ugwp to read monthly-mean GW-tau diagnosed from FV3GFS-runs that resolve GW-activ + if (do_ugwp_v1) then + call tau_amf_interp(me, master, im, idate, fhour, & + jindx1_tau, jindx2_tau, & + ddy_j1tau, ddy_j2tau, tau_amf) + endif + +!> - Call aerinterpol() to make aerosol interpolation + if (iaerclm) then + ! aerinterpol is using threading inside, don't + ! move into OpenMP parallel section above + call aerinterpol (me, master, nthrds, im, idate, & + fhour, jindx1_aer, jindx2_aer,& + ddy_aer, iindx1_aer, & + iindx2_aer, ddx_aer, & + levs, prsl, aer_nm) + endif + +! Not needed for SCM: +!> - Call gcycle() to repopulate specific time-varying surface properties for AMIP/forecast runs + ! if (nscyc > 0) then + ! if (mod(kdt,nscyc) == 1) THEN + ! call gcycle (me, nthrds, nx, ny, isc, jsc, nsst, tile_num, nlunit, & + ! input_nml_file, lsoil, lsoil_lsm, kice, idate, ialb, isot, ivegsrc, & + ! use_ufo, nst_anl, fhcyc, phour, landfrac, lakefrac, min_seaice, min_lakeice,& + ! frac_grid, smc, slc, stc, smois, sh2o, tslb, tiice, tg3, tref, tsfc, & + ! tsfco, tisfc, hice, fice, facsf, facwf, alvsf, alvwf, alnsf, alnwf, & + ! zorli, zorll, zorlo, weasd, slope, snoalb, canopy, vfrac, vtype, & + ! stype, shdmin, shdmax, snowd, cv, cvb, cvt, oro, oro_uf, & + ! xlat_d, xlon_d, slmsk, imap, jmap) + ! endif + ! endif + + end subroutine GFS_phys_time_vary_timestep_init +!! @} + +!> \section arg_table_GFS_phys_time_vary_timestep_finalize Argument Table +!! \htmlinclude GFS_phys_time_vary_timestep_finalize.html +!! +!>\section gen_GFS_phys_time_vary_timestep_finalize GFS_phys_time_vary_timestep_finalize General Algorithm +!! @{ + subroutine GFS_phys_time_vary_timestep_finalize (errmsg, errflg) + + implicit none + + ! Interface variables + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + end subroutine GFS_phys_time_vary_timestep_finalize +!! @} !> \section arg_table_GFS_phys_time_vary_finalize Argument Table !! \htmlinclude GFS_phys_time_vary_finalize.html !! subroutine GFS_phys_time_vary_finalize(errmsg, errflg) - implicit none - ! Interface variables - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg + implicit none - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 + ! Interface variables + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg - if (.not.is_initialized) return + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 - ! Deallocate ozone arrays - if (allocated(oz_lat) ) deallocate(oz_lat) - if (allocated(oz_pres) ) deallocate(oz_pres) - if (allocated(oz_time) ) deallocate(oz_time) - if (allocated(ozplin) ) deallocate(ozplin) + if (.not.is_initialized) return - ! Deallocate h2o arrays - if (allocated(h2o_lat) ) deallocate(h2o_lat) - if (allocated(h2o_pres)) deallocate(h2o_pres) - if (allocated(h2o_time)) deallocate(h2o_time) - if (allocated(h2oplin) ) deallocate(h2oplin) + ! Deallocate ozone arrays + if (allocated(oz_lat) ) deallocate(oz_lat) + if (allocated(oz_pres) ) deallocate(oz_pres) + if (allocated(oz_time) ) deallocate(oz_time) + if (allocated(ozplin) ) deallocate(ozplin) - ! Deallocate aerosol arrays - if (allocated(aerin) ) deallocate(aerin) - if (allocated(aer_pres)) deallocate(aer_pres) + ! Deallocate h2o arrays + if (allocated(h2o_lat) ) deallocate(h2o_lat) + if (allocated(h2o_pres)) deallocate(h2o_pres) + if (allocated(h2o_time)) deallocate(h2o_time) + if (allocated(h2oplin) ) deallocate(h2oplin) - ! Deallocate IN and CCN arrays - if (allocated(ciplin) ) deallocate(ciplin) - if (allocated(ccnin) ) deallocate(ccnin) - if (allocated(ci_pres) ) deallocate(ci_pres) + ! Deallocate aerosol arrays + if (allocated(aerin) ) deallocate(aerin) + if (allocated(aer_pres)) deallocate(aer_pres) - is_initialized = .false. + ! Deallocate IN and CCN arrays + if (allocated(ciplin) ) deallocate(ciplin) + if (allocated(ccnin) ) deallocate(ccnin) + if (allocated(ci_pres) ) deallocate(ci_pres) - end subroutine GFS_phys_time_vary_finalize + ! Deallocate UGWP-input arrays + if (allocated(ugwp_taulat)) deallocate(ugwp_taulat) + if (allocated(tau_limb )) deallocate(tau_limb) + if (allocated(days_limb )) deallocate(days_limb) -!> \section arg_table_GFS_phys_time_vary_run Argument Table -!! \htmlinclude GFS_phys_time_vary_run.html -!! - subroutine GFS_phys_time_vary_run (Grid, Statein, Model, Tbd, Sfcprop, Cldprop, Diag, first_time_step, errmsg, errflg) - - use mersenne_twister, only: random_setseed, random_number - use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type, GFS_grid_type, & - GFS_Tbd_type, GFS_sfcprop_type, & - GFS_cldprop_type, GFS_diag_type, & - GFS_statein_type - - implicit none - - type(GFS_grid_type), intent(in) :: Grid - type(GFS_statein_type), intent(in) :: Statein - type(GFS_control_type), intent(inout) :: Model - type(GFS_tbd_type), intent(inout) :: Tbd - type(GFS_sfcprop_type), intent(inout) :: Sfcprop - type(GFS_cldprop_type), intent(inout) :: Cldprop - type(GFS_diag_type), intent(inout) :: Diag - logical, intent(in) :: first_time_step - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - - real(kind=kind_phys), parameter :: con_hr = 3600.0_kind_phys - real(kind=kind_phys), parameter :: con_99 = 99.0_kind_phys - real(kind=kind_phys), parameter :: con_100 = 100.0_kind_phys - - integer :: i, j, k, iseed, iskip, ix, nb, kdt_rad, vegtyp - real(kind=kind_phys) :: sec_zero, rsnow - real(kind=kind_phys) :: wrk(1) - real(kind=kind_phys) :: rannie(Model%cny) - real(kind=kind_phys) :: rndval(Model%cnx*Model%cny*Model%nrcm) - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - ! Check initialization status - if (.not.is_initialized) then - write(errmsg,'(*(a))') "Logic error: GFS_phys_time_vary_run called before GFS_phys_time_vary_init" - errflg = 1 - return - end if - - nb = 1 - - !--- switch for saving convective clouds - cnvc90.f - !--- aka Ken Campana/Yu-Tai Hou legacy - if ((mod(Model%kdt,Model%nsswr) == 0) .and. (Model%lsswr)) then - !--- initialize,accumulate,convert - Model%clstp = 1100 + min(Model%fhswr/con_hr,Model%fhour,con_99) - elseif (mod(Model%kdt,Model%nsswr) == 0) then - !--- accumulate,convert - Model%clstp = 0100 + min(Model%fhswr/con_hr,Model%fhour,con_99) - elseif (Model%lsswr) then - !--- initialize,accumulate - Model%clstp = 1100 - else - !--- accumulate - Model%clstp = 0100 - endif - - !--- random number needed for RAS and old SAS and when cal_pre=.true. - if ( (Model%imfdeepcnv <= 0 .or. Model%cal_pre) .and. Model%random_clds ) then - iseed = mod(con_100*sqrt(Model%fhour*con_hr),1.0d9) + Model%seed0 - call random_setseed(iseed) - call random_number(wrk) - do i = 1,Model%cnx*Model%nrcm - iseed = iseed + nint(wrk(1)*1000.0) * i - call random_setseed(iseed) - call random_number(rannie) - rndval(1+(i-1)*Model%cny:i*Model%cny) = rannie(1:Model%cny) - enddo + is_initialized = .false. - do k = 1,Model%nrcm - iskip = (k-1)*Model%cnx*Model%cny - do ix=1,Model%blksz(nb) - j = Tbd%jmap(ix) - i = Tbd%imap(ix) - Tbd%rann(ix,k) = rndval(i+Model%isc-1 + (j+Model%jsc-2)*Model%cnx + iskip) - enddo - enddo - endif ! imfdeepcnv, cal_re, random_clds - - !--- o3 interpolation - if (Model%ntoz > 0) then - call ozinterpol (Model%me, Model%blksz(nb), Model%idate, Model%fhour, & - Grid%jindx1_o3, Grid%jindx2_o3, Tbd%ozpl, Grid%ddy_o3) - endif - - !--- h2o interpolation - if (Model%h2o_phys) then - call h2ointerpol (Model%me, Model%blksz(nb), Model%idate, Model%fhour, & - Grid%jindx1_h, Grid%jindx2_h, Tbd%h2opl, Grid%ddy_h) - endif - - !--- aerosol interpolation - if (Model%iaerclm) then - call aerinterpol (Model%me, Model%master, Model%blksz(nb), & - Model%idate, Model%fhour, & - Grid%jindx1_aer, Grid%jindx2_aer, & - Grid%ddy_aer,Grid%iindx1_aer, & - Grid%iindx2_aer,Grid%ddx_aer, & - Model%levs,Statein%prsl, & - Tbd%aer_nm) - endif - !--- ICCN interpolation - if (Model%iccn == 1) then - call ciinterpol (Model%me, Model%blksz(nb), Model%idate, Model%fhour, & - Grid%jindx1_ci, Grid%jindx2_ci, & - Grid%ddy_ci,Grid%iindx1_ci, & - Grid%iindx2_ci,Grid%ddx_ci, & - Model%levs,Statein%prsl, & - Tbd%in_nm, Tbd%ccn_nm) - endif - - !--- original FV3 code, not needed for SCM; also not compatible with the way - ! the time vary steps are run (over each block) --> cannot use - !--- repopulate specific time-varying sfc properties for AMIP/forecast runs - !if (Model%nscyc > 0) then - ! if (mod(Model%kdt,Model%nscyc) == 1) THEN - ! call gcycle (nblks, Model, Grid(:), Sfcprop(:), Cldprop(:)) - ! endif - !endif - - !--- determine if diagnostics buckets need to be cleared - sec_zero = nint(Model%fhzero*con_hr) - if (sec_zero >= nint(max(Model%fhswr,Model%fhlwr))) then - if (mod(Model%kdt,Model%nszero) == 0) then - call Diag%rad_zero (Model) - call Diag%phys_zero (Model) - !!!! THIS IS THE POINT AT WHICH DIAG%ZHOUR NEEDS TO BE UPDATED - endif - else - if (mod(Model%kdt,Model%nszero) == 0) then - call Diag%phys_zero (Model) - !!!! THIS IS THE POINT AT WHICH DIAG%ZHOUR NEEDS TO BE UPDATED - endif - kdt_rad = nint(min(Model%fhswr,Model%fhlwr)/Model%dtp) - if (mod(Model%kdt, kdt_rad) == 0) then - call Diag%rad_zero (Model) - !!!! THIS IS THE POINT AT WHICH DIAG%ZHOUR NEEDS TO BE UPDATED - endif - endif - -#if 0 - !Calculate sncovr if it was read in but empty (from FV3/io/FV3GFS_io.F90/sfc_prop_restart_read) - if (first_time_step) then - if (nint(Sfcprop%sncovr(1)) == -9999) then - !--- compute sncovr from existing variables - !--- code taken directly from read_fix.f - do ix = 1, Model%blksz(nb) - Sfcprop%sncovr(ix) = 0.0 - if (Sfcprop%slmsk(ix) > 0.001) then - vegtyp = Sfcprop%vtype(ix) - if (vegtyp == 0) vegtyp = 7 - rsnow = 0.001*Sfcprop%weasd(ix)/snupx(vegtyp) - if (0.001*Sfcprop%weasd(ix) < snupx(vegtyp)) then - Sfcprop%sncovr(ix) = 1.0 - (exp(-salp_data*rsnow) - rsnow*exp(-salp_data)) - else - Sfcprop%sncovr(ix) = 1.0 - endif - endif - enddo - endif - endif -#endif - - end subroutine GFS_phys_time_vary_run - - end module GFS_phys_time_vary + end subroutine GFS_phys_time_vary_finalize + + end module GFS_phys_time_vary +!> @} diff --git a/physics/GFS_phys_time_vary.scm.meta b/physics/GFS_phys_time_vary.scm.meta index 556aa80c7..1dd03d6b7 100644 --- a/physics/GFS_phys_time_vary.scm.meta +++ b/physics/GFS_phys_time_vary.scm.meta @@ -1,42 +1,999 @@ [ccpp-table-properties] name = GFS_phys_time_vary type = scheme - dependencies = aerclm_def.F,aerinterp.F90,h2o_def.f,h2ointerp.f90,iccn_def.F,iccninterp.F90,machine.F,mersenne_twister.f,namelist_soilveg.f,ozinterp.f90,ozne_def.f + dependencies = aerclm_def.F,aerinterp.F90,h2o_def.f,h2ointerp.f90,iccn_def.F,iccninterp.F90,machine.F,mersenne_twister.f + dependencies = namelist_soilveg.f,set_soilveg.f,ozinterp.f90,ozne_def.f,cires_tauamf_data.F90,noahmp_tables.f90 ######################################################################## [ccpp-arg-table] name = GFS_phys_time_vary_init type = scheme -[Grid] - standard_name = GFS_grid_type_instance - long_name = Fortran DDT containing FV3-GFS grid and interpolation related data - units = DDT + +[me] + standard_name = mpi_rank + long_name = current MPI-rank + units = index + dimensions = () + type = integer + intent = in + optional = F +[master] + standard_name = mpi_root + long_name = master MPI-rank + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntoz] + standard_name = index_of_ozone_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for ozone mixing ratio + units = index + dimensions = () + type = integer + intent = in + optional = F +[h2o_phys] + standard_name = flag_for_stratospheric_water_vapor_physics + long_name = flag for stratospheric water vapor physics + units = flag + dimensions = () + type = logical + intent = in + optional = F +[iaerclm] + standard_name = flag_for_aerosol_input_MG_radiation + long_name = flag for using aerosols in Morrison-Gettelman MP_radiation + units = flag + dimensions = () + type = logical + intent = in + optional = F +[iccn] + standard_name = control_for_ice_cloud_condensation_nuclei_forcing + long_name = flag for IN and CCN forcing for morrison gettelman microphysics + units = none + dimensions = () + type = integer + intent = in + optional = F +[iflip] + standard_name = control_for_vertical_index_direction + long_name = iflip - is not the same as flipv + units = flag + dimensions = () + type = integer + intent = in + optional = F +[im] + standard_name = horizontal_dimension + long_name = horizontal dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[nx] + standard_name = number_of_points_in_x_direction_for_this_MPI_rank + long_name = number of points in x direction for this MPI rank + units = count + dimensions = () + type = integer + intent = in + optional = F +[ny] + standard_name = number_of_points_in_y_direction_for_this_MPI_rank + long_name = number of points in y direction for this MPI rank + units = count + dimensions = () + type = integer + intent = in + optional = F +[idate] + standard_name = date_and_time_at_model_initialization_in_united_states_order + long_name = initial date with different size and ordering + units = none + dimensions = (4) + type = integer + intent = in + optional = F +[xlat_d] + standard_name = latitude_in_degree + long_name = latitude in degree north + units = degree_north + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[xlon_d] + standard_name = longitude_in_degree + long_name = longitude in degree east + units = degree_east + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[jindx1_o3] + standard_name = lower_latitude_index_of_ozone_forcing_for_interpolation + long_name = interpolation low index for ozone + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[jindx2_o3] + standard_name = upper_latitude_index_of_ozone_forcing_for_interpolation + long_name = interpolation high index for ozone + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[ddy_o3] + standard_name = latitude_interpolation_weight_for_ozone_forcing + long_name = interpolation high index for ozone + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[ozpl] + standard_name = ozone_forcing + long_name = ozone forcing data + units = various + dimensions = (horizontal_dimension,vertical_dimension_of_ozone_forcing_data,number_of_coefficients_in_ozone_forcing_data) + type = real + kind = kind_phys + intent = in + optional = F +[jindx1_h] + standard_name = lower_latitude_index_of_stratospheric_water_vapor_forcing_for_interpolation + long_name = interpolation low index for stratospheric water vapor + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[jindx2_h] + standard_name = upper_latitude_index_of_stratospheric_water_vapor_forcing_for_interpolation + long_name = interpolation high index for stratospheric water vapor + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[ddy_h] + standard_name = latitude_interpolation_weight_for_stratospheric_water_vapor_forcing + long_name = interpolation high index for stratospheric water vapor + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[h2opl] + standard_name = stratospheric_water_vapor_forcing + long_name = water forcing data + units = various + dimensions = (horizontal_dimension,vertical_dimension_of_h2o_forcing_data,number_of_coefficients_in_h2o_forcing_data) + type = real + kind = kind_phys + intent = in + optional = F +[jindx1_aer] + standard_name = lower_latitude_index_of_aerosol_forcing_for_interpolation + long_name = interpolation low index for prescribed aerosols in the y direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[jindx2_aer] + standard_name = upper_latitude_index_of_aerosol_forcing_for_interpolation + long_name = interpolation high index for prescribed aerosols in the y direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[ddy_aer] + standard_name = latitude_interpolation_weight_for_aerosol_forcing + long_name = interpolation high index for prescribed aerosols in the y direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[iindx1_aer] + standard_name = lower_longitude_index_of_aerosol_forcing_for_interpolation + long_name = interpolation low index for prescribed aerosols in the x direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[iindx2_aer] + standard_name = upper_longitude_index_of_aerosol_forcing_for_interpolation + long_name = interpolation high index for prescribed aerosols in the x direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[ddx_aer] + standard_name = longitude_interpolation_weight_for_aerosol_forcing + long_name = interpolation high index for prescribed aerosols in the x direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[aer_nm] + standard_name = mass_number_concentration_of_aerosol_from_gocart_climatology + long_name = GOCART aerosol climatology number concentration + units = kg-1 + dimensions = (horizontal_dimension,vertical_layer_dimension,number_of_aerosol_tracers_MG) + type = real + kind = kind_phys + intent = in + optional = F +[jindx1_ci] + standard_name = lower_latitude_index_of_cloud_nuclei_forcing_for_interpolation + long_name = interpolation low index for ice and cloud condensation nuclei in the y direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[jindx2_ci] + standard_name = upper_latitude_index_of_cloud_nuclei_forcing_for_interpolation + long_name = interpolation high index for ice and cloud condensation nuclei in the y direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[ddy_ci] + standard_name = latitude_interpolation_weight_for_cloud_nuclei_forcing + long_name = interpolation high index for ice and cloud condensation nuclei in the y direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[iindx1_ci] + standard_name = lower_longitude_index_of_cloud_nuclei_forcing_for_interpolation + long_name = interpolation low index for ice and cloud condensation nuclei in the x direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[iindx2_ci] + standard_name = upper_longitude_index_of_cloud_nuclei_forcing_for_interpolation + long_name = interpolation high index for ice and cloud condensation nuclei in the x direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[ddx_ci] + standard_name = longitude_interpolation_weight_for_cloud_nuclei_forcing + long_name = interpolation high index for ice and cloud condensation nuclei in the x direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[imap] + standard_name = map_of_block_column_number_to_global_i_index + long_name = map of local index ix to global index i for this block + units = none + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[jmap] + standard_name = map_of_block_column_number_to_global_j_index + long_name = map of local index ix to global index j for this block + units = none + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[do_ugwp_v1] + standard_name = flag_for_ugwp_version_1 + long_name = flag to activate ver 1 CIRES UGWP + units = flag + dimensions = () + type = logical + intent = in + optional = F +[jindx1_tau] + standard_name = lower_latitude_index_of_absolute_momentum_flux_due_to_nonorographic_gravity_wave_drag_for_interpolation + long_name = index1 for weight1 for tau NGWs + units = none + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[jindx2_tau] + standard_name = upper_latitude_index_of_absolute_momentum_flux_due_to_nonorographic_gravity_wave_drag_for_interpolation + long_name = index2 for weight2 for tau NGWs + units = none + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[ddy_j1tau] + standard_name = latitude_interpolation_weight_complement_for_absolute_momentum_flux_due_to_nonorographic_gravity_wave_drag + long_name = interpolation weight1 for tau NGWs + units = none + dimensions = (horizontal_dimension) + type = real + intent = inout + kind = kind_phys + optional = F +[ddy_j2tau] + standard_name = latitude_interpolation_weight_for_absolute_momentum_flux_due_to_nonorographic_gravity_wave_drag + long_name = interpolation weight2 for tau NGWs + units = none + dimensions = (horizontal_dimension) + type = real + intent = inout + kind = kind_phys + optional = F +[isot] + standard_name = control_for_soil_type_dataset + long_name = soil type dataset choice + units = index + dimensions = () + type = integer + intent = in + optional = F +[ivegsrc] + standard_name = control_for_vegetation_dataset + long_name = land use dataset choice + units = index + dimensions = () + type = integer + intent = in + optional = F +[nlunit] + standard_name = iounit_of_namelist + long_name = fortran unit number for file opens + units = none + dimensions = () + type = integer + intent = in + optional = F +[sncovr] + standard_name = surface_snow_area_fraction_over_land + long_name = surface snow area fraction + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[sncovr_ice] + standard_name = surface_snow_area_fraction_over_ice + long_name = surface snow area fraction over ice + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[lsm] + standard_name = control_for_land_surface_scheme + long_name = flag for land surface model + units = flag + dimensions = () + type = integer + intent = in + optional = F +[lsm_noahmp] + standard_name = identifier_for_noahmp_land_surface_scheme + long_name = flag for NOAH MP land surface model + units = flag + dimensions = () + type = integer + intent = in + optional = F +[lsm_ruc] + standard_name = identifier_for_ruc_land_surface_scheme + long_name = flag for RUC land surface model + units = flag + dimensions = () + type = integer + intent = in + optional = F +[min_seaice] + standard_name = min_sea_ice_area_fraction + long_name = minimum sea ice value + units = frac + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[fice] + standard_name = sea_ice_area_fraction_of_sea_area_fraction + long_name = ice fraction over open water + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[landfrac] + standard_name = land_area_fraction + long_name = fraction of horizontal grid area occupied by land + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[vtype] + standard_name = vegetation_type_classification_real + long_name = vegetation type for lsm + units = index + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[weasd] + standard_name = lwe_thickness_of_surface_snow_amount + long_name = water equiv of acc snow depth over land and sea ice + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[lsoil] + standard_name = vertical_dimension_of_soil + long_name = number of soil layers + units = count + dimensions = () + type = integer + intent = in + optional = F +[zs] + standard_name = depth_of_soil_layers + long_name = depth of soil levels for land surface model + units = m + dimensions = (vertical_dimension_of_soil_internal_to_land_surface_scheme) + type = real + kind = kind_phys + intent = in + optional = F +[dzs] + standard_name = thickness_of_soil_layers_for_land_surface_model + long_name = thickness of soil levels for land surface model + units = m + dimensions = (vertical_dimension_of_soil_internal_to_land_surface_scheme) + type = real + kind = kind_phys + intent = in + optional = F +[lsnow_lsm_lbound] + standard_name = lower_bound_of_vertical_dimension_of_surface_snow + long_name = lower bound of of snow-related arrays for land surface model + units = count + dimensions = () + type = integer + intent = in + optional = F +[lsnow_lsm_ubound] + standard_name = upper_bound_of_vertical_dimension_of_surface_snow + long_name = upper bound of of snow-related arrays for land surface model + units = count dimensions = () - type = GFS_grid_type + type = integer + intent = in + optional = F +[tvxy] + standard_name = canopy_temperature + long_name = vegetation temperature + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[tgxy] + standard_name = ground_temperature + long_name = ground temperature for noahmp + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[tahxy] + standard_name = air_temperature_in_canopy + long_name = canopy air temperature + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[canicexy] + standard_name = canopy_intercepted_ice_mass + long_name = canopy intercepted ice mass + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[canliqxy] + standard_name = canopy_intercepted_liquid_water + long_name = canopy intercepted liquid water + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[eahxy] + standard_name = air_vapor_pressure_in_canopy + long_name = canopy air vapor pressure + units = Pa + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[cmxy] + standard_name = surface_drag_coefficient_for_momentum_for_noahmp + long_name = surface drag coefficient for momentum for noahmp + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[chxy] + standard_name = surface_drag_coefficient_for_heat_and_moisture_for_noahmp + long_name = surface exchange coeff heat & moisture for noahmp + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[fwetxy] + standard_name = wet_canopy_area_fraction + long_name = area fraction of canopy that is wetted/snowed + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[sneqvoxy] + standard_name = lwe_thickness_of_snowfall_amount_on_previous_timestep + long_name = snow mass at previous time step + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[alboldxy] + standard_name = surface_albedo_assuming_deep_snow_on_previous_timestep + long_name = snow albedo at previous time step + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qsnowxy] + standard_name = lwe_snowfall_rate + long_name = snow precipitation rate at surface + units = mm s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[wslakexy] + standard_name = water_storage_in_lake + long_name = lake water storage + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[taussxy] + standard_name = dimensionless_age_of_surface_snow + long_name = non-dimensional snow age + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[waxy] + standard_name = water_storage_in_aquifer + long_name = water storage in aquifer + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[wtxy] + standard_name = water_storage_in_aquifer_and_saturated_soil + long_name = water storage in aquifer and saturated soil + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[zwtxy] + standard_name = water_table_depth + long_name = water table depth + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[xlaixy] + standard_name = leaf_area_index + long_name = leaf area index + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[xsaixy] + standard_name = stem_area_index + long_name = stem area index + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[lfmassxy] + standard_name = leaf_mass_content + long_name = leaf mass + units = g m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[stmassxy] + standard_name = stem_mass_content + long_name = stem mass + units = g m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[rtmassxy] + standard_name = fine_root_mass_content + long_name = fine root mass + units = g m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[woodxy] + standard_name = wood_mass_content + long_name = wood mass including woody roots + units = g m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[stblcpxy] + standard_name = slow_soil_pool_mass_content_of_carbon + long_name = stable carbon in deep soil + units = g m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[fastcpxy] + standard_name = fast_soil_pool_mass_content_of_carbon + long_name = short-lived carbon in shallow soil + units = g m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[smcwtdxy] + standard_name = volumetric_soil_moisture_between_soil_bottom_and_water_table + long_name = soil water content between the bottom of the soil and the water table + units = m3 m-3 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[deeprechxy] + standard_name = water_table_recharge_assuming_deep + long_name = recharge to or from the water table when deep + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[rechxy] + standard_name = water_table_recharge_assuming_shallow + long_name = recharge to or from the water table when shallow + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[albdvis_lnd] + standard_name = surface_albedo_direct_visible_over_land + long_name = direct surface albedo visible band over land + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys intent = inout optional = F -[Model] - standard_name = GFS_control_type_instance - long_name = Fortran DDT containing FV3-GFS model control parameters - units = DDT +[albdnir_lnd] + standard_name = surface_albedo_direct_NIR_over_land + long_name = direct surface albedo NIR band over land + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[albivis_lnd] + standard_name = surface_albedo_diffuse_visible_over_land + long_name = diffuse surface albedo visible band over land + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[albinir_lnd] + standard_name = surface_albedo_diffuse_NIR_over_land + long_name = diffuse surface albedo NIR band over land + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[albdvis_ice] + standard_name = surface_albedo_direct_visible_over_ice + long_name = direct surface albedo visible band over ice + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[albdnir_ice] + standard_name = surface_albedo_direct_NIR_over_ice + long_name = direct surface albedo NIR band over ice + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[albivis_ice] + standard_name = surface_albedo_diffuse_visible_over_ice + long_name = diffuse surface albedo visible band over ice + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[albinir_ice] + standard_name = surface_albedo_diffuse_NIR_over_ice + long_name = diffuse surface albedo NIR band over ice + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[emiss_lnd] + standard_name = surface_longwave_emissivity_over_land + long_name = surface lw emissivity in fraction over land + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[emiss_ice] + standard_name = surface_longwave_emissivity_over_ice + long_name = surface lw emissivity in fraction over ice + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[snowxy] + standard_name = number_of_snow_layers + long_name = number of snow layers + units = count + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[snicexy] + standard_name = lwe_thickness_of_ice_in_surface_snow + long_name = snow layer ice + units = mm + dimensions = (horizontal_dimension,lower_bound_of_vertical_dimension_of_surface_snow:upper_bound_of_vertical_dimension_of_surface_snow) + type = real + kind = kind_phys + intent = inout + optional = F +[snliqxy] + standard_name = lwe_thickness_of_liquid_water_in_surface_snow + long_name = snow layer liquid water + units = mm + dimensions = (horizontal_dimension,lower_bound_of_vertical_dimension_of_surface_snow:upper_bound_of_vertical_dimension_of_surface_snow) + type = real + kind = kind_phys + intent = inout + optional = F +[tsnoxy] + standard_name = temperature_in_surface_snow + long_name = temperature_in_surface_snow + units = K + dimensions = (horizontal_dimension,lower_bound_of_vertical_dimension_of_surface_snow:upper_bound_of_vertical_dimension_of_surface_snow) + type = real + kind = kind_phys + intent = inout + optional = F +[smoiseq] + standard_name = volumetric_equilibrium_soil_moisture + long_name = equilibrium soil water content + units = m3 m-3 + dimensions = (horizontal_dimension,vertical_dimension_of_soil_internal_to_land_surface_scheme) + type = real + kind = kind_phys + intent = inout + optional = F +[zsnsoxy] + standard_name = depth_from_snow_surface_at_bottom_interface + long_name = depth from the top of the snow surface at the bottom of the layer + units = m + dimensions = (horizontal_dimension,lower_bound_of_vertical_dimension_of_surface_snow:vertical_dimension_of_soil_internal_to_land_surface_scheme) + type = real + kind = kind_phys + intent = inout + optional = F +[slc] + standard_name = volume_fraction_of_unfrozen_water_in_soil + long_name = liquid soil moisture + units = frac + dimensions = (horizontal_dimension,vertical_dimension_of_soil) + type = real + kind = kind_phys + intent = inout + optional = F +[smc] + standard_name = volume_fraction_of_condensed_water_in_soil + long_name = total soil moisture + units = frac + dimensions = (horizontal_dimension,vertical_dimension_of_soil) + type = real + kind = kind_phys + intent = inout + optional = F +[stc] + standard_name = soil_temperature + long_name = soil temperature + units = K + dimensions = (horizontal_dimension,vertical_dimension_of_soil) + type = real + kind = kind_phys + intent = inout + optional = F +[tsfcl] + standard_name = surface_skin_temperature_over_land + long_name = surface skin temperature over land + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[snowd] + standard_name = lwe_surface_snow + long_name = water equivalent snow depth + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[canopy] + standard_name = canopy_water_amount + long_name = canopy water amount + units = kg m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[tg3] + standard_name = deep_soil_temperature + long_name = deep soil temperature + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[stype] + standard_name = soil_type_classification_real + long_name = soil type for lsm + units = index + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[con_t0c] + standard_name = temperature_at_zero_celsius + long_name = temperature at 0 degree Celsius + units = K dimensions = () - type = GFS_control_type + type = real + kind = kind_phys intent = in optional = F -[Interstitial] - standard_name = GFS_interstitial_type_instance - long_name = Fortran DDT containing FV3-GFS interstitial data - units = DDT +[flag_restart] + standard_name = flag_for_restart + long_name = flag for restart (warmstart) or coldstart + units = flag dimensions = () - type = GFS_interstitial_type - intent = inout + type = logical + intent = in optional = F -[Tbd] - standard_name = GFS_tbd_type_instance - long_name = Fortran DDT containing FV3-GFS miscellaneous data - units = DDT +[nthrds] + standard_name = number_of_openmp_threads + long_name = number of OpenMP threads available for physics schemes + units = count dimensions = () - type = GFS_tbd_type + type = integer intent = in optional = F [errmsg] @@ -81,72 +1038,513 @@ ######################################################################## [ccpp-arg-table] - name = GFS_phys_time_vary_run + name = GFS_phys_time_vary_timestep_init type = scheme -[Grid] - standard_name = GFS_grid_type_instance - long_name = Fortran DDT containing FV3-GFS grid and interpolation related data - units = DDT +[me] + standard_name = mpi_rank + long_name = current MPI-rank + units = index dimensions = () - type = GFS_grid_type + type = integer intent = in optional = F -[Statein] - standard_name = GFS_statein_type_instance - long_name = instance of derived type GFS_statein_type - units = DDT +[master] + standard_name = mpi_root + long_name = master MPI-rank + units = index dimensions = () - type = GFS_statein_type + type = integer intent = in optional = F -[Model] - standard_name = GFS_control_type_instance - long_name = Fortran DDT containing FV3-GFS model control parameters - units = DDT +[cnx] + standard_name = number_of_x_points_for_current_cubed_sphere_tile + long_name = number of points in x direction for this cubed sphere face + units = count dimensions = () - type = GFS_control_type - intent = inout + type = integer + intent = in optional = F -[Tbd] - standard_name = GFS_tbd_type_instance - long_name = Fortran DDT containing FV3-GFS miscellaneous data - units = DDT +[cny] + standard_name = number_of_y_points_for_current_cubed_sphere_tile + long_name = number of points in y direction for this cubed sphere face + units = count dimensions = () - type = GFS_tbd_type - intent = inout + type = integer + intent = in optional = F -[Sfcprop] - standard_name = GFS_sfcprop_type_instance - long_name = Fortran DDT containing FV3-GFS surface fields - units = DDT +[isc] + standard_name = starting_x_index_for_this_MPI_rank + long_name = starting index in the x direction for this MPI rank + units = count dimensions = () - type = GFS_sfcprop_type - intent = inout + type = integer + intent = in + optional = F +[jsc] + standard_name = starting_y_index_for_this_MPI_rank + long_name = starting index in the y direction for this MPI rank + units = count + dimensions = () + type = integer + intent = in + optional = F +[nrcm] + standard_name = number_of_random_numbers + long_name = second dimension of random number stream for RAS + units = count + dimensions = () + type = integer + intent = in + optional = F +[im] + standard_name = horizontal_dimension + long_name = horizontal dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[levs] + standard_name = vertical_layer_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in + optional = F +[kdt] + standard_name = index_of_timestep + long_name = current forecast iteration + units = index + dimensions = () + type = integer + intent = in + optional = F +[idate] + standard_name = date_and_time_at_model_initialization_in_united_states_order + long_name = initial date with different size and ordering + units = none + dimensions = (4) + type = integer + intent = in + optional = F +[nsswr] + standard_name = number_of_timesteps_between_shortwave_radiation_calls + long_name = number of timesteps between shortwave radiation calls + units = + dimensions = () + type = integer + intent = in + optional = F +[fhswr] + standard_name = period_of_shortwave_radiation_calls + long_name = frequency for shortwave radiation + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[lsswr] + standard_name = flag_for_calling_shortwave_radiation + long_name = logical flags for sw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F +[fhour] + standard_name = forecast_time + long_name = current forecast time + units = h + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[imfdeepcnv] + standard_name = control_for_deep_convection_scheme + long_name = flag for mass-flux deep convection scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[cal_pre] + standard_name = flag_for_dominant_precipitation_type_partition + long_name = flag controls precip type algorithm + units = flag + dimensions = () + type = logical + intent = in + optional = F +[random_clds] + standard_name = flag_for_random_clouds_for_RAS + long_name = flag for using random clouds with the RAS scheme + units = flag + dimensions = () + type = logical + intent = in + optional = F +[ntoz] + standard_name = index_of_ozone_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for ozone mixing ratio + units = index + dimensions = () + type = integer + intent = in + optional = F +[h2o_phys] + standard_name = flag_for_stratospheric_water_vapor_physics + long_name = flag for stratospheric water vapor physics + units = flag + dimensions = () + type = logical + intent = in + optional = F +[iaerclm] + standard_name = flag_for_aerosol_input_MG_radiation + long_name = flag for using aerosols in Morrison-Gettelman MP_radiation + units = flag + dimensions = () + type = logical + intent = in + optional = F +[iccn] + standard_name = control_for_ice_cloud_condensation_nuclei_forcing + long_name = flag for IN and CCN forcing for morrison gettelman microphysics + units = none + dimensions = () + type = integer + intent = in optional = F -[Cldprop] - standard_name = GFS_cldprop_type_instance - long_name = Fortran DDT containing FV3-GFS cloud fields - units = DDT +[clstp] + standard_name = control_for_convective_cloud_diagnostics + long_name = index used by cnvc90 (for convective clouds) + units = none dimensions = () - type = GFS_cldprop_type + type = real + kind = kind_phys + intent = out + optional = F +[jindx1_o3] + standard_name = lower_latitude_index_of_ozone_forcing_for_interpolation + long_name = interpolation low index for ozone + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[jindx2_o3] + standard_name = upper_latitude_index_of_ozone_forcing_for_interpolation + long_name = interpolation high index for ozone + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[ddy_o3] + standard_name = latitude_interpolation_weight_for_ozone_forcing + long_name = interpolation high index for ozone + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[ozpl] + standard_name = ozone_forcing + long_name = ozone forcing data + units = various + dimensions = (horizontal_dimension,vertical_dimension_of_ozone_forcing_data,number_of_coefficients_in_ozone_forcing_data) + type = real + kind = kind_phys + intent = inout + optional = F +[jindx1_h] + standard_name = lower_latitude_index_of_stratospheric_water_vapor_forcing_for_interpolation + long_name = interpolation low index for stratospheric water vapor + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[jindx2_h] + standard_name = upper_latitude_index_of_stratospheric_water_vapor_forcing_for_interpolation + long_name = interpolation high index for stratospheric water vapor + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[ddy_h] + standard_name = latitude_interpolation_weight_for_stratospheric_water_vapor_forcing + long_name = interpolation high index for stratospheric water vapor + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[h2opl] + standard_name = stratospheric_water_vapor_forcing + long_name = water forcing data + units = various + dimensions = (horizontal_dimension,vertical_dimension_of_h2o_forcing_data,number_of_coefficients_in_h2o_forcing_data) + type = real + kind = kind_phys + intent = inout + optional = F +[jindx1_aer] + standard_name = lower_latitude_index_of_aerosol_forcing_for_interpolation + long_name = interpolation low index for prescribed aerosols in the y direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[jindx2_aer] + standard_name = upper_latitude_index_of_aerosol_forcing_for_interpolation + long_name = interpolation high index for prescribed aerosols in the y direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[ddy_aer] + standard_name = latitude_interpolation_weight_for_aerosol_forcing + long_name = interpolation high index for prescribed aerosols in the y direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[iindx1_aer] + standard_name = lower_longitude_index_of_aerosol_forcing_for_interpolation + long_name = interpolation low index for prescribed aerosols in the x direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[iindx2_aer] + standard_name = upper_longitude_index_of_aerosol_forcing_for_interpolation + long_name = interpolation high index for prescribed aerosols in the x direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[ddx_aer] + standard_name = longitude_interpolation_weight_for_aerosol_forcing + long_name = interpolation high index for prescribed aerosols in the x direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[aer_nm] + standard_name = mass_number_concentration_of_aerosol_from_gocart_climatology + long_name = GOCART aerosol climatology number concentration + units = kg-1 + dimensions = (horizontal_dimension,vertical_layer_dimension,number_of_aerosol_tracers_MG) + type = real + kind = kind_phys + intent = inout + optional = F +[jindx1_ci] + standard_name = lower_latitude_index_of_cloud_nuclei_forcing_for_interpolation + long_name = interpolation low index for ice and cloud condensation nuclei in the y direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[jindx2_ci] + standard_name = upper_latitude_index_of_cloud_nuclei_forcing_for_interpolation + long_name = interpolation high index for ice and cloud condensation nuclei in the y direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[ddy_ci] + standard_name = latitude_interpolation_weight_for_cloud_nuclei_forcing + long_name = interpolation high index for ice and cloud condensation nuclei in the y direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[iindx1_ci] + standard_name = lower_longitude_index_of_cloud_nuclei_forcing_for_interpolation + long_name = interpolation low index for ice and cloud condensation nuclei in the x direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[iindx2_ci] + standard_name = upper_longitude_index_of_cloud_nuclei_forcing_for_interpolation + long_name = interpolation high index for ice and cloud condensation nuclei in the x direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[ddx_ci] + standard_name = longitude_interpolation_weight_for_cloud_nuclei_forcing + long_name = interpolation high index for ice and cloud condensation nuclei in the x direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[in_nm] + standard_name = ice_nucleation_number_from_climatology + long_name = ice nucleation number in MG MP + units = kg-1 + dimensions = (horizontal_dimension,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[ccn_nm] + standard_name = tendency_of_activated_cloud_condensation_nuclei_from_climatology + long_name = tendency of ccn activated number + units = kg-1 s-1 + dimensions = (horizontal_dimension,vertical_layer_dimension) + type = real + kind = kind_phys intent = inout optional = F -[Diag] - standard_name = GFS_diag_type_instance - long_name = Fortran DDT containing FV3-GFS fields targeted for diagnostic output - units = DDT +[imap] + standard_name = map_of_block_column_number_to_global_i_index + long_name = map of local index ix to global index i for this block + units = none + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[jmap] + standard_name = map_of_block_column_number_to_global_j_index + long_name = map of local index ix to global index j for this block + units = none + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[prsl] + standard_name = air_pressure + long_name = mean layer pressure + units = Pa + dimensions = (horizontal_dimension,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[seed0] + standard_name = seed_random_numbers_RAS + long_name = random number seed for the RAS scheme + units = none dimensions = () - type = GFS_diag_type + type = integer + intent = in + optional = F +[rann] + standard_name = random_number + long_name = random number array (0-1) + units = none + dimensions = (horizontal_dimension,number_of_random_numbers) + type = real + kind = kind_phys intent = inout optional = F -[first_time_step] - standard_name = flag_for_first_time_step - long_name = flag for first time step for time integration loop (cold/warmstart) +[do_ugwp_v1] + standard_name = flag_for_ugwp_version_1 + long_name = flag to activate ver 1 CIRES UGWP units = flag dimensions = () type = logical intent = in optional = F +[jindx1_tau] + standard_name = lower_latitude_index_of_absolute_momentum_flux_due_to_nonorographic_gravity_wave_drag_for_interpolation + long_name = index1 for weight1 for tau NGWs + units = none + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[jindx2_tau] + standard_name = upper_latitude_index_of_absolute_momentum_flux_due_to_nonorographic_gravity_wave_drag_for_interpolation + long_name = index2 for weight2 for tau NGWs + units = none + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[ddy_j1tau] + standard_name = latitude_interpolation_weight_complement_for_absolute_momentum_flux_due_to_nonorographic_gravity_wave_drag + long_name = interpolation weight1 for tau NGWs + units = none + dimensions = (horizontal_dimension) + type = real + intent = in + kind = kind_phys + optional = F +[ddy_j2tau] + standard_name = latitude_interpolation_weight_for_absolute_momentum_flux_due_to_nonorographic_gravity_wave_drag + long_name = interpolation weight2 for tau NGWs + units = none + dimensions = (horizontal_dimension) + type = real + intent = in + kind = kind_phys + optional = F +[tau_amf] + standard_name = absolute_momentum_flux_due_to_nonorographic_gravity_wave_drag + long_name = ngw_absolute_momentum_flux + units = various + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[nthrds] + standard_name = number_of_openmp_threads + long_name = number of OpenMP threads available for physics schemes + units = count + dimensions = () + type = integer + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + +######################################################################## +[ccpp-arg-table] + name = GFS_phys_time_vary_timestep_finalize + type = scheme [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/GFS_rad_time_vary.fv3.F90 b/physics/GFS_rad_time_vary.fv3.F90 index a081ddcf1..8dd070b12 100644 --- a/physics/GFS_rad_time_vary.fv3.F90 +++ b/physics/GFS_rad_time_vary.fv3.F90 @@ -1,4 +1,4 @@ -!>\file GFS_rad_time_vary.F90 +!>\file GFS_rad_time_vary.fv3.F90 !! Contains code related to GFS physics suite setup (radiation part of time_vary_step) module GFS_rad_time_vary diff --git a/physics/GFS_rad_time_vary.fv3.meta b/physics/GFS_rad_time_vary.fv3.meta index ffe33810c..6d0833fa7 100644 --- a/physics/GFS_rad_time_vary.fv3.meta +++ b/physics/GFS_rad_time_vary.fv3.meta @@ -8,7 +8,7 @@ name = GFS_rad_time_vary_timestep_init type = scheme [lslwr] - standard_name = flag_to_calc_lw + standard_name = flag_for_calling_longwave_radiation long_name = logical flags for lw radiation calls units = flag dimensions = () @@ -16,7 +16,7 @@ intent = in optional = F [lsswr] - standard_name = flag_to_calc_sw + standard_name = flag_for_calling_shortwave_radiation long_name = logical flags for sw radiation calls units = flag dimensions = () @@ -40,7 +40,7 @@ intent = in optional = F [icsdsw] - standard_name = seed_random_numbers_sw + standard_name = random_number_seed_for_mcica_shortwave long_name = random seeds for sub-column cloud generators sw units = none dimensions = (horizontal_dimension) @@ -48,7 +48,7 @@ intent = inout optional = F [icsdlw] - standard_name = seed_random_numbers_lw + standard_name = random_number_seed_for_mcica_longwave long_name = random seeds for sub-column cloud generators lw units = none dimensions = (horizontal_dimension) @@ -56,7 +56,7 @@ intent = inout optional = F [cnx] - standard_name = number_of_points_in_x_direction_for_this_cubed_sphere_face + standard_name = number_of_x_points_for_current_cubed_sphere_tile long_name = number of points in x direction for this cubed sphere face units = count dimensions = () @@ -64,7 +64,7 @@ intent = in optional = F [cny] - standard_name = number_of_points_in_y_direction_for_this_cubed_sphere_face + standard_name = number_of_y_points_for_current_cubed_sphere_tile long_name = number of points in y direction for this cubed sphere face units = count dimensions = () @@ -104,7 +104,7 @@ intent = in optional = F [sec] - standard_name = seconds_elapsed_since_model_initialization + standard_name = forecast_time_in_seconds long_name = seconds elapsed since model initialization units = s dimensions = () @@ -113,7 +113,7 @@ intent = in optional = F [kdt] - standard_name = index_of_time_step + standard_name = index_of_timestep long_name = current forecast iteration units = index dimensions = () @@ -121,7 +121,7 @@ intent = in optional = F [imp_physics] - standard_name = flag_for_microphysics_scheme + standard_name = control_for_microphysics_scheme long_name = choice of microphysics scheme units = flag dimensions = () @@ -129,7 +129,7 @@ intent = in optional = F [imp_physics_zhao_carr] - standard_name = flag_for_zhao_carr_microphysics_scheme + standard_name = identifier_for_zhao_carr_microphysics_scheme long_name = choice of Zhao-Carr microphysics scheme units = flag dimensions = () @@ -146,7 +146,7 @@ intent = inout optional = F [ps_1delt] - standard_name = surface_air_pressure_at_previous_timestep + standard_name = surface_air_pressure_on_previous_timestep long_name = surface air pressure at previous timestep units = Pa dimensions = (horizontal_dimension) @@ -158,34 +158,34 @@ standard_name = air_temperature_two_timesteps_back long_name = air temperature two timesteps back units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [t_1delt] - standard_name = air_temperature_at_previous_timestep + standard_name = air_temperature_on_previous_timestep_in_xyz_dimensioned_restart_array long_name = air temperature at previous timestep units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [qv_2delt] - standard_name = water_vapor_specific_humidity_two_timesteps_back + standard_name = specific_humidity_two_timesteps_back long_name = water vapor specific humidity two timesteps back units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [qv_1delt] - standard_name = water_vapor_specific_humidity_at_previous_timestep + standard_name = specific_humidity_on_previous_timestep_in_xyz_dimensioned_restart_array long_name = water vapor specific humidity at previous timestep units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -194,16 +194,16 @@ standard_name = air_temperature long_name = model layer mean temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [qv] - standard_name = water_vapor_specific_humidity + standard_name = specific_humidity long_name = water vapor specific humidity units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys intent = in diff --git a/physics/GFS_rad_time_vary.scm.F90 b/physics/GFS_rad_time_vary.scm.F90 index 9d7302beb..d7d4cda26 100644 --- a/physics/GFS_rad_time_vary.scm.F90 +++ b/physics/GFS_rad_time_vary.scm.F90 @@ -1,90 +1,92 @@ -!>\file GFS_rad_time_vary.F90 +!>\file GFS_rad_time_vary.scm.F90 !! Contains code related to GFS physics suite setup (radiation part of time_vary_step) - module GFS_rad_time_vary + module GFS_rad_time_vary implicit none private - public GFS_rad_time_vary_init, GFS_rad_time_vary_run, GFS_rad_time_vary_finalize + public GFS_rad_time_vary_timestep_init contains -!>\defgroup GFS_rad_time_vary GFS RRTMG Update -!!\ingroup RRTMG -!! @{ - subroutine GFS_rad_time_vary_init - end subroutine GFS_rad_time_vary_init - -!> \section arg_table_GFS_rad_time_vary_run Argument Table -!! \htmlinclude GFS_rad_time_vary_run.html +!>\defgroup mod_GFS_rad_time_vary GFS Radiation Time Update +!> @{ +!> \section arg_table_GFS_rad_time_vary_timestep_init Argument Table +!! \htmlinclude GFS_rad_time_vary_timestep_init.html !! - subroutine GFS_rad_time_vary_run (Model, Statein, Tbd, errmsg, errflg) - - use physparam, only: ipsd0, ipsdlim, iaerflg - use mersenne_twister, only: random_setseed, random_index, random_stat - use machine, only: kind_phys - use GFS_typedefs, only: GFS_statein_type, & - GFS_control_type, & - GFS_grid_type, & - GFS_tbd_type - use radcons, only: qmin, con_100 - - implicit none - - type(GFS_control_type), intent(inout) :: Model - type(GFS_statein_type), intent(in) :: Statein - type(GFS_tbd_type), intent(inout) :: Tbd - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - - !--- local variables - type (random_stat) :: stat - integer :: ix, nb, j, i, nblks, ipseed - integer :: numrdm(Model%cnx*Model%cny*2) - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - nb = 1 - - if (Model%lsswr .or. Model%lslwr) then - - !--- call to GFS_radupdate_run is now in GFS_rrtmg_setup_run - - !--- set up random seed index in a reproducible way for entire cubed-sphere face (lat-lon grid) - if ((Model%isubc_lw==2) .or. (Model%isubc_sw==2)) then - ipseed = mod(nint(con_100*sqrt(Model%sec)), ipsdlim) + 1 + ipsd0 - call random_setseed (ipseed, stat) - call random_index (ipsdlim, numrdm, stat) - - !--- set the random seeds for each column in a reproducible way - do ix=1,Model%blksz(nb) - j = Tbd%jmap(ix) - i = Tbd%imap(ix) - !--- for testing purposes, replace numrdm with '100' - Tbd%icsdsw(ix) = numrdm(i+Model%isc-1 + (j+Model%jsc-2)*Model%cnx) - Tbd%icsdlw(ix) = numrdm(i+Model%isc-1 + (j+Model%jsc-2)*Model%cnx + Model%cnx*Model%cny) - enddo - endif ! isubc_lw and isubc_sw - - if (Model%imp_physics == 99) then - if (Model%kdt == 1) then - Tbd%phy_f3d(:,:,1) = Statein%tgrs - Tbd%phy_f3d(:,:,2) = max(qmin,Statein%qgrs(:,:,1)) - Tbd%phy_f3d(:,:,3) = Statein%tgrs - Tbd%phy_f3d(:,:,4) = max(qmin,Statein%qgrs(:,:,1)) - Tbd%phy_f2d(:,1) = Statein%prsi(:,1) - Tbd%phy_f2d(:,2) = Statein%prsi(:,1) - endif - endif - - endif - - end subroutine GFS_rad_time_vary_run - - subroutine GFS_rad_time_vary_finalize() - end subroutine GFS_rad_time_vary_finalize -!! @} - end module GFS_rad_time_vary + subroutine GFS_rad_time_vary_timestep_init ( & + lslwr, lsswr, isubc_lw, isubc_sw, icsdsw, icsdlw, cnx, cny, isc, jsc, & + imap, jmap, sec, kdt, imp_physics, imp_physics_zhao_carr, ps_2delt, & + ps_1delt, t_2delt, t_1delt, qv_2delt, qv_1delt, t, qv, ps, errmsg, errflg) + + use physparam, only: ipsd0, ipsdlim, iaerflg + use mersenne_twister, only: random_setseed, random_index, random_stat + use machine, only: kind_phys + use radcons, only: qmin, con_100 + + implicit none + + ! Interface variables + integer, intent(in) :: isubc_lw, isubc_sw, cnx, cny, isc, jsc, kdt + integer, intent(in) :: imp_physics, imp_physics_zhao_carr + logical, intent(in) :: lslwr, lsswr + integer, intent(inout) :: icsdsw(:), icsdlw(:) + integer, intent(in) :: imap(:), jmap(:) + real(kind_phys), intent(in) :: sec + real(kind_phys), intent(inout) :: ps_2delt(:) + real(kind_phys), intent(inout) :: ps_1delt(:) + real(kind_phys), intent(inout) :: t_2delt(:,:) + real(kind_phys), intent(inout) :: t_1delt(:,:) + real(kind_phys), intent(inout) :: qv_2delt(:,:) + real(kind_phys), intent(inout) :: qv_1delt(:,:) + real(kind_phys), intent(in) :: t(:,:), qv(:,:), ps(:) + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Local variables + type (random_stat) :: stat + integer :: ix, j, i, ipseed + integer :: numrdm(cnx*cny*2) + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (lsswr .or. lslwr) then + + !--- call to GFS_radupdate_timestep_init is now in GFS_rrtmg_setup_timestep_init + + !--- set up random seed index in a reproducible way for entire cubed-sphere face (lat-lon grid) + if ((isubc_lw==2) .or. (isubc_sw==2)) then + ipseed = mod(nint(con_100*sqrt(sec)), ipsdlim) + 1 + ipsd0 + call random_setseed (ipseed, stat) + call random_index (ipsdlim, numrdm, stat) + + do ix=1,size(jmap) + j = jmap(ix) + i = imap(ix) + !--- for testing purposes, replace numrdm with '100' + icsdsw(ix) = numrdm(i+isc-1 + (j+jsc-2)*cnx) + icsdlw(ix) = numrdm(i+isc-1 + (j+jsc-2)*cnx + cnx*cny) + enddo + + endif ! isubc_lw and isubc_sw + + if (imp_physics == imp_physics_zhao_carr) then + if (kdt == 1) then + t_2delt = t + t_1delt = t + qv_2delt = max(qmin,qv) + qv_1delt = max(qmin,qv) + ps_2delt = ps + ps_1delt = ps + endif + endif + + endif + + end subroutine GFS_rad_time_vary_timestep_init +!> @} + + end module GFS_rad_time_vary diff --git a/physics/GFS_rad_time_vary.scm.meta b/physics/GFS_rad_time_vary.scm.meta index b78be178a..6d0833fa7 100644 --- a/physics/GFS_rad_time_vary.scm.meta +++ b/physics/GFS_rad_time_vary.scm.meta @@ -5,32 +5,218 @@ ######################################################################## [ccpp-arg-table] - name = GFS_rad_time_vary_run + name = GFS_rad_time_vary_timestep_init type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = Fortran DDT containing FV3-GFS model control parameters - units = DDT +[lslwr] + standard_name = flag_for_calling_longwave_radiation + long_name = logical flags for lw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F +[lsswr] + standard_name = flag_for_calling_shortwave_radiation + long_name = logical flags for sw radiation calls + units = flag dimensions = () - type = GFS_control_type + type = logical + intent = in + optional = F +[isubc_lw] + standard_name = flag_for_lw_clouds_sub_grid_approximation + long_name = flag for lw clouds sub-grid approximation + units = flag + dimensions = () + type = integer + intent = in + optional = F +[isubc_sw] + standard_name = flag_for_sw_clouds_grid_approximation + long_name = flag for sw clouds sub-grid approximation + units = flag + dimensions = () + type = integer + intent = in + optional = F +[icsdsw] + standard_name = random_number_seed_for_mcica_shortwave + long_name = random seeds for sub-column cloud generators sw + units = none + dimensions = (horizontal_dimension) + type = integer intent = inout optional = F -[Statein] - standard_name = GFS_statein_type_instance - long_name = Fortran DDT containing FV3-GFS prognostic state data in from dycore - units = DDT +[icsdlw] + standard_name = random_number_seed_for_mcica_longwave + long_name = random seeds for sub-column cloud generators lw + units = none + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[cnx] + standard_name = number_of_x_points_for_current_cubed_sphere_tile + long_name = number of points in x direction for this cubed sphere face + units = count + dimensions = () + type = integer + intent = in + optional = F +[cny] + standard_name = number_of_y_points_for_current_cubed_sphere_tile + long_name = number of points in y direction for this cubed sphere face + units = count + dimensions = () + type = integer + intent = in + optional = F +[isc] + standard_name = starting_x_index_for_this_MPI_rank + long_name = starting index in the x direction for this MPI rank + units = count + dimensions = () + type = integer + intent = in + optional = F +[jsc] + standard_name = starting_y_index_for_this_MPI_rank + long_name = starting index in the y direction for this MPI rank + units = count + dimensions = () + type = integer + intent = in + optional = F +[imap] + standard_name = map_of_block_column_number_to_global_i_index + long_name = map of local index ix to global index i for this block + units = none + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[jmap] + standard_name = map_of_block_column_number_to_global_j_index + long_name = map of local index ix to global index j for this block + units = none + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[sec] + standard_name = forecast_time_in_seconds + long_name = seconds elapsed since model initialization + units = s dimensions = () - type = GFS_statein_type + type = real + kind = kind_phys intent = in optional = F -[Tbd] - standard_name = GFS_tbd_type_instance - long_name = Fortran DDT containing FV3-GFS data not yet assigned to a defined container - units = DDT +[kdt] + standard_name = index_of_timestep + long_name = current forecast iteration + units = index + dimensions = () + type = integer + intent = in + optional = F +[imp_physics] + standard_name = control_for_microphysics_scheme + long_name = choice of microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imp_physics_zhao_carr] + standard_name = identifier_for_zhao_carr_microphysics_scheme + long_name = choice of Zhao-Carr microphysics scheme + units = flag dimensions = () - type = GFS_tbd_type + type = integer + intent = in + optional = F +[ps_2delt] + standard_name = surface_air_pressure_two_timesteps_back + long_name = surface air pressure two timesteps back + units = Pa + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[ps_1delt] + standard_name = surface_air_pressure_on_previous_timestep + long_name = surface air pressure at previous timestep + units = Pa + dimensions = (horizontal_dimension) + type = real + kind = kind_phys intent = inout optional = F +[t_2delt] + standard_name = air_temperature_two_timesteps_back + long_name = air temperature two timesteps back + units = K + dimensions = (horizontal_dimension,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[t_1delt] + standard_name = air_temperature_on_previous_timestep_in_xyz_dimensioned_restart_array + long_name = air temperature at previous timestep + units = K + dimensions = (horizontal_dimension,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qv_2delt] + standard_name = specific_humidity_two_timesteps_back + long_name = water vapor specific humidity two timesteps back + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qv_1delt] + standard_name = specific_humidity_on_previous_timestep_in_xyz_dimensioned_restart_array + long_name = water vapor specific humidity at previous timestep + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[t] + standard_name = air_temperature + long_name = model layer mean temperature + units = K + dimensions = (horizontal_dimension,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[qv] + standard_name = specific_humidity + long_name = water vapor specific humidity + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[ps] + standard_name = air_pressure_at_lowest_model_interface + long_name = air pressure at lowest model interface + units = Pa + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/GFS_radiation_surface.F90 b/physics/GFS_radiation_surface.F90 new file mode 100644 index 000000000..7da6e5df7 --- /dev/null +++ b/physics/GFS_radiation_surface.F90 @@ -0,0 +1,201 @@ +!>\file GFS_radiation_surface.f90 +!! This file contains calls to module_radiation_surface::setemis() to set up +!! surface emissivity for LW radiation and to module_radiation_surface::setalb() +!! to set up surface albedo for SW radiation. + module GFS_radiation_surface + + use machine, only: kind_phys + + contains + +!>\defgroup GFS_radiation_surface GFS radiation surface +!! @{ +!> \section arg_table_GFS_radiation_surface_init Argument Table +!! \htmlinclude GFS_radiation_surface_init.html +!! + subroutine GFS_radiation_surface_init (me, sfcalb, ialb, iems, errmsg, errflg) + + use physparam, only: ialbflg, iemsflg + use module_radiation_surface, only: NF_ALBD, sfc_init + + implicit none + + integer, intent(in) :: me, ialb, iems + real(kind=kind_phys), dimension(:,:), intent(in) :: sfcalb + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + ! Consistency check that the number of albedo components in array + ! sfcalb matches the parameter NF_ALBD from radiation_surface.f + if (size(sfcalb,dim=2)/=NF_ALBD) then + errmsg = 'Error in GFS_radiation_surface_init: second' // & + ' dimension of array sfcalb does not match' // & + ' parameter NF_ALBD in radiation_surface.f' + errflg = 1 + end if + + ialbflg= ialb ! surface albedo control flag + iemsflg= iems ! surface emissivity control flag + + if ( me == 0 ) then + print *,'In GFS_radiation_surface_init, before calling sfc_init' + print *,'ialb=',ialb,' iems=',iems + end if + + ! Call surface initialization routine + call sfc_init ( me, errmsg, errflg ) + + end subroutine GFS_radiation_surface_init + + +!> \section arg_table_GFS_radiation_surface_run Argument Table +!! \htmlinclude GFS_radiation_surface_run.html +!! + subroutine GFS_radiation_surface_run ( & + im, frac_grid, lslwr, lsswr, lsm, lsm_noahmp, lsm_ruc, & + vtype, xlat, xlon, slmsk, lndp_type, n_var_lndp, sfc_alb_pert, & + lndp_var_list, lndp_prt_list, landfrac, snowd, sncovr, & + sncovr_ice, fice, zorl, hprime, tsfg, tsfa, tisfc, coszen, & + min_seaice, min_lakeice, lakefrac, & + alvsf, alnsf, alvwf, alnwf, facsf, facwf, & + semis_lnd, semis_ice, snoalb, & + albdvis_lnd, albdnir_lnd, albivis_lnd, albinir_lnd, & + albdvis_ice, albdnir_ice, albivis_ice, albinir_ice, & + semisbase, semis, sfcalb, sfc_alb_dif, errmsg, errflg) + + use module_radiation_surface, only: f_zero, f_one, & + epsln, NF_ALBD, & + setemis, setalb + + implicit none + + integer, intent(in) :: im + logical, intent(in) :: frac_grid, lslwr, lsswr + integer, intent(in) :: lsm, lsm_noahmp, lsm_ruc, lndp_type, n_var_lndp + real(kind=kind_phys), intent(in) :: min_seaice, min_lakeice + + real(kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, vtype, slmsk, & + sfc_alb_pert, lndp_prt_list, & + landfrac, lakefrac, & + snowd, sncovr, & + sncovr_ice, fice, zorl, & + hprime, tsfg, tsfa, tisfc, & + coszen, alvsf, alnsf, alvwf, & + alnwf, facsf, facwf, & + semis_lnd, semis_ice, snoalb + character(len=3) , dimension(:), intent(in) :: lndp_var_list + real(kind=kind_phys), dimension(:), intent(inout) :: albdvis_lnd, albdnir_lnd, & + albivis_lnd, albinir_lnd + real(kind=kind_phys), dimension(:), intent(in) :: albdvis_ice, albdnir_ice, & + albivis_ice, albinir_ice + real(kind=kind_phys), dimension(:), intent(inout) :: semisbase, semis + real(kind=kind_phys), dimension(:,:), intent(inout) :: sfcalb + real(kind=kind_phys), dimension(:), intent(inout) :: sfc_alb_dif + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Local variables + integer :: i + real(kind=kind_phys) :: lndp_alb + real(kind=kind_phys) :: cimin + real(kind=kind_phys), dimension(im) :: fracl, fraci, fraco + logical, dimension(im) :: icy + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + ! Return immediately if neither shortwave nor longwave radiation are called + if (.not. lsswr .and. .not. lslwr) return + + do i=1,im + if (lakefrac(i) > f_zero) then + cimin = min_lakeice + else + cimin = min_seaice + endif + enddo + + ! Set up land/ice/ocean fractions for emissivity and albedo calculations + if (.not. frac_grid) then + do i=1,im + if (slmsk(i) == 1) then + fracl(i) = f_one + fraci(i) = f_zero + fraco(i) = f_zero + icy(i) = .false. + else + fracl(i) = f_zero + fraco(i) = f_one + if(fice(i) < cimin) then + fraci(i) = f_zero + icy(i) = .false. + else + fraci(i) = fraco(i) * fice(i) + icy(i) = .true. + endif + fraco(i) = max(f_zero, fraco(i)-fraci(i)) + endif + enddo + else + do i=1,im + fracl(i) = landfrac(i) + fraco(i) = max(f_zero, f_one - fracl(i)) + if(fice(i) < cimin) then + fraci(i) = f_zero + icy(i) = .false. + else + fraci(i) = fraco(i) * fice(i) + icy(i) = .true. + endif + fraco(i) = max(f_zero, fraco(i)-fraci(i)) + enddo + endif + + if (lslwr) then +!> - Call module_radiation_surface::setemis(),to set up surface +!! emissivity for LW radiation. + call setemis (lsm, lsm_noahmp, lsm_ruc, vtype, & + frac_grid, min_seaice, xlon, xlat, slmsk, & + snowd, sncovr, sncovr_ice, zorl, tsfg, tsfa, & + hprime, semis_lnd, semis_ice, im, & + fracl, fraco, fraci, icy, & ! --- inputs + semisbase, semis) ! --- outputs + endif + + if (lsswr) then +!> - Set surface albedo perturbation, if requested + lndp_alb = -999. + if (lndp_type==1) then + do i =1,n_var_lndp + if (lndp_var_list(i) == 'alb') then + lndp_alb = lndp_prt_list(i) + endif + enddo + endif + +!> - Call module_radiation_surface::setalb(),to set up surface +!! albedor for SW radiation. + + call setalb (slmsk, lsm, lsm_noahmp, lsm_ruc, snowd, sncovr, sncovr_ice, snoalb, & + zorl, coszen, tsfg, tsfa, hprime, frac_grid, min_seaice, & + alvsf, alnsf, alvwf, alnwf, facsf, facwf, fice, tisfc, & + albdvis_lnd, albdnir_lnd, albivis_lnd, albinir_lnd, & + albdvis_ice, albdnir_ice, albivis_ice, albinir_ice, & + IM, sfc_alb_pert, lndp_alb, fracl, fraco, fraci, icy, & ! --- inputs + sfcalb ) ! --- outputs + +!> -# Approximate mean surface albedo from vis- and nir- diffuse values. + sfc_alb_dif(:) = max(0.01, 0.5 * (sfcalb(:,2) + sfcalb(:,4))) + endif + + end subroutine GFS_radiation_surface_run + + subroutine GFS_radiation_surface_finalize () + end subroutine GFS_radiation_surface_finalize +!! @} + end module GFS_radiation_surface diff --git a/physics/GFS_radiation_surface.meta b/physics/GFS_radiation_surface.meta new file mode 100644 index 000000000..eacec3e01 --- /dev/null +++ b/physics/GFS_radiation_surface.meta @@ -0,0 +1,531 @@ +[ccpp-table-properties] + name = GFS_radiation_surface + type = scheme + dependencies = iounitdef.f,machine.F,physparam.f,radiation_surface.f,set_soilveg_ruc.F90,namelist_soilveg_ruc.F90 + +######################################################################## +[ccpp-arg-table] + name = GFS_radiation_surface_init + type = scheme +[me] + standard_name = mpi_rank + long_name = current MPI-rank + units = index + dimensions = () + type = integer + intent = in + optional = F +[sfcalb] + standard_name = surface_albedo_components + long_name = surface albedo IR/UV/VIS components + units = frac + dimensions = (horizontal_dimension,number_of_components_for_surface_albedo) + type = real + kind = kind_phys + intent = in + optional = F +[ialb] + standard_name = control_for_surface_albedo + long_name = flag for using climatology alb, based on sfc type + units = flag + dimensions = () + type = integer + intent = in + optional = F +[iems] + standard_name = control_for_surface_emissivity + long_name = surface emissivity control flag, use fixed value of 1 + units = flag + dimensions = () + type = integer + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + +######################################################################## +[ccpp-arg-table] + name = GFS_radiation_surface_run + type = scheme +[im] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count + dimensions = () + type = integer + intent = in + optional = F +[frac_grid] + standard_name = flag_for_fractional_landmask + long_name = flag for fractional grid + units = flag + dimensions = () + type = logical + intent = in + optional = F +[lslwr] + standard_name = flag_for_calling_longwave_radiation + long_name = logical flags for lw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F +[lsswr] + standard_name = flag_for_calling_shortwave_radiation + long_name = logical flags for sw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F +[lsm] + standard_name = control_for_land_surface_scheme + long_name = flag for land surface model + units = flag + dimensions = () + type = integer + intent = in + optional = F +[lsm_noahmp] + standard_name = identifier_for_noahmp_land_surface_scheme + long_name = flag for NOAH MP land surface model + units = flag + dimensions = () + type = integer + intent = in + optional = F +[lsm_ruc] + standard_name = identifier_for_ruc_land_surface_scheme + long_name = flag for RUC land surface model + units = flag + dimensions = () + type = integer + intent = in + optional = F +[vtype] + standard_name = vegetation_type_classification_real + long_name = vegetation type for lsm + units = index + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[xlat] + standard_name = latitude + long_name = latitude + units = radian + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[xlon] + standard_name = longitude + long_name = longitude + units = radian + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[slmsk] + standard_name = area_type + long_name = landmask: sea/land/ice=0/1/2 + units = flag + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[lndp_type] + standard_name = control_for_stochastic_land_surface_perturbation + long_name = index for stochastic land surface perturbations type + units = index + dimensions = () + type = integer + intent = in + optional = F +[n_var_lndp] + standard_name = number_of_perturbed_land_surface_variables + long_name = number of land surface variables perturbed + units = count + dimensions = () + type = integer + intent = in + optional = F +[sfc_alb_pert] + standard_name = surface_albedo_perturbation + long_name = surface albedo perturbation + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[lndp_var_list] + standard_name = land_surface_perturbation_variables + long_name = variables to be perturbed for landperts + units = none + dimensions = (number_of_perturbed_land_surface_variables) + type = character + kind = len=3 + intent = in + optional = F +[lndp_prt_list] + standard_name = land_surface_perturbation_magnitudes + long_name = magnitude of perturbations for landperts + units = variable + dimensions = (number_of_perturbed_land_surface_variables) + type = real + kind = kind_phys + intent = in + optional = F +[landfrac] + standard_name = land_area_fraction + long_name = fraction of horizontal grid area occupied by land + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[snowd] + standard_name = lwe_surface_snow + long_name = water equivalent snow depth + units = mm + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[sncovr] + standard_name = surface_snow_area_fraction_over_land + long_name = surface snow area fraction + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[sncovr_ice] + standard_name = surface_snow_area_fraction_over_ice + long_name = surface snow area fraction over ice + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[fice] + standard_name = sea_ice_area_fraction_of_sea_area_fraction + long_name = ice fraction over open water + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[zorl] + standard_name = surface_roughness_length + long_name = surface roughness length + units = cm + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[hprime] + standard_name = standard_deviation_of_subgrid_orography + long_name = standard deviation of subgrid height_above_mean_sea_level + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[tsfg] + standard_name = surface_ground_temperature_for_radiation + long_name = surface ground temperature for radiation + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[tsfa] + standard_name = surface_air_temperature_for_radiation + long_name = lowest model layer air temperature for radiation + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[tisfc] + standard_name = sea_ice_temperature + long_name = sea ice surface skin temperature + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[coszen] + standard_name = cosine_of_solar_zenith_angle_for_daytime_points_on_radiation_timestep + long_name = mean cos of zenith angle over rad call period + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[min_seaice] + standard_name = min_sea_ice_area_fraction + long_name = minimum sea ice value + units = frac + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[min_lakeice] + standard_name = min_lake_ice_area_fraction + long_name = minimum lake ice value + units = frac + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[lakefrac] + standard_name = lake_area_fraction + long_name = fraction of horizontal grid area occupied by lake + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[alvsf] + standard_name = vis_albedo_strong_cosz + long_name = mean vis albedo with strong cosz dependency + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[alnsf] + standard_name = nir_albedo_strong_cosz + long_name = mean nir albedo with strong cosz dependency + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[alvwf] + standard_name = vis_albedo_weak_cosz + long_name = mean vis albedo with weak cosz dependency + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[alnwf] + standard_name = nir_albedo_weak_cosz + long_name = mean nir albedo with weak cosz dependency + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[facsf] + standard_name =strong_cosz_area_fraction + long_name = fractional coverage with strong cosz dependency + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[facwf] + standard_name = weak_cosz_area_fraction + long_name = fractional coverage with weak cosz dependency + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[semis_lnd] + standard_name = surface_longwave_emissivity_over_land + long_name = surface lw emissivity in fraction over land + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[semis_ice] + standard_name = surface_longwave_emissivity_over_ice + long_name = surface lw emissivity in fraction over ice + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[snoalb] + standard_name = upper_bound_of_max_albedo_assuming_deep_snow + long_name = maximum snow albedo + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[albdvis_lnd] + standard_name = surface_albedo_direct_visible_over_land + long_name = direct surface albedo visible band over land + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[albdnir_lnd] + standard_name = surface_albedo_direct_NIR_over_land + long_name = direct surface albedo NIR band over land + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[albivis_lnd] + standard_name = surface_albedo_diffuse_visible_over_land + long_name = diffuse surface albedo visible band over land + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[albinir_lnd] + standard_name = surface_albedo_diffuse_NIR_over_land + long_name = diffuse surface albedo NIR band over land + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[albdvis_ice] + standard_name = surface_albedo_direct_visible_over_ice + long_name = direct surface albedo visible band over ice + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[albdnir_ice] + standard_name = surface_albedo_direct_NIR_over_ice + long_name = direct surface albedo NIR band over ice + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[albivis_ice] + standard_name = surface_albedo_diffuse_visible_over_ice + long_name = diffuse surface albedo visible band over ice + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[albinir_ice] + standard_name = surface_albedo_diffuse_NIR_over_ice + long_name = diffuse surface albedo NIR band over ice + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[semisbase] + standard_name = baseline_surface_longwave_emissivity + long_name = baseline surface lw emissivity in fraction + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[semis] + standard_name = surface_longwave_emissivity + long_name = surface lw emissivity in fraction + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[sfcalb] + standard_name = surface_albedo_components + long_name = surface albedo IR/UV/VIS components + units = frac + dimensions = (horizontal_loop_extent,number_of_components_for_surface_albedo) + type = real + kind = kind_phys + intent = inout + optional = F +[sfc_alb_dif] + standard_name = surface_albedo_for_diffused_shortwave_on_radiation_timestep + long_name = mean surface diffused sw albedo + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F diff --git a/physics/GFS_rrtmg_post.F90 b/physics/GFS_rrtmg_post.F90 index 278d3c416..b882930bf 100644 --- a/physics/GFS_rrtmg_post.F90 +++ b/physics/GFS_rrtmg_post.F90 @@ -1,10 +1,12 @@ !>\file GFS_rrtmg_post.f90 !! This file contains + +!>\defgroup GFS_rrtmg_post_mod GFS RRTMG Scheme Post module GFS_rrtmg_post contains -!>\defgroup GFS_rrtmg_post GFS RRTMG Scheme Post -!! @{ +!> \section arg_table_GFS_rrtmg_post_init Argument Table +!! subroutine GFS_rrtmg_post_init () end subroutine GFS_rrtmg_post_init @@ -200,5 +202,4 @@ end subroutine GFS_rrtmg_post_run subroutine GFS_rrtmg_post_finalize () end subroutine GFS_rrtmg_post_finalize -!! @} end module GFS_rrtmg_post diff --git a/physics/GFS_rrtmg_post.meta b/physics/GFS_rrtmg_post.meta index bb67a315a..6564f5025 100644 --- a/physics/GFS_rrtmg_post.meta +++ b/physics/GFS_rrtmg_post.meta @@ -16,7 +16,7 @@ intent = in optional = F [km] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () @@ -24,7 +24,7 @@ intent = in optional = F [kmp1] - standard_name = vertical_dimension_plus_one + standard_name = vertical_interface_dimension long_name = number of vertical levels plus one units = count dimensions = () @@ -32,7 +32,7 @@ intent = in optional = F [lm] - standard_name = number_of_vertical_layers_for_radiation_calculations + standard_name = vertical_dimension_for_radiation long_name = number of vertical layers for radiation calculation units = count dimensions = () @@ -80,7 +80,7 @@ intent = in optional = F [nfxr] - standard_name = number_of_radiation_diagnostic_variables + standard_name = number_of_diagnostics_variables_for_radiation long_name = number of variables stored in the fluxr array units = count dimensions = () @@ -96,7 +96,7 @@ intent = in optional = F [lsswr] - standard_name = flag_to_calc_sw + standard_name = flag_for_calling_shortwave_radiation long_name = logical flags for sw radiation calls units = flag dimensions = () @@ -104,7 +104,7 @@ intent = in optional = F [lslwr] - standard_name = flag_to_calc_lw + standard_name = flag_for_calling_longwave_radiation long_name = logical flags for lw radiation calls units = flag dimensions = () @@ -112,7 +112,7 @@ intent = in optional = F [lssav] - standard_name = flag_diagnostics + standard_name = flag_for_diagnostics long_name = logical flag for storing diagnostics units = flag dimensions = () @@ -120,7 +120,7 @@ intent = in optional = F [fhlwr] - standard_name = frequency_for_longwave_radiation + standard_name = period_of_longwave_radiation_calls long_name = frequency for longwave radiation units = s dimensions = () @@ -129,7 +129,7 @@ intent = in optional = F [fhswr] - standard_name = frequency_for_shortwave_radiation + standard_name = period_of_shortwave_radiation_calls long_name = frequency for shortwave radiation units = s dimensions = () @@ -147,7 +147,7 @@ intent = in optional = F [coszen] - standard_name = cosine_of_zenith_angle + standard_name = cosine_of_solar_zenith_angle_for_daytime_points_on_radiation_timestep long_name = mean cos of zenith angle over rad call period units = none dimensions = (horizontal_loop_extent) @@ -156,7 +156,7 @@ intent = in optional = F [coszdg] - standard_name = daytime_mean_cosz_over_rad_call_period + standard_name = cosine_of_solar_zenith_angle_on_radiation_timestep long_name = daytime mean cosz over rad call period units = none dimensions = (horizontal_loop_extent) @@ -168,7 +168,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -177,7 +177,7 @@ standard_name = air_temperature long_name = model layer mean temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -220,7 +220,7 @@ standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -244,7 +244,7 @@ intent = in optional = F [sfcflw] - standard_name = lw_fluxes_sfc + standard_name = surface_lw_fluxes_assuming_total_and_clear_sky_on_radiation_timestep long_name = lw radiation fluxes at sfc units = W m-2 dimensions = (horizontal_loop_extent) @@ -252,7 +252,7 @@ intent = in optional = F [sfcfsw] - standard_name = sw_fluxes_sfc + standard_name = surface_sw_fluxes_assuming_total_and_clear_sky_on_radiation_timestep long_name = sw radiation fluxes at sfc units = W m-2 dimensions = (horizontal_loop_extent) @@ -287,7 +287,7 @@ standard_name = cumulative_radiation_diagnostic long_name = time-accumulated 2D radiation-related diagnostic fields units = various - dimensions = (horizontal_loop_extent,number_of_radiation_diagnostic_variables) + dimensions = (horizontal_loop_extent,number_of_diagnostics_variables_for_radiation) type = real kind = kind_phys intent = inout diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 109df3b65..dbea66985 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -18,16 +18,16 @@ end subroutine GFS_rrtmg_pre_init ! in the CCPP version - they are defined in the interstitial_create routine subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & imfdeepcnv, imfdeepcnv_gf, me, ncnd, ntrac, num_p3d, npdf3d, ncnvcld3d,& - ntqv, ntcw,ntiw, ntlnc, ntinc, ncld, ntrw, ntsw, ntgl, ntwa, ntoz, & + ntqv, ntcw,ntiw, ntlnc, ntinc, ntrw, ntsw, ntgl, ntwa, ntoz, & ntclamt, nleffr, nieffr, nseffr, lndp_type, kdt, imp_physics, & imp_physics_thompson, imp_physics_gfdl, imp_physics_zhao_carr, & imp_physics_zhao_carr_pdf, imp_physics_mg, imp_physics_wsm6, & imp_physics_fer_hires, julian, yearlen, lndp_var_list, lsswr, lslwr, & ltaerosol, lgfdlmprad, uni_cld, effr_in, do_mynnedmf, lmfshal, & - lmfdeep2, fhswr, fhlwr, solhr, sup, eps, epsm1, fvirt, & + lmfdeep2, fhswr, fhlwr, solhr, sup, con_eps, epsm1, fvirt, & rog, rocp, con_rd, xlat_d, xlat, xlon, coslat, sinlat, tsfc, slmsk, & - prsi, prsl, prslk, tgrs, sfc_wts, mg_cld, effrr_in, & - cnvw_in, cnvc_in, qgrs, aer_nm, dx, icloud, & !inputs from here and above + prsi, prsl, prslk, tgrs, sfc_wts, mg_cld, effrr_in, pert_clds, & + sppt_wts, sppt_amp, cnvw_in, cnvc_in, qgrs, aer_nm, dx, icloud, & !inputs from here and above coszen, coszdg, effrl_inout, effri_inout, effrs_inout, & clouds1, clouds2, clouds3, clouds4, clouds5, & !in/out from here and above kd, kt, kb, mtopa, mbota, raddt, tsfg, tsfa, de_lgth, alb1d, delp, dz, & !output from here and below @@ -65,13 +65,16 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & & profsw_type, NBDSW use module_radlw_parameters, only: topflw_type, sfcflw_type, & & proflw_type, NBDLW - use surface_perturbation, only: cdfnor + use surface_perturbation, only: cdfnor,ppfbet ! For Thompson MP - use module_mp_thompson, only: calc_effectRad, Nt_c - use module_mp_thompson_make_number_concentrations, only: & - make_IceNumber, & - make_DropletNumber, & + use module_mp_thompson, only: calc_effectRad, Nt_c, & + re_qc_min, re_qc_max, & + re_qi_min, re_qi_max, & + re_qs_min, re_qs_max + use module_mp_thompson_make_number_concentrations, only: & + make_IceNumber, & + make_DropletNumber, & make_RainNumber implicit none @@ -80,7 +83,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & imfdeepcnv, & imfdeepcnv_gf, me, ncnd, ntrac, & num_p3d, npdf3d, ncnvcld3d, ntqv, & - ntcw, ntiw, ntlnc, ntinc, ncld, & + ntcw, ntiw, ntlnc, ntinc, & ntrw, ntsw, ntgl, ntwa, ntoz, & ntclamt, nleffr, nieffr, nseffr, & lndp_type, & @@ -97,10 +100,10 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & logical, intent(in) :: lsswr, lslwr, ltaerosol, lgfdlmprad, & uni_cld, effr_in, do_mynnedmf, & - lmfshal, lmfdeep2 + lmfshal, lmfdeep2, pert_clds - real(kind=kind_phys), intent(in) :: fhswr, fhlwr, solhr, sup, julian - real(kind=kind_phys), intent(in) :: eps, epsm1, fvirt, rog, rocp, con_rd + real(kind=kind_phys), intent(in) :: fhswr, fhlwr, solhr, sup, julian, sppt_amp + real(kind=kind_phys), intent(in) :: con_eps, epsm1, fvirt, rog, rocp, con_rd real(kind=kind_phys), dimension(:), intent(in) :: xlat_d, xlat, xlon, & coslat, sinlat, tsfc, & @@ -109,7 +112,8 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & real(kind=kind_phys), dimension(:,:), intent(in) :: prsi, prsl, prslk, & tgrs, sfc_wts, & mg_cld, effrr_in, & - cnvw_in, cnvc_in + cnvw_in, cnvc_in, & + sppt_wts real(kind=kind_phys), dimension(:,:,:), intent(in) :: qgrs, aer_nm @@ -118,54 +122,52 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & real(kind=kind_phys), dimension(:,:), intent(inout) :: effrl_inout, & effri_inout, & effrs_inout - real(kind=kind_phys), dimension(im,lm+LTP), intent(inout) :: clouds1, & + real(kind=kind_phys), dimension(:,:), intent(inout) :: clouds1, & clouds2, clouds3, & clouds4, clouds5 - integer, intent(out) :: kd, kt, kb - - integer, dimension(im,3), intent(out) :: mbota, mtopa - - real(kind=kind_phys), intent(out) :: raddt - - real(kind=kind_phys), dimension(im), intent(out) :: tsfg, tsfa - real(kind=kind_phys), dimension(im), intent(out) :: de_lgth, & - alb1d - - real(kind=kind_phys), dimension(im,lm+LTP), intent(out) :: delp, dz, & - plyr, tlyr, & - qlyr, olyr - - real(kind=kind_phys), dimension(im,lm+1+LTP), intent(out) :: plvl, tlvl - - - - real(kind=kind_phys), dimension(im,lm+LTP), intent(out) :: gasvmr_co2, & - gasvmr_n2o, & - gasvmr_ch4, & - gasvmr_o2, & - gasvmr_co, & - gasvmr_cfc11,& - gasvmr_cfc12,& - gasvmr_cfc22,& - gasvmr_ccl4,& - gasvmr_cfc113 - real(kind=kind_phys), dimension(im,NSPC1), intent(out) :: aerodp - real(kind=kind_phys), dimension(im,lm+LTP), intent(out) :: clouds6, & - clouds7, & - clouds8, & - clouds9, & - cldfra - real(kind=kind_phys), dimension(im,5), intent(out) :: cldsa - - real(kind=kind_phys), dimension(im,lm+LTP,NBDSW), intent(out) :: faersw1,& - faersw2,& - faersw3 - - real(kind=kind_phys), dimension(im,lm+LTP,NBDLW), intent(out) :: faerlw1,& - faerlw2,& - faerlw3 - real(kind=kind_phys), dimension(im,lm+LTP), intent(out) :: alpha + integer, intent(out) :: kd, kt, kb + + integer, dimension(:,:), intent(out) :: mbota, mtopa + + real(kind=kind_phys), intent(out) :: raddt + + real(kind=kind_phys), dimension(:), intent(out) :: tsfg, tsfa + real(kind=kind_phys), dimension(:), intent(out) :: de_lgth, & + alb1d + + real(kind=kind_phys), dimension(:,:), intent(out) :: delp, dz, & + plyr, tlyr, & + qlyr, olyr + + real(kind=kind_phys), dimension(:,:), intent(out) :: plvl, tlvl + + real(kind=kind_phys), dimension(:,:), intent(out) :: gasvmr_co2, & + gasvmr_n2o, & + gasvmr_ch4, & + gasvmr_o2, & + gasvmr_co, & + gasvmr_cfc11,& + gasvmr_cfc12,& + gasvmr_cfc22,& + gasvmr_ccl4,& + gasvmr_cfc113 + real(kind=kind_phys), dimension(:,:), intent(out) :: aerodp + real(kind=kind_phys), dimension(:,:), intent(out) :: clouds6, & + clouds7, & + clouds8, & + clouds9, & + cldfra + real(kind=kind_phys), dimension(:,:), intent(out) :: cldsa + + real(kind=kind_phys), dimension(:,:,:), intent(out) :: faersw1,& + faersw2,& + faersw3 + + real(kind=kind_phys), dimension(:,:,:), intent(out) :: faerlw1,& + faerlw2,& + faerlw3 + real(kind=kind_phys), dimension(:,:), intent(out) :: alpha character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -201,6 +203,11 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & real(kind=kind_phys), dimension(im,lm+LTP,NBDSW,NF_AESW) :: faersw real(kind=kind_phys), dimension(im,lm+LTP,NBDLW,NF_AELW) :: faerlw + ! for stochastic cloud perturbations + real(kind=kind_phys), dimension(im) :: cldp1d + real (kind=kind_phys) :: alpha0,beta0,m,s,cldtmp,tmp_wt,cdfz + integer :: iflag + integer :: ids, ide, jds, jde, kds, kde, & ims, ime, jms, jme, kms, kme, & its, ite, jts, jte, kts, kte @@ -288,12 +295,10 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & plyr(i,k1) = prsl(i,k2) * 0.01 ! pa to mb (hpa) tlyr(i,k1) = tgrs(i,k2) prslk1(i,k1) = prslk(i,k2) - rho(i,k1) = plyr(i,k1)/(con_rd*tlyr(i,k1)) - orho(i,k1) = 1.0/rho(i,k1) !> - Compute relative humidity. es = min( prsl(i,k2), fpvs( tgrs(i,k2) ) ) ! fpvs and prsl in pa - qs = max( QMIN, eps * es / (prsl(i,k2) + epsm1*es) ) + qs = max( QMIN, con_eps * es / (prsl(i,k2) + epsm1*es) ) rhly(i,k1) = max( 0.0, min( 1.0, max(QMIN, qgrs(i,k2,ntqv))/qs ) ) qstl(i,k1) = qs enddo @@ -345,7 +350,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & if ( plvl(i,lla) <= prsmin ) plvl(i,lla) = 2.0*prsmin plyr(i,lyb) = 0.5 * plvl(i,lla) tlyr(i,lyb) = tlyr(i,lya) - prslk1(i,lyb) = (plyr(i,lyb)*0.001) ** rocp ! plyr in Pa + prslk1(i,lyb) = (plyr(i,lyb)*0.001) ** rocp ! plyr in hPa rhly(i,lyb) = rhly(i,lya) qstl(i,lyb) = qstl(i,lya) enddo @@ -589,7 +594,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & !! call module_radiation_clouds::progcld1() !! - For Zhao/Moorthi's prognostic cloud+pdfcld, !! call module_radiation_clouds::progcld3() -!! call module_radiation_clouds::progclduni() for unified cloud and ncld=2 +!! call module_radiation_clouds::progclduni() for unified cloud and ncnd>=2 ! --- ... obtain cloud information for radiation calculations @@ -631,11 +636,13 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & enddo enddo ! for Thompson MP - prepare variables for calc_effr - if (imp_physics == imp_physics_thompson .and. ltaerosol) then + if_thompson: if (imp_physics == imp_physics_thompson .and. ltaerosol) then do k=1,LMK do i=1,IM - qvs = qgrs(i,k,ntqv) + qvs = qlyr(i,k) qv_mp (i,k) = qvs/(1.-qvs) + rho (i,k) = con_eps*plyr(i,k)*100./(con_rd*tlyr(i,k)*(qv_mp(i,k)+con_eps)) + orho (i,k) = 1.0/rho(i,k) qc_mp (i,k) = tracer1(i,k,ntcw)/(1.-qvs) qi_mp (i,k) = tracer1(i,k,ntiw)/(1.-qvs) qs_mp (i,k) = tracer1(i,k,ntsw)/(1.-qvs) @@ -647,8 +654,10 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & elseif (imp_physics == imp_physics_thompson) then do k=1,LMK do i=1,IM - qvs = qgrs(i,k,ntqv) + qvs = qlyr(i,k) qv_mp (i,k) = qvs/(1.-qvs) + rho (i,k) = con_eps*plyr(i,k)*100./(con_rd*tlyr(i,k)*(qv_mp(i,k)+con_eps)) + orho (i,k) = 1.0/rho(i,k) qc_mp (i,k) = tracer1(i,k,ntcw)/(1.-qvs) qi_mp (i,k) = tracer1(i,k,ntiw)/(1.-qvs) qs_mp (i,k) = tracer1(i,k,ntsw)/(1.-qvs) @@ -656,7 +665,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & ni_mp (i,k) = tracer1(i,k,ntinc)/(1.-qvs) enddo enddo - endif + endif if_thompson endif do n=1,ncndl do k=1,LMK @@ -681,11 +690,6 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntiw) ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntsw) ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntgl) - -! else -! do j=1,ncld -! ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntcw+j-1) ! cloud condensate amount -! enddo endif do k=1,LMK do i=1,IM @@ -761,7 +765,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & do k=1,lm do i=1,im if (ltaerosol .and. qc_mp(i,k)>1.e-12 .and. nc_mp(i,k)<100.) then - nc_mp(i,k) = make_DropletNumber(qc_mp(i,k)*rho(i,k), nwfa(i,k)) * orho(i,k) + nc_mp(i,k) = make_DropletNumber(qc_mp(i,k)*rho(i,k), nwfa(i,k)*rho(i,k)) * orho(i,k) endif if (qi_mp(i,k)>1.e-12 .and. ni_mp(i,k)<100.) then ni_mp(i,k) = make_IceNumber(qi_mp(i,k)*rho(i,k), tlyr(i,k)) * orho(i,k) @@ -774,9 +778,14 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & !tgs: progclduni has different limits for ice radii (10.0-150.0) than ! calc_effectRad (4.99-125.0 for WRFv3.8.1; 2.49-125.0 for WRFv4+) ! it will raise the low limit from 5 to 10, but the high limit will remain 125. - call calc_effectRad (tlyr(i,:), plyr(i,:), qv_mp(i,:), qc_mp(i,:), & + call calc_effectRad (tlyr(i,:), plyr(i,:)*100., qv_mp(i,:), qc_mp(i,:), & nc_mp(i,:), qi_mp(i,:), ni_mp(i,:), qs_mp(i,:), & re_cloud(i,:), re_ice(i,:), re_snow(i,:), 1, lm ) + do k=1,lm + re_cloud(i,k) = MAX(re_qc_min, MIN(re_cloud(i,k), re_qc_max)) + re_ice(i,k) = MAX(re_qi_min, MIN(re_ice(i,k), re_qi_max)) + re_snow(i,k) = MAX(re_qs_min, MIN(re_snow(i,k), re_qs_max)) + end do end do ! Scale Thompson's effective radii from meter to micron do k=1,lm @@ -887,8 +896,8 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & do i =1, im do k =1, lmk - qc_save(i,k) = ccnd(i,k,1) - qi_save(i,k) = ccnd(i,k,2) + qc_save(i,k) = ccnd(i,k,1) + qi_save(i,k) = ccnd(i,k,2) qs_save(i,k) = ccnd(i,k,4) enddo enddo @@ -932,11 +941,10 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & ccnd(1:IM,1:LMK,1) = ccnd(1:IM,1:LMK,1) + cnvw(1:IM,1:LMK) endif - if (imp_physics == imp_physics_zhao_carr .or. imp_physics == imp_physics_mg) then ! zhao/moorthi's prognostic cloud scheme ! or unified cloud and/or with MG microphysics - if (uni_cld .and. ncld >= 2) then + if (uni_cld .and. ncndl >= 2) then call progclduni (plyr, plvl, tlyr, tvly, ccnd, ncndl, & ! --- inputs xlat, xlon, slmsk, dz, delp, & IM, LMK, LMP, cldcov, & @@ -1038,6 +1046,31 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & ! endif ! end_if_ntcw +! perturb cld cover + if (pert_clds) then + do i=1,im + tmp_wt= -1*log( ( 2.0 / ( sppt_wts(i,38) ) ) - 1 ) + call cdfnor(tmp_wt,cdfz) + cldp1d(i) = cdfz + enddo + do k = 1, LMK + do i = 1, IM + ! compute beta distribution parameters + m = clouds(i,k,1) + if (m<0.99 .AND. m > 0.01) then + s = sppt_amp*m*(1.-m) + alpha0 = m*m*(1.-m)/(s*s)-m + beta0 = alpha0*(1.-m)/m + ! compute beta distribution value corresponding + ! to the given percentile albPpert to use as new albedo + call ppfbet(cldp1d(i),alpha0,beta0,iflag,cldtmp) + clouds(i,k,1) = cldtmp + else + clouds(i,k,1) = m + endif + enddo ! end_do_i_loop + enddo ! end_do_k_loop + endif do k = 1, LMK do i = 1, IM clouds1(i,k) = clouds(i,k,1) diff --git a/physics/GFS_rrtmg_pre.meta b/physics/GFS_rrtmg_pre.meta index eaa878ee7..c7c5380cb 100644 --- a/physics/GFS_rrtmg_pre.meta +++ b/physics/GFS_rrtmg_pre.meta @@ -18,7 +18,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () @@ -26,7 +26,7 @@ intent = in optional = F [lm] - standard_name = number_of_vertical_layers_for_radiation_calculations + standard_name = vertical_dimension_for_radiation long_name = number of vertical layers for radiation calculation units = count dimensions = () @@ -50,7 +50,7 @@ intent = in optional = F [n_var_lndp] - standard_name = number_of_land_surface_variables_perturbed + standard_name = number_of_perturbed_land_surface_variables long_name = number of land surface variables perturbed units = count dimensions = () @@ -58,7 +58,7 @@ intent = in optional = F [imfdeepcnv] - standard_name = flag_for_mass_flux_deep_convection_scheme + standard_name = control_for_deep_convection_scheme long_name = flag for mass-flux deep convection scheme units = flag dimensions = () @@ -66,7 +66,7 @@ intent = in optional = F [imfdeepcnv_gf] - standard_name = flag_for_gf_deep_convection_scheme + standard_name = identifier_for_grell_freitas_deep_convection long_name = flag for Grell-Freitas deep convection scheme units = flag dimensions = () @@ -82,7 +82,7 @@ intent = in optional = F [ncnd] - standard_name = number_of_cloud_condensate_types + standard_name = number_of_condensate_species long_name = number of cloud condensate types units = count dimensions = () @@ -98,7 +98,7 @@ intent = in optional = F [num_p3d] - standard_name = array_dimension_of_3d_arrays_for_microphysics + standard_name = number_of_microphysics_variables_in_xyz_dimensioned_restart_array long_name = number of 3D arrays needed for microphysics units = count dimensions = () @@ -106,7 +106,7 @@ intent = in optional = F [npdf3d] - standard_name = number_of_3d_arrays_associated_with_pdf_based_clouds + standard_name = number_of_pdf_based_variables_in_xyz_dimensioned_restart_array long_name = number of 3d arrays associated with pdf based clouds/mp units = count dimensions = () @@ -114,7 +114,7 @@ intent = in optional = F [ncnvcld3d] - standard_name = number_of_convective_3d_cloud_fields + standard_name = number_of_convective_cloud_variables_in_xyz_dimensioned_restart_array long_name = number of convective 3d clouds fields units = count dimensions = () @@ -122,7 +122,7 @@ intent = in optional = F [ntqv] - standard_name = index_for_water_vapor + standard_name = index_of_specific_humidity_in_tracer_concentration_array long_name = tracer index for water vapor (specific humidity) units = index dimensions = () @@ -130,7 +130,7 @@ intent = in optional = F [ntcw] - standard_name = index_for_liquid_cloud_condensate + standard_name = index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array long_name = tracer index for cloud condensate (or liquid water) units = index dimensions = () @@ -138,7 +138,7 @@ intent = in optional = F [ntiw] - standard_name = index_for_ice_cloud_condensate + standard_name = index_of_cloud_ice_mixing_ratio_in_tracer_concentration_array long_name = tracer index for ice water units = index dimensions = () @@ -146,7 +146,7 @@ intent = in optional = F [ntlnc] - standard_name = index_for_liquid_cloud_number_concentration + standard_name = index_of_mass_number_concentration_of_cloud_droplets_in_tracer_concentration_array long_name = tracer index for liquid number concentration units = index dimensions = () @@ -154,23 +154,15 @@ intent = in optional = F [ntinc] - standard_name = index_for_ice_cloud_number_concentration + standard_name = index_of_mass_number_concentration_of_cloud_ice_in_tracer_concentration_array long_name = tracer index for ice number concentration units = index dimensions = () type = integer intent = in optional = F -[ncld] - standard_name = number_of_hydrometeors - long_name = choice of cloud scheme / number of hydrometeors - units = count - dimensions = () - type = integer - intent = in - optional = F [ntrw] - standard_name = index_for_rain_water + standard_name = index_of_rain_mixing_ratio_in_tracer_concentration_array long_name = tracer index for rain water units = index dimensions = () @@ -178,7 +170,7 @@ intent = in optional = F [ntsw] - standard_name = index_for_snow_water + standard_name = index_of_snow_mixing_ratio_in_tracer_concentration_array long_name = tracer index for snow water units = index dimensions = () @@ -186,7 +178,7 @@ intent = in optional = F [ntgl] - standard_name = index_for_graupel + standard_name = index_of_graupel_mixing_ratio_in_tracer_concentration_array long_name = tracer index for graupel units = index dimensions = () @@ -194,7 +186,7 @@ intent = in optional = F [ntwa] - standard_name = index_for_water_friendly_aerosols + standard_name = index_of_mass_number_concentration_of_hygroscopic_aerosols_in_tracer_concentration_array long_name = tracer index for water friendly aerosol units = index dimensions = () @@ -202,7 +194,7 @@ intent = in optional = F [ntoz] - standard_name = index_for_ozone + standard_name = index_of_ozone_mixing_ratio_in_tracer_concentration_array long_name = tracer index for ozone mixing ratio units = index dimensions = () @@ -210,7 +202,7 @@ intent = in optional = F [ntclamt] - standard_name = index_for_cloud_amount + standard_name = index_of_cloud_area_fraction_in_atmosphere_layer_in_tracer_concentration_array long_name = tracer index for cloud amount integer units = index dimensions = () @@ -218,7 +210,7 @@ intent = in optional = F [nleffr] - standard_name = index_for_cloud_liquid_water_effective_radius + standard_name = index_of_cloud_liquid_water_effective_radius_in_xyz_dimensioned_restart_array long_name = the index of cloud liquid water effective radius in phy_f3d units = index dimensions = () @@ -226,7 +218,7 @@ intent = in optional = F [nieffr] - standard_name = index_for_ice_effective_radius + standard_name = index_of_cloud_ice_effective_radius_in_xyz_dimensioned_restart_array long_name = the index of ice effective radius in phy_f3d units = index dimensions = () @@ -234,7 +226,7 @@ intent = in optional = F [nseffr] - standard_name = index_for_snow_effective_radius + standard_name = index_of_snow_effective_radius_in_xyz_dimensioned_restart_array long_name = the index of snow effective radius in phy_f3d units = index dimensions = () @@ -242,7 +234,7 @@ intent = in optional = F [lndp_type] - standard_name = index_for_stochastic_land_surface_perturbation_type + standard_name = control_for_stochastic_land_surface_perturbation long_name = index for stochastic land surface perturbations type units = index dimensions = () @@ -250,7 +242,7 @@ intent = in optional = F [kdt] - standard_name = index_of_time_step + standard_name = index_of_timestep long_name = current forecast iteration units = index dimensions = () @@ -258,7 +250,7 @@ intent = in optional = F [imp_physics] - standard_name = flag_for_microphysics_scheme + standard_name = control_for_microphysics_scheme long_name = choice of microphysics scheme units = flag dimensions = () @@ -266,7 +258,7 @@ intent = in optional = F [imp_physics_thompson] - standard_name = flag_for_thompson_microphysics_scheme + standard_name = identifier_for_thompson_microphysics_scheme long_name = choice of Thompson microphysics scheme units = flag dimensions = () @@ -274,7 +266,7 @@ intent = in optional = F [imp_physics_gfdl] - standard_name = flag_for_gfdl_microphysics_scheme + standard_name = identifier_for_gfdl_microphysics_scheme long_name = choice of GFDL microphysics scheme units = flag dimensions = () @@ -282,7 +274,7 @@ intent = in optional = F [imp_physics_zhao_carr] - standard_name = flag_for_zhao_carr_microphysics_scheme + standard_name = identifier_for_zhao_carr_microphysics_scheme long_name = choice of Zhao-Carr microphysics scheme units = flag dimensions = () @@ -290,7 +282,7 @@ intent = in optional = F [imp_physics_zhao_carr_pdf] - standard_name = flag_for_zhao_carr_pdf_microphysics_scheme + standard_name = identifier_for_zhao_carr_pdf_microphysics_scheme long_name = choice of Zhao-Carr microphysics scheme with PDF clouds units = flag dimensions = () @@ -298,7 +290,7 @@ intent = in optional = F [imp_physics_mg] - standard_name = flag_for_morrison_gettelman_microphysics_scheme + standard_name = identifier_for_morrison_gettelman_microphysics_scheme long_name = choice of Morrison-Gettelman microphysics scheme units = flag dimensions = () @@ -306,7 +298,7 @@ intent = in optional = F [imp_physics_wsm6] - standard_name = flag_for_wsm6_microphysics_scheme + standard_name = identifier_for_wsm6_microphysics_scheme long_name = choice of WSM6 microphysics scheme units = flag dimensions = () @@ -314,7 +306,7 @@ intent = in optional = F [imp_physics_fer_hires] - standard_name = flag_for_fer_hires_microphysics_scheme + standard_name = identifier_for_fer_hires_microphysics_scheme long_name = choice of Ferrier-Aligo microphysics scheme units = flag dimensions = () @@ -322,7 +314,7 @@ intent = in optional = F [julian] - standard_name = julian_day + standard_name = forecast_julian_day long_name = julian day units = days dimensions = () @@ -331,7 +323,7 @@ intent = in optional = F [yearlen] - standard_name = number_of_days_in_year + standard_name = number_of_days_in_current_year long_name = number of days in a year units = days dimensions = () @@ -339,16 +331,16 @@ intent = in optional = F [lndp_var_list] - standard_name = variables_to_be_perturbed_for_landperts + standard_name = land_surface_perturbation_variables long_name = variables to be perturbed for landperts units = none - dimensions = (number_of_land_surface_variables_perturbed) + dimensions = (number_of_perturbed_land_surface_variables) type = character kind = len=3 intent = in optional = F [lsswr] - standard_name = flag_to_calc_sw + standard_name = flag_for_calling_shortwave_radiation long_name = logical flags for sw radiation calls units = flag dimensions = () @@ -356,7 +348,7 @@ intent = in optional = F [lslwr] - standard_name = flag_to_calc_lw + standard_name = flag_for_calling_longwave_radiation long_name = logical flags for lw radiation calls units = flag dimensions = () @@ -380,7 +372,7 @@ intent = in optional = F [uni_cld] - standard_name = flag_for_uni_cld + standard_name = flag_for_shoc_cloud_area_fraction_for_radiation long_name = flag for uni_cld units = flag dimensions = () @@ -396,7 +388,7 @@ intent = in optional = F [do_mynnedmf] - standard_name = do_mynnedmf + standard_name = flag_for_mellor_yamada_nakanishi_niino_pbl_scheme long_name = flag to activate MYNN-EDMF units = flag dimensions = () @@ -404,7 +396,7 @@ intent = in optional = F [lmfshal] - standard_name = flag_for_lmfshal + standard_name = flag_for_cloud_area_fraction_option_for_radiation long_name = flag for lmfshal units = flag dimensions = () @@ -412,7 +404,7 @@ intent = in optional = F [lmfdeep2] - standard_name = flag_for_scale_aware_mass_flux_convection + standard_name = flag_for_scale_aware_mass_flux_deep_convection_for_radiation long_name = flag for some scale-aware mass-flux convection scheme active units = flag dimensions = () @@ -420,7 +412,7 @@ intent = in optional = F [fhswr] - standard_name = frequency_for_shortwave_radiation + standard_name = period_of_shortwave_radiation_calls long_name = frequency for shortwave radiation units = s dimensions = () @@ -429,7 +421,7 @@ intent = in optional = F [fhlwr] - standard_name = frequency_for_longwave_radiation + standard_name = period_of_longwave_radiation_calls long_name = frequency for longwave radiation units = s dimensions = () @@ -438,7 +430,7 @@ intent = in optional = F [solhr] - standard_name = forecast_hour_of_the_day + standard_name = forecast_utc_hour long_name = time in hours after 00z at the current timestep units = h dimensions = () @@ -447,7 +439,7 @@ intent = in optional = F [sup] - standard_name = ice_supersaturation_threshold + standard_name = tunable_parameter_for_ice_supersaturation long_name = ice supersaturation parameter for PDF clouds units = none dimensions = () @@ -455,7 +447,7 @@ kind = kind_phys intent = in optional = F -[eps] +[con_eps] standard_name = ratio_of_dry_air_to_water_vapor_gas_constants long_name = rd/rv units = none @@ -501,7 +493,7 @@ intent = in optional = F [con_rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -564,7 +556,7 @@ intent = in optional = F [slmsk] - standard_name = sea_land_ice_mask_real + standard_name = area_type long_name = landmask: sea/land/ice=0/1/2 units = flag dimensions = (horizontal_loop_extent) @@ -576,7 +568,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -585,16 +577,16 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [prslk] - standard_name = dimensionless_exner_function_at_model_layers + standard_name = dimensionless_exner_function long_name = dimensionless Exner function at model layer centers units = none - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -603,13 +595,13 @@ standard_name = air_temperature long_name = model layer mean temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [sfc_wts] - standard_name = weights_for_stochastic_surface_physics_perturbation + standard_name = surface_stochastic_weights_from_coupled_process long_name = weights for stochastic surface physics perturbation units = none dimensions = (horizontal_loop_extent,number_of_surface_perturbations) @@ -621,34 +613,60 @@ standard_name = cloud_fraction_for_MG long_name = cloud fraction used by Morrison-Gettelman MP units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [effrr_in] - standard_name = effective_radius_of_stratiform_cloud_rain_particle_in_um + standard_name = effective_radius_of_stratiform_cloud_rain_particle long_name = effective radius of cloud rain particle in micrometers units = um - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[pert_clds] + standard_name = flag_for_stochastic_cloud_fraction_perturbations + long_name = flag for stochastic cloud fraction physics perturbations + units = flag + dimensions = () + type = logical + intent = in + optional = F +[sppt_wts] + standard_name = sppt_weights_from_coupled_process + long_name = weights for stochastic sppt perturbation + units = none + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[sppt_amp] + standard_name = total_amplitude_of_sppt_perturbation + long_name = toal ampltidue of stochastic sppt perturbation + units = none + dimensions = () type = real kind = kind_phys intent = in optional = F [cnvw_in] - standard_name = convective_cloud_water_mixing_ratio_in_phy_f3d + standard_name = convective_cloud_condensate_mixing_ratio long_name = convective cloud water mixing ratio in the phy_f3d array units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [cnvc_in] - standard_name = convective_cloud_cover_in_phy_f3d + standard_name = convective_cloud_area_fraction long_name = convective cloud cover in the phy_f3d array units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -657,22 +675,22 @@ standard_name = tracer_concentration long_name = model layer mean tracer concentration units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = in optional = F [aer_nm] - standard_name = aerosol_number_concentration_from_gocart_aerosol_climatology + standard_name = mass_number_concentration_of_aerosol_from_gocart_climatology long_name = GOCART aerosol climatology number concentration units = kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_aerosol_tracers_MG) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_aerosol_tracers_MG) type = real kind = kind_phys intent = in optional = F [dx] - standard_name = cell_size + standard_name = characteristic_grid_lengthscale long_name = relative dx for the grid cell units = m dimensions = (horizontal_loop_extent) @@ -681,7 +699,7 @@ intent = in optional = F [icloud] - standard_name = cloud_effect_to_optical_depth_and_cloud_fraction + standard_name = control_for_cloud_area_fraction_option long_name = cloud effect to the optical depth and cloud fraction in radiation units = flag dimensions = () @@ -689,7 +707,7 @@ intent = in optional = F [coszen] - standard_name = cosine_of_zenith_angle + standard_name = cosine_of_solar_zenith_angle_for_daytime_points_on_radiation_timestep long_name = mean cos of zenith angle over rad call period units = none dimensions = (horizontal_loop_extent) @@ -698,7 +716,7 @@ intent = inout optional = F [coszdg] - standard_name = daytime_mean_cosz_over_rad_call_period + standard_name = cosine_of_solar_zenith_angle_on_radiation_timestep long_name = daytime mean cosz over rad call period units = none dimensions = (horizontal_loop_extent) @@ -707,28 +725,28 @@ intent = inout optional = F [effrl_inout] - standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle_in_um + standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle long_name = eff. radius of cloud liquid water particle in micrometer units = um - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [effri_inout] - standard_name = effective_radius_of_stratiform_cloud_ice_particle_in_um + standard_name = effective_radius_of_stratiform_cloud_ice_particle long_name = eff. radius of cloud ice water particle in micrometer units = um - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [effrs_inout] - standard_name = effective_radius_of_stratiform_cloud_snow_particle_in_um + standard_name = effective_radius_of_stratiform_cloud_snow_particle long_name = effective radius of cloud snow particle in micrometers units = um - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -936,90 +954,90 @@ intent = out optional = F [gasvmr_co2] - standard_name = volume_mixing_ratio_co2 + standard_name = volume_mixing_ratio_of_co2 long_name = CO2 volume mixing ratio - units = kg kg-1 + units = m3 m-3 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out optional = F [gasvmr_n2o] - standard_name = volume_mixing_ratio_n2o + standard_name = volume_mixing_ratio_of_n2o long_name = N2O volume mixing ratio - units = kg kg-1 + units = m3 m-3 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out optional = F [gasvmr_ch4] - standard_name = volume_mixing_ratio_ch4 + standard_name = volume_mixing_ratio_of_ch4 long_name = CH4 volume mixing ratio - units = kg kg-1 + units = m3 m-3 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out optional = F [gasvmr_o2] - standard_name = volume_mixing_ratio_o2 + standard_name = volume_mixing_ratio_of_o2 long_name = O2 volume mixing ratio - units = kg kg-1 + units = m3 m-3 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out optional = F [gasvmr_co] - standard_name = volume_mixing_ratio_co + standard_name = volume_mixing_ratio_of_co long_name = CO volume mixing ratio - units = kg kg-1 + units = m3 m-3 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out optional = F [gasvmr_cfc11] - standard_name = volume_mixing_ratio_cfc11 + standard_name = volume_mixing_ratio_of_cfc11 long_name = CFC11 volume mixing ratio - units = kg kg-1 + units = m3 m-3 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out optional = F [gasvmr_cfc12] - standard_name = volume_mixing_ratio_cfc12 + standard_name = volume_mixing_ratio_of_cfc12 long_name = CFC12 volume mixing ratio - units = kg kg-1 + units = m3 m-3 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out optional = F [gasvmr_cfc22] - standard_name = volume_mixing_ratio_cfc22 + standard_name = volume_mixing_ratio_of_cfc22 long_name = CFC22 volume mixing ratio - units = kg kg-1 + units = m3 m-3 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out optional = F [gasvmr_ccl4] - standard_name = volume_mixing_ratio_ccl4 + standard_name = volume_mixing_ratio_of_ccl4 long_name = CCL4 volume mixing ratio - units = kg kg-1 + units = m3 m-3 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out optional = F [gasvmr_cfc113] - standard_name = volume_mixing_ratio_cfc113 + standard_name = volume_mixing_ratio_of_cfc113 long_name = CFC113 volume mixing ratio - units = kg kg-1 + units = m3 m-3 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys @@ -1168,4 +1186,3 @@ type = integer intent = out optional = F - diff --git a/physics/GFS_rrtmg_setup.F90 b/physics/GFS_rrtmg_setup.F90 index 85ffe7d67..fc660994d 100644 --- a/physics/GFS_rrtmg_setup.F90 +++ b/physics/GFS_rrtmg_setup.F90 @@ -1,12 +1,13 @@ !> \file GFS_rrtmg_setup.f90 !! This file contains + +!> \defgroup GFS_rrtmg_setup_mod GFS RRTMG Scheme Setup module GFS_rrtmg_setup - use physparam, only : isolar , ictmflg, ico2flg, ioznflg, iaerflg,& -! & iaermdl, laswflg, lalwflg, lavoflg, icldflg, & + use physparam, only : isolar , ictmflg, ico2flg, ioznflg, iaerflg, & & iaermdl, icldflg, & & iovrRad=>iovr, lcrick , lcnorm , lnoprec, & - & ialbflg, iemsflg, isubcsw, isubclw, ivflip , ipsd0, & + & isubcsw, isubclw, ivflip , ipsd0, & & iswcliq, & & kind_phys @@ -38,18 +39,16 @@ module GFS_rrtmg_setup contains -!> \defgroup GFS_rrtmg_setup GFS RRTMG Scheme Setup -!! @{ -!! \section arg_table_GFS_rrtmg_setup_init Argument Table +!> \section arg_table_GFS_rrtmg_setup_init Argument Table !! \htmlinclude GFS_rrtmg_setup_init.html !! subroutine GFS_rrtmg_setup_init ( & - si, levr, ictm, isol, ico2, iaer, ialb, iems, ntcw, & + si, levr, ictm, isol, ico2, iaer, ntcw, & num_p3d, npdf3d, ntoz, iovr, isubc_sw, isubc_lw, & icliq_sw, crick_proof, ccnorm, & imp_physics, & norad_precip, idate, iflip, & - im, faerlw, faersw, aerodp, & ! for consistency checks + do_RRTMGP, im, faerlw, faersw, aerodp, & ! for consistency checks me, errmsg, errflg) ! ================= subprogram documentation block ================ ! ! ! @@ -106,15 +105,6 @@ subroutine GFS_rrtmg_setup_init ( & ! =1 include tropspheric aerosols for lw ! ! c: =0 no topospheric aerosol in sw radiation ! ! =1 include tropspheric aerosols for sw ! -! ialb : control flag for surface albedo schemes ! -! =0: climatology, based on surface veg types ! -! =1: modis retrieval based surface albedo scheme ! -! iems : ab 2-digit control flag ! -! a: =0 set sfc air/ground t same for lw radiation ! -! =1 set sfc air/ground t diff for lw radiation ! -! b: =0 use fixed sfc emissivity=1.0 (black-body) ! -! =1 use varying climtology sfc emiss (veg based)! -! =2 future development (not yet) ! ! ntcw :=0 no cloud condensate calculated ! ! >0 array index location for cloud condensate ! ! num_p3d :=3: ferrier's microphysics cloud scheme ! @@ -158,21 +148,16 @@ subroutine GFS_rrtmg_setup_init ( & use module_radsw_parameters, only: NBDSW use module_radlw_parameters, only: NBDLW use module_radiation_aerosols,only: NF_AELW, NF_AESW, NSPC1 - use module_radiation_clouds, only: NF_CLDS - use module_radiation_gases, only: NF_VGAS - use module_radiation_surface, only: NF_ALBD implicit none ! interface variables - real (kind=kind_phys), intent(in) :: si(levr+1) + real (kind=kind_phys), intent(in) :: si(:) integer, intent(in) :: levr integer, intent(in) :: ictm integer, intent(in) :: isol integer, intent(in) :: ico2 integer, intent(in) :: iaer - integer, intent(in) :: ialb - integer, intent(in) :: iems integer, intent(in) :: ntcw integer, intent(in) :: num_p3d integer, intent(in) :: npdf3d @@ -185,9 +170,11 @@ subroutine GFS_rrtmg_setup_init ( & logical, intent(in) :: ccnorm integer, intent(in) :: imp_physics logical, intent(in) :: norad_precip - integer, intent(in) :: idate(4) + integer, intent(in) :: idate(:) integer, intent(in) :: iflip ! For consistency checks + + logical, intent(in) :: do_RRTMGP integer, intent(in) :: im real(kind_phys), intent(in) :: faerlw(:,:,:,:) real(kind_phys), intent(in) :: faersw(:,:,:,:) @@ -208,6 +195,12 @@ subroutine GFS_rrtmg_setup_init ( & errflg = 0 if (is_initialized) return + + if (do_RRTMGP) then + write(errmsg,'(*(a))') "Logic error: do_RRTMGP must be set to .false." + errflg = 1 + return + end if ! Consistency checks for dimensions of arrays, this is required ! to detect differences in FV3's parameters that are used to @@ -277,9 +270,6 @@ subroutine GFS_rrtmg_setup_init ( & isubcsw = isubc_sw ! sub-column cloud approx flag in sw radiation isubclw = isubc_lw ! sub-column cloud approx flag in lw radiation - ialbflg= ialb ! surface albedo control flag - iemsflg= iems ! surface emissivity control flag - ivflip = iflip ! vertical index direction control flag ! --- assign initial permutation seed for mcica cloud-radiation @@ -292,7 +282,7 @@ subroutine GFS_rrtmg_setup_init ( & print *,' In rad_initialize (GFS_rrtmg_setup_init), before calling radinit' print *,' si =',si print *,' levr=',levr,' ictm=',ictm,' isol=',isol,' ico2=',ico2,& - & ' iaer=',iaer,' ialb=',ialb,' iems=',iems,' ntcw=',ntcw + & ' iaermdl=',iaermdl,' iaerflg=',iaerflg print *,' np3d=',num_p3d,' ntoz=',ntoz, & & ' iovr=',iovr,' isubc_sw=',isubc_sw, & & ' isubc_lw=',isubc_lw,' icliq_sw=',icliq_sw, & @@ -448,15 +438,6 @@ subroutine radinit( si, NLAY, imp_physics, me ) ! ioznflg : ozone data source control flag ! ! =0: use climatological ozone profile ! ! =1: use interactive ozone profile ! -! ialbflg : albedo scheme control flag ! -! =0: climatology, based on surface veg types ! -! =1: modis retrieval based surface albedo scheme ! -! iemsflg : emissivity scheme cntrl flag (ab 2-digit integer) ! -! a:=0 set sfc air/ground t same for lw radiation ! -! =1 set sfc air/ground t diff for lw radiation ! -! b:=0 use fixed sfc emissivity=1.0 (black-body) ! -! =1 use varying climtology sfc emiss (veg based) ! -! =2 future development (not yet) ! ! icldflg : cloud optical property scheme control flag ! ! =0: use diagnostic cloud scheme ! ! =1: use prognostic cloud scheme (default) ! @@ -489,7 +470,7 @@ subroutine radinit( si, NLAY, imp_physics, me ) ! =1: index from surface to toa ! ! ! ! subroutines called: sol_init, aer_init, gas_init, cld_init, ! -! sfc_init, rlwinit, rswinit ! +! rlwinit, rswinit ! ! ! ! usage: call radinit ! ! ! @@ -499,9 +480,7 @@ subroutine radinit( si, NLAY, imp_physics, me ) use module_radiation_astronomy, only : sol_init use module_radiation_aerosols, only : aer_init use module_radiation_gases, only : gas_init - use module_radiation_surface, only : sfc_init use module_radiation_clouds, only : cld_init - ! DH* these should be called by rrtmg_lw_init and rrtmg_sw_init! use rrtmg_lw, only : rlwinit use rrtmg_sw, only : rswinit @@ -521,16 +500,6 @@ subroutine radinit( si, NLAY, imp_physics, me ) ! !> -# Set up control variables and external module variables in !! module physparam -#if 0 - ! DH* WHAT IS THIS? - ! GFS_radiation_driver.F90 may in the future initialize air/ground - ! temperature differently; however, this is not used at the moment - ! and as such we avoid the difficulty of dealing with exchanging - ! itsfc between GFS_rrtmg_setup and a yet-to-be-created/-used - ! interstitial routine (or GFS_radiation_driver.F90) - itsfc = iemsflg / 10 ! sfc air/ground temp control - ! *DH -#endif loz1st = (ioznflg == 0) ! first-time clim ozone data read flag month0 = 0 iyear0 = 0 @@ -543,7 +512,7 @@ subroutine radinit( si, NLAY, imp_physics, me ) print *, VTAGRAD !print out version tag print *,' - Selected Control Flag settings: ICTMflg=',ictmflg, & & ' ISOLar =',isolar, ' ICO2flg=',ico2flg,' IAERflg=',iaerflg, & - & ' IALBflg=',ialbflg,' IEMSflg=',iemsflg,' ICLDflg=',icldflg, & + & ' ICLDflg=',icldflg, & & ' IMP_PHYSICS=',imp_physics,' IOZNflg=',ioznflg print *,' IVFLIP=',ivflip,' IOVR=',iovrRad, & & ' ISUBCSW=',isubcsw,' ISUBCLW=',isubclw @@ -598,8 +567,6 @@ subroutine radinit( si, NLAY, imp_physics, me ) !! call module_radiation_aerosols::aer_init() !! - CO2 and other gases intialization routine: !! call module_radiation_gases::gas_init() -!! - surface intialization routine: -!! call module_radiation_surface::sfc_init() !! - cloud initialization routine: !! call module_radiation_clouds::cld_init() !! - LW radiation initialization routine: @@ -614,8 +581,6 @@ subroutine radinit( si, NLAY, imp_physics, me ) call gas_init ( me ) ! --- ... co2 and other gases initialization routine - call sfc_init ( me ) ! --- ... surface initialization routine - call cld_init ( si, NLAY, imp_physics, me) ! --- ... cloud initialization routine call rlwinit ( me ) ! --- ... lw radiation initialization routine @@ -623,7 +588,7 @@ subroutine radinit( si, NLAY, imp_physics, me ) call rswinit ( me ) ! --- ... sw radiation initialization routine ! return -!................................... +! end subroutine radinit !----------------------------------- @@ -817,5 +782,4 @@ subroutine radupdate( idate,jdate,deltsw,deltim,lsswr, me, & end subroutine radupdate !----------------------------------- -!! @} end module GFS_rrtmg_setup diff --git a/physics/GFS_rrtmg_setup.meta b/physics/GFS_rrtmg_setup.meta index 513594ab2..e882841cf 100644 --- a/physics/GFS_rrtmg_setup.meta +++ b/physics/GFS_rrtmg_setup.meta @@ -1,24 +1,24 @@ [ccpp-table-properties] name = GFS_rrtmg_setup type = scheme - dependencies = iounitdef.f,module_bfmicrophysics.f,physparam.f,radcons.f90,radiation_aerosols.f,radiation_astronomy.f,radiation_clouds.f, - dependencies = module_mp_thompson.F90,radiation_gases.f,radiation_surface.f,radlw_main.F90,radlw_param.f,radsw_main.F90,radsw_param.f, + dependencies = iounitdef.f,module_bfmicrophysics.f,physparam.f,radcons.f90,radiation_aerosols.f,radiation_astronomy.f,radiation_clouds.f + dependencies = module_mp_thompson.F90,radiation_gases.f,radlw_main.F90,radlw_param.f,radsw_main.F90,radsw_param.f ######################################################################## [ccpp-arg-table] name = GFS_rrtmg_setup_init type = scheme [si] - standard_name = vertical_sigma_coordinate_for_radiation_initialization + standard_name = sigma_pressure_hybrid_vertical_coordinate long_name = vertical sigma coordinate for radiation initialization units = none - dimensions = (number_of_vertical_layers_for_radiation_calculations_plus_one) + dimensions = (vertical_interface_dimension_for_radiation) type = real kind = kind_phys intent = in optional = F [levr] - standard_name = number_of_vertical_layers_for_radiation_calculations + standard_name = vertical_dimension_for_radiation long_name = number of vertical levels for radiation calculations units = count dimensions = () @@ -34,7 +34,7 @@ intent = in optional = F [isol] - standard_name = flag_for_solar_constant + standard_name = control_for_solar_constant long_name = use prescribed solar constant units = flag dimensions = () @@ -42,7 +42,7 @@ intent = in optional = F [ico2] - standard_name = flag_for_using_prescribed_global_mean_co2_value + standard_name = control_for_co2 long_name = prescribed global mean value (old opernl) units = flag dimensions = () @@ -50,31 +50,15 @@ intent = in optional = F [iaer] - standard_name = flag_for_default_aerosol_effect_in_shortwave_radiation + standard_name = control_for_shortwave_radiation_aerosols long_name = default aerosol effect in sw only units = flag dimensions = () type = integer intent = in optional = F -[ialb] - standard_name = flag_for_using_climatology_albedo - long_name = flag for using climatology alb, based on sfc type - units = flag - dimensions = () - type = integer - intent = in - optional = F -[iems] - standard_name = flag_for_surface_emissivity_control - long_name = surface emissivity control flag, use fixed value of 1 - units = flag - dimensions = () - type = integer - intent = in - optional = F [ntcw] - standard_name = index_for_liquid_cloud_condensate + standard_name = index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array long_name = tracer index for cloud condensate (or liquid water) units = index dimensions = () @@ -82,7 +66,7 @@ intent = in optional = F [num_p3d] - standard_name = array_dimension_of_3d_arrays_for_microphysics + standard_name = number_of_microphysics_variables_in_xyz_dimensioned_restart_array long_name = number of 3D arrays needed for microphysics units = count dimensions = () @@ -90,7 +74,7 @@ intent = in optional = F [npdf3d] - standard_name = number_of_3d_arrays_associated_with_pdf_based_clouds + standard_name = number_of_pdf_based_variables_in_xyz_dimensioned_restart_array long_name = number of 3d arrays associated with pdf based clouds/mp units = count dimensions = () @@ -98,7 +82,7 @@ intent = in optional = F [ntoz] - standard_name = index_for_ozone + standard_name = index_of_ozone_mixing_ratio_in_tracer_concentration_array long_name = tracer index for ozone mixing ratio units = index dimensions = () @@ -130,7 +114,7 @@ intent = in optional = F [icliq_sw] - standard_name = flag_for_optical_property_for_liquid_clouds_for_shortwave_radiation + standard_name = control_for_shortwave_radiation_liquid_clouds long_name = sw optical property for liquid clouds units = flag dimensions = () @@ -146,7 +130,7 @@ intent = in optional = F [ccnorm] - standard_name = flag_for_cloud_condensate_normalized_by_cloud_cover + standard_name = flag_for_in_cloud_condensate long_name = flag for cloud condensate normalized by cloud cover units = flag dimensions = () @@ -154,7 +138,7 @@ intent = in optional = F [imp_physics] - standard_name = flag_for_microphysics_scheme + standard_name = control_for_microphysics_scheme long_name = choice of microphysics scheme units = flag dimensions = () @@ -162,7 +146,7 @@ intent = in optional = F [norad_precip] - standard_name = flag_for_precipitation_effect_on_radiation + standard_name = flag_for_turning_off_precipitation_radiative_effect long_name = radiation precip flag for Ferrier/Moorthi units = flag dimensions = () @@ -170,7 +154,7 @@ intent = in optional = F [idate] - standard_name = date_and_time_at_model_initialization_reordered + standard_name = date_and_time_at_model_initialization_in_united_states_order long_name = initialization date and time units = none dimensions = (4) @@ -178,13 +162,21 @@ intent = in optional = F [iflip] - standard_name = flag_for_vertical_index_direction_control + standard_name = control_for_vertical_index_direction long_name = flag for vertical index direction control units = flag dimensions = () type = integer intent = in optional = F +[do_RRTMGP] + standard_name = flag_for_rrtmgp_radiation_scheme + long_name = flag for RRTMGP scheme + units = flag + dimensions = () + type = logical + intent = in + optional = F [im] standard_name = horizontal_dimension long_name = horizontal dimension @@ -251,7 +243,7 @@ name = GFS_rrtmg_setup_timestep_init type = scheme [idate] - standard_name = date_and_time_at_model_initialization + standard_name = date_and_time_at_model_initialization_in_iso_order long_name = initialization date and time units = none dimensions = (8) @@ -259,7 +251,7 @@ intent = in optional = F [jdate] - standard_name = forecast_date_and_time + standard_name = date_and_time_of_forecast_in_united_states_order long_name = current forecast date and time units = none dimensions = (8) @@ -267,7 +259,7 @@ intent = in optional = F [deltsw] - standard_name = frequency_for_shortwave_radiation + standard_name = period_of_shortwave_radiation_calls long_name = frequency for shortwave radiation units = s dimensions = () @@ -276,7 +268,7 @@ intent = in optional = F [deltim] - standard_name = time_step_for_dynamics + standard_name = timestep_for_dynamics long_name = dynamics timestep units = s dimensions = () @@ -285,7 +277,7 @@ intent = in optional = F [lsswr] - standard_name = flag_to_calc_sw + standard_name = flag_for_calling_shortwave_radiation long_name = logical flags for sw radiation calls units = flag dimensions = () diff --git a/physics/GFS_rrtmgp_cloud_overlap_pre.F90 b/physics/GFS_rrtmgp_cloud_overlap_pre.F90 index 05b8ee79e..edd3aab93 100644 --- a/physics/GFS_rrtmgp_cloud_overlap_pre.F90 +++ b/physics/GFS_rrtmgp_cloud_overlap_pre.F90 @@ -3,7 +3,7 @@ ! ######################################################################################## module GFS_rrtmgp_cloud_overlap_pre use machine, only: kind_phys - use rrtmgp_aux, only: check_error_msg + use radiation_tools, only: check_error_msg use module_radiation_cloud_overlap, only: cmp_dcorr_lgth, get_alpha_exp public GFS_rrtmgp_cloud_overlap_pre_init, GFS_rrtmgp_cloud_overlap_pre_run, GFS_rrtmgp_cloud_overlap_pre_finalize @@ -21,13 +21,13 @@ end subroutine GFS_rrtmgp_cloud_overlap_pre_init !! subroutine GFS_rrtmgp_cloud_overlap_pre_run(nCol, nLev, yearlen, doSWrad, doLWrad, & julian, lat, p_lev, p_lay, tv_lay, con_pi, con_g, con_rd, con_epsq, dcorr_con, & - idcor, iovr, iovr_dcorr, iovr_exprand, iovr_exp, idcor_con, idcor_hogan, & + idcor, iovr, iovr_dcorr, iovr_exp, iovr_exprand, idcor_con, idcor_hogan, & idcor_oreopoulos, cld_frac, & - cloud_overlap_param, precip_overlap_param, de_lgth, deltaZc, errmsg, errflg) + de_lgth, cloud_overlap_param, precip_overlap_param, deltaZc, errmsg, errflg) implicit none ! Inputs - integer, intent(in) :: & + integer, intent(in) :: & nCol, & ! Number of horizontal grid points nLev, & ! Number of vertical layers yearlen, & ! Length of current year (365/366) WTF? @@ -39,7 +39,7 @@ subroutine GFS_rrtmgp_cloud_overlap_pre_run(nCol, nLev, yearlen, doSWrad, doLWra idcor_con, & ! Flag for decorrelation-length. Use constant value idcor_hogan, & ! Flag for decorrelation-length. (https://rmets.onlinelibrary.wiley.com/doi/full/10.1002/qj.647) idcor_oreopoulos ! Flag for decorrelation-length. (10.5194/acp-12-9097-2012) - logical, intent(in) :: & + logical, intent(in) :: & doSWrad, & ! Call SW radiation? doLWrad ! Call LW radiation real(kind_phys), intent(in) :: & @@ -49,19 +49,19 @@ subroutine GFS_rrtmgp_cloud_overlap_pre_run(nCol, nLev, yearlen, doSWrad, doLWra con_rd, & ! Physical constant: gas-constant for dry air con_epsq, & ! Physical constant: Minimum value for specific humidity dcorr_con ! Decorrelation-length (used if idcor = idcor_con) - real(kind_phys), dimension(nCol), intent(in) :: & + real(kind_phys), dimension(:), intent(in) :: & lat ! Latitude - real(kind_phys), dimension(nCol,nLev), intent(in) :: & + real(kind_phys), dimension(:,:), intent(in) :: & tv_lay, & ! Virtual temperature (K) p_lay, & ! Pressure at model-layers (Pa) cld_frac ! Total cloud fraction - real(kind_phys), dimension(nCol,nLev+1), intent(in) :: & + real(kind_phys), dimension(:,:), intent(in) :: & p_lev ! Pressure at model-level interfaces (Pa) ! Outputs - real(kind_phys), dimension(nCol),intent(out) :: & + real(kind_phys), dimension(:),intent(out) :: & de_lgth ! Decorrelation length - real(kind_phys), dimension(nCol,nLev),intent(out) :: & + real(kind_phys), dimension(:,:),intent(out) :: & cloud_overlap_param, & ! Cloud-overlap parameter precip_overlap_param, & ! Precipitation overlap parameter deltaZc ! Layer thickness (from layer-centers)(km) diff --git a/physics/GFS_rrtmgp_cloud_overlap_pre.meta b/physics/GFS_rrtmgp_cloud_overlap_pre.meta index 273832362..7073cac07 100644 --- a/physics/GFS_rrtmgp_cloud_overlap_pre.meta +++ b/physics/GFS_rrtmgp_cloud_overlap_pre.meta @@ -1,7 +1,7 @@ [ccpp-table-properties] name = GFS_rrtmgp_cloud_overlap_pre type = scheme - dependencies = rrtmgp_aux.F90, radiation_cloud_overlap.F90 + dependencies = radiation_tools.F90, radiation_cloud_overlap.F90 ######################################################################## [ccpp-arg-table] @@ -16,15 +16,23 @@ intent = in optional = F [nLev] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () type = integer intent = in optional = F +[yearlen] + standard_name = number_of_days_in_current_year + long_name = number of days in a year + units = days + dimensions = () + type = integer + intent = in + optional = F [doSWrad] - standard_name = flag_to_calc_sw + standard_name = flag_for_calling_shortwave_radiation long_name = logical flags for sw radiation calls units = flag dimensions = () @@ -32,23 +40,15 @@ intent = in optional = F [doLWrad] - standard_name = flag_to_calc_lw + standard_name = flag_for_calling_longwave_radiation long_name = logical flags for lw radiation calls units = flag dimensions = () type = logical intent = in optional = F -[yearlen] - standard_name = number_of_days_in_year - long_name = number of days in a year - units = days - dimensions = () - type = integer - intent = in - optional = F [julian] - standard_name = julian_day + standard_name = forecast_julian_day long_name = julian day units = days dimensions = () @@ -69,7 +69,7 @@ standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure at vertical interface for radiation calculation units = hPa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -78,7 +78,7 @@ standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure at vertical layer for radiation calculation units = hPa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -87,7 +87,7 @@ standard_name = virtual_temperature long_name = layer virtual temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -111,7 +111,7 @@ intent = in optional = F [con_rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -128,6 +128,23 @@ kind = kind_phys intent = in optional = F +[dcorr_con] + standard_name = decorrelation_length_used_by_overlap_method + long_name = decorrelation length (default) used by cloud overlap method (iovr) + units = km + dimensions = () + type = real + intent = in + kind = kind_phys + optional = F +[idcor] + standard_name = flag_for_decorrelation_length_method + long_name = flag for decorrelation length method used in cloud overlap method (iovr) + units = flag + dimensions = () + type = integer + intent = in + optional = F [iovr] standard_name = flag_for_cloud_overlap_method_for_radiation long_name = flag for cloud overlap method @@ -160,14 +177,6 @@ type = integer intent = in optional = F -[idcor] - standard_name = flag_for_decorrelation_length_method - long_name = flag for decorrelation length method used in cloud overlap method (iovr) - units = flag - dimensions = () - type = integer - intent = in - optional = F [idcor_con] standard_name = flag_for_constant_decorrelation_length_method long_name = choice of decorrelation length computation (costant) @@ -192,20 +201,11 @@ type = integer intent = in optional = F -[dcorr_con] - standard_name = decorreltion_length_used_by_overlap_method - long_name = decorrelation length (default) used by cloud overlap method (iovr) - units = km - dimensions = () - type = real - intent = in - kind = kind_phys - optional = F [cld_frac] standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -223,7 +223,7 @@ standard_name = cloud_overlap_param long_name = cloud overlap parameter units = km - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -232,7 +232,7 @@ standard_name = precip_overlap_param long_name = precipitation overlap parameter units = km - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -241,7 +241,7 @@ standard_name = layer_thickness long_name = layer_thickness units = m - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out diff --git a/physics/GFS_rrtmgp_gfdlmp_pre.F90 b/physics/GFS_rrtmgp_gfdlmp_pre.F90 index 16844304b..ccbfd1df8 100644 --- a/physics/GFS_rrtmgp_gfdlmp_pre.F90 +++ b/physics/GFS_rrtmgp_gfdlmp_pre.F90 @@ -4,9 +4,10 @@ ! ######################################################################################## module GFS_rrtmgp_gfdlmp_pre use machine, only: kind_phys - use rrtmgp_aux, only: check_error_msg + use radiation_tools, only: check_error_msg use module_radiation_cloud_overlap, only: cmp_dcorr_lgth, get_alpha_exp - use rrtmgp_lw_cloud_optics, only: radliq_lwr, radliq_upr, radice_lwr, radice_upr + use rrtmgp_lw_cloud_optics, only: radliq_lwr => radliq_lwrLW, radliq_upr => radliq_uprLW,& + radice_lwr => radice_lwrLW, radice_upr => radice_uprLW ! Parameters real(kind_phys), parameter :: & @@ -63,20 +64,20 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(nCol, nLev, nTracers, ncnd, i_cldliq, i_cld real(kind_phys), intent(in) :: & con_g, & ! Physical constant: gravitational constant con_rd ! Physical constant: gas-constant for dry air - real(kind_phys), dimension(nCol,nLev), intent(in) :: & + real(kind_phys), dimension(:,:), intent(in) :: & tv_lay, & ! Virtual temperature (K) p_lay, & ! Pressure at model-layers (Pa) effrin_cldliq, & ! Effective radius for liquid cloud-particles (microns) effrin_cldice, & ! Effective radius for ice cloud-particles (microns) effrin_cldrain, & ! Effective radius for rain cloud-particles (microns) effrin_cldsnow ! Effective radius for snow cloud-particles (microns) - real(kind_phys), dimension(nCol,nLev+1), intent(in) :: & + real(kind_phys), dimension(:,:), intent(in) :: & p_lev ! Pressure at model-level interfaces (Pa) - real(kind_phys), dimension(nCol, nLev, nTracers),intent(in) :: & + real(kind_phys), dimension(:,:,:),intent(in) :: & tracer ! Cloud condensate amount in layer by type () ! Outputs - real(kind_phys), dimension(nCol,nLev),intent(inout) :: & + real(kind_phys), dimension(:,:),intent(inout) :: & cld_frac, & ! Total cloud fraction cld_lwp, & ! Cloud liquid water path cld_reliq, & ! Cloud liquid effective radius @@ -165,7 +166,8 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(nCol, nLev, nTracers, ncnd, i_cldliq, i_cld where(cld_reice .gt. radice_upr) cld_reice = radice_upr endif - ! Cloud-fraction + ! Cloud-fraction. For mynnedmf, cld_frac is adjusted for precipitation here, otherwise + ! it passes through this interface. It is adjusted prior in sgscloudradpre. if (do_mynnedmf .and. kdt .gt. 1) then do iLay = 1, nLev do iCol = 1, nCol diff --git a/physics/GFS_rrtmgp_gfdlmp_pre.meta b/physics/GFS_rrtmgp_gfdlmp_pre.meta index 19d09cd79..69bd63b08 100644 --- a/physics/GFS_rrtmgp_gfdlmp_pre.meta +++ b/physics/GFS_rrtmgp_gfdlmp_pre.meta @@ -1,7 +1,7 @@ [ccpp-table-properties] name = GFS_rrtmgp_gfdlmp_pre type = scheme - dependencies = rrtmgp_aux.F90, radiation_cloud_overlap.F90, rrtmgp_lw_cloud_optics.F90 + dependencies = radiation_tools.F90, radiation_cloud_overlap.F90, rrtmgp_lw_cloud_optics.F90 ######################################################################## [ccpp-arg-table] @@ -16,7 +16,7 @@ intent = in optional = F [nLev] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () @@ -32,71 +32,15 @@ intent = in optional = F [ncnd] - standard_name = number_of_cloud_condensate_types + standard_name = number_of_condensate_species long_name = number of cloud condensate types units = count dimensions = () type = integer intent = in optional = F -[doSWrad] - standard_name = flag_to_calc_sw - long_name = logical flags for sw radiation calls - units = flag - dimensions = () - type = logical - intent = in - optional = F -[doLWrad] - standard_name = flag_to_calc_lw - long_name = logical flags for lw radiation calls - units = flag - dimensions = () - type = logical - intent = in - optional = F -[effr_in] - standard_name = flag_for_cloud_effective_radii - long_name = flag for cloud effective radii calculations in GFDL microphysics - units = flag - dimensions = () - type = logical - intent = in - optional = F -[doGP_cldoptics_PADE] - standard_name = flag_to_calc_lw_cld_optics_using_RRTMGP_PADE - long_name = logical flag to control cloud optics scheme. - units = flag - dimensions = () - type = logical - intent = in - optional = F -[doGP_cldoptics_LUT] - standard_name = flag_to_calc_lw_cld_optics_using_RRTMGP_LUT - long_name = logical flag to control cloud optics scheme. - units = flag - dimensions = () - type = logical - intent = in - optional = F -[do_mynnedmf] - standard_name = do_mynnedmf - long_name = flag to activate MYNN-EDMF - units = flag - dimensions = () - type = logical - intent = in - optional = F -[kdt] - standard_name = index_of_time_step - long_name = current forecast iteration - units = index - dimensions = () - type = integer - intent = in - optional = F [i_cldliq] - standard_name = index_for_liquid_cloud_condensate + standard_name = index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array long_name = tracer index for cloud condensate (or liquid water) units = index dimensions = () @@ -104,7 +48,7 @@ intent = in optional = F [i_cldice] - standard_name = index_for_ice_cloud_condensate + standard_name = index_of_cloud_ice_mixing_ratio_in_tracer_concentration_array long_name = tracer index for ice water units = index dimensions = () @@ -112,7 +56,7 @@ intent = in optional = F [i_cldrain] - standard_name = index_for_rain_water + standard_name = index_of_rain_mixing_ratio_in_tracer_concentration_array long_name = tracer index for rain water units = index dimensions = () @@ -120,7 +64,7 @@ intent = in optional = F [i_cldsnow] - standard_name = index_for_snow_water + standard_name = index_of_snow_mixing_ratio_in_tracer_concentration_array long_name = tracer index for snow water units = index dimensions = () @@ -128,7 +72,7 @@ intent = in optional = F [i_cldgrpl] - standard_name = index_for_graupel + standard_name = index_of_graupel_mixing_ratio_in_tracer_concentration_array long_name = tracer index for graupel units = index dimensions = () @@ -136,54 +80,58 @@ intent = in optional = F [i_cldtot] - standard_name = index_for_cloud_amount + standard_name = index_of_cloud_area_fraction_in_atmosphere_layer_in_tracer_concentration_array long_name = tracer index for cloud amount integer units = index dimensions = () type = integer intent = in optional = F -[effrin_cldliq] - standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle_in_um - long_name = eff. radius of cloud liquid water particle in micrometer - units = um - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys +[doSWrad] + standard_name = flag_for_calling_shortwave_radiation + long_name = logical flags for sw radiation calls + units = flag + dimensions = () + type = logical intent = in - optional = F -[effrin_cldice] - standard_name = effective_radius_of_stratiform_cloud_ice_particle_in_um - long_name = eff. radius of cloud ice water particle in micrometer - units = um - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys + optional = F +[doLWrad] + standard_name = flag_for_calling_longwave_radiation + long_name = logical flags for lw radiation calls + units = flag + dimensions = () + type = logical intent = in - optional = F -[effrin_cldrain] - standard_name = effective_radius_of_stratiform_cloud_rain_particle_in_um - long_name = effective radius of cloud rain particle in micrometers - units = um - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys + optional = F +[effr_in] + standard_name = flag_for_cloud_effective_radii + long_name = flag for cloud effective radii calculations in GFDL microphysics + units = flag + dimensions = () + type = logical intent = in - optional = F -[effrin_cldsnow] - standard_name = effective_radius_of_stratiform_cloud_snow_particle_in_um - long_name = effective radius of cloud snow particle in micrometers - units = um - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys + optional = F +[kdt] + standard_name = index_of_timestep + long_name = current forecast iteration + units = index + dimensions = () + type = integer intent = in - optional = F + optional = F +[do_mynnedmf] + standard_name = flag_for_mellor_yamada_nakanishi_niino_pbl_scheme + long_name = flag to activate MYNN-EDMF + units = flag + dimensions = () + type = logical + intent = in + optional = F [p_lev] standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure at vertical interface for radiation calculation units = hPa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -192,7 +140,7 @@ standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure at vertical layer for radiation calculation units = hPa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -201,16 +149,52 @@ standard_name = virtual_temperature long_name = layer virtual temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F +[effrin_cldliq] + standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle + long_name = eff. radius of cloud liquid water particle in micrometer + units = um + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[effrin_cldice] + standard_name = effective_radius_of_stratiform_cloud_ice_particle + long_name = eff. radius of cloud ice water particle in micrometer + units = um + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[effrin_cldrain] + standard_name = effective_radius_of_stratiform_cloud_rain_particle + long_name = effective radius of cloud rain particle in micrometers + units = um + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[effrin_cldsnow] + standard_name = effective_radius_of_stratiform_cloud_snow_particle + long_name = effective radius of cloud snow particle in micrometers + units = um + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in + optional = F [tracer] standard_name = chemical_tracers long_name = chemical tracers units = g g-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = in @@ -225,7 +209,7 @@ intent = in optional = F [con_rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -233,11 +217,27 @@ kind = kind_phys intent = in optional = F +[doGP_cldoptics_PADE] + standard_name = flag_to_calc_lw_cld_optics_using_RRTMGP_PADE + long_name = logical flag to control cloud optics scheme. + units = flag + dimensions = () + type = logical + intent = in + optional = F +[doGP_cldoptics_LUT] + standard_name = flag_to_calc_lw_cld_optics_using_RRTMGP_LUT + long_name = logical flag to control cloud optics scheme. + units = flag + dimensions = () + type = logical + intent = in + optional = F [cld_frac] standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -246,7 +246,7 @@ standard_name = cloud_liquid_water_path long_name = layer cloud liquid water path units = g m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -255,7 +255,7 @@ standard_name = mean_effective_radius_for_liquid_cloud long_name = mean effective radius for liquid cloud units = um - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -264,7 +264,7 @@ standard_name = cloud_ice_water_path long_name = layer cloud ice water path units = g m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -273,7 +273,7 @@ standard_name = mean_effective_radius_for_ice_cloud long_name = mean effective radius for ice cloud units = um - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -282,7 +282,7 @@ standard_name = cloud_snow_water_path long_name = layer cloud snow water path units = g m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -291,7 +291,7 @@ standard_name = mean_effective_radius_for_snow_flake long_name = mean effective radius for snow cloud units = um - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -300,7 +300,7 @@ standard_name = cloud_rain_water_path long_name = layer cloud rain water path units = g m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -309,7 +309,7 @@ standard_name = mean_effective_radius_for_rain_drop long_name = mean effective radius for rain cloud units = um - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -318,7 +318,7 @@ standard_name = precipitation_fraction_by_layer long_name = precipitation fraction in each layer units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/GFS_rrtmgp_lw_post.F90 b/physics/GFS_rrtmgp_lw_post.F90 index e2dbd17fa..ff0346fe4 100644 --- a/physics/GFS_rrtmgp_lw_post.F90 +++ b/physics/GFS_rrtmgp_lw_post.F90 @@ -6,7 +6,7 @@ module GFS_rrtmgp_lw_post use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_fluxes_byband, only: ty_fluxes_byband use mo_heating_rates, only: compute_heating_rate - use rrtmgp_aux, only: check_error_msg + use radiation_tools, only: check_error_msg implicit none public GFS_rrtmgp_lw_post_init,GFS_rrtmgp_lw_post_run,GFS_rrtmgp_lw_post_finalize diff --git a/physics/GFS_rrtmgp_lw_post.meta b/physics/GFS_rrtmgp_lw_post.meta index 72a82421e..4e88ea60f 100644 --- a/physics/GFS_rrtmgp_lw_post.meta +++ b/physics/GFS_rrtmgp_lw_post.meta @@ -1,7 +1,7 @@ [ccpp-table-properties] name = GFS_rrtmgp_lw_post type = scheme - dependencies = iounitdef.f,machine.F,radiation_aerosols.f,radlw_param.f,rte-rrtmgp/extensions/mo_fluxes_byband.F90,rte-rrtmgp/extensions/mo_fluxes_byband_kernels.F90,rrtmgp_aux.F90,rte-rrtmgp/rte/mo_fluxes.F90,rte-rrtmgp/rte/kernels/mo_fluxes_broadband_kernels.F90,rte-rrtmgp/extensions/mo_heating_rates.F90 + dependencies = iounitdef.f,machine.F,radiation_aerosols.f,radlw_param.f,rte-rrtmgp/extensions/mo_fluxes_byband.F90,rte-rrtmgp/extensions/mo_fluxes_byband_kernels.F90,radiation_tools.F90,rte-rrtmgp/rte/mo_fluxes.F90,rte-rrtmgp/rte/kernels/mo_fluxes_broadband_kernels.F90,rte-rrtmgp/extensions/mo_heating_rates.F90 ######################################################################## [ccpp-arg-table] @@ -16,7 +16,7 @@ intent = in optional = F [nLev] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () @@ -24,7 +24,7 @@ intent = in optional = F [lslwr] - standard_name = flag_to_calc_lw + standard_name = flag_for_calling_longwave_radiation long_name = logical flags for lw radiation calls units = flag dimensions = () @@ -32,7 +32,7 @@ intent = in optional = F [do_lw_clrsky_hr] - standard_name = flag_for_output_of_longwave_heating_rate + standard_name = flag_for_output_of_tendency_of_air_temperature_due_to_longwave_heating_on_radiation_timestep_assuming_clear_sky long_name = flag to output lw heating rate units = flag dimensions = () @@ -40,7 +40,7 @@ intent = in optional = F [save_diag] - standard_name = flag_diagnostics + standard_name = flag_for_diagnostics long_name = logical flag for storing diagnostics units = flag dimensions = () @@ -48,7 +48,7 @@ intent = in optional = F [fhlwr] - standard_name = frequency_for_longwave_radiation + standard_name = period_of_longwave_radiation_calls long_name = frequency for longwave radiation units = s dimensions = () @@ -69,7 +69,7 @@ standard_name = air_temperature_at_layer_for_RRTMGP long_name = air temperature at vertical layer for radiation calculation units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -78,7 +78,7 @@ standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure level units = hPa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -87,7 +87,7 @@ standard_name = RRTMGP_lw_flux_profile_upward_allsky long_name = RRTMGP upward longwave all-sky flux profile units = W m-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -96,7 +96,7 @@ standard_name = RRTMGP_lw_flux_profile_downward_allsky long_name = RRTMGP downward longwave all-sky flux profile units = W m-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -105,7 +105,7 @@ standard_name = RRTMGP_lw_flux_profile_upward_clrsky long_name = RRTMGP upward longwave clr-sky flux profile units = W m-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -114,7 +114,7 @@ standard_name = RRTMGP_lw_flux_profile_downward_clrsky long_name = RRTMGP downward longwave clr-sky flux profile units = W m-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -166,7 +166,7 @@ standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -175,7 +175,7 @@ standard_name = RRTMGP_cloud_optical_depth_layers_at_10mu_band long_name = approx 10mu band layer cloud optical depth units = none - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -184,13 +184,13 @@ standard_name = cumulative_radiation_diagnostic long_name = time-accumulated 2D radiation-related diagnostic fields units = various - dimensions = (horizontal_loop_extent,number_of_radiation_diagnostic_variables) + dimensions = (horizontal_loop_extent,number_of_diagnostics_variables_for_radiation) type = real kind = kind_phys intent = inout optional = F [sfcdlw] - standard_name = surface_downwelling_longwave_flux_on_radiation_time_step + standard_name = surface_downwelling_longwave_flux_on_radiation_timestep long_name = total sky sfc downward lw flux units = W m-2 dimensions = (horizontal_loop_extent) @@ -199,7 +199,7 @@ intent = inout optional = F [sfculw] - standard_name = surface_upwelling_longwave_flux_on_radiation_time_step + standard_name = surface_upwelling_longwave_flux_on_radiation_timestep long_name = total sky sfc upward lw flux units = W m-2 dimensions = (horizontal_loop_extent) @@ -208,7 +208,7 @@ intent = inout optional = F [sfcflw] - standard_name = lw_fluxes_sfc + standard_name = surface_lw_fluxes_assuming_total_and_clear_sky_on_radiation_timestep long_name = lw radiation fluxes at sfc units = W m-2 dimensions = (horizontal_loop_extent) @@ -216,7 +216,7 @@ intent = inout optional = F [tsflw] - standard_name = surface_midlayer_air_temperature_in_longwave_radiation + standard_name = air_temperature_at_surface_adjacent_layer_on_radiation_timestep long_name = surface air temp during lw calculation units = K dimensions = (horizontal_loop_extent) @@ -225,10 +225,10 @@ intent = inout optional = F [htrlw] - standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step + standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_timestep long_name = total sky lw heating rate units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -245,12 +245,12 @@ standard_name = RRTMGP_lw_fluxes long_name = lw fluxes total sky / csk and up / down at levels units = W m-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = proflw_type intent = inout optional = T [htrlwc] - standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step + standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_timestep long_name = longwave clear sky heating rate units = K s-1 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 73828999f..88e534595 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -8,9 +8,8 @@ module GFS_rrtmgp_pre getgases, & ! Routine to setup trace gases getozn ! Routine to setup ozone ! RRTMGP types - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_gas_concentrations, only: ty_gas_concs - use rrtmgp_aux, only: check_error_msg + use radiation_tools, only: check_error_msg,cmp_tlev real(kind_phys), parameter :: & amd = 28.9644_kind_phys, & ! Molecular weight of dry-air (g/mol) @@ -19,22 +18,11 @@ module GFS_rrtmgp_pre amdw = amd/amw, & ! Molecular weight of dry air / water vapor amdo3 = amd/amo3 ! Molecular weight of dry air / ozone - ! Some common trace gas on/off flags. - ! This allows for control over which trace gases are used in RRTMGP radiation scheme via - ! namelist. - logical :: & - isActive_h2o = .false., & ! - isActive_co2 = .false., & ! - isActive_o3 = .false., & ! - isActive_n2o = .false., & ! - isActive_ch4 = .false., & ! - isActive_o2 = .false., & ! - isActive_ccl4 = .false., & ! - isActive_cfc11 = .false., & ! - isActive_cfc12 = .false., & ! - isActive_cfc22 = .false. ! + ! Save trace gas indices. integer :: iStr_h2o, iStr_co2, iStr_o3, iStr_n2o, iStr_ch4, iStr_o2, iStr_ccl4, & iStr_cfc11, iStr_cfc12, iStr_cfc22 + character(len=32),dimension(:),allocatable :: & + active_gases_array public GFS_rrtmgp_pre_run,GFS_rrtmgp_pre_init,GFS_rrtmgp_pre_finalize contains @@ -45,19 +33,17 @@ module GFS_rrtmgp_pre !! \section arg_table_GFS_rrtmgp_pre_init !! \htmlinclude GFS_rrtmgp_pre_init.html !! - subroutine GFS_rrtmgp_pre_init(nGases, active_gases, active_gases_array, errmsg, errflg) + subroutine GFS_rrtmgp_pre_init(nGases, active_gases, errmsg, errflg) ! Inputs - integer, intent(in) :: & - nGases ! Number of active gases in RRTMGP - character(len=*), intent(in) :: & - active_gases ! List of active gases from namelist. + integer, intent(in) :: & + nGases ! Number of active gases in RRTMGP + character(len=*), intent(in) :: & + active_gases ! List of active gases from namelist. ! Outputs - character(len=*),dimension(nGases), intent(out) :: & - active_gases_array ! Character array containing trace gases to include in RRTMGP character(len=*), intent(out) :: & - errmsg ! Error message + errmsg ! Error message integer, intent(out) :: & - errflg ! Error flag + errflg ! Error flag ! Local variables character(len=1) :: tempstr @@ -87,52 +73,19 @@ subroutine GFS_rrtmgp_pre_init(nGases, active_gases, active_gases_array, errmsg, gasIndices(nGases,2)=len(trim(active_gases)) ! Now extract the gas names + allocate(active_gases_array(nGases)) do ij=1,nGases active_gases_array(ij) = active_gases(gasIndices(ij,1):gasIndices(ij,2)) - enddo - - ! Which gases are active? (This is purely for flexibility) - do ij=1,nGases - if(trim(active_gases_array(ij)) .eq. 'h2o') then - isActive_h2o = .true. - istr_h2o = ij - endif - if(trim(active_gases_array(ij)) .eq. 'co2') then - isActive_co2 = .true. - istr_co2 = ij - endif - if(trim(active_gases_array(ij)) .eq. 'o3') then - isActive_o3 = .true. - istr_o3 = ij - endif - if(trim(active_gases_array(ij)) .eq. 'n2o') then - isActive_n2o = .true. - istr_n2o = ij - endif - if(trim(active_gases_array(ij)) .eq. 'ch4') then - isActive_ch4 = .true. - istr_ch4 = ij - endif - if(trim(active_gases_array(ij)) .eq. 'o2') then - isActive_o2 = .true. - istr_o2 = ij - endif - if(trim(active_gases_array(ij)) .eq. 'ccl4') then - isActive_ccl4 = .true. - istr_ccl4 = ij - endif - if(trim(active_gases_array(ij)) .eq. 'cfc11') then - isActive_cfc11 = .true. - istr_cfc11 = ij - endif - if(trim(active_gases_array(ij)) .eq. 'cfc12') then - isActive_cfc12 = .true. - istr_cfc12 = ij - endif - if(trim(active_gases_array(ij)) .eq. 'cfc22') then - isActive_cfc22 = .true. - istr_cfc22 = ij - endif + if(trim(active_gases_array(ij)) .eq. 'h2o') istr_h2o = ij + if(trim(active_gases_array(ij)) .eq. 'co2') istr_co2 = ij + if(trim(active_gases_array(ij)) .eq. 'o3') istr_o3 = ij + if(trim(active_gases_array(ij)) .eq. 'n2o') istr_n2o = ij + if(trim(active_gases_array(ij)) .eq. 'ch4') istr_ch4 = ij + if(trim(active_gases_array(ij)) .eq. 'o2') istr_o2 = ij + if(trim(active_gases_array(ij)) .eq. 'ccl4') istr_ccl4 = ij + if(trim(active_gases_array(ij)) .eq. 'cfc11') istr_cfc11 = ij + if(trim(active_gases_array(ij)) .eq. 'cfc12') istr_cfc12 = ij + if(trim(active_gases_array(ij)) .eq. 'cfc22') istr_cfc22 = ij enddo end subroutine GFS_rrtmgp_pre_init @@ -143,25 +96,23 @@ end subroutine GFS_rrtmgp_pre_init !> \section arg_table_GFS_rrtmgp_pre_run !! \htmlinclude GFS_rrtmgp_pre_run.html !! - subroutine GFS_rrtmgp_pre_run(nCol, nLev, nGases, nTracers, i_o3, lsswr, lslwr, fhswr, & - fhlwr, xlat, xlon, prsl, tgrs, prslk, prsi, qgrs, tsfc, active_gases_array, con_eps,& - con_epsm1, con_fvirt, con_epsqs, lw_gas_props, & - raddt, p_lay, t_lay, p_lev, t_lev, tsfg, tsfa, qs_lay, q_lay, tv_lay, relhum, tracer,& - gas_concentrations, errmsg, errflg) + subroutine GFS_rrtmgp_pre_run(nCol, nLev, nTracers, i_o3, lsswr, lslwr, fhswr, fhlwr, & + xlat, xlon, prsl, tgrs, prslk, prsi, qgrs, tsfc, con_eps, con_epsm1, con_fvirt, & + con_epsqs, minGPpres, minGPtemp, raddt, p_lay, t_lay, p_lev, t_lev, tsfg, tsfa, & + qs_lay, q_lay, tv_lay, relhum, tracer, gas_concentrations, errmsg, errflg) ! Inputs integer, intent(in) :: & nCol, & ! Number of horizontal grid points nLev, & ! Number of vertical layers - nGases, & ! Number of active gases in RRTMGP. nTracers, & ! Number of tracers from model. i_o3 ! Index into tracer array for ozone logical, intent(in) :: & lsswr, & ! Call SW radiation? lslwr ! Call LW radiation - character(len=*),dimension(nGases), intent(in) :: & - active_gases_array ! Character array containing trace gases to include in RRTMGP real(kind_phys), intent(in) :: & + minGPtemp, & ! Minimum temperature allowed in RRTMGP. + minGPpres, & ! Minimum pressure allowed in RRTMGP. fhswr, & ! Frequency of SW radiation call. fhlwr ! Frequency of LW radiation call. real(kind_phys), intent(in) :: & @@ -181,8 +132,6 @@ subroutine GFS_rrtmgp_pre_run(nCol, nLev, nGases, nTracers, i_o3, lsswr, lslwr, prsi ! Pressure at model-interfaces (Pa) real(kind_phys), dimension(nCol,nLev,nTracers) :: & qgrs ! Tracer concentrations (kg/kg) - type(ty_gas_optics_rrtmgp),intent(in) :: & - lw_gas_props ! RRTMGP DDT: ! Outputs character(len=*), intent(out) :: & @@ -214,8 +163,9 @@ subroutine GFS_rrtmgp_pre_run(nCol, nLev, nGases, nTracers, i_o3, lsswr, lslwr, logical :: top_at_1 real(kind_phys),dimension(nCol,nLev) :: vmr_o3, vmr_h2o real(kind_phys) :: es, tem1, tem2 - real(kind_phys), dimension(nCol,nLev) :: o3_lay, tem2da, tem2db + real(kind_phys), dimension(nCol,nLev) :: o3_lay real(kind_phys), dimension(nCol,nLev, NF_VGAS) :: gas_vmr + character(len=32), dimension(gas_concentrations%get_num_gases()) :: active_gases ! Initialize CCPP error handling variables errmsg = '' @@ -252,44 +202,17 @@ subroutine GFS_rrtmgp_pre_run(nCol, nLev, nGases, nTracers, i_o3, lsswr, lslwr, ! Temperature at layer-center t_lay(1:NCOL,:) = tgrs(1:NCOL,:) - ! Temperature at layer-interfaces - if (top_at_1) then - tem2da(1:nCol,2:iSFC) = log(p_lay(1:nCol,2:iSFC)) - tem2db(1:nCol,2:iSFC) = log(p_lev(1:nCol,2:iSFC)) - do iCol = 1, nCol - tem2da(iCol,1) = log(p_lay(iCol,1) ) - tem2db(iCol,1) = log(max(lw_gas_props%get_press_min(), p_lev(iCol,1)) ) - tem2db(iCol,iSFC) = log(p_lev(iCol,iSFC) ) + ! Bound temperature at layer centers. + do iCol=1,NCOL + do iLay=1,nLev + if (t_lay(iCol,iLay) .le. minGPtemp) then + t_lay(iCol,iLay) = minGPtemp + epsilon(minGPtemp) + endif enddo - ! - t_lev(1:NCOL,1) = t_lay(1:NCOL,iTOA) - do iLay = 2, iSFC - do iCol = 1, nCol - t_lev(iCol,iLay) = t_lay(iCol,iLay) + (t_lay(iCol,iLay-1) - t_lay(iCol,iLay))& - * (tem2db(iCol,iLay) - tem2da(iCol,iLay)) & - / (tem2da(iCol,iLay-1) - tem2da(iCol,iLay)) - enddo - enddo - t_lev(1:NCOL,iSFC+1) = tsfc(1:NCOL) - else - tem2da(1:nCol,2:iTOA) = log(p_lay(1:nCol,2:iTOA)) - tem2db(1:nCol,2:iTOA) = log(p_lev(1:nCol,2:iTOA)) - do iCol = 1, nCol - tem2da(iCol,1) = log(p_lay(iCol,1)) - tem2db(iCol,1) = log(p_lev(iCol,1)) - tem2db(iCol,iTOA) = log(max(lw_gas_props%get_press_min(), p_lev(iCol,iTOA)) ) - enddo - ! - t_lev(1:NCOL,1) = tsfc(1:NCOL) - do iLay = 1, iTOA-1 - do iCol = 1, nCol - t_lev(iCol,iLay+1) = t_lay(iCol,iLay) + (t_lay(iCol,iLay+1) - t_lay(iCol,iLay))& - * (tem2db(iCol,iLay+1) - tem2da(iCol,iLay)) & - / (tem2da(iCol,iLay+1) - tem2da(iCol,iLay)) - enddo - enddo - t_lev(1:NCOL,iTOA+1) = t_lay(1:NCOL,iTOA) - endif + enddo + + ! Temperature at layer-interfaces + call cmp_tlev(nCol,nLev,minGPpres,p_lay,t_lay,p_lev,tsfc,t_lev) ! Compute a bunch of thermodynamic fields needed by the cloud microphysics schemes. ! Relative humidity, saturation mixing-ratio, vapor mixing-ratio, virtual temperature, @@ -333,14 +256,14 @@ subroutine GFS_rrtmgp_pre_run(nCol, nLev, nGases, nTracers, i_o3, lsswr, lslwr, vmr_h2o = merge((q_lay/(1-q_lay))*amdw, 0., q_lay .ne. 1.) vmr_o3 = merge(o3_lay*amdo3, 0., o3_lay .gt. 0.) - ! Initialize and opulate RRTMGP DDT w/ gas-concentrations - call check_error_msg('sw_gas_optics_init',gas_concentrations%init(active_gases_array)) - call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_o2), gas_vmr(:,:,4))) - call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_co2), gas_vmr(:,:,1))) - call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_ch4), gas_vmr(:,:,3))) - call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_n2o), gas_vmr(:,:,2))) - call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_h2o), vmr_h2o)) - call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_o3), vmr_o3)) + ! Populate RRTMGP DDT w/ gas-concentrations + gas_concentrations%gas_name(:) = active_gases_array(:) + gas_concentrations%concs(istr_o2)%conc(:,:) = gas_vmr(:,:,4) + gas_concentrations%concs(istr_co2)%conc(:,:) = gas_vmr(:,:,1) + gas_concentrations%concs(istr_ch4)%conc(:,:) = gas_vmr(:,:,3) + gas_concentrations%concs(istr_n2o)%conc(:,:) = gas_vmr(:,:,2) + gas_concentrations%concs(istr_h2o)%conc(:,:) = vmr_h2o(:,:) + gas_concentrations%concs(istr_o3)%conc(:,:) = vmr_o3(:,:) ! ####################################################################################### ! Radiation time step (output) (Is this really needed?) (Used by some diagnostics) @@ -351,7 +274,7 @@ subroutine GFS_rrtmgp_pre_run(nCol, nLev, nGases, nTracers, i_o3, lsswr, lslwr, ! Setup surface ground temperature and ground/air skin temperature if required. ! ####################################################################################### tsfg(1:NCOL) = tsfc(1:NCOL) - tsfa(1:NCOL) = t_lay(1:NCOL,iSFC)!tsfc(1:NCOL) + tsfa(1:NCOL) = t_lay(1:NCOL,iSFC) end subroutine GFS_rrtmgp_pre_run @@ -360,5 +283,4 @@ end subroutine GFS_rrtmgp_pre_run ! ######################################################################################### subroutine GFS_rrtmgp_pre_finalize () end subroutine GFS_rrtmgp_pre_finalize - end module GFS_rrtmgp_pre diff --git a/physics/GFS_rrtmgp_pre.meta b/physics/GFS_rrtmgp_pre.meta index fd7067ca6..ddda82bb6 100644 --- a/physics/GFS_rrtmgp_pre.meta +++ b/physics/GFS_rrtmgp_pre.meta @@ -2,7 +2,7 @@ name = GFS_rrtmgp_pre type = scheme dependencies = funcphys.f90,iounitdef.f,machine.F,module_bfmicrophysics.f,physcons.F90,physparam.f,radcons.f90,radiation_aerosols.f - dependencies = radiation_astronomy.f,radiation_clouds.f,module_mp_thompson.F90,radiation_gases.f,radiation_surface.f,rrtmgp_aux.F90,rrtmg_lw_cloud_optics.F90 + dependencies = radiation_astronomy.f,radiation_clouds.f,module_mp_thompson.F90,radiation_gases.f,radiation_surface.f,radiation_tools.F90,rrtmg_lw_cloud_optics.F90 ######################################################################## [ccpp-arg-table] @@ -25,15 +25,6 @@ type = integer intent = in optional = F -[active_gases_array] - standard_name = list_of_active_gases_used_by_RRTMGP - long_name = list of active gases used by RRTMGP - units = none - dimensions = (number_of_active_gases_used_by_RRTMGP) - type = character - kind = len=* - intent = out - optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP @@ -65,21 +56,13 @@ intent = in optional = F [nLev] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () type = integer intent = in - optional = F -[nGases] - standard_name = number_of_active_gases_used_by_RRTMGP - long_name = number of gases available used by RRTMGP (Model%nGases) - units = count - dimensions = () - type = integer - intent = in - optional = F + optional = F [nTracers] standard_name = number_of_tracers long_name = number of tracers @@ -89,7 +72,7 @@ intent = in optional = F [lsswr] - standard_name = flag_to_calc_sw + standard_name = flag_for_calling_shortwave_radiation long_name = logical flags for sw radiation calls units = flag dimensions = () @@ -97,15 +80,15 @@ intent = in optional = F [lslwr] - standard_name = flag_to_calc_lw + standard_name = flag_for_calling_longwave_radiation long_name = logical flags for lw radiation calls units = flag dimensions = () type = logical intent = in - optional = F + optional = F [i_o3] - standard_name = index_for_ozone + standard_name = index_of_ozone_mixing_ratio_in_tracer_concentration_array long_name = tracer index for ozone mixing ratio units = index dimensions = () @@ -113,7 +96,7 @@ intent = in optional = F [fhswr] - standard_name = frequency_for_shortwave_radiation + standard_name = period_of_shortwave_radiation_calls long_name = frequency for shortwave radiation units = s dimensions = () @@ -122,7 +105,7 @@ intent = in optional = F [fhlwr] - standard_name = frequency_for_longwave_radiation + standard_name = period_of_longwave_radiation_calls long_name = frequency for longwave radiation units = s dimensions = () @@ -152,16 +135,16 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in optional = F [prslk] - standard_name = dimensionless_exner_function_at_model_layers + standard_name = dimensionless_exner_function long_name = dimensionless Exner function at model layer centers units = none - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -170,7 +153,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -179,7 +162,7 @@ standard_name = air_temperature long_name = model layer mean temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -188,7 +171,7 @@ standard_name = tracer_concentration long_name = model layer mean tracer concentration units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = in @@ -202,15 +185,6 @@ kind = kind_phys intent = in optional = F -[active_gases_array] - standard_name = list_of_active_gases_used_by_RRTMGP - long_name = list of active gases used by RRTMGP - units = none - dimensions = (number_of_active_gases_used_by_RRTMGP) - type = character - kind = len=* - intent = in - optional = F [con_eps] standard_name = ratio_of_dry_air_to_water_vapor_gas_constants long_name = rd/rv @@ -246,13 +220,23 @@ type = real kind = kind_phys intent = in - optional = F -[lw_gas_props] - standard_name = coefficients_for_lw_gas_optics - long_name = DDT containing spectral information for RRTMGP LW radiation scheme - units = DDT + optional = F +[minGPpres] + standard_name = minimum_pressure_in_RRTMGP + long_name = minimum pressure allowed in RRTMGP + units = Pa dimensions = () - type = ty_gas_optics_rrtmgp + type = real + kind = kind_phys + intent = in + optional = F +[minGPtemp] + standard_name = minimum_temperature_in_RRTMGP + long_name = minimum temperature allowed in RRTMGP + units = K + dimensions = () + type = real + kind = kind_phys intent = in optional = F [raddt] @@ -268,7 +252,7 @@ standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure at vertical layer for radiation calculation units = hPa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -277,7 +261,7 @@ standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure at vertical interface for radiation calculation units = hPa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = inout @@ -286,7 +270,7 @@ standard_name = air_temperature_at_layer_for_RRTMGP long_name = air temperature at vertical layer for radiation calculation units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -295,7 +279,7 @@ standard_name = air_temperature_at_interface_for_RRTMGP long_name = air temperature at vertical interface for radiation calculation units = K - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = inout @@ -322,7 +306,7 @@ standard_name = virtual_temperature long_name = layer virtual temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -331,7 +315,7 @@ standard_name = relative_humidity long_name = layer relative humidity units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -340,7 +324,7 @@ standard_name = saturation_vapor_pressure long_name = saturation vapor pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -349,7 +333,7 @@ standard_name = water_vapor_mixing_ratio long_name = water vaport mixing ratio units = kg/kg - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -358,7 +342,7 @@ standard_name = chemical_tracers long_name = chemical tracers units = g g-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = inout diff --git a/physics/GFS_rrtmgp_setup.F90 b/physics/GFS_rrtmgp_setup.F90 index 308456e06..d518cb6e3 100644 --- a/physics/GFS_rrtmgp_setup.F90 +++ b/physics/GFS_rrtmgp_setup.F90 @@ -5,12 +5,11 @@ module GFS_rrtmgp_setup use module_radiation_astronomy, only : sol_init, sol_update use module_radiation_aerosols, only : aer_init, aer_update use module_radiation_gases, only : gas_init, gas_update - use module_radiation_surface, only : sfc_init use GFS_cloud_diagnostics, only : hml_cloud_diagnostics_initialize ! *NOTE* These parameters below are required radiation_****** modules. They are not ! directly used by the RRTMGP routines. use physparam, only : isolar, ictmflg, ico2flg, ioznflg, iaerflg, & - iaermdl, ialbflg, iemsflg, ivflip + iaermdl, ivflip implicit none public GFS_rrtmgp_setup_init, GFS_rrtmgp_setup_timestep_init, GFS_rrtmgp_setup_finalize @@ -40,13 +39,14 @@ module GFS_rrtmgp_setup !! \section arg_table_GFS_rrtmgp_setup_init !! \htmlinclude GFS_rrtmgp_setup_init.html !! - subroutine GFS_rrtmgp_setup_init(imp_physics, imp_physics_fer_hires, imp_physics_gfdl, & - imp_physics_thompson, imp_physics_wsm6, imp_physics_zhao_carr, & - imp_physics_zhao_carr_pdf, imp_physics_mg, si, levr, ictm, isol, ico2, iaer, ialb, & - iems, ntcw, num_p3d, ntoz, iovr, isubc_sw, isubc_lw, icliq_sw, crick_proof, ccnorm, & + subroutine GFS_rrtmgp_setup_init(do_RRTMGP, imp_physics, imp_physics_fer_hires, & + imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6, imp_physics_zhao_carr, & + imp_physics_zhao_carr_pdf, imp_physics_mg, si, levr, ictm, isol, ico2, iaer, & + ntcw, num_p3d, ntoz, iovr, isubc_sw, isubc_lw, icliq_sw, crick_proof, ccnorm, & norad_precip, idate, iflip, me, errmsg, errflg) ! Inputs + logical, intent(in) :: do_RRTMGP integer, intent(in) :: & imp_physics, & ! Flag for MP scheme imp_physics_fer_hires, & ! Flag for fer-hires scheme @@ -56,14 +56,14 @@ subroutine GFS_rrtmgp_setup_init(imp_physics, imp_physics_fer_hires, imp_physics imp_physics_zhao_carr, & ! Flag for zhao-carr scheme imp_physics_zhao_carr_pdf, & ! Flag for zhao-carr+PDF scheme imp_physics_mg ! Flag for MG scheme - real(kind_phys), dimension(levr+1), intent(in) :: & + real(kind_phys), dimension(:), intent(in) :: & si - integer, intent(in) :: levr, ictm, isol, ico2, iaer, ialb, iems, & - ntcw, num_p3d, ntoz, iovr, isubc_sw, isubc_lw, & + integer, intent(in) :: levr, ictm, isol, ico2, iaer, & + ntcw, num_p3d, ntoz, iovr, isubc_sw, isubc_lw, & icliq_sw, iflip, me logical, intent(in) :: & crick_proof, ccnorm, norad_precip - integer, intent(in), dimension(4) :: & + integer, intent(in), dimension(:) :: & idate ! Outputs @@ -75,14 +75,19 @@ subroutine GFS_rrtmgp_setup_init(imp_physics, imp_physics_fer_hires, imp_physics errflg = 0 if (is_initialized) return - + + ! Consistency checks + if (.not. do_RRTMGP) then + write(errmsg,'(*(a))') "Logic error: do_RRTMGP must be set to .true." + errflg = 1 + return + end if + ! Set radiation parameters isolar = isol ! solar constant control flag ictmflg = ictm ! data ic time/date control flag ico2flg = ico2 ! co2 data source control flag ioznflg = ntoz ! ozone data source control flag - ialbflg = ialb ! surface albedo control flag - iemsflg = iems ! surface emissivity control flag ivflip = iflip ! vertical index direction control flag if ( ictm==0 .or. ictm==-2 ) then @@ -105,8 +110,6 @@ subroutine GFS_rrtmgp_setup_init(imp_physics, imp_physics_fer_hires, imp_physics ' isol = ',isol, & ' ico2 = ',ico2, & ' iaer = ',iaer, & - ' ialb = ',ialb, & - ' iems = ',iems, & ' ntcw = ',ntcw print *,' np3d = ',num_p3d, & ' ntoz = ',ntoz, & @@ -118,14 +121,6 @@ subroutine GFS_rrtmgp_setup_init(imp_physics, imp_physics_fer_hires, imp_physics ' me = ',me endif -#if 0 - ! GFS_radiation_driver.F90 may in the future initialize air/ground - ! temperature differently; however, this is not used at the moment - ! and as such we avoid the difficulty of dealing with exchanging - ! itsfc between GFS_rrtmgp_setup and a yet-to-be-created/-used - ! interstitial routine (or GFS_radiation_driver.F90) - itsfc = iemsflg / 10 ! sfc air/ground temp control -#endif loz1st = (ioznflg == 0) ! first-time clim ozone data read flag month0 = 0 iyear0 = 0 @@ -135,7 +130,6 @@ subroutine GFS_rrtmgp_setup_init(imp_physics, imp_physics_fer_hires, imp_physics call sol_init ( me ) call aer_init ( levr, me ) call gas_init ( me ) - call sfc_init ( me ) call hml_cloud_diagnostics_initialize(imp_physics, imp_physics_fer_hires, & imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6, & imp_physics_zhao_carr, imp_physics_zhao_carr_pdf, imp_physics_mg, levr, me, si,& diff --git a/physics/GFS_rrtmgp_setup.meta b/physics/GFS_rrtmgp_setup.meta index 1237184d8..4abf0a2b1 100644 --- a/physics/GFS_rrtmgp_setup.meta +++ b/physics/GFS_rrtmgp_setup.meta @@ -2,14 +2,22 @@ name = GFS_rrtmgp_setup type = scheme dependencies = iounitdef.f,machine.F,module_bfmicrophysics.f,physparam.f,radiation_aerosols.f,radiation_astronomy.f - dependencies = module_mp_thompson.F90,radiation_clouds.f,radiation_gases.f,radiation_surface.f + dependencies = module_mp_thompson.F90,radiation_clouds.f,radiation_gases.f ######################################################################## [ccpp-arg-table] name = GFS_rrtmgp_setup_init type = scheme +[do_RRTMGP] + standard_name = flag_for_rrtmgp_radiation_scheme + long_name = flag for RRTMGP scheme + units = flag + dimensions = () + type = logical + intent = in + optional = F [imp_physics] - standard_name = flag_for_microphysics_scheme + standard_name = control_for_microphysics_scheme long_name = choice of microphysics scheme units = flag dimensions = () @@ -17,7 +25,7 @@ intent = in optional = F [imp_physics_fer_hires] - standard_name = flag_for_fer_hires_microphysics_scheme + standard_name = identifier_for_fer_hires_microphysics_scheme long_name = choice of Ferrier-Aligo microphysics scheme units = flag dimensions = () @@ -25,7 +33,7 @@ intent = in optional = F [imp_physics_gfdl] - standard_name = flag_for_gfdl_microphysics_scheme + standard_name = identifier_for_gfdl_microphysics_scheme long_name = choice of GFDL microphysics scheme units = flag dimensions = () @@ -33,15 +41,17 @@ intent = in optional = F [imp_physics_thompson] - standard_name = flag_for_thompson_microphysics_scheme + standard_name = identifier_for_thompson_microphysics_scheme long_name = choice of Thompson microphysics scheme units = flag dimensions = () type = integer + intent = in + optional = F [imp_physics_wsm6] intent = in optional = F - standard_name = flag_for_wsm6_microphysics_scheme + standard_name = identifier_for_wsm6_microphysics_scheme long_name = choice of WSM6 microphysics scheme units = flag dimensions = () @@ -49,7 +59,7 @@ intent = in optional = F [imp_physics_zhao_carr] - standard_name = flag_for_zhao_carr_microphysics_scheme + standard_name = identifier_for_zhao_carr_microphysics_scheme long_name = choice of Zhao-Carr microphysics scheme units = flag dimensions = () @@ -57,7 +67,7 @@ intent = in optional = F [imp_physics_zhao_carr_pdf] - standard_name = flag_for_zhao_carr_pdf_microphysics_scheme + standard_name = identifier_for_zhao_carr_pdf_microphysics_scheme long_name = choice of Zhao-Carr microphysics scheme with PDF clouds units = flag dimensions = () @@ -65,7 +75,7 @@ intent = in optional = F [imp_physics_mg] - standard_name = flag_for_morrison_gettelman_microphysics_scheme + standard_name = identifier_for_morrison_gettelman_microphysics_scheme long_name = choice of Morrison-Gettelman microphysics scheme units = flag dimensions = () @@ -73,16 +83,16 @@ intent = in optional = F [si] - standard_name = vertical_sigma_coordinate_for_radiation_initialization + standard_name = sigma_pressure_hybrid_vertical_coordinate long_name = vertical sigma coordinate for radiation initialization units = none - dimensions = (number_of_vertical_layers_for_radiation_calculations_plus_one) + dimensions = (vertical_interface_dimension_for_radiation) type = real kind = kind_phys intent = in optional = F [levr] - standard_name = number_of_vertical_layers_for_radiation_calculations + standard_name = vertical_dimension_for_radiation long_name = number of vertical levels for radiation calculations units = count dimensions = () @@ -98,7 +108,7 @@ intent = in optional = F [isol] - standard_name = flag_for_solar_constant + standard_name = control_for_solar_constant long_name = use prescribed solar constant units = flag dimensions = () @@ -106,7 +116,7 @@ intent = in optional = F [ico2] - standard_name = flag_for_using_prescribed_global_mean_co2_value + standard_name = control_for_co2 long_name = prescribed global mean value (old opernl) units = flag dimensions = () @@ -114,31 +124,15 @@ intent = in optional = F [iaer] - standard_name = flag_for_default_aerosol_effect_in_shortwave_radiation + standard_name = control_for_shortwave_radiation_aerosols long_name = default aerosol effect in sw only units = flag dimensions = () type = integer intent = in optional = F -[ialb] - standard_name = flag_for_using_climatology_albedo - long_name = flag for using climatology alb, based on sfc type - units = flag - dimensions = () - type = integer - intent = in - optional = F -[iems] - standard_name = flag_for_surface_emissivity_control - long_name = surface emissivity control flag, use fixed value of 1 - units = flag - dimensions = () - type = integer - intent = in - optional = F [ntcw] - standard_name = index_for_liquid_cloud_condensate + standard_name = index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array long_name = tracer index for cloud condensate (or liquid water) units = index dimensions = () @@ -146,7 +140,7 @@ intent = in optional = F [num_p3d] - standard_name = array_dimension_of_3d_arrays_for_microphysics + standard_name = number_of_microphysics_variables_in_xyz_dimensioned_restart_array long_name = number of 3D arrays needed for microphysics units = count dimensions = () @@ -154,7 +148,7 @@ intent = in optional = F [ntoz] - standard_name = index_for_ozone + standard_name = index_of_ozone_mixing_ratio_in_tracer_concentration_array long_name = tracer index for ozone mixing ratio units = index dimensions = () @@ -186,7 +180,7 @@ intent = in optional = F [icliq_sw] - standard_name = flag_for_optical_property_for_liquid_clouds_for_shortwave_radiation + standard_name = control_for_shortwave_radiation_liquid_clouds long_name = sw optical property for liquid clouds units = flag dimensions = () @@ -202,7 +196,7 @@ intent = in optional = F [ccnorm] - standard_name = flag_for_cloud_condensate_normalized_by_cloud_cover + standard_name = flag_for_in_cloud_condensate long_name = flag for cloud condensate normalized by cloud cover units = flag dimensions = () @@ -210,7 +204,7 @@ intent = in optional = F [norad_precip] - standard_name = flag_for_precipitation_effect_on_radiation + standard_name = flag_for_turning_off_precipitation_radiative_effect long_name = radiation precip flag for Ferrier/Moorthi units = flag dimensions = () @@ -218,7 +212,7 @@ intent = in optional = F [idate] - standard_name = date_and_time_at_model_initialization_reordered + standard_name = date_and_time_at_model_initialization_in_united_states_order long_name = initialization date and time units = none dimensions = (4) @@ -226,7 +220,7 @@ intent = in optional = F [iflip] - standard_name = flag_for_vertical_index_direction_control + standard_name = control_for_vertical_index_direction long_name = flag for vertical index direction control units = flag dimensions = () @@ -264,7 +258,7 @@ name = GFS_rrtmgp_setup_timestep_init type = scheme [idate] - standard_name = date_and_time_at_model_initialization + standard_name = date_and_time_at_model_initialization_in_iso_order long_name = initialization date and time units = none dimensions = (8) @@ -272,7 +266,7 @@ intent = in optional = F [jdate] - standard_name = forecast_date_and_time + standard_name = date_and_time_of_forecast_in_united_states_order long_name = current forecast date and time units = none dimensions = (8) @@ -280,7 +274,7 @@ intent = in optional = F [deltsw] - standard_name = frequency_for_shortwave_radiation + standard_name = period_of_shortwave_radiation_calls long_name = frequency for shortwave radiation units = s dimensions = () @@ -289,7 +283,7 @@ intent = in optional = F [deltim] - standard_name = time_step_for_dynamics + standard_name = timestep_for_dynamics long_name = dynamics timestep units = s dimensions = () @@ -298,7 +292,7 @@ intent = in optional = F [lsswr] - standard_name = flag_to_calc_sw + standard_name = flag_for_calling_shortwave_radiation long_name = logical flags for sw radiation calls units = flag dimensions = () diff --git a/physics/GFS_rrtmgp_sw_post.F90 b/physics/GFS_rrtmgp_sw_post.F90 index f89c2e7e7..23a681826 100644 --- a/physics/GFS_rrtmgp_sw_post.F90 +++ b/physics/GFS_rrtmgp_sw_post.F90 @@ -5,7 +5,8 @@ module GFS_rrtmgp_sw_post use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_fluxes_byband, only: ty_fluxes_byband use mo_heating_rates, only: compute_heating_rate - use rrtmgp_aux, only: check_error_msg + use radiation_tools, only: check_error_msg + use rrtmgp_sw_gas_optics, only: sw_gas_props implicit none public GFS_rrtmgp_sw_post_init,GFS_rrtmgp_sw_post_run,GFS_rrtmgp_sw_post_finalize @@ -26,7 +27,7 @@ end subroutine GFS_rrtmgp_sw_post_init !! subroutine GFS_rrtmgp_sw_post_run (nCol, nLev, nDay, idxday, lsswr, do_sw_clrsky_hr, & save_diag, fhswr, coszen, coszdg, t_lay, p_lev, sfc_alb_nir_dir, sfc_alb_nir_dif, & - sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, sw_gas_props, fluxswUP_allsky, & + sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, fluxswUP_allsky, & fluxswDOWN_allsky, fluxswUP_clrsky, fluxswDOWN_clrsky, raddt, aerodp, cldsa, mbota, & mtopa, cld_frac, cldtausw, fluxr, & nirbmdi, nirdfdi, visbmdi, visdfdi, nirbmui, nirdfui, visbmui, visdfui, sfcnsw, & @@ -43,8 +44,6 @@ subroutine GFS_rrtmgp_sw_post_run (nCol, nLev, nDay, idxday, lsswr, do_sw_clrsky lsswr, & ! Call SW radiation? do_sw_clrsky_hr, & ! Output clear-sky SW heating-rate? save_diag ! Output radiation diagnostics? - type(ty_gas_optics_rrtmgp),intent(in) :: & - sw_gas_props ! DDT containing SW spectral information real(kind_phys), intent(in) :: & fhswr ! Frequency for SW radiation real(kind_phys), dimension(nCol), intent(in) :: & diff --git a/physics/GFS_rrtmgp_sw_post.meta b/physics/GFS_rrtmgp_sw_post.meta index 2dc412118..73f25cc74 100644 --- a/physics/GFS_rrtmgp_sw_post.meta +++ b/physics/GFS_rrtmgp_sw_post.meta @@ -2,7 +2,7 @@ name = GFS_rrtmgp_sw_post type = scheme dependencies = iounitdef.f,machine.F,radiation_aerosols.f,radsw_param.f,rte-rrtmgp/extensions/mo_fluxes_byband.F90,rte-rrtmgp/extensions/mo_fluxes_byband_kernels.F90 - dependencies = rte-rrtmgp/rte/mo_fluxes.F90,rte-rrtmgp/rte/kernels/mo_fluxes_broadband_kernels.F90,rte-rrtmgp/extensions/mo_heating_rates.F90,rrtmgp_aux.F90 + dependencies = rte-rrtmgp/rte/mo_fluxes.F90,rte-rrtmgp/rte/kernels/mo_fluxes_broadband_kernels.F90,rte-rrtmgp/extensions/mo_heating_rates.F90,radiation_tools.F90 ######################################################################## [ccpp-arg-table] @@ -17,7 +17,7 @@ intent = in optional = F [nLev] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () @@ -41,7 +41,7 @@ intent = in optional = F [lsswr] - standard_name = flag_to_calc_sw + standard_name = flag_for_calling_shortwave_radiation long_name = logical flags for sw radiation calls units = flag dimensions = () @@ -49,7 +49,7 @@ intent = in optional = F [do_sw_clrsky_hr] - standard_name = flag_for_output_of_shortwave_heating_rate + standard_name = flag_for_output_of_tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_timestep_assuming_clear_sky long_name = flag to output sw heating rate units = flag dimensions = () @@ -57,7 +57,7 @@ intent = in optional = F [save_diag] - standard_name = flag_diagnostics + standard_name = flag_for_diagnostics long_name = logical flag for storing diagnostics units = flag dimensions = () @@ -65,7 +65,7 @@ intent = in optional = F [fhswr] - standard_name = frequency_for_shortwave_radiation + standard_name = period_of_shortwave_radiation_calls long_name = frequency for shortwave radiation units = s dimensions = () @@ -74,7 +74,7 @@ intent = in optional = F [coszen] - standard_name = cosine_of_zenith_angle + standard_name = cosine_of_solar_zenith_angle_for_daytime_points_on_radiation_timestep long_name = mean cos of zenith angle over rad call period units = none dimensions = (horizontal_loop_extent) @@ -83,7 +83,7 @@ intent = in optional = F [coszdg] - standard_name = daytime_mean_cosz_over_rad_call_period + standard_name = cosine_of_solar_zenith_angle_on_radiation_timestep long_name = daytime mean cosz over rad call period units = none dimensions = (horizontal_loop_extent) @@ -95,7 +95,7 @@ standard_name = air_temperature_at_layer_for_RRTMGP long_name = air temperature at vertical layer for radiation calculation units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -104,7 +104,7 @@ standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure level units = hPa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -113,7 +113,7 @@ standard_name = surface_albedo_nearIR_direct long_name = near-IR (direct) surface albedo (sfc_alb_nir_dir) units = none - dimensions = (number_of_sw_bands_rrtmgp,horizontal_loop_extent) + dimensions = (number_of_shortwave_bands,horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -122,7 +122,7 @@ standard_name = surface_albedo_nearIR_diffuse long_name = near-IR (diffuse) surface albedo (sfc_alb_nir_dif) units = none - dimensions = (number_of_sw_bands_rrtmgp,horizontal_loop_extent) + dimensions = (number_of_shortwave_bands,horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -131,7 +131,7 @@ standard_name = surface_albedo_uvvis_dir long_name = UVVIS (direct) surface albedo (sfc_alb_uvvis_dir) units = none - dimensions = (number_of_sw_bands_rrtmgp,horizontal_loop_extent) + dimensions = (number_of_shortwave_bands,horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -140,24 +140,16 @@ standard_name = surface_albedo_uvvis_dif long_name = UVVIS (diffuse) surface albedo (sfc_alb_uvvis_dif) units = none - dimensions = (number_of_sw_bands_rrtmgp,horizontal_loop_extent) + dimensions = (number_of_shortwave_bands,horizontal_loop_extent) type = real kind = kind_phys intent = in optional = F -[sw_gas_props] - standard_name = coefficients_for_sw_gas_optics - long_name = DDT containing spectral information for RRTMGP SW radiation scheme - units = DDT - dimensions = () - type = ty_gas_optics_rrtmgp - intent = in - optional = F [fluxswUP_allsky] standard_name = RRTMGP_sw_flux_profile_upward_allsky long_name = RRTMGP upward shortwave all-sky flux profile units = W m-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -166,7 +158,7 @@ standard_name = RRTMGP_sw_flux_profile_downward_allsky long_name = RRTMGP downward shortwave all-sky flux profile units = W m-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -175,7 +167,7 @@ standard_name = RRTMGP_sw_flux_profile_upward_clrsky long_name = RRTMGP upward shortwave clr-sky flux profile units = W m-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -184,7 +176,7 @@ standard_name = RRTMGP_sw_flux_profile_downward_clrsky long_name = RRTMGP downward shortwave clr-sky flux profile units = W m-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -236,7 +228,7 @@ standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -245,7 +237,7 @@ standard_name = RRTMGP_cloud_optical_depth_layers_at_0_55mu_band long_name = approx .55mu band layer cloud optical depth units = none - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -254,13 +246,13 @@ standard_name = cumulative_radiation_diagnostic long_name = time-accumulated 2D radiation-related diagnostic fields units = various - dimensions = (horizontal_loop_extent,number_of_radiation_diagnostic_variables) + dimensions = (horizontal_loop_extent,number_of_diagnostics_variables_for_radiation) type = real kind = kind_phys intent = inout optional = F [nirbmdi] - standard_name = surface_downwelling_direct_near_infrared_shortwave_flux_on_radiation_time_step + standard_name = surface_downwelling_direct_nir_shortwave_flux_on_radiation_timestep long_name = sfc nir beam sw downward flux units = W m-2 dimensions = (horizontal_loop_extent) @@ -269,7 +261,7 @@ intent = inout optional = F [nirdfdi] - standard_name = surface_downwelling_diffuse_near_infrared_shortwave_flux_on_radiation_time_step + standard_name = surface_downwelling_diffuse_nir_shortwave_flux_on_radiation_timestep long_name = sfc nir diff sw downward flux units = W m-2 dimensions = (horizontal_loop_extent) @@ -278,7 +270,7 @@ intent = inout optional = F [visbmdi] - standard_name = surface_downwelling_direct_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step + standard_name = surface_downwelling_direct_uv_and_vis_shortwave_flux_on_radiation_timestep long_name = sfc uv+vis beam sw downward flux units = W m-2 dimensions = (horizontal_loop_extent) @@ -287,7 +279,7 @@ intent = inout optional = F [visdfdi] - standard_name = surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step + standard_name = surface_downwelling_diffuse_uv_and_vis_shortwave_flux_on_radiation_timestep long_name = sfc uv+vis diff sw downward flux units = W m-2 dimensions = (horizontal_loop_extent) @@ -296,7 +288,7 @@ intent = inout optional = F [nirbmui] - standard_name = surface_upwelling_direct_near_infrared_shortwave_flux_on_radiation_time_step + standard_name = surface_upwelling_direct_nir_shortwave_flux_on_radiation_timestep long_name = sfc nir beam sw upward flux units = W m-2 dimensions = (horizontal_loop_extent) @@ -305,7 +297,7 @@ intent = inout optional = F [nirdfui] - standard_name = surface_upwelling_diffuse_near_infrared_shortwave_flux_on_radiation_time_step + standard_name = surface_upwelling_diffuse_nir_shortwave_flux_on_radiation_timestep long_name = sfc nir diff sw upward flux units = W m-2 dimensions = (horizontal_loop_extent) @@ -314,7 +306,7 @@ intent = inout optional = F [visbmui] - standard_name = surface_upwelling_direct_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step + standard_name = surface_upwelling_direct_uv_and_vis_shortwave_flux_on_radiation_timestep long_name = sfc uv+vis beam sw upward flux units = W m-2 dimensions = (horizontal_loop_extent) @@ -323,7 +315,7 @@ intent = inout optional = F [visdfui] - standard_name = surface_upwelling_diffuse_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step + standard_name = surface_upwelling_diffuse_uv_and_vis_shortwave_flux_on_radiation_timestep long_name = sfc uv+vis diff sw upward flux units = W m-2 dimensions = (horizontal_loop_extent) @@ -332,7 +324,7 @@ intent = inout optional = F [sfcnsw] - standard_name = surface_net_downwelling_shortwave_flux_on_radiation_time_step + standard_name = surface_net_downwelling_shortwave_flux_on_radiation_timestep long_name = total sky sfc netsw flx into ground units = W m-2 dimensions = (horizontal_loop_extent) @@ -341,7 +333,7 @@ intent = inout optional = F [sfcdsw] - standard_name = surface_downwelling_shortwave_flux_on_radiation_time_step + standard_name = surface_downwelling_shortwave_flux_on_radiation_timestep long_name = total sky sfc downward sw flux units = W m-2 dimensions = (horizontal_loop_extent) @@ -350,16 +342,16 @@ intent = inout optional = F [htrsw] - standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_timestep long_name = total sky sw heating rate units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [sfcfsw] - standard_name = sw_fluxes_sfc + standard_name = surface_sw_fluxes_assuming_total_and_clear_sky_on_radiation_timestep long_name = sw radiation fluxes at sfc units = W m-2 dimensions = (horizontal_loop_extent) @@ -375,10 +367,10 @@ intent = inout optional = F [htrswc] - standard_name = tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_timestep long_name = clear sky sw heating rates units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/GFS_rrtmgp_sw_pre.F90 b/physics/GFS_rrtmgp_sw_pre.F90 index 1268ed26f..19f211d7f 100644 --- a/physics/GFS_rrtmgp_sw_pre.F90 +++ b/physics/GFS_rrtmgp_sw_pre.F90 @@ -1,17 +1,13 @@ module GFS_rrtmgp_sw_pre use machine, only: & kind_phys ! Working type - use module_radiation_astronomy,only: & + use module_radiation_astronomy, only: & coszmn ! Function to compute cos(SZA) - use module_radiation_surface, only: & - NF_ALBD, & ! Number of surface albedo categories (4; nir-direct, nir-diffuse, uvvis-direct, uvvis-diffuse) - setalb ! Routine to compute surface albedo - use surface_perturbation, only: & - cdfnor ! Routine to compute CDF (used to compute percentiles) use mo_gas_optics_rrtmgp, only: & ty_gas_optics_rrtmgp - public GFS_rrtmgp_sw_pre_run,GFS_rrtmgp_sw_pre_init,GFS_rrtmgp_sw_pre_finalize - + use rrtmgp_sw_gas_optics, only: sw_gas_props + public GFS_rrtmgp_sw_pre_run, GFS_rrtmgp_sw_pre_init, GFS_rrtmgp_sw_pre_finalize + contains ! ######################################################################################### @@ -26,83 +22,46 @@ end subroutine GFS_rrtmgp_sw_pre_init !> \section arg_table_GFS_rrtmgp_sw_pre_run !! \htmlinclude GFS_rrtmgp_sw_pre.html !! - subroutine GFS_rrtmgp_sw_pre_run(me, nCol, nLev, lndp_type, n_var_lndp,lndp_var_list, & - lndp_prt_list, doSWrad, solhr, lon, coslat, sinlat, snowd, sncovr, snoalb, zorl, & - tsfg, tsfa, hprime, alvsf, alnsf, alvwf, alnwf, facsf, facwf, fice, tisfc, lsmask, & - sfc_wts, p_lay, tv_lay, relhum, p_lev, sw_gas_props, nday, idxday, coszen, coszdg, & - sfc_alb_nir_dir, sfc_alb_nir_dif, sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, sfc_alb_dif, & - errmsg, errflg) - - ! Inputs + subroutine GFS_rrtmgp_sw_pre_run(me, nCol, doSWrad, solhr, lon, coslat, sinlat, & + nday, idxday, coszen, coszdg, sfcalb, sfc_alb_nir_dir, sfc_alb_nir_dif, & + sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, errmsg, errflg) + + ! Input integer, intent(in) :: & me, & ! Current MPI rank - nCol, & ! Number of horizontal grid points - nLev, & ! Number of vertical layers - n_var_lndp, & ! Number of surface variables perturbed - lndp_type ! Type of land perturbations scheme used - character(len=3), dimension(n_var_lndp), intent(in) :: & - lndp_var_list - real(kind_phys), dimension(n_var_lndp), intent(in) :: & - lndp_prt_list + nCol ! Number of horizontal grid points + logical,intent(in) :: & - doSWrad ! Call RRTMGP SW radiation? + doSWrad ! Call RRTMGP SW radiation? real(kind_phys), intent(in) :: & - solhr ! Time in hours after 00z at the current timestep - real(kind_phys), dimension(nCol), intent(in) :: & - lsmask, & ! Landmask: sea/land/ice=0/1/2 + solhr ! Time in hours after 00z at the current timestep + real(kind_phys), dimension(:), intent(in) :: & lon, & ! Longitude coslat, & ! Cosine(latitude) - sinlat, & ! Sine(latitude) - snowd, & ! Water equivalent snow depth (mm) - sncovr, & ! Surface snow area fraction (frac) - snoalb, & ! Maximum snow albedo (frac) - zorl, & ! Surface roughness length (cm) - tsfg, & ! Surface ground temperature for radiation (K) - tsfa, & ! Lowest model layer air temperature for radiation (K) - hprime, & ! Standard deviation of subgrid orography (m) - alvsf, & ! Mean vis albedo with strong cosz dependency (frac) - alnsf, & ! Mean nir albedo with strong cosz dependency (frac) - alvwf, & ! Mean vis albedo with weak cosz dependency (frac) - alnwf, & ! Mean nir albedo with weak cosz dependency (frac) - facsf, & ! Fractional coverage with strong cosz dependency (frac) - facwf, & ! Fractional coverage with weak cosz dependency (frac) - fice, & ! Ice fraction over open water (frac) - tisfc ! Sea ice surface skin temperature (K) - real(kind_phys), dimension(nCol,n_var_lndp), intent(in) :: & - sfc_wts ! Weights for stochastic surface physics perturbation () - real(kind_phys), dimension(nCol,nLev),intent(in) :: & - p_lay, & ! Layer pressure - tv_lay, & ! Layer virtual-temperature - relhum ! Layer relative-humidity - real(kind_phys), dimension(nCol,nLev+1),intent(in) :: & - p_lev ! Pressure @ layer interfaces (Pa) - type(ty_gas_optics_rrtmgp),intent(in) :: & - sw_gas_props ! RRTMGP DDT: spectral information for SW calculation + sinlat ! Sine(latitude) + + real(kind_phys), dimension(:,:), intent(in) :: sfcalb ! Outputs integer, intent(out) :: & nday ! Number of daylit points - integer, dimension(ncol), intent(out) :: & + integer, dimension(:), intent(out) :: & idxday ! Indices for daylit points - real(kind_phys), dimension(ncol), intent(inout) :: & + real(kind_phys), dimension(:), intent(inout) :: & coszen, & ! Cosine of SZA - coszdg, & ! Cosine of SZA, daytime - sfc_alb_dif ! Mean surface diffused (nIR+uvvis) sw albedo - real(kind_phys), dimension(sw_gas_props%get_nband(),ncol), intent(out) :: & - sfc_alb_nir_dir, & ! Surface albedo (direct) + coszdg ! Cosine of SZA, daytime + real(kind_phys), dimension(:,:), intent(out) :: & + sfc_alb_nir_dir, & ! Surface albedo (direct) sfc_alb_nir_dif, & ! Surface albedo (diffuse) sfc_alb_uvvis_dir, & ! Surface albedo (direct) sfc_alb_uvvis_dif ! Surface albedo (diffuse) character(len=*), intent(out) :: & errmsg ! Error message - integer, intent(out) :: & + integer, intent(out) :: & errflg ! Error flag ! Local variables - integer :: i, j, iCol, iBand, iLay - real(kind_phys), dimension(ncol, NF_ALBD) :: sfcalb - real(kind_phys), dimension(ncol) :: alb1d - real(kind_phys) :: lndp_alb + integer :: i, iBand ! Initialize CCPP error handling variables errmsg = '' @@ -120,30 +79,19 @@ subroutine GFS_rrtmgp_sw_pre_run(me, nCol, nLev, lndp_type, n_var_lndp,lndp_var_ ! #################################################################################### nday = 0 idxday = 0 - do i = 1, NCOL + do i = 1, nCol if (coszen(i) >= 0.0001) then nday = nday + 1 idxday(nday) = i endif enddo - - ! #################################################################################### - ! Call module_radiation_surface::setalb() to setup surface albedo. - ! #################################################################################### - alb1d(:) = 0. - lndp_alb = -999. - call setalb (lsmask, snowd, sncovr, snoalb, zorl, coszen, tsfg, tsfa, hprime, alvsf, & - alnsf, alvwf, alnwf, facsf, facwf, fice, tisfc, NCOL, alb1d, lndp_alb, sfcalb) - - ! Approximate mean surface albedo from vis- and nir- diffuse values. - sfc_alb_dif(:) = max(0.01, 0.5 * (sfcalb(:,2) + sfcalb(:,4))) - + ! Spread across all SW bands do iBand=1,sw_gas_props%get_nband() - sfc_alb_nir_dir(iBand,1:NCOL) = sfcalb(1:NCOL,1) - sfc_alb_nir_dif(iBand,1:NCOL) = sfcalb(1:NCOL,2) - sfc_alb_uvvis_dir(iBand,1:NCOL) = sfcalb(1:NCOL,3) - sfc_alb_uvvis_dif(iBand,1:NCOL) = sfcalb(1:NCOL,4) + sfc_alb_nir_dir(iBand,1:nCol) = sfcalb(1:nCol,1) + sfc_alb_nir_dif(iBand,1:nCol) = sfcalb(1:nCol,2) + sfc_alb_uvvis_dir(iBand,1:nCol) = sfcalb(1:nCol,3) + sfc_alb_uvvis_dif(iBand,1:nCol) = sfcalb(1:nCol,4) enddo else nday = 0 @@ -152,12 +100,10 @@ subroutine GFS_rrtmgp_sw_pre_run(me, nCol, nLev, lndp_type, n_var_lndp,lndp_var_ sfc_alb_nir_dif(:,1:nCol) = 0. sfc_alb_uvvis_dir(:,1:nCol) = 0. sfc_alb_uvvis_dif(:,1:nCol) = 0. - sfc_alb_dif(1:nCol) = 0. endif - end subroutine GFS_rrtmgp_sw_pre_run - + ! ######################################################################################### ! SUBROUTINE GFS_rrtmgp_sw_pre_finalize ! ######################################################################################### diff --git a/physics/GFS_rrtmgp_sw_pre.meta b/physics/GFS_rrtmgp_sw_pre.meta index 202f1667a..53831b42a 100644 --- a/physics/GFS_rrtmgp_sw_pre.meta +++ b/physics/GFS_rrtmgp_sw_pre.meta @@ -1,7 +1,7 @@ [ccpp-table-properties] name = GFS_rrtmgp_sw_pre type = scheme - dependencies = iounitdef.f,machine.F,physparam.f,radiation_astronomy.f,radiation_surface.f + dependencies = machine.F,radiation_astronomy.f,rrtmgp_sw_gas_optics.F90,rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90, ######################################################################## [ccpp-arg-table] @@ -12,7 +12,7 @@ long_name = current MPI-rank units = index dimensions = () - type = integer + type = integer intent = in optional = F [ncol] @@ -23,50 +23,8 @@ type = integer intent = in optional = F -[nLev] - standard_name = vertical_dimension - long_name = number of vertical levels - units = count - dimensions = () - type = integer - intent = in - optional = F -[n_var_lndp] - standard_name = number_of_land_surface_variables_perturbed - long_name = number of land surface variables perturbed - units = count - dimensions = () - type = integer - intent = in - optional = F -[lndp_type] - standard_name = index_for_stochastic_land_surface_perturbation_type - long_name = index for stochastic land surface perturbations type - units = index - dimensions = () - type = integer - intent = in - optional = F -[lndp_prt_list] - standard_name =magnitude_of_perturbations_for_landperts - long_name = magnitude of perturbations for landperts - units = variable - dimensions = (number_of_land_surface_variables_perturbed) - type = real - kind = kind_phys - intent = in - optional = F -[lndp_var_list] - standard_name = variables_to_be_perturbed_for_landperts - long_name = variables to be perturbed for landperts - units = none - dimensions = (number_of_land_surface_variables_perturbed) - type = character - kind = len=3 - intent = in - optional = F [doSWrad] - standard_name = flag_to_calc_sw + standard_name = flag_for_calling_shortwave_radiation long_name = logical flags for sw radiation calls units = flag dimensions = () @@ -74,7 +32,7 @@ intent = in optional = F [solhr] - standard_name = forecast_hour_of_the_day + standard_name = forecast_utc_hour long_name = time in hours after 00z at the current timestep units = h dimensions = () @@ -108,218 +66,64 @@ type = real kind = kind_phys intent = in - optional = F -[lsmask] - standard_name = sea_land_ice_mask_real - long_name = landmask: sea/land/ice=0/1/2 - units = flag - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[snowd] - standard_name = surface_snow_thickness_water_equivalent - long_name = water equivalent snow depth - units = mm - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[sncovr] - standard_name = surface_snow_area_fraction_over_land - long_name = surface snow area fraction - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[snoalb] - standard_name = upper_bound_on_max_albedo_over_deep_snow - long_name = maximum snow albedo - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[zorl] - standard_name = surface_roughness_length - long_name = surface roughness length - units = cm - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[tsfg] - standard_name = surface_ground_temperature_for_radiation - long_name = surface ground temperature for radiation - units = K - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[tsfa] - standard_name = surface_air_temperature_for_radiation - long_name = lowest model layer air temperature for radiation - units = K - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[hprime] - standard_name = standard_deviation_of_subgrid_orography - long_name = standard deviation of subgrid orography - units = m - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[alvsf] - standard_name = mean_vis_albedo_with_strong_cosz_dependency - long_name = mean vis albedo with strong cosz dependency - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[alnsf] - standard_name = mean_nir_albedo_with_strong_cosz_dependency - long_name = mean nir albedo with strong cosz dependency - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[alvwf] - standard_name = mean_vis_albedo_with_weak_cosz_dependency - long_name = mean vis albedo with weak cosz dependency - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in optional = F -[alnwf] - standard_name = mean_nir_albedo_with_weak_cosz_dependency - long_name = mean nir albedo with weak cosz dependency - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[facsf] - standard_name =fractional_coverage_with_strong_cosz_dependency - long_name = fractional coverage with strong cosz dependency - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in +[nday] + standard_name = daytime_points_dimension + long_name = daytime points dimension + units = count + dimensions = () + type = integer + intent = out optional = F -[facwf] - standard_name = fractional_coverage_with_weak_cosz_dependency - long_name = fractional coverage with weak cosz dependency - units = frac +[idxday] + standard_name = daytime_points + long_name = daytime points + units = index dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in + type = integer + intent = out optional = F -[fice] - standard_name = sea_ice_concentration - long_name = ice fraction over open water - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[tisfc] - standard_name = sea_ice_temperature - long_name = sea ice surface skin temperature - units = K +[coszen] + standard_name = cosine_of_solar_zenith_angle_for_daytime_points_on_radiation_timestep + long_name = mean cos of zenith angle over rad call period + units = none dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = in + intent = inout optional = F -[sfc_wts] - standard_name = weights_for_stochastic_surface_physics_perturbation - long_name = weights for stochastic surface physics perturbation +[coszdg] + standard_name = cosine_of_solar_zenith_angle_on_radiation_timestep + long_name = daytime mean cosz over rad call period units = none - dimensions = (horizontal_loop_extent,number_of_surface_perturbations) - type = real - kind = kind_phys - intent = in - optional = F -[tv_lay] - standard_name = virtual_temperature - long_name = layer virtual temperature - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = in + intent = inout optional = F -[relhum] - standard_name = relative_humidity - long_name = layer relative humidity +[sfcalb] + standard_name = surface_albedo_components + long_name = surface albedo IR/UV/VIS components units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,number_of_components_for_surface_albedo) type = real kind = kind_phys intent = in optional = F -[p_lay] - standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa - long_name = air pressure at vertical layer for radiation calculation - units = hPa - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[p_lev] - standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa - long_name = air pressure at vertical interface for radiation calculation - units = hPa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = in - optional = F -[sw_gas_props] - standard_name = coefficients_for_sw_gas_optics - long_name = DDT containing spectral information for RRTMGP SW radiation scheme - units = DDT - dimensions = () - type = ty_gas_optics_rrtmgp - intent = in - optional = F [sfc_alb_nir_dir] standard_name = surface_albedo_nearIR_direct long_name = near-IR (direct) surface albedo (sfc_alb_nir_dir) units = none - dimensions = (number_of_sw_bands_rrtmgp,horizontal_loop_extent) + dimensions = (number_of_shortwave_bands,horizontal_loop_extent) type = real kind = kind_phys intent = out optional = F [sfc_alb_nir_dif] standard_name = surface_albedo_nearIR_diffuse - long_name = near-IR (diffuse) surface albedo (sfc_alb_nir_dif) + long_name = near-IR (diffuse) surface albedo (sfc_alb_nir_dif) units = none - dimensions = (number_of_sw_bands_rrtmgp,horizontal_loop_extent) + dimensions = (number_of_shortwave_bands,horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -328,7 +132,7 @@ standard_name = surface_albedo_uvvis_dir long_name = UVVIS (direct) surface albedo (sfc_alb_uvvis_dir) units = none - dimensions = (number_of_sw_bands_rrtmgp,horizontal_loop_extent) + dimensions = (number_of_shortwave_bands,horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -337,54 +141,11 @@ standard_name = surface_albedo_uvvis_dif long_name = UVVIS (diffuse) surface albedo (sfc_alb_uvvis_dif) units = none - dimensions = (number_of_sw_bands_rrtmgp,horizontal_loop_extent) + dimensions = (number_of_shortwave_bands,horizontal_loop_extent) type = real kind = kind_phys intent = out optional = F -[nday] - standard_name = daytime_points_dimension - long_name = daytime points dimension - units = count - dimensions = () - type = integer - intent = out - optional = F -[idxday] - standard_name = daytime_points - long_name = daytime points - units = index - dimensions = (horizontal_loop_extent) - type = integer - intent = out - optional = F -[coszen] - standard_name = cosine_of_zenith_angle - long_name = mean cos of zenith angle over rad call period - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = inout - optional = F -[coszdg] - standard_name = daytime_mean_cosz_over_rad_call_period - long_name = daytime mean cosz over rad call period - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = inout - optional = F -[sfc_alb_dif] - standard_name = surface_diffused_shortwave_albedo - long_name = mean surface diffused sw albedo - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = inout - optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/GFS_rrtmgp_thompsonmp_pre.F90 b/physics/GFS_rrtmgp_thompsonmp_pre.F90 index ea27f3d2b..85877704f 100644 --- a/physics/GFS_rrtmgp_thompsonmp_pre.F90 +++ b/physics/GFS_rrtmgp_thompsonmp_pre.F90 @@ -5,51 +5,54 @@ module GFS_rrtmgp_thompsonmp_pre use machine, only: & kind_phys - use rrtmgp_aux, only: & + use radiation_tools, only: & check_error_msg use module_mp_thompson, only: & - calc_effectRad, & - Nt_c + calc_effectRad, Nt_c, & + re_qc_min, re_qc_max, & + re_qi_min, re_qi_max, & + re_qs_min, re_qs_max use module_mp_thompson_make_number_concentrations, only: & make_IceNumber, & make_DropletNumber, & make_RainNumber - use rrtmgp_lw_cloud_optics, only: radliq_lwr, radliq_upr, radice_lwr, radice_upr + use rrtmgp_lw_cloud_optics, only: radliq_lwr => radliq_lwrLW, radliq_upr => radliq_uprLW,& + radice_lwr => radice_lwrLW, radice_upr => radice_uprLW implicit none - + ! Parameters specific to THOMPSON MP scheme. real(kind_phys), parameter :: & rerain_def = 1000.0 ! Default rain radius to 1000 microns - + public GFS_rrtmgp_thompsonmp_pre_init, GFS_rrtmgp_thompsonmp_pre_run, GFS_rrtmgp_thompsonmp_pre_finalize - -contains + +contains ! ###################################################################################### ! ###################################################################################### subroutine GFS_rrtmgp_thompsonmp_pre_init() end subroutine GFS_rrtmgp_thompsonmp_pre_init - + ! ###################################################################################### ! ###################################################################################### !! \section arg_table_GFS_rrtmgp_thompsonmp_pre_run !! \htmlinclude GFS_rrtmgp_thompsonmp_pre_run.html -!! +!! subroutine GFS_rrtmgp_thompsonmp_pre_run(nCol, nLev, nTracers, ncnd, doSWrad, doLWrad, & i_cldliq, i_cldice, i_cldrain, i_cldsnow, i_cldgrpl, i_cldtot, i_cldliq_nc, & i_cldice_nc, i_twa, effr_in, p_lev, p_lay, tv_lay, t_lay, effrin_cldliq, & - effrin_cldice, effrin_cldsnow, tracer, qs_lay, q_lay, relhum, cld_frac_mg, con_g, & - con_rd, uni_cld, lmfshal, lmfdeep2, ltaerosol, do_mynnedmf, imfdeepcnv, & - imfdeepcnv_gf, doGP_cldoptics_PADE, doGP_cldoptics_LUT, & + effrin_cldice, effrin_cldsnow, tracer, qs_lay, q_lay, relhum, con_g, con_rd, & + con_eps, lmfshal, ltaerosol, do_mynnedmf, imfdeepcnv, imfdeepcnv_gf, & + doGP_cldoptics_PADE, doGP_cldoptics_LUT, & cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, & cld_rerain, precip_frac, errmsg, errflg) - - ! Inputs + + ! Inputs integer, intent(in) :: & nCol, & ! Number of horizontal grid points nLev, & ! Number of vertical layers ncnd, & ! Number of cloud condensation types. - nTracers, & ! Number of tracers from model. - i_cldliq, & ! Index into tracer array for cloud liquid amount. + nTracers, & ! Number of tracers from model. + i_cldliq, & ! Index into tracer array for cloud liquid amount. i_cldice, & ! cloud ice amount. i_cldrain, & ! cloud rain amount. i_cldsnow, & ! cloud snow amount. @@ -61,35 +64,33 @@ subroutine GFS_rrtmgp_thompsonmp_pre_run(nCol, nLev, nTracers, ncnd, doSWrad, do imfdeepcnv, & ! Choice of mass-flux deep convection scheme imfdeepcnv_gf ! Flag for Grell-Freitas deep convection scheme logical, intent(in) :: & - doSWrad, & ! Call SW radiation? - doLWrad, & ! Call LW radiation - effr_in, & ! Use cloud effective radii provided by model? - uni_cld, & ! Use provided cloud-fraction? + doSWrad, & ! Call SW radiation? + doLWrad, & ! Call LW radiation + effr_in, & ! Use cloud effective radii provided by model? lmfshal, & ! Flag for mass-flux shallow convection scheme used by Xu-Randall - lmfdeep2, & ! Flag for some scale-aware mass-flux convection scheme active ltaerosol, & ! Flag for aerosol option do_mynnedmf, & ! Flag to activate MYNN-EDMF doGP_cldoptics_LUT,& ! Flag to do GP cloud-optics (LUTs) doGP_cldoptics_PADE ! (PADE approximation) real(kind_phys), intent(in) :: & con_g, & ! Physical constant: gravitational constant - con_rd ! Physical constant: gas-constant for dry air + con_rd, & ! Physical constant: gas-constant for dry air + con_eps ! Physical constant: gas constant air / gas constant H2O - real(kind_phys), dimension(nCol,nLev), intent(in) :: & + real(kind_phys), dimension(:,:), intent(in) :: & tv_lay, & ! Virtual temperature (K) t_lay, & ! Temperature (K) qs_lay, & ! Saturation vapor pressure (Pa) q_lay, & ! water-vapor mixing ratio (kg/kg) relhum, & ! Relative humidity - p_lay, & ! Pressure at model-layers (Pa) - cld_frac_mg ! Cloud-fraction from MG scheme. WTF????? - real(kind_phys), dimension(nCol,nLev+1), intent(in) :: & + p_lay ! Pressure at model-layers (Pa) + real(kind_phys), dimension(:,:), intent(in) :: & p_lev ! Pressure at model-level interfaces (Pa) - real(kind_phys), dimension(nCol, nLev, nTracers),intent(in) :: & - tracer ! Cloud condensate amount in layer by type () - + real(kind_phys), dimension(:,:,:),intent(in) :: & + tracer ! Cloud condensate amount in layer by type () + ! In/Outs - real(kind_phys), dimension(nCol,nLev), intent(inout) :: & + real(kind_phys), dimension(:,:), intent(inout) :: & cld_frac, & ! Total cloud fraction cld_lwp, & ! Cloud liquid water path cld_reliq, & ! Cloud liquid effective radius @@ -97,31 +98,32 @@ subroutine GFS_rrtmgp_thompsonmp_pre_run(nCol, nLev, nTracers, ncnd, doSWrad, do cld_reice, & ! Cloud ice effecive radius cld_swp, & ! Cloud snow water path cld_resnow, & ! Cloud snow effective radius - cld_rwp, & ! Cloud rain water path + cld_rwp, & ! Cloud rain water path cld_rerain, & ! Cloud rain effective radius precip_frac, & ! Precipitation fraction effrin_cldliq, & ! Effective radius for liquid cloud-particles (microns) effrin_cldice, & ! Effective radius for ice cloud-particles (microns) - effrin_cldsnow ! Effective radius for snow cloud-particles (microns) - - ! Outputs + effrin_cldsnow ! Effective radius for snow cloud-particles (microns) + + ! Outputs character(len=*), intent(out) :: & errmsg ! Error message - integer, intent(out) :: & + integer, intent(out) :: & errflg ! Error flag - + ! Local variables real(kind_phys) :: alpha0, pfac, tem1, cld_mr real(kind_phys), dimension(nCol, nLev, min(4,ncnd)) :: cld_condensate integer :: iCol,iLay,l - real(kind_phys), dimension(nCol,nLev) :: deltaP, deltaZ, rho, orho, re_cloud, re_ice,& + real(kind_phys) :: rho, orho + real(kind_phys), dimension(nCol,nLev) :: deltaP, deltaZ, re_cloud, re_ice,& re_snow, qv_mp, qc_mp, qi_mp, qs_mp, nc_mp, ni_mp, nwfa logical :: top_at_1 - + ! Initialize CCPP error handling variables errmsg = '' errflg = 0 - + if (.not. (doSWrad .or. doLWrad)) return ! Cloud condensate @@ -129,108 +131,115 @@ subroutine GFS_rrtmgp_thompsonmp_pre_run(nCol, nLev, nTracers, ncnd, doSWrad, do cld_condensate(1:nCol,1:nLev,2) = tracer(1:nCol,1:nLev,i_cldice) ! -ice water cld_condensate(1:nCol,1:nLev,3) = tracer(1:nCol,1:nLev,i_cldrain) ! -rain water cld_condensate(1:nCol,1:nLev,4) = tracer(1:nCol,1:nLev,i_cldsnow) + &! -snow + grapuel - tracer(1:nCol,1:nLev,i_cldgrpl) - + tracer(1:nCol,1:nLev,i_cldgrpl) + ! Cloud water path (g/m2) - deltaP = abs(p_lev(:,2:nLev+1)-p_lev(:,1:nLev))/100. + deltaP = abs(p_lev(:,2:nLev+1)-p_lev(:,1:nLev))/100. do iLay = 1, nLev do iCol = 1, nCol - ! Compute liquid/ice condensate path from mixing ratios (kg/kg)->(g/m2) + ! Compute liquid/ice condensate path from mixing ratios (kg/kg)->(g/m2) tem1 = (1.0e5/con_g) * deltaP(iCol,iLay) cld_lwp(iCol,iLay) = max(0., cld_condensate(iCol,iLay,1) * tem1) cld_iwp(iCol,iLay) = max(0., cld_condensate(iCol,iLay,2) * tem1) cld_rwp(iCol,iLay) = max(0., cld_condensate(iCol,iLay,3) * tem1) - cld_swp(iCol,iLay) = max(0., cld_condensate(iCol,iLay,4) * tem1) + cld_swp(iCol,iLay) = max(0., cld_condensate(iCol,iLay,4) * tem1) enddo - enddo - + enddo + ! Cloud particle sizes and number concentrations... - - ! First, prepare cloud mixing-ratios and number concentrations for Calc_Re - rho = p_lay(1:nCol,1:nLev)/(con_rd*t_lay(1:nCol,1:nLev)) - orho = 1./rho + + ! Prepare cloud mixing-ratios and number concentrations for calc_effectRad, + ! and update number concentrations, consistent with sub-grid clouds do iLay = 1, nLev - do iCol = 1, nCol + do iCol = 1, nCol qv_mp(iCol,iLay) = q_lay(iCol,iLay)/(1.-q_lay(iCol,iLay)) + rho = con_eps*p_lay(iCol,iLay)/(con_rd*t_lay(iCol,iLay)*(qv_mp(iCol,iLay)+con_eps)) + orho = 1./rho qc_mp(iCol,iLay) = tracer(iCol,iLay,i_cldliq) / (1.-q_lay(iCol,iLay)) qi_mp(iCol,iLay) = tracer(iCol,iLay,i_cldice) / (1.-q_lay(iCol,iLay)) qs_mp(iCol,iLay) = tracer(iCol,iLay,i_cldsnow) / (1.-q_lay(iCol,iLay)) - nc_mp(iCol,iLay) = tracer(iCol,iLay,i_cldliq_nc) / (1.-q_lay(iCol,iLay)) ni_mp(iCol,iLay) = tracer(iCol,iLay,i_cldice_nc) / (1.-q_lay(iCol,iLay)) if (ltaerosol) then + nc_mp(iCol,iLay) = tracer(iCol,iLay,i_cldliq_nc) / (1.-q_lay(iCol,iLay)) nwfa(iCol,iLay) = tracer(iCol,iLay,i_twa) + if (qc_mp(iCol,iLay) > 1.e-12 .and. nc_mp(iCol,iLay) < 100.) then + nc_mp(iCol,iLay) = make_DropletNumber(qc_mp(iCol,iLay)*rho, nwfa(iCol,iLay)*rho) * orho + endif else - nc_mp(iCol,iLay) = nt_c*orho(iCol,iLay) - endif - enddo - enddo - - ! Update number concentration, consistent with sub-grid clouds - do iLay = 1, nLev - do iCol = 1, nCol - if (ltaerosol .and. qc_mp(iCol,iLay) > 1.e-12 .and. nc_mp(iCol,iLay) < 100.) then - nc_mp(iCol,iLay) = make_DropletNumber(qc_mp(iCol,iLay)*rho(iCol,iLay), nwfa(iCol,iLay)) * orho(iCol,iLay) + nc_mp(iCol,iLay) = nt_c*orho endif if (qi_mp(iCol,iLay) > 1.e-12 .and. ni_mp(iCol,iLay) < 100.) then - ni_mp(iCol,iLay) = make_IceNumber(qi_mp(iCol,iLay)*rho(iCol,iLay), t_lay(iCol,iLay)) * orho(iCol,iLay) + ni_mp(iCol,iLay) = make_IceNumber(qi_mp(iCol,iLay)*rho, t_lay(iCol,iLay)) * orho endif enddo enddo - + ! Compute effective radii for liquid/ice/snow using subgrid scale clouds ! Call Thompson's subroutine to compute effective radii do iCol=1,nCol call calc_effectRad (t_lay(iCol,:), p_lay(iCol,:), qv_mp(iCol,:), qc_mp(iCol,:), & nc_mp(iCol,:), qi_mp(iCol,:), ni_mp(iCol,:), qs_mp(iCol,:), & re_cloud(iCol,:), re_ice(iCol,:), re_snow(iCol,:), 1, nLev ) + do iLay = 1, nLev + re_cloud(iCol,iLay) = MAX(re_qc_min, MIN(re_cloud(iCol,iLay), re_qc_max)) + re_ice(iCol,iLay) = MAX(re_qi_min, MIN(re_ice(iCol,iLay), re_qi_max)) + re_snow(iCol,iLay) = MAX(re_qs_min, MIN(re_snow(iCol,iLay), re_qs_max)) + enddo + enddo + + ! Scale Thompson's effective radii from meter to micron + do iLay = 1, nLev + do iCol = 1, nCol + effrin_cldliq(iCol,iLay) = re_cloud(iCol,iLay)*1.e6 + effrin_cldice(iCol,iLay) = re_ice(iCol,iLay)*1.e6 + effrin_cldsnow(iCol,iLay) = re_snow(iCol,iLay)*1.e6 + enddo enddo - - ! Scale Thompson's effective radii from meter to micron - effrin_cldliq(1:nCol,1:nLev) = re_cloud(1:nCol,1:nLev)*1.e6 - effrin_cldice(1:nCol,1:nLev) = re_ice(1:nCol,1:nLev)*1.e6 - effrin_cldsnow(1:nCol,1:nLev) = re_snow(1:nCol,1:nLev)*1.e6 - - ! Bound effective radii for RRTMGP, LUT's for cloud-optics go from - ! 2.5 - 21.5 microns for liquid clouds, + + ! Bound effective radii for RRTMGP, LUT's for cloud-optics go from + ! 2.5 - 21.5 microns for liquid clouds, ! 10 - 180 microns for ice-clouds if (doGP_cldoptics_PADE .or. doGP_cldoptics_LUT) then - where(effrin_cldliq .lt. radliq_lwr) effrin_cldliq = radliq_lwr - where(effrin_cldliq .gt. radliq_upr) effrin_cldliq = radliq_upr - where(effrin_cldice .lt. radice_lwr) effrin_cldice = radice_lwr - where(effrin_cldice .gt. radice_upr) effrin_cldice = radice_upr + do iLay = 1, nLev + do iCol = 1, nCol + if (effrin_cldliq(iCol,iLay) .lt. radliq_lwr) effrin_cldliq(iCol,iLay) = radliq_lwr + if (effrin_cldliq(iCol,iLay) .gt. radliq_upr) effrin_cldliq(iCol,iLay) = radliq_upr + if (effrin_cldice(iCol,iLay) .lt. radice_lwr) effrin_cldice(iCol,iLay) = radice_lwr + if (effrin_cldice(iCol,iLay) .gt. radice_upr) effrin_cldice(iCol,iLay) = radice_upr + enddo + enddo endif ! Update global effective radii arrays. - cld_reliq(1:nCol,1:nLev) = effrin_cldliq(1:nCol,1:nLev) - cld_reice(1:nCol,1:nLev) = effrin_cldice(1:nCol,1:nLev) - cld_resnow(1:nCol,1:nLev) = effrin_cldsnow(1:nCol,1:nLev) - cld_rerain(1:nCol,1:nLev) = rerain_def - + do iLay = 1, nLev + do iCol = 1, nCol + cld_reliq(iCol,iLay) = effrin_cldliq(iCol,iLay) + cld_reice(iCol,iLay) = effrin_cldice(iCol,iLay) + cld_resnow(iCol,iLay) = effrin_cldsnow(iCol,iLay) + cld_rerain(iCol,iLay) = rerain_def + enddo + enddo ! Compute cloud-fraction. Else, use value provided - if(.not. do_mynnedmf .or. imfdeepcnv .ne. imfdeepcnv_gf ) then ! MYNN PBL or GF conv + if(.not. do_mynnedmf .and. imfdeepcnv .ne. imfdeepcnv_gf ) then ! MYNN PBL or GF conv ! Cloud-fraction - if (uni_cld) then - cld_frac(1:nCol,1:nLev) = cld_frac_mg(1:nCol,1:nLev) - else - if( lmfshal) alpha0 = 100. ! Default (from GATE simulations) - if(.not. lmfshal) alpha0 = 2000. - ! Xu-Randall (1996) cloud-fraction - do iLay = 1, nLev - do iCol = 1, nCol - cld_mr = cld_condensate(iCol,iLay,1) + cld_condensate(iCol,iLay,2) + & - cld_condensate(iCol,iLay,4) - cld_frac(iCol,iLay) = cld_frac_XuRandall(p_lay(iCol,iLay), & - qs_lay(iCol,iLay), relhum(iCol,iLay), cld_mr, alpha0) - enddo + if( lmfshal) alpha0 = 100. ! Default (from GATE simulations) + if(.not. lmfshal) alpha0 = 2000. + ! Xu-Randall (1996) cloud-fraction + do iLay = 1, nLev + do iCol = 1, nCol + cld_mr = cld_condensate(iCol,iLay,1) + cld_condensate(iCol,iLay,2) + & + cld_condensate(iCol,iLay,4) + cld_frac(iCol,iLay) = cld_frac_XuRandall(p_lay(iCol,iLay), & + qs_lay(iCol,iLay), relhum(iCol,iLay), cld_mr, alpha0) enddo - endif + enddo endif - + ! Precipitation fraction (Hack. For now use cloud-fraction) precip_frac(1:nCol,1:nLev) = cld_frac(1:nCol,1:nLev) - + end subroutine GFS_rrtmgp_thompsonmp_pre_run - + ! ###################################################################################### ! ###################################################################################### subroutine GFS_rrtmgp_thompsonmp_pre_finalize() @@ -241,11 +250,11 @@ end subroutine GFS_rrtmgp_thompsonmp_pre_finalize ! Xu-Randall(1996) A Semiempirical Cloudiness Parameterization for Use in Climate Models ! https://doi.org/10.1175/1520-0469(1996)053<3084:ASCPFU>2.0.CO;2 ! - ! cld_frac = {1-exp[-alpha*cld_mr/((1-relhum)*qs_lay)**lambda]}*relhum**P + ! cld_frac = {1-exp[-alpha*cld_mr/((1-relhum)*qs_lay)**lambda]}*relhum**P ! ! ###################################################################################### function cld_frac_XuRandall(p_lay, qs_lay, relhum, cld_mr, alpha) - + ! Inputs real(kind_phys), intent(in) :: & p_lay, & ! Pressure (Pa) @@ -253,7 +262,7 @@ function cld_frac_XuRandall(p_lay, qs_lay, relhum, cld_mr, alpha) relhum, & ! Relative humidity cld_mr, & ! Total cloud mixing ratio alpha ! Scheme parameter (default=100) - + ! Outputs real(kind_phys) :: cld_frac_XuRandall @@ -262,21 +271,21 @@ function cld_frac_XuRandall(p_lay, qs_lay, relhum, cld_mr, alpha) ! Parameters real(kind_phys) :: & - lambda = 0.50, & ! + lambda = 0.50, & ! P = 0.25 - + clwt = 1.0e-6 * (p_lay*0.001) if (cld_mr > clwt) then onemrh = max(1.e-10, 1.0 - relhum) tem1 = alpha / min(max((onemrh*qs_lay)**lambda,0.0001),1.0) tem2 = max(min(tem1*(cld_mr - clwt), 50.0 ), 0.0 ) tem3 = sqrt(sqrt(relhum)) ! This assumes "p" = 0.25. Identical, but cheaper than relhum**p - ! + ! cld_frac_XuRandall = max( tem3*(1.0-exp(-tem2)), 0.0 ) else cld_frac_XuRandall = 0.0 endif - + return end function end module GFS_rrtmgp_thompsonmp_pre diff --git a/physics/GFS_rrtmgp_thompsonmp_pre.meta b/physics/GFS_rrtmgp_thompsonmp_pre.meta index 90ec59760..d2a976f47 100644 --- a/physics/GFS_rrtmgp_thompsonmp_pre.meta +++ b/physics/GFS_rrtmgp_thompsonmp_pre.meta @@ -1,7 +1,7 @@ [ccpp-table-properties] name = GFS_rrtmgp_thompsonmp_pre type = scheme - dependencies = rrtmgp_aux.F90, module_mp_thompson_make_number_concentrations.F90, module_mp_thompson.F90, rrtmgp_lw_cloud_optics.F90 + dependencies = radiation_tools.F90, module_mp_thompson_make_number_concentrations.F90, module_mp_thompson.F90, rrtmgp_lw_cloud_optics.F90 ######################################################################## [ccpp-arg-table] @@ -16,7 +16,7 @@ intent = in optional = F [nLev] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () @@ -32,7 +32,7 @@ intent = in optional = F [ncnd] - standard_name = number_of_cloud_condensate_types + standard_name = number_of_condensate_species long_name = number of cloud condensate types units = count dimensions = () @@ -40,7 +40,7 @@ intent = in optional = F [doSWrad] - standard_name = flag_to_calc_sw + standard_name = flag_for_calling_shortwave_radiation long_name = logical flags for sw radiation calls units = flag dimensions = () @@ -48,55 +48,15 @@ intent = in optional = F [doLWrad] - standard_name = flag_to_calc_lw + standard_name = flag_for_calling_longwave_radiation long_name = logical flags for lw radiation calls units = flag dimensions = () type = logical intent = in optional = F -[effr_in] - standard_name = flag_for_cloud_effective_radii - long_name = flag for cloud effective radii calculations in GFDL microphysics - units = flag - dimensions = () - type = logical - intent = in - optional = F -[uni_cld] - standard_name = flag_for_uni_cld - long_name = flag for uni_cld - units = flag - dimensions = () - type = logical - intent = in - optional = F -[lmfshal] - standard_name = flag_for_lmfshal - long_name = flag for lmfshal - units = flag - dimensions = () - type = logical - intent = in - optional = F -[lmfdeep2] - standard_name = flag_for_scale_aware_mass_flux_convection - long_name = flag for some scale-aware mass-flux convection scheme active - units = flag - dimensions = () - type = logical - intent = in - optional = F -[ltaerosol] - standard_name = flag_for_aerosol_physics - long_name = flag for aerosol physics - units = flag - dimensions = () - type = logical - intent = in - optional = F [i_cldliq] - standard_name = index_for_liquid_cloud_condensate + standard_name = index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array long_name = tracer index for cloud condensate (or liquid water) units = index dimensions = () @@ -104,7 +64,7 @@ intent = in optional = F [i_cldice] - standard_name = index_for_ice_cloud_condensate + standard_name = index_of_cloud_ice_mixing_ratio_in_tracer_concentration_array long_name = tracer index for ice water units = index dimensions = () @@ -112,7 +72,7 @@ intent = in optional = F [i_cldrain] - standard_name = index_for_rain_water + standard_name = index_of_rain_mixing_ratio_in_tracer_concentration_array long_name = tracer index for rain water units = index dimensions = () @@ -120,7 +80,7 @@ intent = in optional = F [i_cldsnow] - standard_name = index_for_snow_water + standard_name = index_of_snow_mixing_ratio_in_tracer_concentration_array long_name = tracer index for snow water units = index dimensions = () @@ -128,7 +88,7 @@ intent = in optional = F [i_cldgrpl] - standard_name = index_for_graupel + standard_name = index_of_graupel_mixing_ratio_in_tracer_concentration_array long_name = tracer index for graupel units = index dimensions = () @@ -136,7 +96,7 @@ intent = in optional = F [i_cldtot] - standard_name = index_for_cloud_amount + standard_name = index_of_cloud_area_fraction_in_atmosphere_layer_in_tracer_concentration_array long_name = tracer index for cloud amount integer units = index dimensions = () @@ -144,7 +104,7 @@ intent = in optional = F [i_cldliq_nc] - standard_name = index_for_liquid_cloud_number_concentration + standard_name = index_of_mass_number_concentration_of_cloud_droplets_in_tracer_concentration_array long_name = tracer index for liquid number concentration units = index dimensions = () @@ -152,7 +112,7 @@ intent = in optional = F [i_cldice_nc] - standard_name = index_for_ice_cloud_number_concentration + standard_name = index_of_mass_number_concentration_of_cloud_ice_in_tracer_concentration_array long_name = tracer index for ice number concentration units = index dimensions = () @@ -160,94 +120,26 @@ intent = in optional = F [i_twa] - standard_name = index_for_water_friendly_aerosols + standard_name = index_of_mass_number_concentration_of_hygroscopic_aerosols_in_tracer_concentration_array long_name = tracer index for water friendly aerosol units = index dimensions = () type = integer intent = in optional = F -[effrin_cldliq] - standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle_in_um - long_name = eff. radius of cloud liquid water particle in micrometer - units = um - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[effrin_cldice] - standard_name = effective_radius_of_stratiform_cloud_ice_particle_in_um - long_name = eff. radius of cloud ice water particle in micrometer - units = um - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[effrin_cldsnow] - standard_name = effective_radius_of_stratiform_cloud_snow_particle_in_um - long_name = effective radius of cloud snow particle in micrometers - units = um - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[cld_frac_mg] - standard_name = cloud_fraction_for_MG - long_name = cloud fraction used by Morrison-Gettelman MP - units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[do_mynnedmf] - standard_name = do_mynnedmf - long_name = flag to activate MYNN-EDMF - units = flag - dimensions = () - type = logical - intent = in - optional = F -[imfdeepcnv] - standard_name = flag_for_mass_flux_deep_convection_scheme - long_name = flag for mass-flux deep convection scheme - units = flag - dimensions = () - type = integer - intent = in - optional = F -[imfdeepcnv_gf] - standard_name = flag_for_gf_deep_convection_scheme - long_name = flag for Grell-Freitas deep convection scheme - units = flag - dimensions = () - type = integer - intent = in - optional = F -[doGP_cldoptics_PADE] - standard_name = flag_to_calc_lw_cld_optics_using_RRTMGP_PADE - long_name = logical flag to control cloud optics scheme. - units = flag - dimensions = () - type = logical - intent = in - optional = F -[doGP_cldoptics_LUT] - standard_name = flag_to_calc_lw_cld_optics_using_RRTMGP_LUT - long_name = logical flag to control cloud optics scheme. +[effr_in] + standard_name = flag_for_cloud_effective_radii + long_name = flag for cloud effective radii calculations in GFDL microphysics units = flag dimensions = () - type = logical + type = logical intent = in - optional = F + optional = F [p_lev] standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure at vertical interface for radiation calculation units = hPa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -256,7 +148,7 @@ standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure at vertical layer for radiation calculation units = hPa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -265,7 +157,7 @@ standard_name = virtual_temperature long_name = layer virtual temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -274,7 +166,43 @@ standard_name = air_temperature_at_layer_for_RRTMGP long_name = air temperature at vertical layer for radiation calculation units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[effrin_cldliq] + standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle + long_name = eff. radius of cloud liquid water particle in micrometer + units = um + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[effrin_cldice] + standard_name = effective_radius_of_stratiform_cloud_ice_particle + long_name = eff. radius of cloud ice water particle in micrometer + units = um + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[effrin_cldsnow] + standard_name = effective_radius_of_stratiform_cloud_snow_particle + long_name = effective radius of cloud snow particle in micrometers + units = um + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[tracer] + standard_name = chemical_tracers + long_name = chemical tracers + units = g g-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = in @@ -283,7 +211,7 @@ standard_name = saturation_vapor_pressure long_name = saturation vapor pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -292,29 +220,20 @@ standard_name = water_vapor_mixing_ratio long_name = water vaport mixing ratio units = kg/kg - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in - optional = F + optional = F [relhum] standard_name = relative_humidity long_name = layer relative humidity units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F -[tracer] - standard_name = chemical_tracers - long_name = chemical tracers - units = g g-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) - type = real - kind = kind_phys - intent = in - optional = F [con_g] standard_name = gravitational_acceleration long_name = gravitational acceleration @@ -325,19 +244,84 @@ intent = in optional = F [con_rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () type = real - kind = kind_phys + kind = kind_phys + intent = in + optional = F +[con_eps] + standard_name = ratio_of_dry_air_to_water_vapor_gas_constants + long_name = rd/rv + units = none + dimensions = () + type = real + kind = kind_phys intent = in optional = F +[lmfshal] + standard_name = flag_for_cloud_area_fraction_option_for_radiation + long_name = flag for lmfshal + units = flag + dimensions = () + type = logical + intent = in + optional = F +[ltaerosol] + standard_name = flag_for_aerosol_physics + long_name = flag for aerosol physics + units = flag + dimensions = () + type = logical + intent = in + optional = F +[do_mynnedmf] + standard_name = flag_for_mellor_yamada_nakanishi_niino_pbl_scheme + long_name = flag to activate MYNN-EDMF + units = flag + dimensions = () + type = logical + intent = in + optional = F +[imfdeepcnv] + standard_name = control_for_deep_convection_scheme + long_name = flag for mass-flux deep convection scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imfdeepcnv_gf] + standard_name = identifier_for_grell_freitas_deep_convection + long_name = flag for Grell-Freitas deep convection scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[doGP_cldoptics_PADE] + standard_name = flag_to_calc_lw_cld_optics_using_RRTMGP_PADE + long_name = logical flag to control cloud optics scheme. + units = flag + dimensions = () + type = logical + intent = in + optional = F +[doGP_cldoptics_LUT] + standard_name = flag_to_calc_lw_cld_optics_using_RRTMGP_LUT + long_name = logical flag to control cloud optics scheme. + units = flag + dimensions = () + type = logical + intent = in + optional = F [cld_frac] standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -346,7 +330,7 @@ standard_name = cloud_liquid_water_path long_name = layer cloud liquid water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -355,7 +339,7 @@ standard_name = mean_effective_radius_for_liquid_cloud long_name = mean effective radius for liquid cloud units = um - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -364,7 +348,7 @@ standard_name = cloud_ice_water_path long_name = layer cloud ice water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -373,7 +357,7 @@ standard_name = mean_effective_radius_for_ice_cloud long_name = mean effective radius for ice cloud units = um - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -382,7 +366,7 @@ standard_name = cloud_snow_water_path long_name = layer cloud snow water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -391,7 +375,7 @@ standard_name = mean_effective_radius_for_snow_flake long_name = mean effective radius for snow cloud units = um - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -400,7 +384,7 @@ standard_name = cloud_rain_water_path long_name = layer cloud rain water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -409,7 +393,7 @@ standard_name = mean_effective_radius_for_rain_drop long_name = mean effective radius for rain cloud units = um - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -418,11 +402,11 @@ standard_name = precipitation_fraction_by_layer long_name = precipitation fraction in each layer units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout - optional = F + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP @@ -439,4 +423,4 @@ dimensions = () type = integer intent = out - optional = F \ No newline at end of file + optional = F diff --git a/physics/GFS_rrtmgp_zhaocarr_pre.F90 b/physics/GFS_rrtmgp_zhaocarr_pre.F90 index 35b404b45..d7eecd090 100644 --- a/physics/GFS_rrtmgp_zhaocarr_pre.F90 +++ b/physics/GFS_rrtmgp_zhaocarr_pre.F90 @@ -4,7 +4,7 @@ ! ######################################################################################## module GFS_rrtmgp_zhaocarr_pre use machine, only: kind_phys - use rrtmgp_aux, only: check_error_msg + use radiation_tools, only: check_error_msg use funcphys, only: fpvs use module_radiation_clouds, only: get_alpha_dcorr @@ -32,9 +32,9 @@ subroutine GFS_rrtmgp_zhaocarr_pre_run(nCol, nLev, nCnd, nTracers, i_cldliq, lss lslwr, effr_in, uni_cld, lmfshal, lat, lsmask, p_lev, p_lay, t_lay, relhum, & tv_lay, effrin_cldliq, effrin_cldice, effrin_cldrain, effrin_cldsnow, & shoc_sgs_cldfrac, cncvw, tracer, & - con_eps, con_epsq, con_epsqs, con_epsm1, con_g, con_ttp, con_rd, con_pi, & + con_ttp, con_epsq, con_epsqs, con_eps, con_epsm1, con_g, con_rd, con_pi, & cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, & - cld_rerain, de_lgth, deltaZ, cloud_overlap_param, errmsg, errflg) + cld_rerain, deltaZ, de_lgth, cloud_overlap_param, errmsg, errflg) implicit none ! Inputs @@ -59,10 +59,10 @@ subroutine GFS_rrtmgp_zhaocarr_pre_run(nCol, nLev, nCnd, nTracers, i_cldliq, lss con_ttp, & ! Triple point temperature of water (K) con_rd, & ! Ideal gas constant for dry air (J/kg/K) con_pi ! Pi - real(kind_phys), dimension(nCol), intent(in) :: & + real(kind_phys), dimension(:), intent(in) :: & lsmask, & ! Land/Sea mask lat ! Latitude - real(kind_phys), dimension(nCol,nLev), intent(in) :: & + real(kind_phys), dimension(:, :), intent(in) :: & tv_lay, & ! Virtual temperature (K) p_lay, & ! Pressure at model-layers (Pa) t_lay, & ! Temperature at model-layers (K) @@ -73,15 +73,15 @@ subroutine GFS_rrtmgp_zhaocarr_pre_run(nCol, nLev, nCnd, nTracers, i_cldliq, lss effrin_cldsnow, & ! Effective radius for snow cloud-particles (microns) shoc_sgs_cldfrac, & ! Subgrid-scale cloud fraction from the SHOC scheme cncvw ! Convective cloud water mixing ratio (kg/kg) - real(kind_phys), dimension(nCol,nLev+1), intent(in) :: & + real(kind_phys), dimension(:, :), intent(in) :: & p_lev ! Pressure at model-level interfaces (Pa) - real(kind_phys), dimension(nCol, nLev, nTracers),intent(in) :: & + real(kind_phys), dimension(:, :, :),intent(in) :: & tracer ! Cloud condensate amount in layer by type () ! Outputs - real(kind_phys), dimension(nCol),intent(out) :: & + real(kind_phys), dimension(:),intent(out) :: & de_lgth ! Decorrelation length - real(kind_phys), dimension(nCol,nLev),intent(out) :: & + real(kind_phys), dimension(:, :),intent(out) :: & cld_frac, & ! Total cloud fraction cld_lwp, & ! Cloud liquid water path cld_reliq, & ! Cloud liquid effective radius diff --git a/physics/GFS_rrtmgp_zhaocarr_pre.meta b/physics/GFS_rrtmgp_zhaocarr_pre.meta index 0cc454d2e..361431d34 100644 --- a/physics/GFS_rrtmgp_zhaocarr_pre.meta +++ b/physics/GFS_rrtmgp_zhaocarr_pre.meta @@ -1,7 +1,7 @@ [ccpp-table-properties] name = GFS_rrtmgp_zhaocarr_pre type = scheme - dependencies = rrtmgp_aux.F90 + dependencies = radiation_tools.F90 ######################################################################## [ccpp-arg-table] @@ -16,13 +16,21 @@ intent = in optional = F [nLev] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () type = integer intent = in optional = F +[ncnd] + standard_name = number_of_condensate_species + long_name = number of cloud condensate types + units = count + dimensions = () + type = integer + intent = in + optional = F [nTracers] standard_name = number_of_tracers long_name = number of tracers @@ -31,16 +39,16 @@ type = integer intent = in optional = F -[ncnd] - standard_name = number_of_cloud_condensate_types - long_name = number of cloud condensate types - units = count +[i_cldliq] + standard_name = index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for cloud condensate (or liquid water) + units = index dimensions = () - type = integer + type = integer intent = in - optional = F + optional = F [lsswr] - standard_name = flag_to_calc_sw + standard_name = flag_for_calling_shortwave_radiation long_name = logical flags for sw radiation calls units = flag dimensions = () @@ -48,7 +56,7 @@ intent = in optional = F [lslwr] - standard_name = flag_to_calc_lw + standard_name = flag_for_calling_longwave_radiation long_name = logical flags for lw radiation calls units = flag dimensions = () @@ -64,7 +72,7 @@ intent = in optional = F [uni_cld] - standard_name = flag_for_uni_cld + standard_name = flag_for_shoc_cloud_area_fraction_for_radiation long_name = flag for uni_cld units = flag dimensions = () @@ -72,21 +80,13 @@ intent = in optional = F [lmfshal] - standard_name = flag_for_lmfshal + standard_name = flag_for_cloud_area_fraction_option_for_radiation long_name = flag for lmfshal units = flag dimensions = () type = logical intent = in optional = F -[i_cldliq] - standard_name = index_for_liquid_cloud_condensate - long_name = tracer index for cloud condensate (or liquid water) - units = index - dimensions = () - type = integer - intent = in - optional = F [lat] standard_name = latitude long_name = latitude @@ -95,11 +95,20 @@ type = real intent = in kind = kind_phys +[lsmask] + standard_name = area_type + long_name = landmask: sea/land/ice=0/1/2 + units = flag + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F [p_lev] standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure at vertical interface for radiation calculation units = hPa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -108,70 +117,70 @@ standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure at vertical layer for radiation calculation units = hPa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F -[tv_lay] - standard_name = virtual_temperature - long_name = layer virtual temperature +[t_lay] + standard_name = air_temperature_at_layer_for_RRTMGP + long_name = air temperature at vertical layer for radiation calculation units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in - optional = F + optional = F [relhum] standard_name = relative_humidity long_name = layer relative humidity units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F -[t_lay] - standard_name = air_temperature_at_layer_for_RRTMGP - long_name = air temperature at vertical layer for radiation calculation +[tv_lay] + standard_name = virtual_temperature + long_name = layer virtual temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in - optional = F + optional = F [effrin_cldliq] - standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle_in_um + standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle long_name = eff. radius of cloud liquid water particle in micrometer units = um - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [effrin_cldice] - standard_name = effective_radius_of_stratiform_cloud_ice_particle_in_um + standard_name = effective_radius_of_stratiform_cloud_ice_particle long_name = eff. radius of cloud ice water particle in micrometer units = um - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [effrin_cldrain] - standard_name = effective_radius_of_stratiform_cloud_rain_particle_in_um + standard_name = effective_radius_of_stratiform_cloud_rain_particle long_name = effective radius of cloud rain particle in micrometers units = um - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [effrin_cldsnow] - standard_name = effective_radius_of_stratiform_cloud_snow_particle_in_um + standard_name = effective_radius_of_stratiform_cloud_snow_particle long_name = effective radius of cloud snow particle in micrometers units = um - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -180,16 +189,16 @@ standard_name = subgrid_scale_cloud_fraction_from_shoc long_name = subgrid-scale cloud fraction from the SHOC scheme units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [cncvw] - standard_name = convective_cloud_water_mixing_ratio_in_phy_f3d + standard_name = convective_cloud_condensate_mixing_ratio long_name = convective cloud water mixing ratio in the phy_f3d array units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -198,20 +207,11 @@ standard_name = chemical_tracers long_name = chemical tracers units = g g-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = in optional = F -[lsmask] - standard_name = sea_land_ice_mask_real - long_name = landmask: sea/land/ice=0/1/2 - units = flag - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F [con_ttp] standard_name = triple_point_temperature_of_water long_name = triple point temperature of water @@ -267,7 +267,7 @@ intent = in optional = F [con_rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -288,7 +288,7 @@ standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -297,7 +297,7 @@ standard_name = cloud_liquid_water_path long_name = layer cloud liquid water path units = g m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -306,7 +306,7 @@ standard_name = mean_effective_radius_for_liquid_cloud long_name = mean effective radius for liquid cloud units = um - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -315,7 +315,7 @@ standard_name = cloud_ice_water_path long_name = layer cloud ice water path units = g m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -324,7 +324,7 @@ standard_name = mean_effective_radius_for_ice_cloud long_name = mean effective radius for ice cloud units = um - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -333,7 +333,7 @@ standard_name = cloud_snow_water_path long_name = layer cloud snow water path units = g m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -342,7 +342,7 @@ standard_name = mean_effective_radius_for_snow_flake long_name = mean effective radius for snow cloud units = um - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -351,7 +351,7 @@ standard_name = cloud_rain_water_path long_name = layer cloud rain water path units = g m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -360,25 +360,16 @@ standard_name = mean_effective_radius_for_rain_drop long_name = mean effective radius for rain cloud units = um - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F -[cloud_overlap_param] - standard_name = cloud_overlap_param - long_name = cloud overlap parameter - units = km - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = out - optional = F [deltaZ] standard_name = layer_thickness long_name = layer_thickness units = m - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -392,6 +383,15 @@ kind = kind_phys intent = out optional = F +[cloud_overlap_param] + standard_name = cloud_overlap_param + long_name = cloud overlap parameter + units = km + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = out + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/GFS_stochastics.F90 b/physics/GFS_stochastics.F90 index 9b4533cf9..0f1124955 100644 --- a/physics/GFS_stochastics.F90 +++ b/physics/GFS_stochastics.F90 @@ -1,6 +1,8 @@ !> \file GFS_stochastics.f90 !! This file contains code previously in GFS_stochastics_driver. +!>\defgroup gfs_stoch GFS Stochastics Physics Module +!! This module module GFS_stochastics contains @@ -12,9 +14,6 @@ subroutine GFS_stochastics_finalize() end subroutine GFS_stochastics_finalize -!>\defgroup gfs_stoch GFS Stochastics Physics Module -!! This module -!> @{ !> \section arg_table_GFS_stochastics_run Argument Table !! \htmlinclude GFS_stochastics_run.html !! @@ -26,15 +25,18 @@ end subroutine GFS_stochastics_finalize !! -# defines random seed indices for radiation (in a reproducible way) !! -# interpolates coefficients for prognostic ozone calculation !! -# performs surface data cycling via the GFS gcycle routine - subroutine GFS_stochastics_run (im, km, kdt, do_sppt, use_zmtnblck, do_shum, & - do_skeb, do_ca,ca_global,ca1,si,vfact_ca, & + subroutine GFS_stochastics_run (im, km, kdt, delt, do_sppt, pert_mp, use_zmtnblck, & + do_shum ,do_skeb, do_ca,ca_global,ca1,si,vfact_ca, & zmtnblck, sppt_wts, skebu_wts, skebv_wts, shum_wts,& sppt_wts_inv, skebu_wts_inv, skebv_wts_inv, & - shum_wts_inv, diss_est, & - ugrs, vgrs, tgrs, qgrs, gu0, gv0, gt0, gq0, dtdtr, & + shum_wts_inv, diss_est, ugrs, vgrs, tgrs, qgrs_wv, & + qgrs_cw, qgrs_rw, qgrs_sw, qgrs_iw, qgrs_gl, & + gu0, gv0, gt0, gq0_wv, dtdtnp, & + gq0_cw, gq0_rw, gq0_sw, gq0_iw, gq0_gl, & rain, rainc, tprcp, totprcp, cnvprcp, & totprcpb, cnvprcpb, cplflx, & rain_cpl, snow_cpl, drain_cpl, dsnow_cpl, & + ntcw,ntrw,ntsw,ntiw,ntgl, & errmsg, errflg) use machine, only: kind_phys @@ -44,13 +46,15 @@ subroutine GFS_stochastics_run (im, km, kdt, do_sppt, use_zmtnblck, do_shum, integer, intent(in) :: im integer, intent(in) :: km integer, intent(in) :: kdt + real(kind_phys), intent(in) :: delt logical, intent(in) :: do_sppt + logical, intent(in) :: pert_mp logical, intent(in) :: do_ca logical, intent(in) :: ca_global logical, intent(in) :: use_zmtnblck logical, intent(in) :: do_shum logical, intent(in) :: do_skeb - real(kind_phys), dimension(1:im), intent(in) :: zmtnblck + real(kind_phys), dimension(:), intent(in) :: zmtnblck ! sppt_wts only allocated if do_sppt == .true. real(kind_phys), dimension(:,:), intent(inout) :: sppt_wts ! skebu_wts, skebv_wts only allocated if do_skeb == .true. @@ -59,28 +63,42 @@ subroutine GFS_stochastics_run (im, km, kdt, do_sppt, use_zmtnblck, do_shum, ! shum_wts only allocated if do_shum == .true. real(kind_phys), dimension(:,:), intent(in) :: shum_wts ! inverse/flipped weights are always allocated - real(kind_phys), dimension(1:im,1:km), intent(inout) :: sppt_wts_inv - real(kind_phys), dimension(1:im,1:km), intent(inout) :: skebu_wts_inv - real(kind_phys), dimension(1:im,1:km), intent(inout) :: skebv_wts_inv - real(kind_phys), dimension(1:im,1:km), intent(inout) :: shum_wts_inv - real(kind_phys), dimension(1:im,1:km), intent(in) :: diss_est - real(kind_phys), dimension(1:im,1:km), intent(in) :: ugrs - real(kind_phys), dimension(1:im,1:km), intent(in) :: vgrs - real(kind_phys), dimension(1:im,1:km), intent(in) :: tgrs - real(kind_phys), dimension(1:im,1:km), intent(in) :: qgrs - real(kind_phys), dimension(1:im,1:km), intent(inout) :: gu0 - real(kind_phys), dimension(1:im,1:km), intent(inout) :: gv0 - real(kind_phys), dimension(1:im,1:km), intent(inout) :: gt0 - real(kind_phys), dimension(1:im,1:km), intent(inout) :: gq0 - ! dtdtr only allocated if do_sppt == .true. - real(kind_phys), dimension(:,:), intent(in) :: dtdtr - real(kind_phys), dimension(1:im), intent(in) :: rain - real(kind_phys), dimension(1:im), intent(in) :: rainc - real(kind_phys), dimension(1:im), intent(inout) :: tprcp - real(kind_phys), dimension(1:im), intent(inout) :: totprcp - real(kind_phys), dimension(1:im), intent(inout) :: cnvprcp - real(kind_phys), dimension(1:im), intent(inout) :: totprcpb - real(kind_phys), dimension(1:im), intent(inout) :: cnvprcpb + real(kind_phys), dimension(:,:), intent(inout) :: sppt_wts_inv + real(kind_phys), dimension(:,:), intent(inout) :: skebu_wts_inv + real(kind_phys), dimension(:,:), intent(inout) :: skebv_wts_inv + real(kind_phys), dimension(:,:), intent(inout) :: shum_wts_inv + real(kind_phys), dimension(:,:), intent(in) :: diss_est + real(kind_phys), dimension(:,:), intent(in) :: ugrs + real(kind_phys), dimension(:,:), intent(in) :: vgrs + real(kind_phys), dimension(:,:), intent(in) :: tgrs + real(kind_phys), dimension(:,:), intent(in) :: qgrs_wv + real(kind_phys), dimension(:,:), intent(in) :: qgrs_cw + real(kind_phys), dimension(:,:), intent(in) :: qgrs_rw + real(kind_phys), dimension(:,:), intent(in) :: qgrs_sw + real(kind_phys), dimension(:,:), intent(in) :: qgrs_iw + real(kind_phys), dimension(:,:), intent(in) :: qgrs_gl + real(kind_phys), dimension(:,:), intent(inout) :: gu0 + real(kind_phys), dimension(:,:), intent(inout) :: gv0 + real(kind_phys), dimension(:,:), intent(inout) :: gt0 + real(kind_phys), dimension(:,:), intent(inout) :: gq0_wv + real(kind_phys), dimension(:,:), intent(inout) :: gq0_cw + real(kind_phys), dimension(:,:), intent(inout) :: gq0_rw + real(kind_phys), dimension(:,:), intent(inout) :: gq0_sw + real(kind_phys), dimension(:,:), intent(inout) :: gq0_iw + real(kind_phys), dimension(:,:), intent(inout) :: gq0_gl + integer, intent(in) :: ntcw + integer, intent(in) :: ntrw + integer, intent(in) :: ntsw + integer, intent(in) :: ntiw + integer, intent(in) :: ntgl + real(kind_phys), dimension(:,:), intent(inout) :: dtdtnp + real(kind_phys), dimension(:), intent(in) :: rain + real(kind_phys), dimension(:), intent(in) :: rainc + real(kind_phys), dimension(:), intent(inout) :: tprcp + real(kind_phys), dimension(:), intent(inout) :: totprcp + real(kind_phys), dimension(:), intent(inout) :: cnvprcp + real(kind_phys), dimension(:), intent(inout) :: totprcpb + real(kind_phys), dimension(:), intent(inout) :: cnvprcpb logical, intent(in) :: cplflx ! rain_cpl, snow_cpl only allocated if cplflx == .true. or cplchm == .true. real(kind_phys), dimension(:), intent(inout) :: rain_cpl @@ -88,9 +106,9 @@ subroutine GFS_stochastics_run (im, km, kdt, do_sppt, use_zmtnblck, do_shum, ! drain_cpl, dsnow_cpl only allocated if cplflx == .true. or cplchm == .true. real(kind_phys), dimension(:), intent(in) :: drain_cpl real(kind_phys), dimension(:), intent(in) :: dsnow_cpl - real(kind_phys), dimension(1:km), intent(in) :: si - real(kind_phys), dimension(1:km), intent(inout) :: vfact_ca - real(kind_phys), dimension(1:im), intent(in) :: ca1 + real(kind_phys), dimension(:), intent(in) :: si + real(kind_phys), dimension(:), intent(inout) :: vfact_ca + real(kind_phys), dimension(:), intent(in) :: ca1 character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -130,17 +148,59 @@ subroutine GFS_stochastics_run (im, km, kdt, do_sppt, use_zmtnblck, do_shum, upert = (gu0(i,k) - ugrs(i,k)) * sppt_wts(i,k) vpert = (gv0(i,k) - vgrs(i,k)) * sppt_wts(i,k) - tpert = (gt0(i,k) - tgrs(i,k) - dtdtr(i,k)) * sppt_wts(i,k) - qpert = (gq0(i,k) - qgrs(i,k)) * sppt_wts(i,k) + tpert = (gt0(i,k) - tgrs(i,k) - (delt*dtdtnp(i,k))) * sppt_wts(i,k) + qpert = (gq0_wv(i,k) - qgrs_wv(i,k)) * sppt_wts(i,k) gu0(i,k) = ugrs(i,k)+upert gv0(i,k) = vgrs(i,k)+vpert !negative humidity check - qnew = qgrs(i,k)+qpert + qnew = qgrs_wv(i,k)+qpert if (qnew >= 1.0e-10) then - gq0(i,k) = qnew - gt0(i,k) = tgrs(i,k) + tpert + dtdtr(i,k) + gq0_wv(i,k) = qnew + gt0(i,k) = tgrs(i,k) + tpert + (delt*dtdtnp(i,k)) + endif + if (pert_mp) then + if (ntcw>0) then + qpert = (gq0_cw(i,k) - qgrs_cw(i,k)) * sppt_wts(i,k) + qnew = qgrs_cw(i,k)+qpert + gq0_cw(i,k) = qnew + if (qnew < 0.0) then + gq0_cw(i,k) = 0.0 + endif + endif + if (ntrw>0) then + qpert = (gq0_rw(i,k) - qgrs_rw(i,k)) * sppt_wts(i,k) + qnew = qgrs_rw(i,k)+qpert + gq0_rw(i,k) = qnew + if (qnew < 0.0) then + gq0_rw(i,k) = 0.0 + endif + endif + if (ntsw>0) then + qpert = (gq0_sw(i,k) - qgrs_sw(i,k)) * sppt_wts(i,k) + qnew = qgrs_sw(i,k)+qpert + gq0_sw(i,k) = qnew + if (qnew < 0.0) then + gq0_sw(i,k) = 0.0 + endif + endif + if (ntiw>0) then + qpert = (gq0_iw(i,k) - qgrs_iw(i,k)) * sppt_wts(i,k) + qnew = qgrs_iw(i,k)+qpert + gq0_iw(i,k) = qnew + if (qnew < 0.0) then + gq0_iw(i,k) = 0.0 + endif + endif + if (ntgl>0) then + qpert = (gq0_gl(i,k) - qgrs_gl(i,k)) * sppt_wts(i,k) + qnew = qgrs_gl(i,k)+qpert + gq0_gl(i,k) = qnew + if (qnew < 0.0) then + gq0_gl(i,k) = 0.0 + endif + endif endif enddo enddo @@ -154,10 +214,12 @@ subroutine GFS_stochastics_run (im, km, kdt, do_sppt, use_zmtnblck, do_shum, totprcpb(:) = totprcpb(:) + (sppt_wts(:,15) - 1 )*rain(:) cnvprcpb(:) = cnvprcpb(:) + (sppt_wts(:,15) - 1 )*rainc(:) - if (cplflx) then + if (cplflx) then rain_cpl(:) = rain_cpl(:) + (sppt_wts(:,15) - 1.0)*drain_cpl(:) snow_cpl(:) = snow_cpl(:) + (sppt_wts(:,15) - 1.0)*dsnow_cpl(:) - endif + endif + !zero out radiative heating tendency for next physics step + dtdtnp(:,:)=0.0 endif @@ -201,15 +263,57 @@ subroutine GFS_stochastics_run (im, km, kdt, do_sppt, use_zmtnblck, do_shum, upert = (gu0(i,k) - ugrs(i,k)) * ca(i,k) vpert = (gv0(i,k) - vgrs(i,k)) * ca(i,k) - tpert = (gt0(i,k) - tgrs(i,k) - dtdtr(i,k)) * ca(i,k) - qpert = (gq0(i,k) - qgrs(i,k)) * ca(i,k) + tpert = (gt0(i,k) - tgrs(i,k) - (delt*dtdtnp(i,k))) * ca(i,k) + qpert = (gq0_wv(i,k) - qgrs_wv(i,k)) * ca(i,k) gu0(i,k) = ugrs(i,k)+upert gv0(i,k) = vgrs(i,k)+vpert !negative humidity check - qnew = qgrs(i,k)+qpert + qnew = qgrs_wv(i,k)+qpert if (qnew >= 1.0e-10) then - gq0(i,k) = qnew - gt0(i,k) = tgrs(i,k) + tpert + dtdtr(i,k) + gq0_wv(i,k) = qnew + gt0(i,k) = tgrs(i,k) + tpert + (delt*dtdtnp(i,k)) + endif + if (pert_mp) then + if (ntcw>0) then + qpert = (gq0_cw(i,k) - qgrs_cw(i,k)) * ca(i,k) + qnew = qgrs_cw(i,k)+qpert + gq0_cw(i,k) = qnew + if (qnew < 0.0) then + gq0_cw(i,k) = 0.0 + endif + endif + if (ntrw>0) then + qpert = (gq0_rw(i,k) - qgrs_rw(i,k)) * ca(i,k) + qnew = qgrs_rw(i,k)+qpert + gq0_rw(i,k) = qnew + if (qnew < 0.0) then + gq0_rw(i,k) = 0.0 + endif + endif + if (ntsw>0) then + qpert = (gq0_sw(i,k) - qgrs_sw(i,k)) * ca(i,k) + qnew = qgrs_sw(i,k)+qpert + gq0_sw(i,k) = qnew + if (qnew < 0.0) then + gq0_sw(i,k) = 0.0 + endif + endif + if (ntiw>0) then + qpert = (gq0_iw(i,k) - qgrs_iw(i,k)) * ca(i,k) + qnew = qgrs_iw(i,k)+qpert + gq0_iw(i,k) = qnew + if (qnew < 0.0) then + gq0_iw(i,k) = 0.0 + endif + endif + if (ntgl>0) then + qpert = (gq0_gl(i,k) - qgrs_gl(i,k)) * ca(i,k) + qnew = qgrs_gl(i,k)+qpert + gq0_gl(i,k) = qnew + if (qnew < 0.0) then + gq0_gl(i,k) = 0.0 + endif + endif endif enddo enddo @@ -227,13 +331,15 @@ subroutine GFS_stochastics_run (im, km, kdt, do_sppt, use_zmtnblck, do_shum, rain_cpl(:) = rain_cpl(:) + (ca(:,15) - 1.0)*drain_cpl(:) snow_cpl(:) = snow_cpl(:) + (ca(:,15) - 1.0)*dsnow_cpl(:) endif + !zero out radiative heating tendency for next physics step + dtdtnp(:,:)=0.0 endif if (do_shum) then do k=1,km - gq0(:,k) = gq0(:,k)*(1.0 + shum_wts(:,k)) + gq0_wv(:,k) = gq0_wv(:,k)*(1.0 + shum_wts(:,k)) shum_wts_inv(:,k) = shum_wts(:,k) end do endif @@ -250,4 +356,3 @@ subroutine GFS_stochastics_run (im, km, kdt, do_sppt, use_zmtnblck, do_shum, end subroutine GFS_stochastics_run end module GFS_stochastics -!> @} diff --git a/physics/GFS_stochastics.meta b/physics/GFS_stochastics.meta index 43c7b2d42..dd7bda9c4 100644 --- a/physics/GFS_stochastics.meta +++ b/physics/GFS_stochastics.meta @@ -16,7 +16,7 @@ intent = in optional = F [km] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () @@ -24,13 +24,22 @@ intent = in optional = F [kdt] - standard_name = index_of_time_step + standard_name = index_of_timestep long_name = current forecast iteration units = index dimensions = () type = integer intent = in optional = F +[delt] + standard_name = timestep_for_physics + long_name = physics timestep + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F [do_sppt] standard_name = flag_for_stochastic_physics_perturbations long_name = flag for stochastic physics perturbations @@ -39,8 +48,16 @@ type = logical intent = in optional = F +[pert_mp] + standard_name = flag_for_stochastic_microphysics_perturbations + long_name = flag for stochastic microphysics physics perturbations + units = flag + dimensions = () + type = logical + intent = in + optional = F [use_zmtnblck] - standard_name = flag_for_mountain_blocking + standard_name = flag_for_mountain_blocking_for_sppt long_name = flag for mountain blocking units = flag dimensions = () @@ -80,7 +97,7 @@ intent = in optional = F [ca1] - standard_name = cellular_automata_global_pattern + standard_name = cellular_automata_global_pattern_from_coupled_process long_name = cellular automata global pattern units = flag dimensions = (horizontal_loop_extent) @@ -89,19 +106,19 @@ intent = in optional = F [si] - standard_name = vertical_sigma_coordinate_for_radiation_initialization + standard_name = sigma_pressure_hybrid_vertical_coordinate long_name = vertical sigma coordinate for radiation initialization units = none - dimensions = (number_of_vertical_layers_for_radiation_calculations_plus_one) + dimensions = (vertical_interface_dimension_for_radiation) type = real kind = kind_phys intent = in optional = F [vfact_ca] - standard_name = vertical_weight_for_ca + standard_name = cellular_automata_vertical_weight long_name = vertical weight for ca units = frac - dimensions = (vertical_dimension) + dimensions = (vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -116,37 +133,37 @@ intent = in optional = F [sppt_wts] - standard_name = weights_for_stochastic_sppt_perturbation + standard_name = sppt_weights_from_coupled_process long_name = weights for stochastic sppt perturbation units = none - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [skebu_wts] - standard_name = weights_for_stochastic_skeb_perturbation_of_x_wind + standard_name = skeb_x_wind_weights_from_coupled_process long_name = weights for stochastic skeb perturbation of x wind units = none - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [skebv_wts] - standard_name = weights_for_stochastic_skeb_perturbation_of_y_wind + standard_name = skeb_y_wind_weights_from_coupled_process long_name = weights for stochastic skeb perturbation of y wind units = none - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [shum_wts] - standard_name = weights_for_stochastic_shum_perturbation + standard_name = shum_weights_from_coupled_process long_name = weights for stochastic shum perturbation units = none - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -155,7 +172,7 @@ standard_name = weights_for_stochastic_sppt_perturbation_flipped long_name = weights for stochastic sppt perturbation, flipped units = none - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -164,7 +181,7 @@ standard_name = weights_for_stochastic_skeb_perturbation_of_x_wind_flipped long_name = weights for stochastic skeb perturbation of x wind, flipped units = none - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -173,7 +190,7 @@ standard_name = weights_for_stochastic_skeb_perturbation_of_y_wind_flipped long_name = weights for stochastic skeb perturbation of y wind, flipped units = none - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -182,7 +199,7 @@ standard_name = weights_for_stochastic_shum_perturbation_flipped long_name = weights for stochastic shum perturbation, flipped units = none - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -191,7 +208,7 @@ standard_name = dissipation_estimate_of_air_temperature_at_model_layers long_name = dissipation estimate model layer mean temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -200,7 +217,7 @@ standard_name = x_wind long_name = zonal wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -209,7 +226,7 @@ standard_name = y_wind long_name = meridional wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -218,64 +235,154 @@ standard_name = air_temperature long_name = model layer mean temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F -[qgrs] - standard_name = water_vapor_specific_humidity +[qgrs_wv] + standard_name = specific_humidity long_name = water vapor specific humidity units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[qgrs_cw] + standard_name = cloud_liquid_water_mixing_ratio + long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[qgrs_rw] + standard_name = rain_mixing_ratio + long_name = moist mixing ratio of rain + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[qgrs_sw] + standard_name = snow_mixing_ratio + long_name = moist mixing ratio of snow + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[qgrs_iw] + standard_name = cloud_ice_mixing_ratio + long_name = moist mixing ratio of cloud ice + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[qgrs_gl] + standard_name = graupel_mixing_ratio + long_name = moist ratio of mass of graupel to mass of dry air plus vapor (without condensates) + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [gu0] - standard_name = x_wind_updated_by_physics + standard_name = x_wind_of_new_state long_name = zonal wind updated by physics units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [gv0] - standard_name = y_wind_updated_by_physics + standard_name = y_wind_of_new_state long_name = meridional wind updated by physics units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [gt0] - standard_name = air_temperature_updated_by_physics + standard_name = air_temperature_of_new_state long_name = temperature updated by physics units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F -[gq0] - standard_name = water_vapor_specific_humidity_updated_by_physics +[gq0_wv] + standard_name = specific_humidity_of_new_state long_name = water vapor specific humidity updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F -[dtdtr] - standard_name = tendency_of_air_temperature_due_to_radiative_heating_on_physics_time_step - long_name = temp. change due to radiative heating per time step - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) +[dtdtnp] + standard_name = tendency_of_air_temperature_to_withold_from_sppt + long_name = temp. change from physics that should not be perturbed by sppt + units = K s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys - intent = in + intent = inout + optional = F +[gq0_cw] + standard_name = cloud_liquid_water_mixing_ratio_of_new_state + long_name = cloud condensed water mixing ratio updated by physics + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[gq0_rw] + standard_name = rain_mixing_ratio_of_new_state + long_name = moist mixing ratio of rain updated by physics + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[gq0_sw] + standard_name = snow_mixing_ratio_of_new_state + long_name = moist mixing ratio of snow updated by physics + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[gq0_iw] + standard_name = cloud_ice_mixing_ratio_of_new_state + long_name = moist mixing ratio of cloud ice updated by physics + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[gq0_gl] + standard_name = graupel_mixing_ratio_of_new_state + long_name = moist ratio of mass of graupel to mass of dry air plus vapor (without condensates) updated by physics + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout optional = F [rain] standard_name = lwe_thickness_of_precipitation_amount_on_dynamics_timestep @@ -341,7 +448,7 @@ intent = inout optional = F [cplflx] - standard_name = flag_for_flux_coupling + standard_name = flag_for_surface_flux_coupling long_name = flag controlling cplflx collection (default off) units = flag dimensions = () @@ -349,7 +456,7 @@ intent = in optional = F [rain_cpl] - standard_name = lwe_thickness_of_precipitation_amount_for_coupling + standard_name = cumulative_lwe_thickness_of_precipitation_amount_for_coupling long_name = total rain precipitation units = m dimensions = (horizontal_loop_extent) @@ -358,7 +465,7 @@ intent = inout optional = F [snow_cpl] - standard_name = lwe_thickness_of_snow_amount_for_coupling + standard_name = cumulative_lwe_thickness_of_snow_amount_for_coupling long_name = total snow precipitation units = m dimensions = (horizontal_loop_extent) @@ -367,7 +474,7 @@ intent = inout optional = F [drain_cpl] - standard_name = tendency_of_lwe_thickness_of_precipitation_amount_for_coupling + standard_name = tendency_of_lwe_thickness_of_rain_amount_on_dynamics_timestep_for_coupling long_name = change in rain_cpl (coupling_type) units = m dimensions = (horizontal_loop_extent) @@ -376,7 +483,7 @@ intent = in optional = F [dsnow_cpl] - standard_name = tendency_of_lwe_thickness_of_snow_amount_for_coupling + standard_name = tendency_of_lwe_thickness_of_snowfall_amount_on_dynamics_timestep_for_coupling long_name = change in show_cpl (coupling_type) units = m dimensions = (horizontal_loop_extent) @@ -384,6 +491,46 @@ kind = kind_phys intent = in optional = F +[ntcw] + standard_name = index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for cloud condensate (or liquid water) + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntrw] + standard_name = index_of_rain_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for rain water + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntsw] + standard_name = index_of_snow_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for snow water + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntiw] + standard_name = index_of_cloud_ice_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for ice water + units = index + dimensions = () + intent = in + optional = F + type = integer +[ntgl] + standard_name = index_of_graupel_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for graupel + units = index + dimensions = () + type = integer + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/GFS_suite_interstitial.F90 b/physics/GFS_suite_interstitial.F90 index c465f74e7..6bc702216 100644 --- a/physics/GFS_suite_interstitial.F90 +++ b/physics/GFS_suite_interstitial.F90 @@ -59,9 +59,9 @@ subroutine GFS_suite_interstitial_phys_reset_run (Interstitial, Model, errmsg, e ! interface variables type(GFS_interstitial_type), intent(inout) :: Interstitial - type(GFS_control_type), intent(in) :: Model - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg + type(GFS_control_type), intent(in ) :: Model + character(len=*), intent( out) :: errmsg + integer, intent( out) :: errflg errmsg = '' errflg = 0 @@ -87,26 +87,27 @@ end subroutine GFS_suite_interstitial_1_finalize !! \htmlinclude GFS_suite_interstitial_1_run.html !! subroutine GFS_suite_interstitial_1_run (im, levs, ntrac, dtf, dtp, slmsk, area, dxmin, dxinv, pgr, & - islmsk, work1, work2, psurf, dudt, dvdt, dtdt, dtdtc, dqdt, errmsg, errflg) + islmsk, work1, work2, psurf, dudt, dvdt, dtdt, dqdt, errmsg, errflg) use machine, only: kind_phys implicit none ! interface variables - integer, intent(in) :: im, levs, ntrac - real(kind=kind_phys), intent(in) :: dtf, dtp, dxmin, dxinv - real(kind=kind_phys), intent(in), dimension(im) :: slmsk, area, pgr - - integer, intent(out), dimension(im) :: islmsk - real(kind=kind_phys), intent(out), dimension(im) :: work1, work2, psurf - real(kind=kind_phys), intent(out), dimension(im,levs) :: dudt, dvdt, dtdt, dtdtc - real(kind=kind_phys), intent(out), dimension(im,levs,ntrac) :: dqdt - real(kind=kind_phys), parameter :: zero = 0.0_kind_phys, one = 1.0_kind_phys - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg + integer, intent(in ) :: im, levs, ntrac + real(kind=kind_phys), intent(in ) :: dtf, dtp, dxmin, dxinv + real(kind=kind_phys), intent(in ), dimension(:) :: slmsk, area, pgr + + integer, intent(out), dimension(:) :: islmsk + real(kind=kind_phys), intent(out), dimension(:) :: work1, work2, psurf + real(kind=kind_phys), intent(out), dimension(:,:) :: dudt, dvdt, dtdt + real(kind=kind_phys), intent(out), dimension(:,:,:) :: dqdt + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg ! local variables + real(kind=kind_phys), parameter :: zero = 0.0_kind_phys, one = 1.0_kind_phys integer :: i, k, n ! Initialize CCPP error handling variables @@ -127,7 +128,6 @@ subroutine GFS_suite_interstitial_1_run (im, levs, ntrac, dtf, dtp, slmsk, area, dudt(i,k) = zero dvdt(i,k) = zero dtdt(i,k) = zero - dtdtc(i,k) = zero enddo enddo do n=1,ntrac @@ -156,50 +156,55 @@ end subroutine GFS_suite_interstitial_2_init subroutine GFS_suite_interstitial_2_finalize() end subroutine GFS_suite_interstitial_2_finalize -#if 0 + !> \section arg_table_GFS_suite_interstitial_2_run Argument Table !! \htmlinclude GFS_suite_interstitial_2_run.html !! -#endif - subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, cplflx, flag_cice, shal_cnv, old_monin, mstrat, & + subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, flag_cice, shal_cnv, old_monin, mstrat, & do_shoc, frac_grid, imfshalcnv, dtf, xcosz, adjsfcdsw, adjsfcdlw, cice, pgr, ulwsfc_cice, lwhd, htrsw, htrlw, xmu, ctei_rm, & work1, work2, prsi, tgrs, prsl, qgrs_water_vapor, qgrs_cloud_water, cp, hvap, prslk, suntim, adjsfculw, adjsfculw_lnd, & - adjsfculw_ice, adjsfculw_wat, dlwsfc, ulwsfc, psmean, dt3dt_lw, dt3dt_sw, dt3dt_pbl, dt3dt_dcnv, dt3dt_scnv, dt3dt_mp, & - ctei_rml, ctei_r, kinver, dry, icy, wet, frland, huge, use_LW_jacobian, errmsg, errflg) + adjsfculw_ice, adjsfculw_wat, dlwsfc, ulwsfc, psmean, dtend, dtidx, index_of_process_longwave, index_of_process_shortwave, & + index_of_process_pbl, index_of_process_dcnv, index_of_process_scnv, index_of_process_mp, index_of_temperature, & + ctei_rml, ctei_r, kinver, dry, icy, wet, frland, huge, use_LW_jacobian, htrlwu, errmsg, errflg) implicit none ! interface variables - integer, intent(in ) :: im, levs, imfshalcnv - logical, intent(in ) :: lssav, ldiag3d, lsidea, cplflx, shal_cnv - logical, intent(in ) :: old_monin, mstrat, do_shoc, frac_grid, use_LW_jacobian - real(kind=kind_phys), intent(in ) :: dtf, cp, hvap - - logical, intent(in ), dimension(im) :: flag_cice - real(kind=kind_phys), intent(in ), dimension(2) :: ctei_rm - real(kind=kind_phys), intent(in ), dimension(im) :: xcosz, adjsfcdsw, adjsfcdlw, pgr, xmu, ulwsfc_cice, work1, work2 - real(kind=kind_phys), intent(in ), dimension(im) :: cice - real(kind=kind_phys), intent(in ), dimension(im, levs) :: htrsw, htrlw, tgrs, prsl, qgrs_water_vapor, qgrs_cloud_water, prslk - real(kind=kind_phys), intent(in ), dimension(im, levs+1) :: prsi - real(kind=kind_phys), intent(in ), dimension(im, levs, 6) :: lwhd - integer, intent(inout), dimension(im) :: kinver - real(kind=kind_phys), intent(inout), dimension(im) :: suntim, dlwsfc, ulwsfc, psmean, ctei_rml, ctei_r - real(kind=kind_phys), intent(in ), dimension(im) :: adjsfculw_lnd, adjsfculw_ice, adjsfculw_wat - real(kind=kind_phys), intent(inout), dimension(im) :: adjsfculw - - ! These arrays are only allocated if ldiag3d is .true. - real(kind=kind_phys), intent(inout), dimension(:,:) :: dt3dt_lw, dt3dt_sw, dt3dt_pbl, dt3dt_dcnv, dt3dt_scnv, dt3dt_mp - - logical, intent(in ), dimension(im) :: dry, icy, wet - real(kind=kind_phys), intent(in ), dimension(im) :: frland - real(kind=kind_phys), intent(in ) :: huge - - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg + integer, intent(in ) :: im, levs, imfshalcnv + logical, intent(in ) :: lssav, ldiag3d, lsidea, shal_cnv + logical, intent(in ) :: old_monin, mstrat, do_shoc, frac_grid, use_LW_jacobian + real(kind=kind_phys), intent(in ) :: dtf, cp, hvap + + logical, intent(in ), dimension(:) :: flag_cice + real(kind=kind_phys), intent(in ), dimension(:) :: ctei_rm + real(kind=kind_phys), intent(in ), dimension(:) :: xcosz, adjsfcdsw, adjsfcdlw, pgr, xmu, work1, work2 + real(kind=kind_phys), intent(in ), dimension(:) :: ulwsfc_cice + real(kind=kind_phys), intent(in ), dimension(:) :: cice + real(kind=kind_phys), intent(in ), dimension(:,:) :: htrsw, htrlw, htrlwu, tgrs, prsl, qgrs_water_vapor, qgrs_cloud_water, prslk + real(kind=kind_phys), intent(in ), dimension(:,:) :: prsi + real(kind=kind_phys), intent(in ), dimension(:,:,:) :: lwhd + integer, intent(inout), dimension(:) :: kinver + real(kind=kind_phys), intent(inout), dimension(:) :: suntim, dlwsfc, ulwsfc, psmean, ctei_rml, ctei_r + real(kind=kind_phys), intent(in ), dimension(:) :: adjsfculw_lnd, adjsfculw_ice, adjsfculw_wat + real(kind=kind_phys), intent(inout), dimension(:) :: adjsfculw + + ! dtend is only allocated if ldiag3d is .true. + real(kind=kind_phys), optional, intent(inout), dimension(:,:,:) :: dtend + integer, intent(in), dimension(:,:) :: dtidx + integer, intent(in) :: index_of_process_longwave, index_of_process_shortwave, & + index_of_process_pbl, index_of_process_dcnv, index_of_process_scnv, & + index_of_process_mp, index_of_temperature + + logical, intent(in ), dimension(:) :: dry, icy, wet + real(kind=kind_phys), intent(in ), dimension(:) :: frland + real(kind=kind_phys), intent(in ) :: huge + + character(len=*), intent( out) :: errmsg + integer, intent( out) :: errflg ! local variables real(kind=kind_phys), parameter :: czmin = 0.0001_kind_phys ! cos(89.994) - integer :: i, k + integer :: i, k, idtend real(kind=kind_phys) :: tem1, tem2, tem, hocp logical, dimension(im) :: invrsn real(kind=kind_phys), dimension(im) :: tx1, tx2 @@ -230,8 +235,8 @@ subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, cplfl ! --- ... sfc lw fluxes used by atmospheric model are saved for output if (.not. use_LW_jacobian) then - if (frac_grid) then - do i=1,im + if (frac_grid) then + do i=1,im tem = (one - frland(i)) * cice(i) ! tem = ice fraction wrt whole cell if (flag_cice(i)) then adjsfculw(i) = adjsfculw_lnd(i) * frland(i) & @@ -242,9 +247,9 @@ subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, cplfl + adjsfculw_ice(i) * tem & + adjsfculw_wat(i) * (one - frland(i) - tem) endif - enddo - else - do i=1,im + enddo + else + do i=1,im if (dry(i)) then ! all land adjsfculw(i) = adjsfculw_lnd(i) elseif (icy(i)) then ! ice (and water) @@ -265,35 +270,65 @@ subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, cplfl else ! all water adjsfculw(i) = adjsfculw_wat(i) endif - enddo - endif + enddo + endif endif do i=1,im dlwsfc(i) = dlwsfc(i) + adjsfcdlw(i)*dtf ulwsfc(i) = ulwsfc(i) + adjsfculw(i)*dtf psmean(i) = psmean(i) + pgr(i)*dtf ! mean surface pressure - end do + enddo if (ldiag3d) then if (lsidea) then - do k=1,levs - do i=1,im - dt3dt_lw(i,k) = dt3dt_lw(i,k) + lwhd(i,k,1)*dtf - dt3dt_sw(i,k) = dt3dt_sw(i,k) + lwhd(i,k,2)*dtf - dt3dt_pbl(i,k) = dt3dt_pbl(i,k) + lwhd(i,k,3)*dtf - dt3dt_dcnv(i,k) = dt3dt_dcnv(i,k) + lwhd(i,k,4)*dtf - dt3dt_scnv(i,k) = dt3dt_scnv(i,k) + lwhd(i,k,5)*dtf - dt3dt_mp(i,k) = dt3dt_mp(i,k) + lwhd(i,k,6)*dtf - enddo - enddo + idtend = dtidx(index_of_temperature,index_of_process_longwave) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + lwhd(:,:,1)*dtf + endif + + idtend = dtidx(index_of_temperature,index_of_process_shortwave) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + lwhd(:,:,2)*dtf + endif + + idtend = dtidx(index_of_temperature,index_of_process_pbl) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + lwhd(:,:,3)*dtf + endif + + idtend = dtidx(index_of_temperature,index_of_process_dcnv) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + lwhd(:,:,4)*dtf + endif + + idtend = dtidx(index_of_temperature,index_of_process_scnv) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + lwhd(:,:,5)*dtf + endif + + idtend = dtidx(index_of_temperature,index_of_process_mp) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + lwhd(:,:,6)*dtf + endif else - do k=1,levs - do i=1,im - dt3dt_lw(i,k) = dt3dt_lw(i,k) + htrlw(i,k)*dtf - dt3dt_sw(i,k) = dt3dt_sw(i,k) + htrsw(i,k)*dtf*xmu(i) - enddo - enddo + idtend = dtidx(index_of_temperature,index_of_process_longwave) + if(idtend>=1) then + if (use_LW_jacobian) then + dtend(:,:,idtend) = dtend(:,:,idtend) + htrlwu(:,:)*dtf + else + dtend(:,:,idtend) = dtend(:,:,idtend) + htrlw(:,:)*dtf + endif + endif + + idtend = dtidx(index_of_temperature,index_of_process_shortwave) + if(idtend>=1) then + do k=1,levs + do i=1,im + dtend(i,k,idtend) = dtend(i,k,idtend) + htrsw(i,k)*dtf*xmu(i) + enddo + enddo + endif endif endif endif ! end if_lssav_block @@ -374,16 +409,16 @@ subroutine GFS_suite_stateout_reset_run (im, levs, ntrac, & implicit none ! interface variables - integer, intent(in) :: im - integer, intent(in) :: levs - integer, intent(in) :: ntrac - real(kind=kind_phys), dimension(im,levs), intent(in) :: tgrs, ugrs, vgrs - real(kind=kind_phys), dimension(im,levs,ntrac), intent(in) :: qgrs - real(kind=kind_phys), dimension(im,levs), intent(out) :: gt0, gu0, gv0 - real(kind=kind_phys), dimension(im,levs,ntrac), intent(out) :: gq0 + integer, intent(in ) :: im + integer, intent(in ) :: levs + integer, intent(in ) :: ntrac + real(kind=kind_phys), intent(in ), dimension(:,:) :: tgrs, ugrs, vgrs + real(kind=kind_phys), intent(in ), dimension(:,:,:) :: qgrs + real(kind=kind_phys), intent(out), dimension(:,:) :: gt0, gu0, gv0 + real(kind=kind_phys), intent(out), dimension(:,:,:) :: gq0 - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg ! Initialize CCPP error handling variables errmsg = '' @@ -422,22 +457,22 @@ subroutine GFS_suite_stateout_update_run (im, levs, ntrac, dtp, & implicit none ! Interface variables - integer, intent(in) :: im - integer, intent(in) :: levs - integer, intent(in) :: ntrac - integer, intent(in) :: imp_physics,imp_physics_fer_hires - integer, intent(in) :: ntiw, nqrimef - real(kind=kind_phys), intent(in) :: dtp, epsq - - real(kind=kind_phys), dimension(im,levs), intent(in) :: tgrs, ugrs, vgrs - real(kind=kind_phys), dimension(im,levs,ntrac), intent(in) :: qgrs - real(kind=kind_phys), dimension(im,levs), intent(in) :: dudt, dvdt, dtdt - real(kind=kind_phys), dimension(im,levs,ntrac), intent(in) :: dqdt - real(kind=kind_phys), dimension(im,levs), intent(out) :: gt0, gu0, gv0 - real(kind=kind_phys), dimension(im,levs,ntrac), intent(out) :: gq0 - - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg + integer, intent(in ) :: im + integer, intent(in ) :: levs + integer, intent(in ) :: ntrac + integer, intent(in ) :: imp_physics,imp_physics_fer_hires + integer, intent(in ) :: ntiw, nqrimef + real(kind=kind_phys), intent(in ) :: dtp, epsq + + real(kind=kind_phys), intent(in ), dimension(:,:) :: tgrs, ugrs, vgrs + real(kind=kind_phys), intent(in ), dimension(:,:,:) :: qgrs + real(kind=kind_phys), intent(in ), dimension(:,:) :: dudt, dvdt, dtdt + real(kind=kind_phys), intent(in ), dimension(:,:,:) :: dqdt + real(kind=kind_phys), intent(out), dimension(:,:) :: gt0, gu0, gv0 + real(kind=kind_phys), intent(out), dimension(:,:,:) :: gq0 + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg integer :: i, k ! Initialize CCPP error handling variables @@ -476,20 +511,19 @@ end subroutine GFS_suite_interstitial_3_init subroutine GFS_suite_interstitial_3_finalize() end subroutine GFS_suite_interstitial_3_finalize -#if 0 !> \section arg_table_GFS_suite_interstitial_3_run Argument Table !! \htmlinclude GFS_suite_interstitial_3_run.html !! -#endif subroutine GFS_suite_interstitial_3_run (im, levs, nn, cscnv, & satmedmf, trans_trac, do_shoc, ltaerosol, ntrac, ntcw, & ntiw, ntclamt, ntrw, ntsw, ntrnc, ntsnc, ntgl, ntgnc, & xlon, xlat, gt0, gq0, imp_physics, imp_physics_mg, & imp_physics_zhao_carr, imp_physics_zhao_carr_pdf, & - imp_physics_gfdl, imp_physics_thompson, & - imp_physics_wsm6, imp_physics_fer_hires, prsi, & + imp_physics_gfdl, imp_physics_thompson, dtidx, ntlnc, & + imp_physics_wsm6, imp_physics_fer_hires, prsi, ntinc, & prsl, prslk, rhcbot,rhcpbl, rhctop, rhcmax, islmsk, & - work1, work2, kpbl, kinver, ras, me, & + work1, work2, kpbl, kinver, ras, me, save_lnc, save_inc, & + ldiag3d, qdiag3d, index_of_process_conv_trans, & clw, rhc, save_qc, save_qi, save_tcp, errmsg, errflg) use machine, only: kind_phys @@ -497,28 +531,33 @@ subroutine GFS_suite_interstitial_3_run (im, levs, nn, cscnv, & implicit none ! interface variables - integer, intent(in) :: im, levs, nn, ntrac, ntcw, ntiw, ntclamt, ntrw, & - ntsw, ntrnc, ntsnc, ntgl, ntgnc, imp_physics, imp_physics_mg, imp_physics_zhao_carr, imp_physics_zhao_carr_pdf, & - imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6,imp_physics_fer_hires, me - integer, dimension(im), intent(in) :: islmsk, kpbl, kinver - logical, intent(in) :: cscnv, satmedmf, trans_trac, do_shoc, ltaerosol, ras - - real(kind=kind_phys), intent(in) :: rhcbot, rhcmax, rhcpbl, rhctop - real(kind=kind_phys), dimension(im), intent(in) :: work1, work2 - real(kind=kind_phys), dimension(im, levs), intent(in) :: prsl, prslk - real(kind=kind_phys), dimension(im, levs+1), intent(in) :: prsi - real(kind=kind_phys), dimension(im), intent(in) :: xlon, xlat - real(kind=kind_phys), dimension(im, levs), intent(in) :: gt0 - real(kind=kind_phys), dimension(im, levs, ntrac), intent(in) :: gq0 - - real(kind=kind_phys), dimension(im, levs), intent(inout) :: rhc, save_qc + integer, intent(in ) :: im, levs, nn, ntrac, ntcw, ntiw, ntclamt, ntrw, ntsw,& + ntrnc, ntsnc, ntgl, ntgnc, imp_physics, imp_physics_mg, imp_physics_zhao_carr, imp_physics_zhao_carr_pdf, & + imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6,imp_physics_fer_hires, me, index_of_process_conv_trans + integer, intent(in ), dimension(:) :: islmsk, kpbl, kinver + logical, intent(in ) :: cscnv, satmedmf, trans_trac, do_shoc, ltaerosol, ras + + integer, intent(in) :: ntinc, ntlnc + logical, intent(in) :: ldiag3d, qdiag3d + integer, dimension(:,:), intent(in) :: dtidx + real, dimension(:,:), intent(out) :: save_lnc, save_inc + + real(kind=kind_phys), intent(in ) :: rhcbot, rhcmax, rhcpbl, rhctop + real(kind=kind_phys), intent(in ), dimension(:) :: work1, work2 + real(kind=kind_phys), intent(in ), dimension(:,:) :: prsl, prslk + real(kind=kind_phys), intent(in ), dimension(:,:) :: prsi + real(kind=kind_phys), intent(in ), dimension(:) :: xlon, xlat + real(kind=kind_phys), intent(in ), dimension(:,:) :: gt0 + real(kind=kind_phys), intent(in ), dimension(:,:,:) :: gq0 + + real(kind=kind_phys), intent(inout), dimension(:,:) :: rhc, save_qc ! save_qi is not allocated for Zhao-Carr MP - real(kind=kind_phys), dimension(:, :), intent(inout) :: save_qi - real(kind=kind_phys), dimension(:, :), intent(inout) :: save_tcp ! ONLY ALLOCATE FOR THOMPSON! TODO - real(kind=kind_phys), dimension(im, levs, nn), intent(inout) :: clw + real(kind=kind_phys), intent(inout), dimension(:,:) :: save_qi + real(kind=kind_phys), intent(inout), dimension(:,:) :: save_tcp + real(kind=kind_phys), intent(inout), dimension(:,:,:) :: clw - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg + character(len=*), intent( out) :: errmsg + integer, intent( out) :: errflg ! local variables integer :: i,k,n,tracers,kk @@ -634,6 +673,15 @@ subroutine GFS_suite_interstitial_3_run (im, levs, nn, cscnv, & enddo endif + if(imp_physics == imp_physics_thompson .and. ldiag3d .and. qdiag3d) then + if(dtidx(100+ntlnc,index_of_process_conv_trans)>0) then + save_lnc = gq0(:,:,ntlnc) + endif + if(dtidx(100+ntinc,index_of_process_conv_trans)>0) then + save_inc = gq0(:,:,ntinc) + endif + endif + end subroutine GFS_suite_interstitial_3_run end module GFS_suite_interstitial_3 @@ -651,10 +699,11 @@ end subroutine GFS_suite_interstitial_4_finalize !> \section arg_table_GFS_suite_interstitial_4_run Argument Table !! \htmlinclude GFS_suite_interstitial_4_run.html !! - subroutine GFS_suite_interstitial_4_run (im, levs, ltaerosol, cplchm, tracers_total, ntrac, ntcw, ntiw, ntclamt, & + subroutine GFS_suite_interstitial_4_run (im, levs, ltaerosol, tracers_total, ntrac, ntcw, ntiw, ntclamt, & ntrw, ntsw, ntrnc, ntsnc, ntgl, ntgnc, ntlnc, ntinc, nn, imp_physics, imp_physics_gfdl, imp_physics_thompson, & - imp_physics_zhao_carr, imp_physics_zhao_carr_pdf, dtf, save_qc, save_qi, con_pi, & - gq0, clw, prsl, save_tcp, con_rd, nwfa, spechum, dqdti, errmsg, errflg) + imp_physics_zhao_carr, imp_physics_zhao_carr_pdf, convert_dry_rho, dtf, save_qc, save_qi, con_pi, dtidx, dtend,& + index_of_process_conv_trans, gq0, clw, prsl, save_tcp, con_rd, con_eps, nwfa, spechum, ldiag3d, & + qdiag3d, save_lnc, save_inc, ntk, ntke, errmsg, errflg) use machine, only: kind_phys use module_mp_thompson_make_number_concentrations, only: make_IceNumber, make_DropletNumber @@ -663,36 +712,38 @@ subroutine GFS_suite_interstitial_4_run (im, levs, ltaerosol, cplchm, tracers_to ! interface variables - integer, intent(in) :: im, levs, tracers_total, ntrac, ntcw, ntiw, ntclamt, ntrw, & + integer, intent(in ) :: im, levs, tracers_total, ntrac, ntcw, ntiw, ntclamt, ntrw, & ntsw, ntrnc, ntsnc, ntgl, ntgnc, ntlnc, ntinc, nn, imp_physics, imp_physics_gfdl, imp_physics_thompson, & imp_physics_zhao_carr, imp_physics_zhao_carr_pdf - logical, intent(in) :: ltaerosol, cplchm + logical, intent(in) :: ltaerosol, convert_dry_rho - real(kind=kind_phys), intent(in) :: con_pi, dtf - real(kind=kind_phys), dimension(im,levs), intent(in) :: save_qc + real(kind=kind_phys), intent(in ) :: con_pi, dtf + real(kind=kind_phys), intent(in ), dimension(:,:) :: save_qc ! save_qi is not allocated for Zhao-Carr MP - real(kind=kind_phys), dimension(:, :), intent(in) :: save_qi - - real(kind=kind_phys), dimension(im,levs,ntrac), intent(inout) :: gq0 - real(kind=kind_phys), dimension(im,levs,nn), intent(inout) :: clw - real(kind=kind_phys), dimension(im,levs), intent(in) :: prsl - real(kind=kind_phys), intent(in) :: con_rd - real(kind=kind_phys), dimension(:,:), intent(in) :: nwfa, save_tcp - real(kind=kind_phys), dimension(im,levs), intent(in) :: spechum + real(kind=kind_phys), intent(in ), dimension(:,:) :: save_qi, save_lnc, save_inc - ! dqdti may not be allocated - real(kind=kind_phys), dimension(:,:), intent(inout) :: dqdti + ! dtend and dtidx are only allocated if ldiag3d + logical, intent(in) :: ldiag3d, qdiag3d + real(kind=kind_phys), dimension(:,:,:), intent(inout) :: dtend + integer, dimension(:,:), intent(in) :: dtidx + integer, intent(in) :: index_of_process_conv_trans,ntk,ntke - real(kind=kind_phys), parameter :: zero = 0.0_kind_phys, one = 1.0_kind_phys + real(kind=kind_phys), dimension(:,:,:), intent(inout) :: gq0 + real(kind=kind_phys), dimension(:,:,:), intent(inout) :: clw + real(kind=kind_phys), dimension(:,:), intent(in) :: prsl + real(kind=kind_phys), intent(in) :: con_rd, con_eps + real(kind=kind_phys), dimension(:,:), intent(in) :: nwfa, save_tcp + real(kind=kind_phys), dimension(:,:), intent(in) :: spechum - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg + character(len=*), intent( out) :: errmsg + integer, intent( out) :: errflg ! local variables - integer :: i,k,n,tracers + real(kind=kind_phys), parameter :: zero = 0.0_kind_phys, one = 1.0_kind_phys + integer :: i,k,n,tracers,idtend - real(kind=kind_phys), dimension(im,levs) :: rho_dryair + real(kind=kind_phys) :: rho, orho real(kind=kind_phys), dimension(im,levs) :: qv_mp !< kg kg-1 (dry mixing ratio) real(kind=kind_phys), dimension(im,levs) :: qc_mp !< kg kg-1 (dry mixing ratio) real(kind=kind_phys), dimension(im,levs) :: qi_mp !< kg kg-1 (dry mixing ratio) @@ -703,6 +754,39 @@ subroutine GFS_suite_interstitial_4_run (im, levs, ltaerosol, cplchm, tracers_to errmsg = '' errflg = 0 + if(ldiag3d) then + if(ntk>0 .and. ntk<=size(clw,3)) then + idtend=dtidx(100+ntke,index_of_process_conv_trans) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + clw(:,:,ntk)-gq0(:,:,ntk) + endif + endif + if(ntcw>0) then + if (imp_physics == imp_physics_zhao_carr .or. & + imp_physics == imp_physics_zhao_carr_pdf .or. & + imp_physics == imp_physics_gfdl) then + idtend=dtidx(100+ntcw,index_of_process_conv_trans) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + clw(:,:,1)+clw(:,:,2) - gq0(:,:,ntcw) + endif + else if(ntiw>0) then + idtend=dtidx(100+ntiw,index_of_process_conv_trans) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + clw(:,:,1)-gq0(:,:,ntiw) + endif + idtend=dtidx(100+ntcw,index_of_process_conv_trans) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + clw(:,:,2)-gq0(:,:,ntcw) + endif + else + idtend=dtidx(100+ntcw,index_of_process_conv_trans) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + clw(:,:,1)+clw(:,:,2) - gq0(:,:,ntcw) + endif + endif + endif + endif + ! --- update the tracers due to deep & shallow cumulus convective transport ! (except for suspended water and ice) @@ -714,6 +798,12 @@ subroutine GFS_suite_interstitial_4_run (im, levs, ltaerosol, cplchm, tracers_to n /= ntrw .and. n /= ntsw .and. n /= ntrnc .and. & n /= ntsnc .and. n /= ntgl .and. n /= ntgnc ) then tracers = tracers + 1 + if(n/=ntk .and. n/=ntlnc .and. n/=ntinc .and. n /= ntcw .and. n /= ntiw) then + idtend=dtidx(100+n,index_of_process_conv_trans) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + clw(:,:,tracers)-gq0(:,:,n) + endif + endif do k=1,levs do i=1,im gq0(i,k,n) = clw(i,k,tracers) @@ -740,32 +830,65 @@ subroutine GFS_suite_interstitial_4_run (im, levs, ltaerosol, cplchm, tracers_to enddo if (imp_physics == imp_physics_thompson .and. (ntlnc>0 .or. ntinc>0)) then - do k=1,levs - do i=1,im - !> - Density of air in kg m-3 - rho_dryair(i,k) = prsl(i,k) / (con_rd*save_tcp(i,k)) - !> - Convert specific humidity to dry mixing ratio - qv_mp(i,k) = spechum(i,k) / (one-spechum(i,k)) - if (ntlnc>0) then - !> - Convert moist mixing ratio to dry mixing ratio - qc_mp(i,k) = (clw(i,k,2)-save_qc(i,k)) / (one-spechum(i,k)) - !> - Convert number concentration from moist to dry - nc_mp(i,k) = gq0(i,k,ntlnc) / (one-spechum(i,k)) - nc_mp(i,k) = max(zero, nc_mp(i,k) + make_DropletNumber(qc_mp(i,k) * rho_dryair(i,k), nwfa(i,k)) * (one/rho_dryair(i,k))) - !> - Convert number concentrations from dry to moist - gq0(i,k,ntlnc) = nc_mp(i,k) / (one+qv_mp(i,k)) - endif - if (ntinc>0) then - !> - Convert moist mixing ratio to dry mixing ratio - qi_mp(i,k) = (clw(i,k,1)-save_qi(i,k)) / (one-spechum(i,k)) - !> - Convert number concentration from moist to dry - ni_mp(i,k) = gq0(i,k,ntinc) / (one-spechum(i,k)) - ni_mp(i,k) = max(zero, ni_mp(i,k) + make_IceNumber(qi_mp(i,k) * rho_dryair(i,k), save_tcp(i,k)) * (one/rho_dryair(i,k))) - !> - Convert number concentrations from dry to moist - gq0(i,k,ntinc) = ni_mp(i,k) / (one+qv_mp(i,k)) - endif + if_convert_dry_rho: if (convert_dry_rho) then + do k=1,levs + do i=1,im + !> - Convert specific humidity to dry mixing ratio + qv_mp(i,k) = spechum(i,k) / (one-spechum(i,k)) + !> - Density of air in kg m-3 and inverse density + rho = con_eps*prsl(i,k) / (con_rd*save_tcp(i,k)*(qv_mp(i,k)+con_eps)) + orho = one/rho + if (ntlnc>0) then + !> - Convert moist mixing ratio to dry mixing ratio + qc_mp(i,k) = (clw(i,k,2)-save_qc(i,k)) / (one-spechum(i,k)) + !> - Convert number concentration from moist to dry + nc_mp(i,k) = gq0(i,k,ntlnc) / (one-spechum(i,k)) + nc_mp(i,k) = max(zero, nc_mp(i,k) + make_DropletNumber(qc_mp(i,k) * rho, nwfa(i,k)*rho) * orho) + !> - Convert number concentrations from dry to moist + gq0(i,k,ntlnc) = nc_mp(i,k) / (one+qv_mp(i,k)) + endif + if (ntinc>0) then + !> - Convert moist mixing ratio to dry mixing ratio + qi_mp(i,k) = (clw(i,k,1)-save_qi(i,k)) / (one-spechum(i,k)) + !> - Convert number concentration from moist to dry + ni_mp(i,k) = gq0(i,k,ntinc) / (one-spechum(i,k)) + ni_mp(i,k) = max(zero, ni_mp(i,k) + make_IceNumber(qi_mp(i,k) * rho, save_tcp(i,k)) * orho) + !> - Convert number concentrations from dry to moist + gq0(i,k,ntinc) = ni_mp(i,k) / (one+qv_mp(i,k)) + endif + enddo enddo - enddo + else + do k=1,levs + do i=1,im + !> - Density of air in kg m-3 and inverse density + rho = con_eps*prsl(i,k) / (con_rd*save_tcp(i,k)*(spechum(i,k)+con_eps)) + orho = one/rho + if (ntlnc>0) then + !> - Update cloud water mixing ratio + qc_mp(i,k) = (clw(i,k,2)-save_qc(i,k)) + !> - Update cloud water number concentration + gq0(i,k,ntlnc) = max(zero, gq0(i,k,ntlnc) + make_DropletNumber(qc_mp(i,k) * rho, nwfa(i,k)*rho) * orho) + endif + if (ntinc>0) then + !> - Update cloud ice mixing ratio + qi_mp(i,k) = (clw(i,k,1)-save_qi(i,k)) + !> - Update cloud ice number concentration + gq0(i,k,ntinc) = max(zero, gq0(i,k,ntinc) + make_IceNumber(qi_mp(i,k) * rho, save_tcp(i,k)) * orho) + endif + enddo + enddo + end if if_convert_dry_rho + if(ldiag3d .and. qdiag3d) then + idtend = dtidx(100+ntlnc,index_of_process_conv_trans) + if(idtend>0) then + dtend(:,:,idtend) = dtend(:,:,idtend) + gq0(:,:,ntlnc) - save_lnc + endif + idtend = dtidx(100+ntinc,index_of_process_conv_trans) + if(idtend>0) then + dtend(:,:,idtend) = dtend(:,:,idtend) + gq0(:,:,ntinc) - save_inc + endif + endif endif else @@ -784,15 +907,6 @@ subroutine GFS_suite_interstitial_4_run (im, levs, ltaerosol, cplchm, tracers_to enddo endif ! end if_ntcw -! dqdt_v : instaneous moisture tendency (kg/kg/sec) - if (cplchm) then - do k=1,levs - do i=1,im - dqdti(i,k) = dqdti(i,k) * (one / dtf) - enddo - enddo - endif - end subroutine GFS_suite_interstitial_4_run end module GFS_suite_interstitial_4 @@ -817,14 +931,14 @@ subroutine GFS_suite_interstitial_5_run (im, levs, ntrac, ntcw, ntiw, nn, gq0, c implicit none ! interface variables - integer, intent(in) :: im, levs, ntrac, ntcw, ntiw, nn + integer, intent(in ) :: im, levs, ntrac, ntcw, ntiw, nn - real(kind=kind_phys), dimension(im, levs, ntrac), intent(in) :: gq0 + real(kind=kind_phys), intent(in ), dimension(:,:,:) :: gq0 - real(kind=kind_phys), dimension(im, levs, nn), intent(out) :: clw + real(kind=kind_phys), intent(out), dimension(:,:,:) :: clw - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg ! local variables integer :: i,k diff --git a/physics/GFS_suite_interstitial.meta b/physics/GFS_suite_interstitial.meta index fdf1716f1..7d3d6dc7b 100644 --- a/physics/GFS_suite_interstitial.meta +++ b/physics/GFS_suite_interstitial.meta @@ -104,7 +104,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -120,7 +120,7 @@ intent = in optional = F [dtf] - standard_name = time_step_for_dynamics + standard_name = timestep_for_dynamics long_name = dynamics timestep units = s dimensions = () @@ -129,7 +129,7 @@ intent = in optional = F [dtp] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics timestep units = s dimensions = () @@ -138,7 +138,7 @@ intent = in optional = F [slmsk] - standard_name = sea_land_ice_mask_real + standard_name = area_type long_name = landmask: sea/land/ice=0/1/2 units = flag dimensions = (horizontal_loop_extent) @@ -156,7 +156,7 @@ intent = in optional = F [dxmin] - standard_name = minimum_scaling_factor_for_critical_relative_humidity + standard_name = min_grid_scale long_name = minimum scaling factor for critical relative humidity units = m2 rad-2 dimensions = () @@ -165,7 +165,7 @@ intent = in optional = F [dxinv] - standard_name = inverse_scaling_factor_for_critical_relative_humidity + standard_name = reciprocal_of_grid_scale_range long_name = inverse scaling factor for critical relative humidity units = rad2 m-2 dimensions = () @@ -218,46 +218,37 @@ intent = out optional = F [dudt] - standard_name = tendency_of_x_wind_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_x_wind long_name = updated tendency of the x wind units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [dvdt] - standard_name = tendency_of_y_wind_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_y_wind long_name = updated tendency of the y wind units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [dtdt] - standard_name = tendency_of_air_temperature_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_air_temperature long_name = updated tendency of the temperature units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = out - optional = F -[dtdtc] - standard_name = tendency_of_air_temperature_due_to_radiative_heating_assuming_clear_sky - long_name = clear sky radiative (shortwave + longwave) heating rate at current time - units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [dqdt] - standard_name = tendency_of_tracers_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_tracers long_name = updated tendency of the tracers units = kg kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = out @@ -299,7 +290,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -307,7 +298,7 @@ intent = in optional = F [lssav] - standard_name = flag_diagnostics + standard_name = flag_for_diagnostics long_name = logical flag for storing diagnostics units = flag dimensions = () @@ -315,7 +306,7 @@ intent = in optional = F [ldiag3d] - standard_name = flag_diagnostics_3D + standard_name = flag_for_diagnostics_3D long_name = flag for 3d diagnostic fields units = flag dimensions = () @@ -323,21 +314,13 @@ intent = in optional = F [lsidea] - standard_name = flag_idealized_physics + standard_name = flag_for_integrated_dynamics_through_earths_atmosphere long_name = flag for idealized physics units = flag dimensions = () type = logical intent = in optional = F -[cplflx] - standard_name = flag_for_flux_coupling - long_name = flag controlling cplflx collection (default off) - units = flag - dimensions = () - type = logical - intent = in - optional = F [flag_cice] standard_name = flag_for_cice long_name = flag for cice @@ -347,7 +330,7 @@ intent = in optional = F [shal_cnv] - standard_name = flag_for_shallow_convection + standard_name = flag_for_simplified_arakawa_schubert_shallow_convection long_name = flag for calling shallow convection units = flag dimensions = () @@ -379,7 +362,7 @@ intent = in optional = F [frac_grid] - standard_name = flag_for_fractional_grid + standard_name = flag_for_fractional_landmask long_name = flag for fractional grid units = flag dimensions = () @@ -387,7 +370,7 @@ intent = in optional = F [imfshalcnv] - standard_name = flag_for_mass_flux_shallow_convection_scheme + standard_name = control_for_shallow_convection_scheme long_name = flag for mass-flux shallow convection scheme units = flag dimensions = () @@ -395,7 +378,7 @@ intent = in optional = F [dtf] - standard_name = time_step_for_dynamics + standard_name = timestep_for_dynamics long_name = dynamics timestep units = s dimensions = () @@ -431,7 +414,7 @@ intent = in optional = F [cice] - standard_name = sea_ice_concentration + standard_name = sea_ice_area_fraction_of_sea_area_fraction long_name = ice fraction over open water units = frac dimensions = (horizontal_loop_extent) @@ -449,7 +432,7 @@ intent = in optional = F [ulwsfc_cice] - standard_name = surface_upwelling_longwave_flux_for_coupling + standard_name = surface_upwelling_longwave_flux_from_coupled_process long_name = surface upwelling longwave flux for coupling units = W m-2 dimensions = (horizontal_loop_extent) @@ -458,28 +441,28 @@ intent = in optional = F [lwhd] - standard_name = tendency_of_air_temperature_due_to_longwave_heating_for_idea + standard_name = tendency_of_air_temperature_due_to_integrated_dynamics_through_earths_atmosphere long_name = idea sky lw heating rates units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension,6) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,6) type = real kind = kind_phys intent = in optional = F [htrsw] - standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_timestep long_name = total sky sw heating rate units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [htrlw] - standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step + standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_timestep long_name = total sky lw heating rate units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -494,7 +477,7 @@ intent = in optional = F [ctei_rm] - standard_name = critical_cloud_top_entrainment_instability_criteria + standard_name = tunable_parameter_for_critical_cloud_top_entrainment_instability_criteria long_name = critical cloud top entrainment instability criteria units = none dimensions = (2) @@ -524,7 +507,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -533,7 +516,7 @@ standard_name = air_temperature long_name = model layer mean temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -542,25 +525,25 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [qgrs_water_vapor] - standard_name = water_vapor_specific_humidity + standard_name = specific_humidity long_name = water vapor specific humidity units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [qgrs_cloud_water] - standard_name = cloud_condensed_water_mixing_ratio + standard_name = cloud_liquid_water_mixing_ratio long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -584,10 +567,10 @@ intent = in optional = F [prslk] - standard_name = dimensionless_exner_function_at_model_layers + standard_name = dimensionless_exner_function long_name = dimensionless Exner function at model layer centers units = none - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -609,6 +592,15 @@ type = logical intent = in optional = F +[htrlwu] + standard_name = updated_tendency_of_air_temperature_due_to_longwave_heating_on_physics_timestep + long_name = total sky longwave heating rate on physics time step + units = K s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in + optional = F [adjsfculw] standard_name = surface_upwelling_longwave_flux long_name = surface upwelling longwave flux at current time @@ -637,8 +629,8 @@ intent = in optional = F [adjsfculw_wat] - standard_name = surface_upwelling_longwave_flux_over_ocean_interstitial - long_name = surface upwelling longwave flux at current time over ocean (temporary use as interstitial) + standard_name = surface_upwelling_longwave_flux_over_water_interstitial + long_name = surface upwelling longwave flux at current time over water (temporary use as interstitial) units = W m-2 dimensions = (horizontal_loop_extent) type = real @@ -672,59 +664,78 @@ kind = kind_phys intent = inout optional = F -[dt3dt_lw] - standard_name = cumulative_change_in_temperature_due_to_longwave_radiation - long_name = cumulative change in temperature due to longwave radiation - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) +[dtend] + standard_name = cumulative_change_of_state_variables + long_name = diagnostic tendencies for state variables + units = various + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_cumulative_change_processes) type = real kind = kind_phys intent = inout optional = F -[dt3dt_sw] - standard_name = cumulative_change_in_temperature_due_to_shortwave_radiation - long_name = cumulative change in temperature due to shortwave radiation - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[dtidx] + standard_name = cumulative_change_of_state_variables_outer_index + long_name = index of state-variable and process in last dimension of diagnostic tendencies array AKA cumulative_change_index + units = index + dimensions = (number_of_tracers_plus_one_hundred,number_of_cumulative_change_processes) + type = integer + intent = in optional = F -[dt3dt_pbl] - standard_name = cumulative_change_in_temperature_due_to_PBL - long_name = cumulative change in temperature due to PBL - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[index_of_process_longwave] + standard_name = index_of_longwave_heating_process_in_cumulative_change_index + long_name = index of longwave heating process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in optional = F -[dt3dt_dcnv] - standard_name = cumulative_change_in_temperature_due_to_deep_convection - long_name = cumulative change in temperature due to deep conv. - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[index_of_process_shortwave] + standard_name = index_of_shortwave_heating_process_in_cumulative_change_index + long_name = index of shortwave heating process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in optional = F -[dt3dt_scnv] - standard_name = cumulative_change_in_temperature_due_to_shallow_convection - long_name = cumulative change in temperature due to shal conv. - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[index_of_process_pbl] + standard_name = index_of_subgrid_scale_vertical_mixing_process_in_cumulative_change_index + long_name = index of subgrid scale vertical mixing process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in optional = F -[dt3dt_mp] - standard_name = cumulative_change_in_temperature_due_to_microphysics - long_name = cumulative change in temperature due to microphysics - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[index_of_process_dcnv] + standard_name = index_of_deep_convection_process_process_in_cumulative_change_index + long_name = index of deep convection process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_process_scnv] + standard_name = index_of_shallow_convection_process_process_in_cumulative_change_index + long_name = index of shallow convection process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_process_mp] + standard_name = index_of_microphysics_process_process_in_cumulative_change_index + long_name = index of microphysics transport process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_temperature] + standard_name = index_of_temperature_in_cumulative_change_index + long_name = index of temperature in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in optional = F [ctei_rml] standard_name = grid_sensitive_critical_cloud_top_entrainment_instability_criteria @@ -831,7 +842,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -850,7 +861,7 @@ standard_name = air_temperature long_name = model layer mean temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -859,7 +870,7 @@ standard_name = x_wind long_name = zonal wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -868,7 +879,7 @@ standard_name = y_wind long_name = meridional wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -877,43 +888,43 @@ standard_name = tracer_concentration long_name = model layer mean tracer concentration units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = in optional = F [gt0] - standard_name = air_temperature_updated_by_physics + standard_name = air_temperature_of_new_state long_name = temperature updated by physics units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [gu0] - standard_name = x_wind_updated_by_physics + standard_name = x_wind_of_new_state long_name = zonal wind updated by physics units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [gv0] - standard_name = y_wind_updated_by_physics + standard_name = y_wind_of_new_state long_name = meridional wind updated by physics units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [gq0] - standard_name = tracer_concentration_updated_by_physics + standard_name = tracer_concentration_of_new_state long_name = tracer concentration updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = out @@ -955,7 +966,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -971,7 +982,7 @@ intent = in optional = F [dtp] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics timestep units = s dimensions = () @@ -983,7 +994,7 @@ standard_name = air_temperature long_name = model layer mean temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -992,7 +1003,7 @@ standard_name = x_wind long_name = zonal wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -1001,7 +1012,7 @@ standard_name = y_wind long_name = meridional wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -1010,85 +1021,85 @@ standard_name = tracer_concentration long_name = model layer mean tracer concentration units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = in optional = F [dudt] - standard_name = tendency_of_x_wind_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_x_wind long_name = updated tendency of the x wind units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [dvdt] - standard_name = tendency_of_y_wind_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_y_wind long_name = updated tendency of the y wind units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [dtdt] - standard_name = tendency_of_air_temperature_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_air_temperature long_name = updated tendency of the temperature units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [dqdt] - standard_name = tendency_of_tracers_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_tracers long_name = updated tendency of the tracers units = kg kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = in optional = F [gt0] - standard_name = air_temperature_updated_by_physics + standard_name = air_temperature_of_new_state long_name = temperature updated by physics units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [gu0] - standard_name = x_wind_updated_by_physics + standard_name = x_wind_of_new_state long_name = zonal wind updated by physics units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [gv0] - standard_name = y_wind_updated_by_physics + standard_name = y_wind_of_new_state long_name = meridional wind updated by physics units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [gq0] - standard_name = tracer_concentration_updated_by_physics + standard_name = tracer_concentration_of_new_state long_name = tracer concentration updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = out optional = F [ntiw] - standard_name = index_for_ice_cloud_condensate + standard_name = index_of_cloud_ice_mixing_ratio_in_tracer_concentration_array long_name = tracer index for ice water units = index dimensions = () @@ -1096,7 +1107,7 @@ intent = in optional = F [nqrimef] - standard_name = index_for_mass_weighted_rime_factor + standard_name = index_of_mass_weighted_rime_factor_in_tracer_concentration_array long_name = tracer index for mass weighted rime factor units = index dimensions = () @@ -1104,7 +1115,7 @@ intent = in optional = F [imp_physics] - standard_name = flag_for_microphysics_scheme + standard_name = control_for_microphysics_scheme long_name = choice of microphysics scheme units = flag dimensions = () @@ -1112,7 +1123,7 @@ intent = in optional = F [imp_physics_fer_hires] - standard_name = flag_for_fer_hires_microphysics_scheme + standard_name = identifier_for_fer_hires_microphysics_scheme long_name = choice of Ferrier-Aligo microphysics scheme units = flag dimensions = () @@ -1165,7 +1176,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -1229,7 +1240,7 @@ intent = in optional = F [ntcw] - standard_name = index_for_liquid_cloud_condensate + standard_name = index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array long_name = tracer index for cloud condensate (or liquid water) units = index dimensions = () @@ -1237,7 +1248,7 @@ intent = in optional = F [ntiw] - standard_name = index_for_ice_cloud_condensate + standard_name = index_of_cloud_ice_mixing_ratio_in_tracer_concentration_array long_name = tracer index for ice water units = index dimensions = () @@ -1245,7 +1256,7 @@ intent = in optional = F [ntclamt] - standard_name = index_for_cloud_amount + standard_name = index_of_cloud_area_fraction_in_atmosphere_layer_in_tracer_concentration_array long_name = tracer index for cloud amount integer units = index dimensions = () @@ -1253,7 +1264,7 @@ intent = in optional = F [ntrw] - standard_name = index_for_rain_water + standard_name = index_of_rain_mixing_ratio_in_tracer_concentration_array long_name = tracer index for rain water units = index dimensions = () @@ -1261,7 +1272,7 @@ intent = in optional = F [ntsw] - standard_name = index_for_snow_water + standard_name = index_of_snow_mixing_ratio_in_tracer_concentration_array long_name = tracer index for snow water units = index dimensions = () @@ -1269,7 +1280,7 @@ intent = in optional = F [ntrnc] - standard_name = index_for_rain_number_concentration + standard_name = index_of_mass_number_concentration_of_rain_in_tracer_concentration_array long_name = tracer index for rain number concentration units = index dimensions = () @@ -1277,7 +1288,7 @@ intent = in optional = F [ntsnc] - standard_name = index_for_snow_number_concentration + standard_name = index_of_mass_number_concentration_of_snow_in_tracer_concentration_array long_name = tracer index for snow number concentration units = index dimensions = () @@ -1285,7 +1296,7 @@ intent = in optional = F [ntgl] - standard_name = index_for_graupel + standard_name = index_of_graupel_mixing_ratio_in_tracer_concentration_array long_name = tracer index for graupel units = index dimensions = () @@ -1293,7 +1304,7 @@ intent = in optional = F [ntgnc] - standard_name = index_for_graupel_number_concentration + standard_name = index_of_mass_number_concentration_of_graupel_in_tracer_concentration_array long_name = tracer index for graupel number concentration units = index dimensions = () @@ -1319,25 +1330,25 @@ intent = in optional = F [gt0] - standard_name = air_temperature_updated_by_physics + standard_name = air_temperature_of_new_state long_name = temperature updated by physics units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [gq0] - standard_name = tracer_concentration_updated_by_physics + standard_name = tracer_concentration_of_new_state long_name = tracer concentration updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = in optional = F [imp_physics] - standard_name = flag_for_microphysics_scheme + standard_name = control_for_microphysics_scheme long_name = choice of microphysics scheme units = flag dimensions = () @@ -1345,7 +1356,7 @@ intent = in optional = F [imp_physics_mg] - standard_name = flag_for_morrison_gettelman_microphysics_scheme + standard_name = identifier_for_morrison_gettelman_microphysics_scheme long_name = choice of Morrison-Gettelman microphysics scheme units = flag dimensions = () @@ -1353,7 +1364,7 @@ intent = in optional = F [imp_physics_zhao_carr] - standard_name = flag_for_zhao_carr_microphysics_scheme + standard_name = identifier_for_zhao_carr_microphysics_scheme long_name = choice of Zhao-Carr microphysics scheme units = flag dimensions = () @@ -1361,7 +1372,7 @@ intent = in optional = F [imp_physics_zhao_carr_pdf] - standard_name = flag_for_zhao_carr_pdf_microphysics_scheme + standard_name = identifier_for_zhao_carr_pdf_microphysics_scheme long_name = choice of Zhao-Carr microphysics scheme with PDF clouds units = flag dimensions = () @@ -1369,7 +1380,7 @@ intent = in optional = F [imp_physics_gfdl] - standard_name = flag_for_gfdl_microphysics_scheme + standard_name = identifier_for_gfdl_microphysics_scheme long_name = choice of GFDL microphysics scheme units = flag dimensions = () @@ -1377,7 +1388,7 @@ intent = in optional = F [imp_physics_thompson] - standard_name = flag_for_thompson_microphysics_scheme + standard_name = identifier_for_thompson_microphysics_scheme long_name = choice of Thompson microphysics scheme units = flag dimensions = () @@ -1385,7 +1396,7 @@ intent = in optional = F [imp_physics_wsm6] - standard_name = flag_for_wsm6_microphysics_scheme + standard_name = identifier_for_wsm6_microphysics_scheme long_name = choice of WSM6 microphysics scheme units = flag dimensions = () @@ -1393,7 +1404,7 @@ intent = in optional = F [imp_physics_fer_hires] - standard_name = flag_for_fer_hires_microphysics_scheme + standard_name = identifier_for_fer_hires_microphysics_scheme long_name = choice of Ferrier-Aligo microphysics scheme units = flag dimensions = () @@ -1404,7 +1415,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -1413,16 +1424,16 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [prslk] - standard_name = dimensionless_exner_function_at_model_layers + standard_name = dimensionless_exner_function long_name = dimensionless Exner function at model layer centers units = none - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -1446,7 +1457,7 @@ intent = in optional = F [rhctop] - standard_name = critical_relative_humidity_at_top_of_atmosphere + standard_name = critical_relative_humidity_at_toa long_name = critical relative humidity at the top of atmosphere units = frac dimensions = () @@ -1455,7 +1466,7 @@ intent = in optional = F [rhcmax] - standard_name = maximum_critical_relative_humidity + standard_name = max_critical_relative_humidity long_name = maximum critical relative humidity units = frac dimensions = () @@ -1506,7 +1517,7 @@ intent = in optional = F [ras] - standard_name = flag_for_ras_deep_convection + standard_name = flag_for_relaxed_arakawa_schubert_deep_convection long_name = flag for ras convection scheme units = flag dimensions = () @@ -1525,7 +1536,7 @@ standard_name = convective_transportable_tracers long_name = array to contain cloud water and other convective trans. tracers units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers_for_convective_transport) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers_for_convective_transport) type = real kind = kind_phys intent = inout @@ -1534,7 +1545,7 @@ standard_name = critical_relative_humidity long_name = critical relative humidity units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -1543,7 +1554,7 @@ standard_name = cloud_condensed_water_mixing_ratio_save long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -1552,7 +1563,7 @@ standard_name = ice_water_mixing_ratio_save long_name = cloud ice water mixing ratio before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -1561,11 +1572,77 @@ standard_name = air_temperature_save_from_convective_parameterization long_name = air temperature after cumulus parameterization units = K + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[ldiag3d] + standard_name = flag_for_diagnostics_3D + long_name = flag for 3d diagnostic fields + units = flag + dimensions = () + type = logical + intent = in + optional = F +[qdiag3d] + standard_name = flag_for_tracer_diagnostics_3D + long_name = flag for 3d tracer diagnostic fields + units = flag + dimensions = () + type = logical + intent = in + optional = F +[index_of_process_conv_trans] + standard_name = index_of_convective_transport_process_in_cumulative_change_index + long_name = index of convective transport process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[save_lnc] + standard_name = liquid_cloud_number_concentration_save + long_name = liquid cloud number concentration before entering a physics scheme + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[save_inc] + standard_name = ice_cloud_number_concentration_save + long_name = ice cloud number concentration before entering a physics scheme + units = kg kg-1 dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout optional = F +[ntlnc] + standard_name = index_of_mass_number_concentration_of_cloud_droplets_in_tracer_concentration_array + long_name = tracer index for liquid number concentration + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntinc] + standard_name = index_of_mass_number_concentration_of_cloud_ice_in_tracer_concentration_array + long_name = tracer index for ice number concentration + units = index + dimensions = () + type = integer + intent = in + optional = F +[dtidx] + standard_name = cumulative_change_of_state_variables_outer_index + long_name = index of state-variable and process in last dimension of diagnostic tendencies array AKA cumulative_change_index + units = index + dimensions = (number_of_tracers_plus_one_hundred,number_of_cumulative_change_processes) + type = integer + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP @@ -1603,7 +1680,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -1618,14 +1695,6 @@ type = logical intent = in optional = F -[cplchm] - standard_name = flag_for_chemistry_coupling - long_name = flag controlling cplchm collection (default off) - units = flag - dimensions = () - type = logical - intent = in - optional = F [tracers_total] standard_name = number_of_total_tracers long_name = total number of tracers @@ -1643,7 +1712,7 @@ intent = in optional = F [ntcw] - standard_name = index_for_liquid_cloud_condensate + standard_name = index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array long_name = tracer index for cloud condensate (or liquid water) units = index dimensions = () @@ -1651,7 +1720,7 @@ intent = in optional = F [ntiw] - standard_name = index_for_ice_cloud_condensate + standard_name = index_of_cloud_ice_mixing_ratio_in_tracer_concentration_array long_name = tracer index for ice water units = index dimensions = () @@ -1659,7 +1728,7 @@ intent = in optional = F [ntclamt] - standard_name = index_for_cloud_amount + standard_name = index_of_cloud_area_fraction_in_atmosphere_layer_in_tracer_concentration_array long_name = tracer index for cloud amount integer units = index dimensions = () @@ -1667,7 +1736,7 @@ intent = in optional = F [ntrw] - standard_name = index_for_rain_water + standard_name = index_of_rain_mixing_ratio_in_tracer_concentration_array long_name = tracer index for rain water units = index dimensions = () @@ -1675,7 +1744,7 @@ intent = in optional = F [ntsw] - standard_name = index_for_snow_water + standard_name = index_of_snow_mixing_ratio_in_tracer_concentration_array long_name = tracer index for snow water units = index dimensions = () @@ -1683,7 +1752,7 @@ intent = in optional = F [ntrnc] - standard_name = index_for_rain_number_concentration + standard_name = index_of_mass_number_concentration_of_rain_in_tracer_concentration_array long_name = tracer index for rain number concentration units = index dimensions = () @@ -1691,7 +1760,7 @@ intent = in optional = F [ntsnc] - standard_name = index_for_snow_number_concentration + standard_name = index_of_mass_number_concentration_of_snow_in_tracer_concentration_array long_name = tracer index for snow number concentration units = index dimensions = () @@ -1699,7 +1768,7 @@ intent = in optional = F [ntgl] - standard_name = index_for_graupel + standard_name = index_of_graupel_mixing_ratio_in_tracer_concentration_array long_name = tracer index for graupel units = index dimensions = () @@ -1707,7 +1776,7 @@ intent = in optional = F [ntgnc] - standard_name = index_for_graupel_number_concentration + standard_name = index_of_mass_number_concentration_of_graupel_in_tracer_concentration_array long_name = tracer index for graupel number concentration units = index dimensions = () @@ -1715,7 +1784,7 @@ intent = in optional = F [ntlnc] - standard_name = index_for_liquid_cloud_number_concentration + standard_name = index_of_mass_number_concentration_of_cloud_droplets_in_tracer_concentration_array long_name = tracer index for liquid number concentration units = index dimensions = () @@ -1723,7 +1792,7 @@ intent = in optional = F [ntinc] - standard_name = index_for_ice_cloud_number_concentration + standard_name = index_of_mass_number_concentration_of_cloud_ice_in_tracer_concentration_array long_name = tracer index for ice number concentration units = index dimensions = () @@ -1739,7 +1808,7 @@ intent = in optional = F [imp_physics] - standard_name = flag_for_microphysics_scheme + standard_name = control_for_microphysics_scheme long_name = choice of microphysics scheme units = flag dimensions = () @@ -1747,7 +1816,7 @@ intent = in optional = F [imp_physics_gfdl] - standard_name = flag_for_gfdl_microphysics_scheme + standard_name = identifier_for_gfdl_microphysics_scheme long_name = choice of GFDL microphysics scheme units = flag dimensions = () @@ -1755,7 +1824,7 @@ intent = in optional = F [imp_physics_thompson] - standard_name = flag_for_thompson_microphysics_scheme + standard_name = identifier_for_thompson_microphysics_scheme long_name = choice of Thompson microphysics scheme units = flag dimensions = () @@ -1763,7 +1832,7 @@ intent = in optional = F [imp_physics_zhao_carr] - standard_name = flag_for_zhao_carr_microphysics_scheme + standard_name = identifier_for_zhao_carr_microphysics_scheme long_name = choice of Zhao-Carr microphysics scheme units = flag dimensions = () @@ -1771,15 +1840,23 @@ intent = in optional = F [imp_physics_zhao_carr_pdf] - standard_name = flag_for_zhao_carr_pdf_microphysics_scheme + standard_name = identifier_for_zhao_carr_pdf_microphysics_scheme long_name = choice of Zhao-Carr microphysics scheme with PDF clouds units = flag dimensions = () type = integer intent = in optional = F +[convert_dry_rho] + standard_name = flag_for_converting_hydrometeors_from_moist_to_dry_air + long_name = flag for converting hydrometeors from moist to dry air + units = flag + dimensions = () + type = logical + intent = in + optional = F [dtf] - standard_name = time_step_for_dynamics + standard_name = timestep_for_dynamics long_name = dynamics timestep units = s dimensions = () @@ -1791,7 +1868,7 @@ standard_name = cloud_condensed_water_mixing_ratio_save long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -1800,6 +1877,24 @@ standard_name = ice_water_mixing_ratio_save long_name = cloud ice water mixing ratio before entering a physics scheme units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[save_lnc] + standard_name = liquid_cloud_number_concentration_save + long_name = liquid cloud number concentration before entering a physics scheme + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[save_inc] + standard_name = ice_cloud_number_concentration_save + long_name = ice cloud number concentration before entering a physics scheme + units = kg kg-1 dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys @@ -1815,10 +1910,10 @@ intent = in optional = F [gq0] - standard_name = tracer_concentration_updated_by_physics + standard_name = tracer_concentration_of_new_state long_name = tracer concentration updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = inout @@ -1827,7 +1922,7 @@ standard_name = convective_transportable_tracers long_name = array to contain cloud water and other convective trans. tracers units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers_for_convective_transport) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers_for_convective_transport) type = real kind = kind_phys intent = inout @@ -1836,7 +1931,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -1845,13 +1940,13 @@ standard_name = air_temperature_save_from_convective_parameterization long_name = air temperature after cumulus parameterization units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [con_rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -1859,33 +1954,90 @@ kind = kind_phys intent = in optional = F +[con_eps] + standard_name = ratio_of_dry_air_to_water_vapor_gas_constants + long_name = rd/rv + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F [nwfa] - standard_name = water_friendly_aerosol_number_concentration + standard_name = mass_number_concentration_of_hygroscopic_aerosols long_name = number concentration of water-friendly aerosols units = kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [spechum] - standard_name = water_vapor_specific_humidity + standard_name = specific_humidity long_name = water vapor specific humidity units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F -[dqdti] - standard_name = instantaneous_water_vapor_specific_humidity_tendency_due_to_convection - long_name = instantaneous moisture tendency due to convection - units = kg kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) +[dtidx] + standard_name = cumulative_change_of_state_variables_outer_index + long_name = index of state-variable and process in last dimension of diagnostic tendencies array AKA cumulative_change_index + units = index + dimensions = (number_of_tracers_plus_one_hundred,number_of_cumulative_change_processes) + type = integer + intent = in + optional = F +[dtend] + standard_name = cumulative_change_of_state_variables + long_name = diagnostic tendencies for state variables + units = various + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_cumulative_change_processes) type = real kind = kind_phys intent = inout optional = F +[ntk] + standard_name = index_for_turbulent_kinetic_energy_convective_transport_tracer + long_name = index for turbulent kinetic energy in the convectively transported tracer array + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntke] + standard_name = index_of_turbulent_kinetic_energy_in_tracer_concentration_array + long_name = tracer index for turbulent kinetic energy + units = index + dimensions = () + type = integer + intent = in + optional = F +[ldiag3d] + standard_name = flag_for_diagnostics_3D + long_name = flag for 3d diagnostic fields + units = flag + dimensions = () + type = logical + intent = in + optional = F +[qdiag3d] + standard_name = flag_for_tracer_diagnostics_3D + long_name = flag for 3d tracer diagnostic fields + units = flag + dimensions = () + type = logical + intent = in + optional = F +[index_of_process_conv_trans] + standard_name = index_of_convective_transport_process_in_cumulative_change_index + long_name = index of convective transport process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP @@ -1923,7 +2075,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -1939,7 +2091,7 @@ intent = in optional = F [ntcw] - standard_name = index_for_liquid_cloud_condensate + standard_name = index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array long_name = tracer index for cloud condensate (or liquid water) units = index dimensions = () @@ -1947,7 +2099,7 @@ intent = in optional = F [ntiw] - standard_name = index_for_ice_cloud_condensate + standard_name = index_of_cloud_ice_mixing_ratio_in_tracer_concentration_array long_name = tracer index for ice water units = index dimensions = () @@ -1963,10 +2115,10 @@ intent = in optional = F [gq0] - standard_name = tracer_concentration_updated_by_physics + standard_name = tracer_concentration_of_new_state long_name = tracer concentration updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = in @@ -1975,7 +2127,7 @@ standard_name = convective_transportable_tracers long_name = array to contain cloud water and other convective trans. tracers units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers_for_convective_transport) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers_for_convective_transport) type = real kind = kind_phys intent = inout diff --git a/physics/GFS_surface_composites.F90 b/physics/GFS_surface_composites.F90 index 92367ef4b..7db8d6c19 100644 --- a/physics/GFS_surface_composites.F90 +++ b/physics/GFS_surface_composites.F90 @@ -4,6 +4,7 @@ module GFS_surface_composites_pre use machine, only: kind_phys + use physparam, only : iemsflg implicit none @@ -13,6 +14,8 @@ module GFS_surface_composites_pre real(kind=kind_phys), parameter :: zero = 0.0_kind_phys, one = 1.0_kind_phys, epsln = 1.0e-10_kind_phys + real(kind=kind_phys), parameter :: huge = 9.9692099683868690E36 ! NetCDF float FillValue + contains subroutine GFS_surface_composites_pre_init () @@ -24,43 +27,49 @@ end subroutine GFS_surface_composites_pre_finalize !> \section arg_table_GFS_surface_composites_pre_run Argument Table !! \htmlinclude GFS_surface_composites_pre_run.html !! - subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx, cplwav2atm, & - landfrac, lakefrac, lakedepth, oceanfrac, frland, & - dry, icy, lake, ocean, wet, hice, cice, zorl, zorlo, zorll, zorli, zorl_wat, & - zorl_lnd, zorl_ice, snowd, snowd_wat, snowd_lnd, snowd_ice, tprcp, tprcp_wat, & + subroutine GFS_surface_composites_pre_run (im, flag_init, flag_restart, lkm, lsm, lsm_noahmp, lsm_ruc, frac_grid, & + flag_cice, cplflx, cplwav2atm, landfrac, lakefrac, lakedepth, oceanfrac, frland, & + dry, icy, lake, use_flake, ocean, wet, hice, cice, zorlo, zorll, zorli, & + snowd, snowd_lnd, snowd_ice, tprcp, tprcp_wat, & tprcp_lnd, tprcp_ice, uustar, uustar_wat, uustar_lnd, uustar_ice, & - weasd, weasd_wat, weasd_lnd, weasd_ice, ep1d_ice, tsfc, tsfco, tsfcl, tsfc_wat, & - tsfc_lnd, tsfc_ice, tisfc, tice, tsurf, tsurf_wat, tsurf_lnd, tsurf_ice, & + weasd, weasd_lnd, weasd_ice, ep1d_ice, tsfc, tsfco, tsfcl, tsfc_wat, & + tsfc_lnd, tsfc_ice, tisfc, tice, tsurf_wat, tsurf_lnd, tsurf_ice, & gflx_ice, tgice, islmsk, islmsk_cice, slmsk, semis_rad, semis_wat, semis_lnd, semis_ice, & - qss, qss_wat, qss_lnd, qss_ice, hflx, hflx_wat, hflx_lnd, hflx_ice, & - min_lakeice, min_seaice, errmsg, errflg) + emis_lnd, emis_ice, qss, qss_wat, qss_lnd, qss_ice, hflx, hflx_wat, hflx_lnd, hflx_ice, & + min_lakeice, min_seaice, kdt, errmsg, errflg) implicit none ! Interface variables - integer, intent(in ) :: im, lkm - logical, intent(in ) :: frac_grid, cplflx, cplwav2atm - logical, dimension(im), intent(inout) :: flag_cice - logical, dimension(im), intent(inout) :: dry, icy, lake, ocean, wet - real(kind=kind_phys), dimension(im), intent(in ) :: landfrac, lakefrac, lakedepth, oceanfrac - real(kind=kind_phys), dimension(im), intent(inout) :: cice, hice - real(kind=kind_phys), dimension(im), intent( out) :: frland - real(kind=kind_phys), dimension(im), intent(in ) :: zorl, snowd, tprcp, uustar, weasd, qss, hflx - - real(kind=kind_phys), dimension(im), intent(inout) :: zorlo, zorll, zorli, tsfc, tsfco, tsfcl, tisfc, tsurf - real(kind=kind_phys), dimension(im), intent(inout) :: snowd_wat, snowd_lnd, snowd_ice, tprcp_wat, & - tprcp_lnd, tprcp_ice, zorl_wat, zorl_lnd, zorl_ice, tsfc_wat, tsfc_lnd, tsfc_ice, tsurf_wat, & - tsurf_lnd, tsurf_ice, uustar_wat, uustar_lnd, uustar_ice, weasd_wat, weasd_lnd, weasd_ice, & - qss_wat, qss_lnd, qss_ice, hflx_wat, hflx_lnd, hflx_ice, ep1d_ice, gflx_ice - real(kind=kind_phys), dimension(im), intent( out) :: tice + integer, intent(in ) :: im, lkm, kdt + integer, intent(in ) :: lsm, lsm_noahmp, lsm_ruc + logical, intent(in ) :: flag_init, flag_restart, frac_grid, cplflx, cplwav2atm + logical, dimension(:), intent(inout) :: flag_cice + logical, dimension(:), intent(inout) :: dry, icy, lake, use_flake, ocean, wet + real(kind=kind_phys), dimension(:), intent(in ) :: landfrac, lakefrac, lakedepth, oceanfrac + real(kind=kind_phys), dimension(:), intent(inout) :: cice, hice + real(kind=kind_phys), dimension(:), intent( out) :: frland + real(kind=kind_phys), dimension(:), intent(in ) :: snowd, tprcp, uustar, weasd, qss, hflx + + real(kind=kind_phys), dimension(:), intent(inout) :: tsfc, tsfco, tsfcl, tisfc + real(kind=kind_phys), dimension(:), intent(inout) :: snowd_lnd, snowd_ice, tprcp_wat, & + tprcp_lnd, tprcp_ice, tsfc_wat, tsfc_lnd, tsfc_ice, tsurf_wat,tsurf_lnd, tsurf_ice, & + uustar_wat, uustar_lnd, uustar_ice, weasd_lnd, weasd_ice, & + qss_wat, qss_lnd, qss_ice, hflx_wat, hflx_lnd, hflx_ice, ep1d_ice, gflx_ice + real(kind=kind_phys), dimension(:), intent( out) :: tice real(kind=kind_phys), intent(in ) :: tgice - integer, dimension(im), intent(inout) :: islmsk, islmsk_cice - real(kind=kind_phys), dimension(im), intent(in ) :: semis_rad - real(kind=kind_phys), dimension(im), intent(inout) :: semis_wat, semis_lnd, semis_ice, slmsk + integer, dimension(:), intent(inout) :: islmsk, islmsk_cice + real(kind=kind_phys), dimension(:), intent(in ) :: semis_rad + real(kind=kind_phys), dimension(:), intent(inout) :: semis_wat, semis_lnd, semis_ice, slmsk + real(kind=kind_phys), dimension(:), intent(inout) :: emis_lnd, emis_ice real(kind=kind_phys), intent(in ) :: min_lakeice, min_seaice - + ! + real(kind=kind_phys), dimension(:), intent(inout) :: zorlo, zorll, zorli + ! real(kind=kind_phys), parameter :: timin = 173.0_kind_phys ! minimum temperature allowed for snow/ice + real(kind=kind_phys) :: tem + ! CCPP error handling character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -86,6 +95,7 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx flag_cice(i) = .true. else islmsk_cice(i) = 2 + flag_cice(i) = .false. endif islmsk(i) = 2 else @@ -94,6 +104,7 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx flag_cice(i) = .false. islmsk_cice(i) = 0 islmsk(i) = 0 + icy(i) = .false. endif if (cice(i) < one) then wet(i) = .true. ! some open ocean @@ -101,15 +112,17 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx endif else if (cice(i) >= min_lakeice) then - icy(i) = .true. + icy(i) = .true. islmsk(i) = 2 - tisfc(i) = max(timin, min(tisfc(i), tgice)) + tisfc(i) = max(timin, min(tisfc(i), tgice)) else cice(i) = zero hice(i) = zero islmsk(i) = 0 + icy(i) = .false. endif islmsk_cice(i) = islmsk(i) + flag_cice(i) = .false. if (cice(i) < one) then wet(i) = .true. ! some open lake if (icy(i)) tsfco(i) = max(tisfc(i), tgice) @@ -120,6 +133,9 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx hice(i) = zero islmsk_cice(i) = 1 islmsk(i) = 1 + wet(i) = .false. + icy(i) = .false. + flag_cice(i) = .false. endif enddo @@ -132,18 +148,28 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx frland(i) = one cice(i) = zero hice(i) = zero + icy(i) = .false. else frland(i) = zero if (oceanfrac(i) > zero) then if (cice(i) >= min_seaice) then icy(i) = .true. tisfc(i) = max(timin, min(tisfc(i), tgice)) + if (cplflx) then + islmsk_cice(i) = 4 + flag_cice(i) = .true. + else + islmsk_cice(i) = 2 + flag_cice(i) = .false. + endif + islmsk(i) = 2 else cice(i) = zero hice(i) = zero flag_cice(i) = .false. islmsk(i) = 0 islmsk_cice(i) = 0 + icy(i) = .false. endif if (cice(i) < one) then wet(i) = .true. ! some open ocean @@ -153,13 +179,15 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx if (cice(i) >= min_lakeice) then icy(i) = .true. tisfc(i) = max(timin, min(tisfc(i), tgice)) + islmsk(i) = 2 else cice(i) = zero hice(i) = zero - flag_cice(i) = .false. islmsk(i) = 0 + icy(i) = .false. endif islmsk_cice(i) = islmsk(i) + flag_cice(i) = .false. if (cice(i) < one) then wet(i) = .true. ! some open lake if (icy(i)) tsfco(i) = max(tisfc(i), tgice) @@ -169,75 +197,112 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx enddo endif -! if (.not. cplflx .or. .not. frac_grid) then -! if (cplwav2atm) then -! do i=1,im -! zorll(i) = zorl(i) -! enddo -! else -! do i=1,im -! zorll(i) = zorl(i) -! zorlo(i) = zorl(i) -! enddo -! endif -! endif - do i=1,im tprcp_wat(i) = tprcp(i) tprcp_lnd(i) = tprcp(i) tprcp_ice(i) = tprcp(i) if (wet(i)) then ! Water uustar_wat(i) = uustar(i) - zorl_wat(i) = zorlo(i) tsfc_wat(i) = tsfco(i) tsurf_wat(i) = tsfco(i) -! weasd_wat(i) = weasd(i) -! snowd_wat(i) = snowd(i) - weasd_wat(i) = zero - snowd_wat(i) = zero - semis_wat(i) = 0.984_kind_phys - qss_wat(i) = qss(i) - hflx_wat(i) = hflx(i) + !-- reference emiss value for surface emissivity in setemis + ! 1-open water, 2-grass/shrub land, 3-bare soil, tundra, + ! 4-sandy desert, 5-rocky desert, 6-forest, 7-ice, 8-snow + !data emsref / 0.97, 0.95, 0.94, 0.90, 0.93, 0.96, 0.96, 0.99 / + semis_wat(i) = 0.97_kind_phys ! consistent with setemis + ! DH* + else + zorlo(i) = huge + ! *DH endif if (dry(i)) then ! Land uustar_lnd(i) = uustar(i) weasd_lnd(i) = weasd(i) - zorl_lnd(i) = zorll(i) tsfc_lnd(i) = tsfcl(i) tsurf_lnd(i) = tsfcl(i) - snowd_lnd(i) = snowd(i) + if (iemsflg == 2 .and. .not. flag_init) then + !-- use land emissivity from the LSM + semis_lnd(i) = emis_lnd(i) + else semis_lnd(i) = semis_rad(i) - qss_lnd(i) = qss(i) - hflx_lnd(i) = hflx(i) - end if + endif + ! DH* + else + zorll(i) = huge + ! *DH + endif if (icy(i)) then ! Ice uustar_ice(i) = uustar(i) weasd_ice(i) = weasd(i) - zorl_ice(i) = zorli(i) tsfc_ice(i) = tisfc(i) tsurf_ice(i) = tisfc(i) - snowd_ice(i) = snowd(i) ep1d_ice(i) = zero gflx_ice(i) = zero + if (iemsflg == 2 .and. (.not.flag_init .or. flag_restart) .and. lsm == lsm_ruc) then + !-- use emis_ice from RUC LSM with snow effect + semis_ice(i) = emis_ice(i) + else semis_ice(i) = 0.95_kind_phys - qss_ice(i) = qss(i) - hflx_ice(i) = hflx(i) + endif + ! DH* + else + zorli(i) = huge + ! *DH endif if (nint(slmsk(i)) /= 1) slmsk(i) = islmsk(i) enddo ! to prepare to separate lake from ocean under water category do i = 1, im - if(lkm == 1) then - if(lakefrac(i) >= 0.15 .and. lakedepth(i) > one) then - lake(i) = .true. - else - lake(i) = .false. - endif + if(wet(i) .and. lakefrac(i) > zero) then + lake(i) = .true. + if (lkm == 1 .and. lakefrac(i) >= 0.15 .and. lakedepth(i) > one) then + use_flake(i) = .true. + else + use_flake(i) = .false. + endif else - lake(i) = .false. + lake(i) = .false. + use_flake(i) = .false. endif enddo +! + if (.not. cplflx .or. kdt == 1) then + if (frac_grid) then + do i=1,im + if (dry(i)) then + if (icy(i)) then + tem = one / (cice(i)*(one-frland(i))) + snowd_ice(i) = max(zero, (snowd(i) - snowd_lnd(i)*frland(i)) * tem) + weasd_ice(i) = max(zero, (weasd(i) - weasd_lnd(i)*frland(i)) * tem) + endif + elseif (icy(i)) then + tem = one / cice(i) + snowd_lnd(i) = zero + snowd_ice(i) = snowd(i) * tem + weasd_lnd(i) = zero + weasd_ice(i) = weasd(i) * tem + endif + enddo + else + do i=1,im + if (dry(i)) then + snowd_lnd(i) = snowd(i) + weasd_lnd(i) = weasd(i) + snowd_ice(i) = zero + weasd_ice(i) = zero + elseif (icy(i)) then + snowd_lnd(i) = zero + weasd_lnd(i) = zero + tem = one / cice(i) + snowd_ice(i) = snowd(i) * tem + weasd_ice(i) = weasd(i) * tem + endif + enddo + endif + endif + +! write(0,*)' minmax of ice snow=',minval(snowd_ice),maxval(snowd_ice) ! Assign sea ice temperature to interstitial variable do i = 1, im @@ -277,12 +342,12 @@ subroutine GFS_surface_composites_inter_run (im, dry, icy, wet, semis_wat, semis implicit none ! Interface variables - integer, intent(in ) :: im - logical, dimension(im), intent(in ) :: dry, icy, wet - real(kind=kind_phys), dimension(im), intent(in ) :: semis_wat, semis_lnd, semis_ice, adjsfcdlw, & - adjsfcdsw, adjsfcnsw - real(kind=kind_phys), dimension(im), intent(inout) :: gabsbdlw_lnd, gabsbdlw_ice, gabsbdlw_wat - real(kind=kind_phys), dimension(im), intent(out) :: adjsfcusw + integer, intent(in ) :: im + logical, dimension(:), intent(in ) :: dry, icy, wet + real(kind=kind_phys), dimension(:), intent(in ) :: semis_wat, semis_lnd, semis_ice, adjsfcdlw, & + adjsfcdsw, adjsfcnsw + real(kind=kind_phys), dimension(:), intent(inout) :: gabsbdlw_lnd, gabsbdlw_ice, gabsbdlw_wat + real(kind=kind_phys), dimension(:), intent(out) :: adjsfcusw ! CCPP error handling character(len=*), intent(out) :: errmsg @@ -329,13 +394,17 @@ module GFS_surface_composites_post use machine, only: kind_phys + ! For consistent calculations of composite surface properties + use sfc_diff, only: stability + implicit none private public GFS_surface_composites_post_init, GFS_surface_composites_post_finalize, GFS_surface_composites_post_run - real(kind=kind_phys), parameter :: zero = 0.0_kind_phys, one = 1.0_kind_phys + real(kind=kind_phys), parameter :: zero = 0.0_kind_phys, one = 1.0_kind_phys, & + half = 0.5_kind_phys, qmin = 1.0e-8_kind_phys contains @@ -345,52 +414,68 @@ end subroutine GFS_surface_composites_post_init subroutine GFS_surface_composites_post_finalize() end subroutine GFS_surface_composites_post_finalize -#if 0 !> \section arg_table_GFS_surface_composites_post_run Argument Table !! \htmlinclude GFS_surface_composites_post_run.html !! -#endif subroutine GFS_surface_composites_post_run ( & - im, kice, km, cplflx, cplwav2atm, frac_grid, flag_cice, islmsk, dry, wet, icy, landfrac, lakefrac, oceanfrac, & - zorl, zorlo, zorll, zorli, zorl_wat, zorl_lnd, zorl_ice, & + im, kice, km, rd, rvrdm1, cplflx, cplwav2atm, frac_grid, flag_cice, thsfc_loc, islmsk, dry, wet, icy, wind, t1, q1, prsl1, & + landfrac, lakefrac, oceanfrac, zorl, zorlo, zorll, zorli, garea, & cd, cd_wat, cd_lnd, cd_ice, cdq, cdq_wat, cdq_lnd, cdq_ice, rb, rb_wat, rb_lnd, rb_ice, stress, stress_wat, stress_lnd, & stress_ice, ffmm, ffmm_wat, ffmm_lnd, ffmm_ice, ffhh, ffhh_wat, ffhh_lnd, ffhh_ice, uustar, uustar_wat, uustar_lnd, & - uustar_ice, fm10, fm10_wat, fm10_lnd, fm10_ice, fh2, fh2_wat, fh2_lnd, fh2_ice, tsurf, tsurf_wat, tsurf_lnd, tsurf_ice, & + uustar_ice, fm10, fm10_wat, fm10_lnd, fm10_ice, fh2, fh2_wat, fh2_lnd, fh2_ice, tsurf_wat, tsurf_lnd, tsurf_ice, & cmm, cmm_wat, cmm_lnd, cmm_ice, chh, chh_wat, chh_lnd, chh_ice, gflx, gflx_wat, gflx_lnd, gflx_ice, ep1d, ep1d_wat, & - ep1d_lnd, ep1d_ice, weasd, weasd_wat, weasd_lnd, weasd_ice, snowd, snowd_wat, snowd_lnd, snowd_ice, tprcp, tprcp_wat, & + ep1d_lnd, ep1d_ice, weasd, weasd_lnd, weasd_ice, snowd, snowd_lnd, snowd_ice, tprcp, tprcp_wat, & tprcp_lnd, tprcp_ice, evap, evap_wat, evap_lnd, evap_ice, hflx, hflx_wat, hflx_lnd, hflx_ice, qss, qss_wat, qss_lnd, & - qss_ice, tsfc, tsfco, tsfcl, tsfc_wat, tsfc_lnd, tsfc_ice, tisfc, tice, hice, cice, min_seaice, tiice, stc, errmsg, errflg) + qss_ice, tsfc, tsfco, tsfcl, tsfc_wat, tsfc_lnd, tsfc_ice, tisfc, tice, hice, cice, min_seaice, tiice, & + sigmaf, zvfun, lheatstrg, h0facu, h0facs, hflxq, hffac, stc, & + grav, prsik1, prslk1, prslki, z1, ztmax_wat, ztmax_lnd, ztmax_ice, errmsg, errflg) implicit none integer, intent(in) :: im, kice, km logical, intent(in) :: cplflx, frac_grid, cplwav2atm - logical, dimension(im), intent(in) :: flag_cice, dry, wet, icy - integer, dimension(im), intent(in) :: islmsk - real(kind=kind_phys), dimension(im), intent(in) :: landfrac, lakefrac, oceanfrac, & - zorl_wat, zorl_lnd, zorl_ice, cd_wat, cd_lnd, cd_ice, cdq_wat, cdq_lnd, cdq_ice, rb_wat, rb_lnd, rb_ice, stress_wat, & + logical, intent(in) :: lheatstrg + logical, dimension(:), intent(in) :: flag_cice, dry, wet, icy + integer, dimension(:), intent(in) :: islmsk + real(kind=kind_phys), dimension(:), intent(in) :: wind, t1, q1, prsl1, landfrac, lakefrac, oceanfrac, & + cd_wat, cd_lnd, cd_ice, cdq_wat, cdq_lnd, cdq_ice, rb_wat, rb_lnd, rb_ice, stress_wat, & stress_lnd, stress_ice, ffmm_wat, ffmm_lnd, ffmm_ice, ffhh_wat, ffhh_lnd, ffhh_ice, uustar_wat, uustar_lnd, uustar_ice, & fm10_wat, fm10_lnd, fm10_ice, fh2_wat, fh2_lnd, fh2_ice, tsurf_wat, tsurf_lnd, tsurf_ice, cmm_wat, cmm_lnd, cmm_ice, & - chh_wat, chh_lnd, chh_ice, gflx_wat, gflx_lnd, gflx_ice, ep1d_wat, ep1d_lnd, ep1d_ice, weasd_wat, weasd_lnd, weasd_ice, & - snowd_wat, snowd_lnd, snowd_ice,tprcp_wat, tprcp_lnd, tprcp_ice, evap_wat, evap_lnd, evap_ice, hflx_wat, hflx_lnd, & - hflx_ice, qss_wat, qss_lnd, qss_ice, tsfc_wat, tsfc_lnd, tsfc_ice + chh_wat, chh_lnd, chh_ice, gflx_wat, gflx_lnd, gflx_ice, ep1d_wat, ep1d_lnd, ep1d_ice, weasd_lnd, weasd_ice, & + snowd_lnd, snowd_ice, tprcp_wat, tprcp_lnd, tprcp_ice, evap_wat, evap_lnd, evap_ice, hflx_wat, hflx_lnd, & + hflx_ice, qss_wat, qss_lnd, qss_ice, tsfc_wat, tsfc_lnd, tsfc_ice, zorlo, zorll, zorli, garea - real(kind=kind_phys), dimension(im), intent(inout) :: zorl, zorlo, zorll, zorli, cd, cdq, rb, stress, ffmm, ffhh, uustar, fm10, & - fh2, tsurf, cmm, chh, gflx, ep1d, weasd, snowd, tprcp, evap, hflx, qss, tsfc, tsfco, tsfcl, tisfc + real(kind=kind_phys), dimension(:), intent(inout) :: zorl, cd, cdq, rb, stress, ffmm, ffhh, uustar, fm10, & + fh2, cmm, chh, gflx, ep1d, weasd, snowd, tprcp, evap, hflx, qss, tsfc, tsfco, tsfcl, tisfc - real(kind=kind_phys), dimension(im), intent(in ) :: tice ! interstitial sea ice temperature - real(kind=kind_phys), dimension(im), intent(inout) :: hice, cice + real(kind=kind_phys), dimension(:), intent(in ) :: tice ! interstitial sea ice temperature + real(kind=kind_phys), dimension(:), intent(inout) :: hice, cice + real(kind=kind_phys), dimension(:), intent(inout) :: sigmaf, zvfun, hflxq, hffac + real(kind=kind_phys), intent(in ) :: h0facu, h0facs real(kind=kind_phys), intent(in ) :: min_seaice + real(kind=kind_phys), intent(in ) :: rd, rvrdm1 + + real(kind=kind_phys), dimension(:,:), intent(in ) :: tiice + real(kind=kind_phys), dimension(:,:), intent(inout) :: stc - real(kind=kind_phys), dimension(im, kice), intent(in ) :: tiice - real(kind=kind_phys), dimension(im, km), intent(inout) :: stc + ! Additional data needed for calling "stability" + logical, intent(in ) :: thsfc_loc + real(kind=kind_phys), intent(in ) :: grav + real(kind=kind_phys), dimension(:), intent(in ) :: prsik1, prslk1, prslki, z1 + real(kind=kind_phys), dimension(:), intent(in ) :: ztmax_wat, ztmax_lnd, ztmax_ice character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! Local variables integer :: i, k - real(kind=kind_phys) :: txl, txi, txo, wfrac + real(kind=kind_phys) :: txl, txi, txo, wfrac, q0, rho + ! For calling "stability" + real(kind=kind_phys) :: tsurf, virtfac, tv1, thv1, tvs, z0max, ztmax +! + real(kind=kind_phys) :: tem1, tem2, gdx + real(kind=kind_phys), parameter :: z0lo=0.1, z0up=1.0 +! ! Initialize CCPP error handling variables errmsg = '' @@ -408,45 +493,133 @@ subroutine GFS_surface_composites_post_run ( txi = cice(i) * wfrac ! txi = ice fraction wrt whole cell txo = max(zero, wfrac-txi) ! txo = open water fraction - zorl(i) = txl*zorl_lnd(i) + txi*zorl_ice(i) + txo*zorl_wat(i) - cd(i) = txl*cd_lnd(i) + txi*cd_ice(i) + txo*cd_wat(i) - cdq(i) = txl*cdq_lnd(i) + txi*cdq_ice(i) + txo*cdq_wat(i) - rb(i) = txl*rb_lnd(i) + txi*rb_ice(i) + txo*rb_wat(i) - stress(i) = txl*stress_lnd(i) + txi*stress_ice(i) + txo*stress_wat(i) - ffmm(i) = txl*ffmm_lnd(i) + txi*ffmm_ice(i) + txo*ffmm_wat(i) - ffhh(i) = txl*ffhh_lnd(i) + txi*ffhh_ice(i) + txo*ffhh_wat(i) - uustar(i) = txl*uustar_lnd(i) + txi*uustar_ice(i) + txo*uustar_wat(i) - fm10(i) = txl*fm10_lnd(i) + txi*fm10_ice(i) + txo*fm10_wat(i) - fh2(i) = txl*fh2_lnd(i) + txi*fh2_ice(i) + txo*fh2_wat(i) - !tsurf(i) = txl*tsurf_lnd(i) + txi*tice(i) + txo*tsurf_wat(i) - !tsurf(i) = txl*tsurf_lnd(i) + txi*tsurf_ice(i) + txo*tsurf_wat(i) ! not used again! Moorthi - cmm(i) = txl*cmm_lnd(i) + txi*cmm_ice(i) + txo*cmm_wat(i) - chh(i) = txl*chh_lnd(i) + txi*chh_ice(i) + txo*chh_wat(i) !gflx(i) = txl*gflx_lnd(i) + txi*gflx_ice(i) + txo*gflx_wat(i) ep1d(i) = txl*ep1d_lnd(i) + txi*ep1d_ice(i) + txo*ep1d_wat(i) - !weasd(i) = txl*weasd_lnd(i) + txi*weasd_ice(i) + txo*weasd_wat(i) - !snowd(i) = txl*snowd_lnd(i) + txi*snowd_ice(i) + txo*snowd_wat(i) weasd(i) = txl*weasd_lnd(i) + txi*weasd_ice(i) snowd(i) = txl*snowd_lnd(i) + txi*snowd_ice(i) !tprcp(i) = txl*tprcp_lnd(i) + txi*tprcp_ice(i) + txo*tprcp_wat(i) - - if (.not. flag_cice(i) .and. islmsk(i) == 2) then - evap(i) = txl*evap_lnd(i) + wfrac*evap_ice(i) - hflx(i) = txl*hflx_lnd(i) + wfrac*hflx_ice(i) - qss(i) = txl*qss_lnd(i) + wfrac*qss_ice(i) - gflx(i) = txl*gflx_lnd(i) + wfrac*gflx_ice(i) +! + sigmaf(i) = txl*sigmaf(i) + + if (.not. flag_cice(i)) then + if (islmsk(i) == 2) then + evap(i) = txl*evap_lnd(i) + wfrac*evap_ice(i) + hflx(i) = txl*hflx_lnd(i) + wfrac*hflx_ice(i) + qss(i) = txl*qss_lnd(i) + wfrac*qss_ice(i) + gflx(i) = txl*gflx_lnd(i) + wfrac*gflx_ice(i) + else + evap(i) = txl*evap_lnd(i) + wfrac*evap_wat(i) + hflx(i) = txl*hflx_lnd(i) + wfrac*hflx_wat(i) + qss(i) = txl*qss_lnd(i) + wfrac*qss_wat(i) + gflx(i) = txl*gflx_lnd(i) + wfrac*gflx_wat(i) + endif else evap(i) = txl*evap_lnd(i) + txi*evap_ice(i) + txo*evap_wat(i) hflx(i) = txl*hflx_lnd(i) + txi*hflx_ice(i) + txo*hflx_wat(i) qss(i) = txl*qss_lnd(i) + txi*qss_ice(i) + txo*qss_wat(i) gflx(i) = txl*gflx_lnd(i) + txi*gflx_ice(i) + txo*gflx_wat(i) endif - tsfc(i) = txl*tsfc_lnd(i) + txi*tice(i) + txo*tsfc_wat(i) - zorll(i) = zorl_lnd(i) - zorli(i) = zorl_ice(i) - zorlo(i) = zorl_wat(i) - +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! Call stability for consistent surface properties. Currently this comes from ! +! the GFS surface layere scheme (sfc_diff), regardless of the actual surface ! +! layer parameterization being used - to be extended in the future ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + + tsfc(i) = ( txl * cdq_lnd(i) * tsfc_lnd(i) & + + txi * cdq_ice(i) * tice(i) & ! DH* Ben had tsurf_ice(i), but GFS_surface_composites_post_run uses tice instead + + txo * cdq_wat(i) * tsfc_wat(i)) & + / (txl * cdq_lnd(i) + txi * cdq_ice(i) + txo * cdq_wat(i) ) + tsurf = ( txl * cdq_lnd(i) * tsurf_lnd(i) & + + txi * cdq_ice(i) * tsurf_ice(i) & + + txo * cdq_wat(i) * tsurf_wat(i)) & + / (txl * cdq_lnd(i) + txi * cdq_ice(i) + txo * cdq_wat(i) ) + + q0 = max( q1(i), qmin ) + virtfac = one + rvrdm1 * q0 + + tv1 = t1(i) * virtfac ! Virtual temperature in middle of lowest layer + if(thsfc_loc) then ! Use local potential temperature + thv1 = t1(i) * prslki(i) * virtfac ! Theta-v at lowest level + tvs = half * (tsfc(i)+tsurf) * virtfac + else ! Use potential temperature referenced to 1000 hPa + thv1 = t1(i) / prslk1(i) * virtfac ! Theta-v at lowest level + tvs = half * (tsfc(i)+tsurf)/prsik1(i) * virtfac + endif + + zorl(i) = exp(txl*log(zorll(i)) + txi*log(zorli(i)) + txo*log(zorlo(i))) + z0max = 0.01_kind_phys * zorl(i) + ztmax = exp(txl*log(ztmax_lnd(i)) + txi*log(ztmax_ice(i)) + txo*log(ztmax_wat(i))) + + ! Only actually need to call "stability" if multiple surface types exist... + if(txl .eq. one) then ! 100% land + rb(i) = rb_lnd(i) + ffmm(i) = ffmm_lnd(i) + ffhh(i) = ffhh_lnd(i) + fm10(i) = fm10_lnd(i) + fh2(i) = fh2_lnd(i) + cd(i) = cd_lnd(i) + cdq(i) = cdq_lnd(i) + stress(i) = stress_lnd(i) + uustar(i) = uustar_lnd(i) + elseif(txo .eq. one) then ! 100% open water + rb(i) = rb_wat(i) + ffmm(i) = ffmm_wat(i) + ffhh(i) = ffhh_wat(i) + fm10(i) = fm10_wat(i) + fh2(i) = fh2_wat(i) + cd(i) = cd_wat(i) + cdq(i) = cdq_wat(i) + stress(i) = stress_wat(i) + uustar(i) = uustar_wat(i) + elseif(txi .eq. one) then ! 100% ice + rb(i) = rb_ice(i) + ffmm(i) = ffmm_ice(i) + ffhh(i) = ffhh_ice(i) + fm10(i) = fm10_ice(i) + fh2(i) = fh2_ice(i) + cd(i) = cd_ice(i) + cdq(i) = cdq_ice(i) + stress(i) = stress_ice(i) + uustar(i) = uustar_ice(i) + else ! Mix of multiple surface types (land, water, and/or ice) +! +! re-compute zvfun with composite surface roughness & green vegetation fraction +! + tem1 = (z0max - z0lo) / (z0up - z0lo) + tem1 = min(max(tem1, zero), one) + tem2 = max(sigmaf(i), 0.1) + zvfun(i) = sqrt(tem1 * tem2) + gdx = sqrt(garea(i)) +! +! re-compute variables for canopy heat storage parameterization with the updated zvfun +! in the fractional grid +! + hflxq(i) = hflx(i) + hffac(i) = 1.0 + if (lheatstrg) then + if(hflx(i) > 0.) then + hffac(i) = h0facu * zvfun(i) + else + hffac(i) = h0facs * zvfun(i) + endif + hffac(i) = 1. + hffac(i) + hflxq(i) = hflx(i) / hffac(i) + endif +! + call stability(z1(i), zvfun(i), gdx, tv1, thv1, wind(i), & ! inputs + z0max, ztmax, tvs, grav, thsfc_loc, & ! inputs + rb(i), ffmm(i), ffhh(i), fm10(i), fh2(i), cd(i), cdq(i), & ! outputs + stress(i), uustar(i)) + endif ! Checking to see if point is one or multiple surface types + + ! BWG, 2021/02/25: cmm=cd*wind, chh=cdq*wind, so use composite cd, cdq + rho = prsl1(i) / (rd*tv1) + cmm(i) = cd(i)*wind(i) !txl*cmm_lnd(i) + txi*cmm_ice(i) + txo*cmm_wat(i) + chh(i) = rho*cdq(i)*wind(i) !txl*chh_lnd(i) + txi*chh_ice(i) + txo*chh_wat(i) + +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + if (dry(i)) then tsfcl(i) = tsfc_lnd(i) ! over land elseif (wet(i)) then @@ -496,7 +669,7 @@ subroutine GFS_surface_composites_post_run ( do i=1,im if (islmsk(i) == 1) then - zorl(i) = zorl_lnd(i) + zorl(i) = zorll(i) cd(i) = cd_lnd(i) cdq(i) = cdq_lnd(i) rb(i) = rb_lnd(i) @@ -506,7 +679,6 @@ subroutine GFS_surface_composites_post_run ( uustar(i) = uustar_lnd(i) fm10(i) = fm10_lnd(i) fh2(i) = fh2_lnd(i) - !tsurf(i) = tsurf_lnd(i) tsfcl(i) = tsfc_lnd(i) ! over land tsfc(i) = tsfcl(i) tsfco(i) = tsfc(i) @@ -517,14 +689,13 @@ subroutine GFS_surface_composites_post_run ( ep1d(i) = ep1d_lnd(i) weasd(i) = weasd_lnd(i) snowd(i) = snowd_lnd(i) - !tprcp(i) = tprcp_lnd(i) evap(i) = evap_lnd(i) hflx(i) = hflx_lnd(i) qss(i) = qss_lnd(i) hice(i) = zero cice(i) = zero elseif (islmsk(i) == 0) then - zorl(i) = zorl_wat(i) + zorl(i) = zorlo(i) cd(i) = cd_wat(i) cdq(i) = cdq_wat(i) rb(i) = rb_wat(i) @@ -534,7 +705,6 @@ subroutine GFS_surface_composites_post_run ( uustar(i) = uustar_wat(i) fm10(i) = fm10_wat(i) fh2(i) = fh2_wat(i) - !tsurf(i) = tsurf_wat(i) tsfco(i) = tsfc_wat(i) ! over lake (and ocean when uncoupled) tsfc(i) = tsfco(i) tsfcl(i) = tsfc(i) @@ -543,16 +713,15 @@ subroutine GFS_surface_composites_post_run ( chh(i) = chh_wat(i) gflx(i) = gflx_wat(i) ep1d(i) = ep1d_wat(i) - weasd(i) = weasd_wat(i) - snowd(i) = snowd_wat(i) - !tprcp(i) = tprcp_wat(i) + weasd(i) = zero + snowd(i) = zero evap(i) = evap_wat(i) hflx(i) = hflx_wat(i) qss(i) = qss_wat(i) hice(i) = zero cice(i) = zero else ! islmsk(i) == 2 - zorl(i) = zorl_ice(i) + zorl(i) = zorli(i) cd(i) = cd_ice(i) cdq(i) = cdq_ice(i) rb(i) = rb_ice(i) @@ -562,26 +731,21 @@ subroutine GFS_surface_composites_post_run ( fm10(i) = fm10_ice(i) fh2(i) = fh2_ice(i) stress(i) = stress_ice(i) - !tsurf(i) = tsurf_ice(i) cmm(i) = cmm_ice(i) chh(i) = chh_ice(i) gflx(i) = gflx_ice(i) ep1d(i) = ep1d_ice(i) - weasd(i) = weasd_ice(i) - snowd(i) = snowd_ice(i) - !tprcp(i) = cice(i)*tprcp_ice(i) + (one-cice(i))*tprcp_wat(i) + weasd(i) = weasd_ice(i) * cice(i) + snowd(i) = snowd_ice(i) * cice(i) qss(i) = qss_ice(i) tsfc(i) = tsfc_ice(i) evap(i) = evap_ice(i) hflx(i) = hflx_ice(i) - qss(i) = qss_ice(i) - tisfc(i) = tice(i) - if (.not. flag_cice(i)) then -! tisfc(i) = tice(i) ! over lake ice (and sea ice when uncoupled) - zorl(i) = cice(i) * zorl_ice(i) + (one - cice(i)) * zorl_wat(i) - tsfc(i) = tsfc_ice(i) ! over lake (and ocean when uncoupled) - elseif (wet(i)) then - if (cice(i) >= min_seaice) then ! this was already done for lake ice in sfc_sice + tisfc(i) = tice(i) ! over lake ice (and sea ice when uncoupled) + tsfc(i) = tsfc_ice(i) ! over lake (and ocean when uncoupled) +! + if (flag_cice(i)) then + if (wet(i) .and. cice(i) >= min_seaice) then ! this was already done for lake ice in sfc_sice txi = cice(i) txo = one - txi evap(i) = txi * evap_ice(i) + txo * evap_wat(i) @@ -590,32 +754,23 @@ subroutine GFS_surface_composites_post_run ( stress(i) = txi * stress_ice(i) + txo * stress_wat(i) qss(i) = txi * qss_ice(i) + txo * qss_wat(i) ep1d(i) = txi * ep1d_ice(i) + txo * ep1d_wat(i) - zorl(i) = txi * zorl_ice(i) + txo * zorl_wat(i) - else - evap(i) = evap_wat(i) - hflx(i) = hflx_wat(i) - tsfc(i) = tsfc_wat(i) - stress(i) = stress_wat(i) - qss(i) = qss_wat(i) - ep1d(i) = ep1d_wat(i) - zorl(i) = zorl_wat(i) + zorl(i) = exp(txi*log(zorli(i)) + txo*log(zorlo(i))) endif + elseif (wet(i)) then ! return updated lake ice thickness & concentration to global array + zorl(i) = exp(cice(i)*log(zorli(i)) + (one-cice(i))*log(zorlo(i))) endif +! if (wet(i)) then tsfco(i) = tsfc_wat(i) else tsfco(i) = tsfc(i) endif tsfcl(i) = tsfc(i) - do k=1,kice ! store tiice in stc to reduce output in the nonfrac grid case + do k=1,min(kice,km) ! store tiice in stc to reduce output in the nonfrac grid case stc(i,k) = tiice(i,k) - end do + enddo endif - zorll(i) = zorl_lnd(i) - zorlo(i) = zorl_wat(i) - zorli(i) = zorl_ice(i) - enddo endif ! if (frac_grid) diff --git a/physics/GFS_surface_composites.meta b/physics/GFS_surface_composites.meta index 21b308357..ac7822bad 100644 --- a/physics/GFS_surface_composites.meta +++ b/physics/GFS_surface_composites.meta @@ -1,7 +1,7 @@ [ccpp-table-properties] name = GFS_surface_composites_pre type = scheme - dependencies = machine.F + dependencies = machine.F,sfc_diff.f ######################################################################## [ccpp-arg-table] @@ -15,16 +15,56 @@ type = integer intent = in optional = F +[flag_init] + standard_name = flag_for_first_timestep + long_name = flag signaling first time step for time integration loop + units = flag + dimensions = () + type = logical + intent = in + optional = F +[flag_restart] + standard_name = flag_for_restart + long_name = flag for restart (warmstart) or coldstart + units = flag + dimensions = () + type = logical + intent = in + optional = F [lkm] - standard_name = flag_for_lake_surface_scheme + standard_name = control_for_lake_surface_scheme long_name = flag for lake surface model units = flag dimensions = () type = integer intent = in optional = F +[lsm] + standard_name = control_for_land_surface_scheme + long_name = flag for land surface model + units = flag + dimensions = () + type = integer + intent = in + optional = F +[lsm_noahmp] + standard_name = identifier_for_noahmp_land_surface_scheme + long_name = flag for NOAH MP land surface model + units = flag + dimensions = () + type = integer + intent = in + optional = F +[lsm_ruc] + standard_name = identifier_for_ruc_land_surface_scheme + long_name = flag for RUC land surface model + units = flag + dimensions = () + type = integer + intent = in + optional = F [frac_grid] - standard_name = flag_for_fractional_grid + standard_name = flag_for_fractional_landmask long_name = flag for fractional grid units = flag dimensions = () @@ -37,10 +77,10 @@ units = flag dimensions = (horizontal_loop_extent) type = logical - intent = in + intent = inout optional = F [cplflx] - standard_name = flag_for_flux_coupling + standard_name = flag_for_surface_flux_coupling long_name = flag controlling cplflx collection (default off) units = flag dimensions = () @@ -48,7 +88,7 @@ intent = in optional = F [cplwav2atm] - standard_name = flag_for_wave_coupling_to_atm + standard_name = flag_for_one_way_ocean_wave_coupling_to_atmosphere long_name = flag controlling ocean wave coupling to the atmosphere (default off) units = flag dimensions = () @@ -124,6 +164,14 @@ type = logical intent = inout optional = F +[use_flake] + standard_name = flag_for_using_flake + long_name = flag indicating lake points using flake model + units = flag + dimensions = (horizontal_loop_extent) + type = logical + intent = inout + optional = F [ocean] standard_name = flag_nonzero_ocean_surface_fraction long_name = flag indicating presence of some ocean surface area fraction @@ -150,7 +198,7 @@ intent = inout optional = F [cice] - standard_name = sea_ice_concentration + standard_name = sea_ice_area_fraction_of_sea_area_fraction long_name = ice fraction over open water units = frac dimensions = (horizontal_loop_extent) @@ -158,18 +206,9 @@ kind = kind_phys intent = inout optional = F -[zorl] - standard_name = surface_roughness_length - long_name = surface roughness length - units = cm - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F [zorlo] - standard_name = surface_roughness_length_over_ocean - long_name = surface roughness length over ocean + standard_name = surface_roughness_length_over_water + long_name = surface roughness length over water units = cm dimensions = (horizontal_loop_extent) type = real @@ -194,35 +233,8 @@ kind = kind_phys intent = inout optional = F -[zorl_wat] - standard_name = surface_roughness_length_over_ocean_interstitial - long_name = surface roughness length over ocean (temporary use as interstitial) - units = cm - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = inout - optional = F -[zorl_lnd] - standard_name = surface_roughness_length_over_land_interstitial - long_name = surface roughness length over land (temporary use as interstitial) - units = cm - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = inout - optional = F -[zorl_ice] - standard_name = surface_roughness_length_over_ice_interstitial - long_name = surface roughness length over ice (temporary use as interstitial) - units = cm - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = inout - optional = F [snowd] - standard_name = surface_snow_thickness_water_equivalent + standard_name = lwe_surface_snow long_name = water equivalent snow depth units = mm dimensions = (horizontal_loop_extent) @@ -230,15 +242,6 @@ kind = kind_phys intent = in optional = F -[snowd_wat] - standard_name = surface_snow_thickness_water_equivalent_over_ocean - long_name = water equivalent snow depth over ocean - units = mm - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = inout - optional = F [snowd_lnd] standard_name = surface_snow_thickness_water_equivalent_over_land long_name = water equivalent snow depth over land @@ -267,8 +270,8 @@ intent = in optional = F [tprcp_wat] - standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_ocean - long_name = total precipitation amount in each time step over ocean + standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_water + long_name = total precipitation amount in each time step over water units = m dimensions = (horizontal_loop_extent) type = real @@ -303,8 +306,8 @@ intent = in optional = F [uustar_wat] - standard_name = surface_friction_velocity_over_ocean - long_name = surface friction velocity over ocean + standard_name = surface_friction_velocity_over_water + long_name = surface friction velocity over water units = m s-1 dimensions = (horizontal_loop_extent) type = real @@ -330,7 +333,7 @@ intent = inout optional = F [weasd] - standard_name = water_equivalent_accumulated_snow_depth + standard_name = lwe_thickness_of_surface_snow_amount long_name = water equiv of acc snow depth over land and sea ice units = mm dimensions = (horizontal_loop_extent) @@ -338,15 +341,6 @@ kind = kind_phys intent = in optional = F -[weasd_wat] - standard_name = water_equivalent_accumulated_snow_depth_over_ocean - long_name = water equiv of acc snow depth over ocean - units = mm - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = inout - optional = F [weasd_lnd] standard_name = water_equivalent_accumulated_snow_depth_over_land long_name = water equiv of acc snow depth over land @@ -402,8 +396,8 @@ intent = inout optional = F [tsfc_wat] - standard_name = surface_skin_temperature_over_ocean_interstitial - long_name = surface skin temperature over ocean (temporary use as interstitial) + standard_name = surface_skin_temperature_over_water_interstitial + long_name = surface skin temperature over water (temporary use as interstitial) units = K dimensions = (horizontal_loop_extent) type = real @@ -446,18 +440,9 @@ kind = kind_phys intent = out optional = F -[tsurf] - standard_name = surface_skin_temperature_after_iteration - long_name = surface skin temperature after iteration - units = K - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = inout - optional = F [tsurf_wat] - standard_name = surface_skin_temperature_after_iteration_over_ocean - long_name = surface skin temperature after iteration over ocean + standard_name = surface_skin_temperature_after_iteration_over_water + long_name = surface skin temperature after iteration over water units = K dimensions = (horizontal_loop_extent) type = real @@ -517,7 +502,7 @@ intent = inout optional = F [slmsk] - standard_name = sea_land_ice_mask_real + standard_name = area_type long_name = landmask: sea/land/ice=0/1/2 units = flag dimensions = (horizontal_loop_extent) @@ -535,8 +520,8 @@ intent = in optional = F [semis_wat] - standard_name = surface_longwave_emissivity_over_ocean_interstitial - long_name = surface lw emissivity in fraction over ocean (temporary use as interstitial) + standard_name = surface_longwave_emissivity_over_water_interstitial + long_name = surface lw emissivity in fraction over water (temporary use as interstitial) units = frac dimensions = (horizontal_loop_extent) type = real @@ -561,6 +546,24 @@ kind = kind_phys intent = inout optional = F +[emis_lnd] + standard_name = surface_longwave_emissivity_over_land + long_name = surface lw emissivity in fraction over land + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[emis_ice] + standard_name = surface_longwave_emissivity_over_ice + long_name = surface lw emissivity in fraction over ice + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F [qss] standard_name = surface_specific_humidity long_name = surface air saturation specific humidity @@ -571,8 +574,8 @@ intent = in optional = F [qss_wat] - standard_name = surface_specific_humidity_over_ocean - long_name = surface air saturation specific humidity over ocean + standard_name = surface_specific_humidity_over_water + long_name = surface air saturation specific humidity over water units = kg kg-1 dimensions = (horizontal_loop_extent) type = real @@ -598,7 +601,7 @@ intent = inout optional = F [hflx] - standard_name = kinematic_surface_upward_sensible_heat_flux + standard_name = surface_upward_temperature_flux long_name = kinematic surface upward sensible heat flux units = K m s-1 dimensions = (horizontal_loop_extent) @@ -607,8 +610,8 @@ intent = in optional = F [hflx_wat] - standard_name = kinematic_surface_upward_sensible_heat_flux_over_ocean - long_name = kinematic surface upward sensible heat flux over ocean + standard_name = kinematic_surface_upward_sensible_heat_flux_over_water + long_name = kinematic surface upward sensible heat flux over water units = K m s-1 dimensions = (horizontal_loop_extent) type = real @@ -634,7 +637,7 @@ intent = inout optional = F [min_lakeice] - standard_name = lake_ice_minimum + standard_name = min_lake_ice_area_fraction long_name = minimum lake ice value units = frac dimensions = () @@ -643,7 +646,7 @@ intent = in optional = F [min_seaice] - standard_name = sea_ice_minimum + standard_name = min_sea_ice_area_fraction long_name = minimum sea ice value units = frac dimensions = () @@ -651,6 +654,14 @@ kind = kind_phys intent = in optional = F +[kdt] + standard_name = index_of_timestep + long_name = current forecast iteration + units = index + dimensions = () + type = integer + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP @@ -712,8 +723,8 @@ intent = in optional = F [semis_wat] - standard_name = surface_longwave_emissivity_over_ocean_interstitial - long_name = surface lw emissivity in fraction over ocean (temporary use as interstitial) + standard_name = surface_longwave_emissivity_over_water_interstitial + long_name = surface lw emissivity in fraction over water (temporary use as interstitial) units = frac dimensions = (horizontal_loop_extent) type = real @@ -766,8 +777,8 @@ intent = inout optional = F [gabsbdlw_wat] - standard_name = surface_downwelling_longwave_flux_absorbed_by_ground_over_ocean - long_name = total sky surface downward longwave flux absorbed by the ground over ocean + standard_name = surface_downwelling_longwave_flux_absorbed_by_ground_over_water + long_name = total sky surface downward longwave flux absorbed by the ground over water units = W m-2 dimensions = (horizontal_loop_extent) type = real @@ -838,7 +849,7 @@ intent = in optional = F [kice] - standard_name = ice_vertical_dimension + standard_name = vertical_dimension_of_sea_ice long_name = vertical loop extent for ice levels, start at 1 units = count dimensions = () @@ -846,15 +857,33 @@ intent = in optional = F [km] - standard_name = soil_vertical_dimension + standard_name = vertical_dimension_of_soil long_name = soil vertical layer dimension units = count dimensions = () type = integer intent = in optional = F +[rd] + standard_name = gas_constant_of_dry_air + long_name = ideal gas constant for dry air + units = J kg-1 K-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[rvrdm1] + standard_name = ratio_of_vapor_to_dry_air_gas_constants_minus_one + long_name = (rv/rd) - 1 (rv = ideal gas constant for water vapor) + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F [cplflx] - standard_name = flag_for_flux_coupling + standard_name = flag_for_surface_flux_coupling long_name = flag controlling cplflx collection (default off) units = flag dimensions = () @@ -862,7 +891,7 @@ intent = in optional = F [cplwav2atm] - standard_name = flag_for_wave_coupling_to_atm + standard_name = flag_for_one_way_ocean_wave_coupling_to_atmosphere long_name = flag controlling ocean wave coupling to the atmosphere (default off) units = flag dimensions = () @@ -870,7 +899,7 @@ intent = in optional = F [frac_grid] - standard_name = flag_for_fractional_grid + standard_name = flag_for_fractional_landmask long_name = flag for fractional grid units = flag dimensions = () @@ -885,6 +914,14 @@ type = logical intent = in optional = F +[thsfc_loc] + standard_name = flag_for_reference_pressure_theta + long_name = flag for reference pressure in theta calculation + units = flag + dimensions = () + type = logical + intent = in + optional = F [islmsk] standard_name = sea_land_ice_mask long_name = sea/land/ice mask (=0/1/2) @@ -917,6 +954,42 @@ type = logical intent = in optional = F +[wind] + standard_name = wind_speed_at_lowest_model_layer + long_name = wind speed at lowest model level + units = m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[t1] + standard_name = air_temperature_at_surface_adjacent_layer + long_name = surface layer mean temperature + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[q1] + standard_name = specific_humidity_at_surface_adjacent_layer + long_name = surface layer mean specific humidity + units = kg kg-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[prsl1] + standard_name = air_pressure_at_surface_adjacent_layer + long_name = surface layer mean pressure + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F [landfrac] standard_name = land_area_fraction long_name = fraction of horizontal grid area occupied by land @@ -954,13 +1027,13 @@ intent = inout optional = F [zorlo] - standard_name = surface_roughness_length_over_ocean - long_name = surface roughness length over ocean + standard_name = surface_roughness_length_over_water + long_name = surface roughness length over water units = cm dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = inout + intent = in optional = F [zorll] standard_name = surface_roughness_length_over_land @@ -969,7 +1042,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = inout + intent = in optional = F [zorli] standard_name = surface_roughness_length_over_ice @@ -978,33 +1051,6 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = inout - optional = F -[zorl_wat] - standard_name = surface_roughness_length_over_ocean_interstitial - long_name = surface roughness length over ocean (temporary use as interstitial) - units = cm - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[zorl_lnd] - standard_name = surface_roughness_length_over_land_interstitial - long_name = surface roughness length over land (temporary use as interstitial) - units = cm - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[zorl_ice] - standard_name = surface_roughness_length_over_ice_interstitial - long_name = surface roughness length over ice (temporary use as interstitial) - units = cm - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys intent = in optional = F [cd] @@ -1017,8 +1063,8 @@ intent = inout optional = F [cd_wat] - standard_name = surface_drag_coefficient_for_momentum_in_air_over_ocean - long_name = surface exchange coeff for momentum over ocean + standard_name = surface_drag_coefficient_for_momentum_in_air_over_water + long_name = surface exchange coeff for momentum over water units = none dimensions = (horizontal_loop_extent) type = real @@ -1053,8 +1099,8 @@ intent = inout optional = F [cdq_wat] - standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ocean - long_name = surface exchange coeff heat & moisture over ocean + standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_water + long_name = surface exchange coeff heat surface exchange coeff heat & moisture over ocean moisture over water units = none dimensions = (horizontal_loop_extent) type = real @@ -1089,8 +1135,8 @@ intent = inout optional = F [rb_wat] - standard_name = bulk_richardson_number_at_lowest_model_level_over_ocean - long_name = bulk Richardson number at the surface over ocean + standard_name = bulk_richardson_number_at_lowest_model_level_over_water + long_name = bulk Richardson number at the surface over water units = none dimensions = (horizontal_loop_extent) type = real @@ -1125,8 +1171,8 @@ intent = inout optional = F [stress_wat] - standard_name = surface_wind_stress_over_ocean - long_name = surface wind stress over ocean + standard_name = surface_wind_stress_over_water + long_name = surface wind stress over water units = m2 s-2 dimensions = (horizontal_loop_extent) type = real @@ -1161,8 +1207,8 @@ intent = inout optional = F [ffmm_wat] - standard_name = Monin_Obukhov_similarity_function_for_momentum_over_ocean - long_name = Monin-Obukhov similarity function for momentum over ocean + standard_name = Monin_Obukhov_similarity_function_for_momentum_over_water + long_name = Monin-Obukhov similarity function for momentum over water units = none dimensions = (horizontal_loop_extent) type = real @@ -1197,8 +1243,8 @@ intent = inout optional = F [ffhh_wat] - standard_name = Monin_Obukhov_similarity_function_for_heat_over_ocean - long_name = Monin-Obukhov similarity function for heat over ocean + standard_name = Monin_Obukhov_similarity_function_for_heat_over_water + long_name = Monin-Obukhov similarity function for heat over water units = none dimensions = (horizontal_loop_extent) type = real @@ -1233,8 +1279,8 @@ intent = inout optional = F [uustar_wat] - standard_name = surface_friction_velocity_over_ocean - long_name = surface friction velocity over ocean + standard_name = surface_friction_velocity_over_water + long_name = surface friction velocity over water units = m s-1 dimensions = (horizontal_loop_extent) type = real @@ -1269,8 +1315,8 @@ intent = inout optional = F [fm10_wat] - standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_ocean - long_name = Monin-Obukhov similarity parameter for momentum at 10m over ocean + standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_water + long_name = Monin-Obukhov similarity parameter for momentum at 10m over water units = none dimensions = (horizontal_loop_extent) type = real @@ -1305,8 +1351,8 @@ intent = inout optional = F [fh2_wat] - standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m_over_ocean - long_name = Monin-Obukhov similarity parameter for heat at 2m over ocean + standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m_over_water + long_name = Monin-Obukhov similarity parameter for heat at 2m over water units = none dimensions = (horizontal_loop_extent) type = real @@ -1331,18 +1377,9 @@ kind = kind_phys intent = in optional = F -[tsurf] - standard_name = surface_skin_temperature_after_iteration - long_name = surface skin temperature after iteration - units = K - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = inout - optional = F [tsurf_wat] - standard_name = surface_skin_temperature_after_iteration_over_ocean - long_name = surface skin temperature after iteration over ocean + standard_name = surface_skin_temperature_after_iteration_over_water + long_name = surface skin temperature after iteration over water units = K dimensions = (horizontal_loop_extent) type = real @@ -1377,8 +1414,8 @@ intent = inout optional = F [cmm_wat] - standard_name = surface_drag_wind_speed_for_momentum_in_air_over_ocean - long_name = momentum exchange coefficient over ocean + standard_name = surface_drag_wind_speed_for_momentum_in_air_over_water + long_name = momentum exchange coefficient over water units = m s-1 dimensions = (horizontal_loop_extent) type = real @@ -1413,8 +1450,8 @@ intent = inout optional = F [chh_wat] - standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_ocean - long_name = thermal exchange coefficient over ocean + standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_water + long_name = thermal exchange coefficient over water units = kg m-2 s-1 dimensions = (horizontal_loop_extent) type = real @@ -1449,8 +1486,8 @@ intent = inout optional = F [gflx_wat] - standard_name = upward_heat_flux_in_soil_over_ocean - long_name = soil heat flux over ocean + standard_name = upward_heat_flux_in_soil_over_water + long_name = soil heat flux over water units = W m-2 dimensions = (horizontal_loop_extent) type = real @@ -1485,8 +1522,8 @@ intent = inout optional = F [ep1d_wat] - standard_name = surface_upward_potential_latent_heat_flux_over_ocean - long_name = surface upward potential latent heat flux over ocean + standard_name = surface_upward_potential_latent_heat_flux_over_water + long_name = surface upward potential latent heat flux over water units = W m-2 dimensions = (horizontal_loop_extent) type = real @@ -1512,7 +1549,7 @@ intent = in optional = F [weasd] - standard_name = water_equivalent_accumulated_snow_depth + standard_name = lwe_thickness_of_surface_snow_amount long_name = water equiv of acc snow depth over land and sea ice units = mm dimensions = (horizontal_loop_extent) @@ -1520,15 +1557,6 @@ kind = kind_phys intent = inout optional = F -[weasd_wat] - standard_name = water_equivalent_accumulated_snow_depth_over_ocean - long_name = water equiv of acc snow depth over ocean - units = mm - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F [weasd_lnd] standard_name = water_equivalent_accumulated_snow_depth_over_land long_name = water equiv of acc snow depth over land @@ -1548,7 +1576,7 @@ intent = in optional = F [snowd] - standard_name = surface_snow_thickness_water_equivalent + standard_name = lwe_surface_snow long_name = water equivalent snow depth units = mm dimensions = (horizontal_loop_extent) @@ -1556,15 +1584,6 @@ kind = kind_phys intent = inout optional = F -[snowd_wat] - standard_name = surface_snow_thickness_water_equivalent_over_ocean - long_name = water equivalent snow depth over ocean - units = mm - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F [snowd_lnd] standard_name = surface_snow_thickness_water_equivalent_over_land long_name = water equivalent snow depth over land @@ -1593,8 +1612,8 @@ intent = inout optional = F [tprcp_wat] - standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_ocean - long_name = total precipitation amount in each time step over ocean + standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_water + long_name = total precipitation amount in each time step over water units = m dimensions = (horizontal_loop_extent) type = real @@ -1620,7 +1639,7 @@ intent = in optional = F [evap] - standard_name = kinematic_surface_upward_latent_heat_flux + standard_name = surface_upward_specific_humidity_flux long_name = kinematic surface upward latent heat flux units = kg kg-1 m s-1 dimensions = (horizontal_loop_extent) @@ -1629,8 +1648,8 @@ intent = inout optional = F [evap_wat] - standard_name = kinematic_surface_upward_latent_heat_flux_over_ocean - long_name = kinematic surface upward latent heat flux over ocean + standard_name = kinematic_surface_upward_latent_heat_flux_over_water + long_name = kinematic surface upward latent heat flux over water units = kg kg-1 m s-1 dimensions = (horizontal_loop_extent) type = real @@ -1656,7 +1675,7 @@ intent = in optional = F [hflx] - standard_name = kinematic_surface_upward_sensible_heat_flux + standard_name = surface_upward_temperature_flux long_name = kinematic surface upward sensible heat flux units = K m s-1 dimensions = (horizontal_loop_extent) @@ -1665,8 +1684,8 @@ intent = inout optional = F [hflx_wat] - standard_name = kinematic_surface_upward_sensible_heat_flux_over_ocean - long_name = kinematic surface upward sensible heat flux over ocean + standard_name = kinematic_surface_upward_sensible_heat_flux_over_water + long_name = kinematic surface upward sensible heat flux over water units = K m s-1 dimensions = (horizontal_loop_extent) type = real @@ -1701,8 +1720,8 @@ intent = inout optional = F [qss_wat] - standard_name = surface_specific_humidity_over_ocean - long_name = surface air saturation specific humidity over ocean + standard_name = surface_specific_humidity_over_water + long_name = surface air saturation specific humidity over water units = kg kg-1 dimensions = (horizontal_loop_extent) type = real @@ -1755,8 +1774,8 @@ intent = inout optional = F [tsfc_wat] - standard_name = surface_skin_temperature_over_ocean_interstitial - long_name = surface skin temperature over ocean (temporary use as interstitial) + standard_name = surface_skin_temperature_over_water_interstitial + long_name = surface skin temperature over water (temporary use as interstitial) units = K dimensions = (horizontal_loop_extent) type = real @@ -1809,7 +1828,7 @@ intent = inout optional = F [cice] - standard_name = sea_ice_concentration + standard_name = sea_ice_area_fraction_of_sea_area_fraction long_name = ice fraction over open water units = frac dimensions = (horizontal_loop_extent) @@ -1818,7 +1837,7 @@ intent = inout optional = F [min_seaice] - standard_name = sea_ice_minimum + standard_name = min_sea_ice_area_fraction long_name = minimum sea ice value units = frac dimensions = () @@ -1826,23 +1845,166 @@ kind = kind_phys intent = in [tiice] - standard_name = internal_ice_temperature + standard_name = temperature_in_ice_layer long_name = sea ice internal temperature units = K - dimensions = (horizontal_loop_extent,ice_vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension_of_sea_ice) type = real kind = kind_phys - intent = inout + intent = in optional = F [stc] standard_name = soil_temperature long_name = soil temperature units = K - dimensions = (horizontal_loop_extent,soil_vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension_of_soil) type = real kind = kind_phys intent = inout optional = F +[grav] + standard_name = gravitational_acceleration + long_name = gravitational acceleration + units = m s-2 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[prsik1] + standard_name = surface_dimensionless_exner_function + long_name = dimensionless Exner function at the ground surface + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[prslk1] + standard_name = dimensionless_exner_function_at_surface_adjacent_layer + long_name = dimensionless Exner function at the lowest model layer + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[prslki] + standard_name = ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer + long_name = Exner function ratio bt midlayer and interface at 1st layer + units = ratio + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[z1] + standard_name = height_above_ground_at_lowest_model_layer + long_name = height above ground at 1st model layer + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[garea] + standard_name = cell_area + long_name = area of the grid cell + units = m2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[zvfun] + standard_name = function_of_surface_roughness_length_and_green_vegetation_fraction + long_name = function of surface roughness length and green vegetation fraction + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[lheatstrg] + standard_name = flag_for_canopy_heat_storage_in_land_surface_scheme + long_name = flag for canopy heat storage parameterization + units = flag + dimensions = () + type = logical + intent = in + optional = F +[h0facu] + standard_name = multiplicative_tuning_parameter_for_reduced_surface_heat_fluxes_due_to_canopy_heat_storage + long_name = canopy heat storage factor for sensible heat flux in unstable surface layer + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[h0facs] + standard_name = multiplicative_tuning_parameter_for_reduced_latent_heat_flux_due_to_canopy_heat_storage + long_name = canopy heat storage factor for sensible heat flux in stable surface layer + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[hflxq] + standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness_and_vegetation + long_name = kinematic surface upward sensible heat flux reduced by surface roughness and vegetation + units = K m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[hffac] + standard_name = surface_upward_sensible_heat_flux_reduction_factor + long_name = surface upward sensible heat flux reduction factor from canopy heat storage + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[sigmaf] + standard_name = bounded_vegetation_area_fraction + long_name = areal fractional cover of green vegetation bounded on the bottom + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[ztmax_wat] + standard_name = bounded_surface_roughness_length_for_heat_over_water + long_name = bounded surface roughness length for heat over water + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[ztmax_lnd] + standard_name = bounded_surface_roughness_length_for_heat_over_land + long_name = bounded surface roughness length for heat over land + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[ztmax_ice] + standard_name = bounded_surface_roughness_length_for_heat_over_ice + long_name = bounded surface roughness length for heat over ice + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/GFS_surface_generic.F90 b/physics/GFS_surface_generic.F90 index 72efcea60..b6dd30cfe 100644 --- a/physics/GFS_surface_generic.F90 +++ b/physics/GFS_surface_generic.F90 @@ -1,6 +1,7 @@ !> \file GFS_surface_generic.F90 !! Contains code related to all GFS surface schemes. +!>\defgroup mod_GFS_surface_generic_pre GFS Surface Generic Pre module module GFS_surface_generic_pre use machine, only: kind_phys @@ -26,11 +27,11 @@ end subroutine GFS_surface_generic_pre_finalize !! subroutine GFS_surface_generic_pre_run (im, levs, vfrac, islmsk, isot, ivegsrc, stype, vtype, slope, & prsik_1, prslk_1, tsfc, phil, con_g, & - sigmaf, soiltyp, vegtype, slopetyp, work3, tsurf, zlvl, do_sppt, ca_global,dtdtr,& + sigmaf, soiltyp, vegtype, slopetyp, work3, zlvl, & drain_cpl, dsnow_cpl, rain_cpl, snow_cpl, lndp_type, n_var_lndp, sfc_wts, & lndp_var_list, lndp_prt_list, & - z01d, zt1d, bexp1d, xlai1d, vegf1d, lndp_vgf, & - cplflx, flag_cice, islmsk_cice, slimskin_cpl, tisfc, tsfco, fice, hice, & + z01d, zt1d, bexp1d, xlai1d, vegf1d, lndp_vgf, sfc_wts_inv, & + cplflx, flag_cice, islmsk_cice, slimskin_cpl, & wind, u1, v1, cnvwind, smcwlt2, smcref2, errmsg, errflg) use surface_perturbation, only: cdfnor @@ -39,49 +40,45 @@ subroutine GFS_surface_generic_pre_run (im, levs, vfrac, islmsk, isot, ivegsrc, ! Interface variables integer, intent(in) :: im, levs, isot, ivegsrc - integer, dimension(im), intent(in) :: islmsk - integer, dimension(im), intent(inout) :: soiltyp, vegtype, slopetyp + integer, dimension(:), intent(in) :: islmsk + integer, dimension(:), intent(inout) :: soiltyp, vegtype, slopetyp real(kind=kind_phys), intent(in) :: con_g - real(kind=kind_phys), dimension(im), intent(in) :: vfrac, stype, vtype, slope, prsik_1, prslk_1 + real(kind=kind_phys), dimension(:), intent(in) :: vfrac, stype, vtype, slope, prsik_1, prslk_1 - real(kind=kind_phys), dimension(im), intent(inout) :: tsfc - real(kind=kind_phys), dimension(im,levs), intent(in) :: phil + real(kind=kind_phys), dimension(:), intent(inout) :: tsfc + real(kind=kind_phys), dimension(:,:), intent(in) :: phil - real(kind=kind_phys), dimension(im), intent(inout) :: sigmaf, work3, tsurf, zlvl + real(kind=kind_phys), dimension(:), intent(inout) :: sigmaf, work3, zlvl ! Stochastic physics / surface perturbations - logical, intent(in) :: do_sppt, ca_global - real(kind=kind_phys), dimension(im,levs), intent(out) :: dtdtr - real(kind=kind_phys), dimension(im), intent(out) :: drain_cpl - real(kind=kind_phys), dimension(im), intent(out) :: dsnow_cpl - real(kind=kind_phys), dimension(im), intent(in) :: rain_cpl - real(kind=kind_phys), dimension(im), intent(in) :: snow_cpl - integer, intent(in) :: lndp_type - integer, intent(in) :: n_var_lndp - character(len=3), dimension(n_var_lndp), intent(in) :: lndp_var_list - real(kind=kind_phys), dimension(n_var_lndp), intent(in) :: lndp_prt_list - real(kind=kind_phys), dimension(im,n_var_lndp), intent(in) :: sfc_wts - real(kind=kind_phys), dimension(im), intent(out) :: z01d - real(kind=kind_phys), dimension(im), intent(out) :: zt1d - real(kind=kind_phys), dimension(im), intent(out) :: bexp1d - real(kind=kind_phys), dimension(im), intent(out) :: xlai1d - real(kind=kind_phys), dimension(im), intent(out) :: vegf1d - real(kind=kind_phys), intent(out) :: lndp_vgf - - logical, intent(in) :: cplflx - real(kind=kind_phys), dimension(im), intent(in) :: slimskin_cpl - logical, dimension(im), intent(inout) :: flag_cice - integer, dimension(im), intent(out) :: islmsk_cice - real(kind=kind_phys), dimension(im), intent(in) :: & - tisfc, tsfco, fice, hice - - real(kind=kind_phys), dimension(im), intent(out) :: wind - real(kind=kind_phys), dimension(im), intent(in ) :: u1, v1 + real(kind=kind_phys), dimension(:), intent(out) :: drain_cpl + real(kind=kind_phys), dimension(:), intent(out) :: dsnow_cpl + real(kind=kind_phys), dimension(:), intent(in) :: rain_cpl + real(kind=kind_phys), dimension(:), intent(in) :: snow_cpl + integer, intent(in) :: lndp_type, n_var_lndp + character(len=3), dimension(:), intent(in) :: lndp_var_list + real(kind=kind_phys), dimension(:), intent(in) :: lndp_prt_list + real(kind=kind_phys), dimension(:,:), intent(in) :: sfc_wts + real(kind=kind_phys), dimension(:), intent(out) :: z01d + real(kind=kind_phys), dimension(:), intent(out) :: zt1d + real(kind=kind_phys), dimension(:), intent(out) :: bexp1d + real(kind=kind_phys), dimension(:), intent(out) :: xlai1d + real(kind=kind_phys), dimension(:), intent(out) :: vegf1d + real(kind=kind_phys), intent(out) :: lndp_vgf + real(kind=kind_phys), dimension(:,:), intent(inout) :: sfc_wts_inv + + logical, intent(in) :: cplflx + real(kind=kind_phys), dimension(:), intent(in) :: slimskin_cpl + logical, dimension(:), intent(inout) :: flag_cice + integer, dimension(:), intent(out) :: islmsk_cice + + real(kind=kind_phys), dimension(:), intent(out) :: wind + real(kind=kind_phys), dimension(:), intent(in ) :: u1, v1 ! surface wind enhancement due to convection - real(kind=kind_phys), dimension(im), intent(inout ) :: cnvwind + real(kind=kind_phys), dimension(:), intent(inout ) :: cnvwind ! - real(kind=kind_phys), dimension(im), intent(out) :: smcwlt2, smcref2 + real(kind=kind_phys), dimension(:), intent(out) :: smcwlt2, smcref2 ! CCPP error handling character(len=*), intent(out) :: errmsg @@ -89,8 +86,7 @@ subroutine GFS_surface_generic_pre_run (im, levs, vfrac, islmsk, isot, ivegsrc, ! Local variables integer :: i, k - real(kind=kind_phys) :: onebg - real(kind=kind_phys) :: cdfz + real(kind=kind_phys) :: onebg, cdfz ! Set constants onebg = 1.0/con_g @@ -99,35 +95,33 @@ subroutine GFS_surface_generic_pre_run (im, levs, vfrac, islmsk, isot, ivegsrc, errmsg = '' errflg = 0 - ! Set initial quantities for stochastic physics deltas - if (do_sppt .or. ca_global) then - dtdtr = 0.0 - endif - ! Scale random patterns for surface perturbations with perturbation size ! Turn vegetation fraction pattern into percentile pattern lndp_vgf=-999. + if (lndp_type>0) then + sfc_wts_inv(:,:)=sfc_wts(:,:) + endif if (lndp_type==1) then - do k =1,n_var_lndp - select case(lndp_var_list(k)) - case ('rz0') + do k =1,n_var_lndp + select case(lndp_var_list(k)) + case ('rz0') z01d(:) = lndp_prt_list(k)* sfc_wts(:,k) - case ('rzt') - zt1d(:) = lndp_prt_list(k)* sfc_wts(:,k) - case ('shc') - bexp1d(:) = lndp_prt_list(k) * sfc_wts(:,k) - case ('lai') + case ('rzt') + zt1d(:) = lndp_prt_list(k)* sfc_wts(:,k) + case ('shc') + bexp1d(:) = lndp_prt_list(k) * sfc_wts(:,k) + case ('lai') xlai1d(:) = lndp_prt_list(k)* sfc_wts(:,k) - case ('vgf') + case ('vgf') ! note that the pertrubed vegfrac is being used in sfc_drv, but not sfc_diff do i=1,im call cdfnor(sfc_wts(i,k),cdfz) vegf1d(i) = cdfz enddo lndp_vgf = lndp_prt_list(k) - end select - enddo + end select + enddo endif ! End of stochastic physics / surface perturbation @@ -137,20 +131,20 @@ subroutine GFS_surface_generic_pre_run (im, levs, vfrac, islmsk, isot, ivegsrc, islmsk_cice(i) = islmsk(i) if (islmsk(i) == 2) then if (isot == 1) then - soiltyp(i) = 16 + soiltyp(i) = 16 else - soiltyp(i) = 9 + soiltyp(i) = 9 endif if (ivegsrc == 0 .or. ivegsrc == 4) then - vegtype(i) = 24 + vegtype(i) = 24 elseif (ivegsrc == 1) then - vegtype(i) = 15 + vegtype(i) = 15 elseif (ivegsrc == 2) then - vegtype(i) = 13 + vegtype(i) = 13 elseif (ivegsrc == 3 .or. ivegsrc == 5) then - vegtype(i) = 15 + vegtype(i) = 15 endif - slopetyp(i) = 9 + slopetyp(i) = 9 else soiltyp(i) = int( stype(i)+0.5_kind_phys ) vegtype(i) = int( vtype(i)+0.5_kind_phys ) @@ -162,16 +156,15 @@ subroutine GFS_surface_generic_pre_run (im, levs, vfrac, islmsk, isot, ivegsrc, work3(i) = prsik_1(i) / prslk_1(i) - !tsurf(i) = tsfc(i) zlvl(i) = phil(i,1) * onebg smcwlt2(i) = zero smcref2(i) = zero wind(i) = max(sqrt(u1(i)*u1(i) + v1(i)*v1(i)) & + max(zero, min(cnvwind(i), 30.0_kind_phys)), one) - !wind(i) = max(sqrt(Statein%ugrs(i,1)*Statein%ugrs(i,1) + & - ! Statein%vgrs(i,1)*Statein%vgrs(i,1)) & - ! + max(zero, min(Tbd%phy_f2d(i,Model%num_p2d), 30.0)), one) + !wind(i) = max(sqrt(Statein%ugrs(i,1)*Statein%ugrs(i,1) + & + ! Statein%vgrs(i,1)*Statein%vgrs(i,1)) & + ! + max(zero, min(Tbd%phy_f2d(i,Model%num_p2d), 30.0)), one) cnvwind(i) = zero enddo @@ -211,42 +204,43 @@ end subroutine GFS_surface_generic_post_finalize !> \section arg_table_GFS_surface_generic_post_run Argument Table !! \htmlinclude GFS_surface_generic_post_run.html !! - subroutine GFS_surface_generic_post_run (im, cplflx, cplwav, lssav, icy, wet, dtf, ep1d, gflx, tgrs_1, qgrs_1, ugrs_1, vgrs_1,& + subroutine GFS_surface_generic_post_run (im, cplflx, cplchm, cplwav, lssav, dry, icy, wet, & + dtf, ep1d, gflx, tgrs_1, qgrs_1, ugrs_1, vgrs_1, & adjsfcdlw, adjsfcdsw, adjnirbmd, adjnirdfd, adjvisbmd, adjvisdfd, adjsfculw, adjsfculw_wat, adjnirbmu, adjnirdfu, & adjvisbmu, adjvisdfu,t2m, q2m, u10m, v10m, tsfc, tsfc_wat, pgr, xcosz, evbs, evcw, trans, sbsno, snowc, snohf, & epi, gfluxi, t1, q1, u1, v1, dlwsfci_cpl, dswsfci_cpl, dlwsfc_cpl, dswsfc_cpl, dnirbmi_cpl, dnirdfi_cpl, dvisbmi_cpl, & dvisdfi_cpl, dnirbm_cpl, dnirdf_cpl, dvisbm_cpl, dvisdf_cpl, nlwsfci_cpl, nlwsfc_cpl, t2mi_cpl, q2mi_cpl, u10mi_cpl, & v10mi_cpl, tsfci_cpl, psurfi_cpl, nnirbmi_cpl, nnirdfi_cpl, nvisbmi_cpl, nvisdfi_cpl, nswsfci_cpl, nswsfc_cpl, nnirbm_cpl, & nnirdf_cpl, nvisbm_cpl, nvisdf_cpl, gflux, evbsa, evcwa, transa, sbsnoa, snowca, snohfa, ep, & - runoff, srunoff, runof, drain, lheatstrg, z0fac, e0fac, zorl, hflx, evap, hflxq, evapq, hffac, hefac, errmsg, errflg) + runoff, srunoff, runof, drain, lheatstrg, h0facu, h0facs, zvfun, hflx, evap, hflxq, hffac, errmsg, errflg) implicit none integer, intent(in) :: im - logical, intent(in) :: cplflx, cplwav, lssav - logical, dimension(im), intent(in) :: icy, wet + logical, intent(in) :: cplflx, cplchm, cplwav, lssav + logical, dimension(:), intent(in) :: dry, icy, wet real(kind=kind_phys), intent(in) :: dtf - real(kind=kind_phys), dimension(im), intent(in) :: ep1d, gflx, tgrs_1, qgrs_1, ugrs_1, vgrs_1, adjsfcdlw, adjsfcdsw, & + real(kind=kind_phys), dimension(:), intent(in) :: ep1d, gflx, tgrs_1, qgrs_1, ugrs_1, vgrs_1, adjsfcdlw, adjsfcdsw, & adjnirbmd, adjnirdfd, adjvisbmd, adjvisdfd, adjsfculw, adjsfculw_wat, adjnirbmu, adjnirdfu, adjvisbmu, adjvisdfu, & t2m, q2m, u10m, v10m, tsfc, tsfc_wat, pgr, xcosz, evbs, evcw, trans, sbsno, snowc, snohf - real(kind=kind_phys), dimension(im), intent(inout) :: epi, gfluxi, t1, q1, u1, v1, dlwsfci_cpl, dswsfci_cpl, dlwsfc_cpl, & - dswsfc_cpl, dnirbmi_cpl, dnirdfi_cpl, dvisbmi_cpl, dvisdfi_cpl, dnirbm_cpl, dnirdf_cpl, dvisbm_cpl, dvisdf_cpl, & - nlwsfci_cpl, nlwsfc_cpl, t2mi_cpl, q2mi_cpl, u10mi_cpl, v10mi_cpl, tsfci_cpl, psurfi_cpl, nnirbmi_cpl, nnirdfi_cpl, & - nvisbmi_cpl, nvisdfi_cpl, nswsfci_cpl, nswsfc_cpl, nnirbm_cpl, nnirdf_cpl, nvisbm_cpl, nvisdf_cpl, gflux, evbsa, & + real(kind=kind_phys), dimension(:), intent(inout) :: epi, gfluxi, t1, q1, u1, v1, dlwsfci_cpl, dswsfci_cpl, dlwsfc_cpl, & + dswsfc_cpl, dnirbmi_cpl, dnirdfi_cpl, dvisbmi_cpl, dvisdfi_cpl, dnirbm_cpl, dnirdf_cpl, dvisbm_cpl, dvisdf_cpl, & + nlwsfci_cpl, nlwsfc_cpl, t2mi_cpl, q2mi_cpl, u10mi_cpl, v10mi_cpl, tsfci_cpl, psurfi_cpl, nnirbmi_cpl, nnirdfi_cpl, & + nvisbmi_cpl, nvisdfi_cpl, nswsfci_cpl, nswsfc_cpl, nnirbm_cpl, nnirdf_cpl, nvisbm_cpl, nvisdf_cpl, gflux, evbsa, & evcwa, transa, sbsnoa, snowca, snohfa, ep - real(kind=kind_phys), dimension(im), intent(inout) :: runoff, srunoff - real(kind=kind_phys), dimension(im), intent(in) :: drain, runof + real(kind=kind_phys), dimension(:), intent(inout) :: runoff, srunoff + real(kind=kind_phys), dimension(:), intent(in) :: drain, runof ! For canopy heat storage logical, intent(in) :: lheatstrg - real(kind=kind_phys), intent(in) :: z0fac, e0fac - real(kind=kind_phys), dimension(im), intent(in) :: zorl - real(kind=kind_phys), dimension(im), intent(in) :: hflx, evap - real(kind=kind_phys), dimension(im), intent(out) :: hflxq, evapq - real(kind=kind_phys), dimension(im), intent(out) :: hffac, hefac + real(kind=kind_phys), intent(in) :: h0facu, h0facs + real(kind=kind_phys), dimension(:), intent(in) :: zvfun + real(kind=kind_phys), dimension(:), intent(in) :: hflx, evap + real(kind=kind_phys), dimension(:), intent(out) :: hflxq + real(kind=kind_phys), dimension(:), intent(out) :: hffac ! CCPP error handling variables character(len=*), intent(out) :: errmsg @@ -255,13 +249,8 @@ subroutine GFS_surface_generic_post_run (im, cplflx, cplwav, lssav, icy, wet, dt ! Local variables real(kind=kind_phys), parameter :: albdf = 0.06_kind_phys - ! Parameters for canopy heat storage parametrization - real(kind=kind_phys), parameter :: z0min=0.2, z0max=1.0 - real(kind=kind_phys), parameter :: u10min=2.5, u10max=7.5 - integer :: i real(kind=kind_phys) :: xcosz_loc, ocalnirdf_cpl, ocalnirbm_cpl, ocalvisdf_cpl, ocalvisbm_cpl - real(kind=kind_phys) :: tem, tem1, tem2 ! Initialize CCPP error handling variables errmsg = '' @@ -276,13 +265,19 @@ subroutine GFS_surface_generic_post_run (im, cplflx, cplwav, lssav, icy, wet, dt v1(i) = vgrs_1(i) enddo - if (cplflx .or. cplwav) then + if (cplflx .or. cplchm .or. cplwav) then do i=1,im u10mi_cpl(i) = u10m(i) v10mi_cpl(i) = v10m(i) enddo endif + if (cplflx .or. cplchm) then + do i=1,im + tsfci_cpl(i) = tsfc(i) + enddo + endif + if (cplflx) then do i=1,im dlwsfci_cpl (i) = adjsfcdlw(i) @@ -304,8 +299,6 @@ subroutine GFS_surface_generic_post_run (im, cplflx, cplwav, lssav, icy, wet, dt nlwsfc_cpl (i) = nlwsfc_cpl(i) + nlwsfci_cpl(i)*dtf t2mi_cpl (i) = t2m(i) q2mi_cpl (i) = q2m(i) - tsfci_cpl (i) = tsfc(i) -! tsfci_cpl (i) = tsfc_wat(i) psurfi_cpl (i) = pgr(i) enddo @@ -314,7 +307,7 @@ subroutine GFS_surface_generic_post_run (im, cplflx, cplwav, lssav, icy, wet, dt do i=1,im ! if (Sfcprop%landfrac(i) < one) then ! Not 100% land - if (wet(i)) then ! some open water + if (wet(i)) then ! some open water ! --- compute open water albedo xcosz_loc = max( zero, min( one, xcosz(i) )) ocalnirdf_cpl = 0.06_kind_phys @@ -362,32 +355,28 @@ subroutine GFS_surface_generic_post_run (im, cplflx, cplwav, lssav, icy, wet, dt enddo endif -! --- ... Boundary Layer and Free atmospheic turbulence parameterization ! -! in order to achieve heat storage within canopy layer, in the canopy heat -! storage parameterization the kinematic sensible and latent heat fluxes -! (hflx & evap) as surface boundary forcings to the pbl scheme are -! reduced as a function of surface roughness +! in order to achieve heat storage within canopy layer, in the canopy +! heat torage parameterization the kinematic sensible heat flux +! (hflx) as surface boundary forcing to the pbl scheme is +! reduced in a factor of hffac given as a function of surface roughness & +! green vegetation fraction (zvfun) ! do i=1,im hflxq(i) = hflx(i) - evapq(i) = evap(i) hffac(i) = 1.0 - hefac(i) = 1.0 enddo if (lheatstrg) then do i=1,im - tem = 0.01 * zorl(i) ! change unit from cm to m - tem1 = (tem - z0min) / (z0max - z0min) - hffac(i) = z0fac * min(max(tem1, 0.0), 1.0) - tem = sqrt(u10m(i)**2+v10m(i)**2) - tem1 = (tem - u10min) / (u10max - u10min) - tem2 = 1.0 - min(max(tem1, 0.0), 1.0) - hffac(i) = tem2 * hffac(i) - hefac(i) = 1. + e0fac * hffac(i) - hffac(i) = 1. + hffac(i) - hflxq(i) = hflx(i) / hffac(i) - evapq(i) = evap(i) / hefac(i) + if (dry(i)) then + if(hflx(i) > 0.) then + hffac(i) = h0facu * zvfun(i) + else + hffac(i) = h0facs * zvfun(i) + endif + hffac(i) = 1. + hffac(i) + hflxq(i) = hflx(i) / hffac(i) + endif enddo endif diff --git a/physics/GFS_surface_generic.meta b/physics/GFS_surface_generic.meta index 68713ab19..684c162bf 100644 --- a/physics/GFS_surface_generic.meta +++ b/physics/GFS_surface_generic.meta @@ -16,7 +16,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () @@ -41,7 +41,7 @@ intent = in optional = F [isot] - standard_name = soil_type_dataset_choice + standard_name = control_for_soil_type_dataset long_name = soil type dataset choice units = index dimensions = () @@ -49,7 +49,7 @@ intent = in optional = F [ivegsrc] - standard_name = vegetation_type_dataset_choice + standard_name = control_for_vegetation_dataset long_name = land use dataset choice units = index dimensions = () @@ -84,7 +84,7 @@ intent = in optional = F [prsik_1] - standard_name = dimensionless_exner_function_at_lowest_model_interface + standard_name = surface_dimensionless_exner_function long_name = dimensionless Exner function at lowest model interface units = none dimensions = (horizontal_loop_extent) @@ -93,7 +93,7 @@ intent = in optional = F [prslk_1] - standard_name = dimensionless_exner_function_at_lowest_model_layer + standard_name = dimensionless_exner_function_at_surface_adjacent_layer long_name = dimensionless Exner function at lowest model layer units = none dimensions = (horizontal_loop_extent) @@ -114,7 +114,7 @@ standard_name = geopotential long_name = geopotential at model layer centers units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -170,15 +170,6 @@ kind = kind_phys intent = inout optional = F -[tsurf] - standard_name = surface_skin_temperature_after_iteration - long_name = surface skin temperature after iteration - units = K - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = inout - optional = F [zlvl] standard_name = height_above_ground_at_lowest_model_layer long_name = layer 1 height above ground (not MSL) @@ -188,33 +179,8 @@ kind = kind_phys intent = inout optional = F -[do_sppt] - standard_name = flag_for_stochastic_physics_perturbations - long_name = flag for stochastic physics perturbations - units = flag - dimensions = () - type = logical - intent = in - optional = F -[ca_global] - standard_name = flag_for_global_cellular_automata - long_name = switch for global ca - units = flag - dimensions = () - type = logical - intent = in - optional = F -[dtdtr] - standard_name = tendency_of_air_temperature_due_to_radiative_heating_on_physics_time_step - long_name = temp. change due to radiative heating per time step - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = out - optional = F [drain_cpl] - standard_name = tendency_of_lwe_thickness_of_precipitation_amount_for_coupling + standard_name = tendency_of_lwe_thickness_of_rain_amount_on_dynamics_timestep_for_coupling long_name = change in rain_cpl (coupling_type) units = m dimensions = (horizontal_loop_extent) @@ -223,7 +189,7 @@ intent = out optional = F [dsnow_cpl] - standard_name = tendency_of_lwe_thickness_of_snow_amount_for_coupling + standard_name = tendency_of_lwe_thickness_of_snowfall_amount_on_dynamics_timestep_for_coupling long_name = change in show_cpl (coupling_type) units = m dimensions = (horizontal_loop_extent) @@ -232,7 +198,7 @@ intent = out optional = F [rain_cpl] - standard_name = lwe_thickness_of_precipitation_amount_for_coupling + standard_name = cumulative_lwe_thickness_of_precipitation_amount_for_coupling long_name = total rain precipitation units = m dimensions = (horizontal_loop_extent) @@ -241,7 +207,7 @@ intent = in optional = F [snow_cpl] - standard_name = lwe_thickness_of_snow_amount_for_coupling + standard_name = cumulative_lwe_thickness_of_snow_amount_for_coupling long_name = total snow precipitation units = m dimensions = (horizontal_loop_extent) @@ -250,7 +216,7 @@ intent = in optional = F [lndp_type] - standard_name = index_for_stochastic_land_surface_perturbation_type + standard_name = control_for_stochastic_land_surface_perturbation long_name = index for stochastic land surface perturbations type units = index dimensions = () @@ -258,7 +224,7 @@ intent = in optional = F [n_var_lndp] - standard_name = number_of_land_surface_variables_perturbed + standard_name = number_of_perturbed_land_surface_variables long_name = number of land surface variables perturbed units = count dimensions = () @@ -266,32 +232,32 @@ intent = in optional = F [sfc_wts] - standard_name = weights_for_stochastic_surface_physics_perturbation + standard_name = surface_stochastic_weights_from_coupled_process long_name = weights for stochastic surface physics perturbation units = none - dimensions = (horizontal_loop_extent,number_of_land_surface_variables_perturbed) + dimensions = (horizontal_loop_extent,number_of_perturbed_land_surface_variables) type = real kind = kind_phys intent = in optional = F -[lndp_prt_list] - standard_name =magnitude_of_perturbations_for_landperts - long_name = magnitude of perturbations for landperts - units = variable - dimensions = (number_of_land_surface_variables_perturbed) - type = real - kind = kind_phys - intent = in - optional = F [lndp_var_list] - standard_name = variables_to_be_perturbed_for_landperts + standard_name = land_surface_perturbation_variables long_name = variables to be perturbed for landperts units = none - dimensions = (number_of_land_surface_variables_perturbed) + dimensions = (number_of_perturbed_land_surface_variables) type = character kind = len=3 intent = in optional = F +[lndp_prt_list] + standard_name =land_surface_perturbation_magnitudes + long_name = magnitude of perturbations for landperts + units = variable + dimensions = (number_of_perturbed_land_surface_variables) + type = real + kind = kind_phys + intent = in + optional = F [z01d] standard_name = perturbation_of_momentum_roughness_length long_name = perturbation of momentum roughness length @@ -346,8 +312,17 @@ kind = kind_phys intent = out optional = F +[sfc_wts_inv] + standard_name = weights_for_stochastic_surface_physics_perturbation_flipped + long_name = weights for stochastic surface physics perturbation, flipped + units = none + dimensions = (horizontal_loop_extent,number_of_perturbed_land_surface_variables) + type = real + kind = kind_phys + intent = inout + optional = F [cplflx] - standard_name = flag_for_flux_coupling + standard_name = flag_for_surface_flux_coupling long_name = flag controlling cplflx collection (default off) units = flag dimensions = () @@ -371,7 +346,7 @@ intent = out optional = F [slimskin_cpl] - standard_name = sea_land_ice_mask_in + standard_name = area_type_from_coupled_process long_name = sea/land/ice mask input (=0/1/2) units = flag dimensions = (horizontal_loop_extent) @@ -379,42 +354,6 @@ kind = kind_phys intent = in optional = F -[tisfc] - standard_name = sea_ice_temperature - long_name = sea-ice surface temperature - units = K - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[tsfco] - standard_name = sea_surface_temperature - long_name = sea surface temperature - units = K - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[fice] - standard_name = sea_ice_concentration - long_name = sea-ice concentration [0,1] - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[hice] - standard_name = sea_ice_thickness - long_name = sea-ice thickness - units = m - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F [wind] standard_name = wind_speed_at_lowest_model_layer long_name = wind speed at lowest model level @@ -425,7 +364,7 @@ intent = out optional = F [u1] - standard_name = x_wind_at_lowest_model_layer + standard_name = x_wind_at_surface_adjacent_layer long_name = zonal wind at lowest model layer units = m s-1 dimensions = (horizontal_loop_extent) @@ -434,7 +373,7 @@ intent = in optional = F [v1] - standard_name = y_wind_at_lowest_model_layer + standard_name = y_wind_at_surface_adjacent_layer long_name = meridional wind at lowest model layer units = m s-1 dimensions = (horizontal_loop_extent) @@ -443,7 +382,7 @@ intent = in optional = F [cnvwind] - standard_name = surface_wind_enhancement_due_to_convection + standard_name = enhancement_to_wind_speed_at_surface_adjacent_layer_due_to_convection long_name = surface wind enhancement due to convection units = m s-1 dimensions = (horizontal_loop_extent) @@ -506,15 +445,23 @@ intent = in optional = F [cplflx] - standard_name = flag_for_flux_coupling + standard_name = flag_for_surface_flux_coupling long_name = flag controlling cplflx collection (default off) units = flag dimensions = () type = logical intent = in optional = F +[cplchm] + standard_name = flag_for_chemistry_coupling + long_name = flag controlling cplchm collection (default off) + units = flag + dimensions = () + type = logical + intent = in + optional = F [cplwav] - standard_name = flag_for_wave_coupling + standard_name = flag_for_ocean_wave_coupling long_name = flag controlling cplwav collection (default off) units = flag dimensions = () @@ -522,13 +469,21 @@ intent = in optional = F [lssav] - standard_name = flag_diagnostics + standard_name = flag_for_diagnostics long_name = logical flag for storing diagnostics units = flag dimensions = () type = logical intent = in optional = F +[dry] + standard_name = flag_nonzero_land_surface_fraction + long_name = flag indicating presence of some land surface area fraction + units = flag + dimensions = (horizontal_loop_extent) + type = logical + intent = in + optional = F [icy] standard_name = flag_nonzero_sea_ice_surface_fraction long_name = flag indicating presence of some sea ice surface area fraction @@ -546,7 +501,7 @@ intent = in optional = F [dtf] - standard_name = time_step_for_dynamics + standard_name = timestep_for_dynamics long_name = dynamics timestep units = s dimensions = () @@ -573,7 +528,7 @@ intent = in optional = F [tgrs_1] - standard_name = air_temperature_at_lowest_model_layer + standard_name = air_temperature_at_surface_adjacent_layer long_name = mean temperature at lowest model layer units = K dimensions = (horizontal_loop_extent) @@ -582,7 +537,7 @@ intent = in optional = F [qgrs_1] - standard_name = water_vapor_specific_humidity_at_lowest_model_layer + standard_name = specific_humidity_at_surface_adjacent_layer long_name = specific humidity at lowest model layer units = kg kg-1 dimensions = (horizontal_loop_extent) @@ -591,7 +546,7 @@ intent = in optional = F [ugrs_1] - standard_name = x_wind_at_lowest_model_layer + standard_name = x_wind_at_surface_adjacent_layer long_name = zonal wind at lowest model layer units = m s-1 dimensions = (horizontal_loop_extent) @@ -600,7 +555,7 @@ intent = in optional = F [vgrs_1] - standard_name = y_wind_at_lowest_model_layer + standard_name = y_wind_at_surface_adjacent_layer long_name = meridional wind at lowest model layer units = m s-1 dimensions = (horizontal_loop_extent) @@ -672,8 +627,8 @@ intent = in optional = F [adjsfculw_wat] - standard_name = surface_upwelling_longwave_flux_over_ocean_interstitial - long_name = surface upwelling longwave flux at current time over ocean (temporary use as interstitial) + standard_name = surface_upwelling_longwave_flux_over_water_interstitial + long_name = surface upwelling longwave flux at current time over water (temporary use as interstitial) units = W m-2 dimensions = (horizontal_loop_extent) type = real @@ -717,7 +672,7 @@ intent = in optional = F [t2m] - standard_name = temperature_at_2m + standard_name = air_temperature_at_2m long_name = 2 meter temperature units = K dimensions = (horizontal_loop_extent) @@ -762,8 +717,8 @@ intent = in optional = F [tsfc_wat] - standard_name = surface_skin_temperature_over_ocean_interstitial - long_name = surface skin temperature over ocean (temporary use as interstitial) + standard_name = surface_skin_temperature_over_water_interstitial + long_name = surface skin temperature over water (temporary use as interstitial) units = K dimensions = (horizontal_loop_extent) type = real @@ -897,7 +852,7 @@ intent = inout optional = F [dlwsfci_cpl] - standard_name = instantaneous_surface_downwelling_longwave_flux_for_coupling + standard_name = surface_downwelling_longwave_flux_for_coupling long_name = instantaneous sfc downward lw flux units = W m-2 dimensions = (horizontal_loop_extent) @@ -906,7 +861,7 @@ intent = inout optional = F [dswsfci_cpl] - standard_name = instantaneous_surface_downwelling_shortwave_flux_for_coupling + standard_name = surface_downwelling_shortwave_flux_for_coupling long_name = instantaneous sfc downward sw flux units = W m-2 dimensions = (horizontal_loop_extent) @@ -933,7 +888,7 @@ intent = inout optional = F [dnirbmi_cpl] - standard_name = instantaneous_surface_downwelling_direct_near_infrared_shortwave_flux_for_coupling + standard_name = surface_downwelling_direct_nir_shortwave_flux_for_coupling long_name = instantaneous sfc nir beam downward sw flux units = W m-2 dimensions = (horizontal_loop_extent) @@ -942,7 +897,7 @@ intent = inout optional = F [dnirdfi_cpl] - standard_name = instantaneous_surface_downwelling_diffuse_near_infrared_shortwave_flux_for_coupling + standard_name = surface_downwelling_diffuse_nir_shortwave_flux_for_coupling long_name = instantaneous sfc nir diff downward sw flux units = W m-2 dimensions = (horizontal_loop_extent) @@ -951,7 +906,7 @@ intent = inout optional = F [dvisbmi_cpl] - standard_name = instantaneous_surface_downwelling_direct_ultraviolet_and_visible_shortwave_flux_for_coupling + standard_name = surface_downwelling_direct_uv_and_vis_shortwave_flux_for_coupling long_name = instantaneous sfc uv+vis beam downward sw flux units = W m-2 dimensions = (horizontal_loop_extent) @@ -960,7 +915,7 @@ intent = inout optional = F [dvisdfi_cpl] - standard_name = instantaneous_surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_flux_for_coupling + standard_name = surface_downwelling_diffuse_uv_and_vis_shortwave_flux_for_coupling long_name = instantaneous sfc uv+vis diff downward sw flux units = W m-2 dimensions = (horizontal_loop_extent) @@ -969,7 +924,7 @@ intent = inout optional = F [dnirbm_cpl] - standard_name = cumulative_surface_downwelling_direct_near_infrared_shortwave_flux_for_coupling_multiplied_by_timestep + standard_name = cumulative_surface_downwelling_direct_nir_shortwave_flux_for_coupling_multiplied_by_timestep long_name = cumulative sfc nir beam downward sw flux multiplied by timestep units = W m-2 s dimensions = (horizontal_loop_extent) @@ -978,7 +933,7 @@ intent = inout optional = F [dnirdf_cpl] - standard_name = cumulative_surface_downwelling_diffuse_near_infrared_shortwave_flux_for_coupling_multiplied_by_timestep + standard_name = cumulative_surface_downwelling_diffuse_nir_shortwave_flux_for_coupling_multiplied_by_timestep long_name = cumulative sfc nir diff downward sw flux multiplied by timestep units = W m-2 s dimensions = (horizontal_loop_extent) @@ -987,7 +942,7 @@ intent = inout optional = F [dvisbm_cpl] - standard_name = cumulative_surface_downwelling_direct_ultraviolet_and_visible_shortwave_flux_for_coupling_multiplied_by_timestep + standard_name = cumulative_surface_downwelling_direct_uv_and_vis_shortwave_flux_for_coupling_multiplied_by_timestep long_name = cumulative sfc uv+vis beam dnwd sw flux multiplied by timestep units = W m-2 s dimensions = (horizontal_loop_extent) @@ -996,7 +951,7 @@ intent = inout optional = F [dvisdf_cpl] - standard_name = cumulative_surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_flux_for_coupling_multiplied_by_timestep + standard_name = cumulative_surface_downwelling_diffuse_uv_and_vis_shortwave_flux_for_coupling_multiplied_by_timestep long_name = cumulative sfc uv+vis diff dnwd sw flux multiplied by timestep units = W m-2 s dimensions = (horizontal_loop_extent) @@ -1005,7 +960,7 @@ intent = inout optional = F [nlwsfci_cpl] - standard_name = instantaneous_surface_net_downward_longwave_flux_for_coupling + standard_name = surface_net_downwelling_longwave_flux_for_coupling long_name = instantaneous net sfc downward lw flux units = W m-2 dimensions = (horizontal_loop_extent) @@ -1014,7 +969,7 @@ intent = inout optional = F [nlwsfc_cpl] - standard_name = cumulative_surface_net_downward_longwave_flux_for_coupling_multiplied_by_timestep + standard_name = cumulative_surface_net_downwelling_longwave_flux_for_coupling_multiplied_by_timestep long_name = cumulative net downward lw flux multiplied by timestep units = W m-2 s dimensions = (horizontal_loop_extent) @@ -1023,7 +978,7 @@ intent = inout optional = F [t2mi_cpl] - standard_name = instantaneous_temperature_at_2m_for_coupling + standard_name = temperature_at_2m_for_coupling long_name = instantaneous T2m units = K dimensions = (horizontal_loop_extent) @@ -1032,7 +987,7 @@ intent = inout optional = F [q2mi_cpl] - standard_name = instantaneous_specific_humidity_at_2m_for_coupling + standard_name = specific_humidity_at_2m_for_coupling long_name = instantaneous Q2m units = kg kg-1 dimensions = (horizontal_loop_extent) @@ -1041,7 +996,7 @@ intent = inout optional = F [u10mi_cpl] - standard_name = instantaneous_x_wind_at_10m_for_coupling + standard_name = x_wind_at_10m_for_coupling long_name = instantaneous U10m units = m s-1 dimensions = (horizontal_loop_extent) @@ -1050,7 +1005,7 @@ intent = inout optional = F [v10mi_cpl] - standard_name = instantaneous_y_wind_at_10m_for_coupling + standard_name = y_wind_at_10m_for_coupling long_name = instantaneous V10m units = m s-1 dimensions = (horizontal_loop_extent) @@ -1059,7 +1014,7 @@ intent = inout optional = F [tsfci_cpl] - standard_name = instantaneous_surface_skin_temperature_for_coupling + standard_name = surface_skin_temperature_for_coupling long_name = instantaneous sfc temperature units = K dimensions = (horizontal_loop_extent) @@ -1068,7 +1023,7 @@ intent = inout optional = F [psurfi_cpl] - standard_name = instantaneous_surface_air_pressure_for_coupling + standard_name = surface_air_pressure_for_coupling long_name = instantaneous sfc pressure units = Pa dimensions = (horizontal_loop_extent) @@ -1077,7 +1032,7 @@ intent = inout optional = F [nnirbmi_cpl] - standard_name = instantaneous_surface_net_downward_direct_near_infrared_shortwave_flux_for_coupling + standard_name = surface_net_downwelling_direct_nir_shortwave_flux_for_coupling long_name = instantaneous net nir beam sfc downward sw flux units = W m-2 dimensions = (horizontal_loop_extent) @@ -1086,7 +1041,7 @@ intent = inout optional = F [nnirdfi_cpl] - standard_name = instantaneous_surface_net_downward_diffuse_near_infrared_shortwave_flux_for_coupling + standard_name = surface_net_downwelling_diffuse_nir_shortwave_flux_for_coupling long_name = instantaneous net nir diff sfc downward sw flux units = W m-2 dimensions = (horizontal_loop_extent) @@ -1095,7 +1050,7 @@ intent = inout optional = F [nvisbmi_cpl] - standard_name = instantaneous_surface_net_downward_direct_ultraviolet_and_visible_shortwave_flux_for_coupling + standard_name = surface_net_downwelling_direct_uv_and_vis_shortwave_flux_for_coupling long_name = instantaneous net uv+vis beam downward sw flux units = W m-2 dimensions = (horizontal_loop_extent) @@ -1104,7 +1059,7 @@ intent = inout optional = F [nvisdfi_cpl] - standard_name = instantaneous_surface_net_downward_diffuse_ultraviolet_and_visible_shortwave_flux_for_coupling + standard_name = surface_net_downwelling_diffuse_uv_and_vis_shortwave_flux_for_coupling long_name = instantaneous net uv+vis diff downward sw flux units = W m-2 dimensions = (horizontal_loop_extent) @@ -1113,7 +1068,7 @@ intent = inout optional = F [nswsfci_cpl] - standard_name = instantaneous_surface_net_downward_shortwave_flux_for_coupling + standard_name = surface_net_downwelling_shortwave_flux_for_coupling long_name = instantaneous net sfc downward sw flux units = W m-2 dimensions = (horizontal_loop_extent) @@ -1122,7 +1077,7 @@ intent = inout optional = F [nswsfc_cpl] - standard_name = cumulative_surface_net_downward_shortwave_flux_for_coupling_multiplied_by_timestep + standard_name = cumulative_surface_net_downwelling_shortwave_flux_for_coupling_multiplied_by_timestep long_name = cumulative net downward sw flux multiplied by timestep units = W m-2 s dimensions = (horizontal_loop_extent) @@ -1131,7 +1086,7 @@ intent = inout optional = F [nnirbm_cpl] - standard_name = cumulative_surface_net_downward_direct_near_infrared_shortwave_flux_for_coupling_multiplied_by_timestep + standard_name = cumulative_surface_net_downwelling_direct_nir_shortwave_flux_for_coupling_multiplied_by_timestep long_name = cumulative net nir beam downward sw flux multiplied by timestep units = W m-2 s dimensions = (horizontal_loop_extent) @@ -1140,7 +1095,7 @@ intent = inout optional = F [nnirdf_cpl] - standard_name = cumulative_surface_net_downward_diffuse_near_infrared_shortwave_flux_for_coupling_multiplied_by_timestep + standard_name = cumulative_surface_net_downwellling_diffuse_nir_shortwave_flux_for_coupling_multiplied_by_timestep long_name = cumulative net nir diff downward sw flux multiplied by timestep units = W m-2 s dimensions = (horizontal_loop_extent) @@ -1149,7 +1104,7 @@ intent = inout optional = F [nvisbm_cpl] - standard_name = cumulative_surface_net_downward_direct_ultraviolet_and_visible_shortwave_flux_for_coupling_multiplied_by_timestep + standard_name = cumulative_surface_net_downwelling_direct_uv_and_vis_shortwave_flux_for_coupling_multiplied_by_timestep long_name = cumulative net uv+vis beam downward sw rad flux multiplied by timestep units = W m-2 s dimensions = (horizontal_loop_extent) @@ -1158,7 +1113,7 @@ intent = inout optional = F [nvisdf_cpl] - standard_name = cumulative_surface_net_downward_diffuse_ultraviolet_and_visible_shortwave_flux_for_coupling_multiplied_by_timestep + standard_name = cumulative_surface_net_downwelling_diffuse_uv_and_vis_shortwave_flux_for_coupling_multiplied_by_timestep long_name = cumulative net uv+vis diff downward sw rad flux multiplied by timestep units = W m-2 s dimensions = (horizontal_loop_extent) @@ -1275,42 +1230,33 @@ intent = in optional = F [lheatstrg] - standard_name = flag_for_canopy_heat_storage + standard_name = flag_for_canopy_heat_storage_in_land_surface_scheme long_name = flag for canopy heat storage parameterization units = flag dimensions = () type = logical intent = in optional = F -[z0fac] - standard_name = surface_roughness_fraction_factor - long_name = surface roughness fraction factor for canopy heat storage parameterization +[h0facu] + standard_name = multiplicative_tuning_parameter_for_reduced_surface_heat_fluxes_due_to_canopy_heat_storage + long_name = canopy heat storage factor for sensible heat flux in unstable surface layer units = none dimensions = () type = real kind = kind_phys intent = in optional = F -[e0fac] - standard_name = latent_heat_flux_fraction_factor_relative_to_sensible_heat_flux - long_name = latent heat flux fraction factor relative to sensible heat flux for canopy heat storage parameterization +[h0facs] + standard_name = multiplicative_tuning_parameter_for_reduced_latent_heat_flux_due_to_canopy_heat_storage + long_name = canopy heat storage factor for sensible heat flux in stable surface layer units = none dimensions = () type = real kind = kind_phys intent = in optional = F -[zorl] - standard_name = surface_roughness_length - long_name = surface roughness length - units = cm - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F [hflx] - standard_name = kinematic_surface_upward_sensible_heat_flux + standard_name = surface_upward_temperature_flux long_name = kinematic surface upward sensible heat flux units = K m s-1 dimensions = (horizontal_loop_extent) @@ -1319,7 +1265,7 @@ intent = in optional = F [evap] - standard_name = kinematic_surface_upward_latent_heat_flux + standard_name = surface_upward_specific_humidity_flux long_name = kinematic surface upward latent heat flux units = kg kg-1 m s-1 dimensions = (horizontal_loop_extent) @@ -1328,31 +1274,22 @@ intent = in optional = F [hflxq] - standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness - long_name = kinematic surface upward sensible heat flux reduced by surface roughness + standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness_and_vegetation + long_name = kinematic surface upward sensible heat flux reduced by surface roughness and vegetation units = K m s-1 dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out optional = F -[evapq] - standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness - long_name = kinematic surface upward latent heat flux reduced by surface roughness - units = kg kg-1 m s-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = out - optional = F -[hefac] - standard_name = surface_upward_latent_heat_flux_reduction_factor - long_name = surface upward latent heat flux reduction factor from canopy heat storage +[zvfun] + standard_name = function_of_surface_roughness_length_and_green_vegetation_fraction + long_name = function of surface roughness length and green vegetation fraction units = none dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = out + intent = in optional = F [hffac] standard_name = surface_upward_sensible_heat_flux_reduction_factor diff --git a/physics/GFS_surface_loop_control.F90 b/physics/GFS_surface_loop_control.F90 index c7f727d27..82c55c4ad 100644 --- a/physics/GFS_surface_loop_control.F90 +++ b/physics/GFS_surface_loop_control.F90 @@ -15,11 +15,9 @@ end subroutine GFS_surface_loop_control_part1_finalize !> \brief Brief description of the subroutine !! -#if 0 !! \section arg_table_GFS_surface_loop_control_part1_run Arguments !! \htmlinclude GFS_surface_loop_control_part1_run.html !! -#endif !! \section general General Algorithm !! \section detailed Detailed Algorithm !! @{ @@ -31,10 +29,10 @@ subroutine GFS_surface_loop_control_part1_run (im, iter, wind, flag_guess, errms implicit none ! Interface variables - integer, intent(in) :: im - integer, intent(in) :: iter - real(kind=kind_phys), dimension(im), intent(in) :: wind - logical, dimension(im), intent(inout) :: flag_guess + integer, intent(in) :: im + integer, intent(in) :: iter + real(kind=kind_phys), dimension(:), intent(in) :: wind + logical, dimension(:), intent(inout) :: flag_guess character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -80,7 +78,7 @@ end subroutine GFS_surface_loop_control_part2_finalize !! \section detailed Detailed Algorithm !! @{ - subroutine GFS_surface_loop_control_part2_run (im, iter, wind, & + subroutine GFS_surface_loop_control_part2_run (im, iter, wind, & flag_guess, flag_iter, dry, wet, icy, nstf_name1, errmsg, errflg) use machine, only: kind_phys @@ -90,10 +88,10 @@ subroutine GFS_surface_loop_control_part2_run (im, iter, wind, & ! Interface variables integer, intent(in) :: im integer, intent(in) :: iter - real(kind=kind_phys), dimension(im), intent(in) :: wind - logical, dimension(im), intent(inout) :: flag_guess - logical, dimension(im), intent(inout) :: flag_iter - logical, dimension(im), intent(in) :: dry, wet, icy + real(kind=kind_phys), dimension(:), intent(in) :: wind + logical, dimension(:), intent(inout) :: flag_guess + logical, dimension(:), intent(inout) :: flag_iter + logical, dimension(:), intent(in) :: dry, wet, icy integer, intent(in) :: nstf_name1 character(len=*), intent(out) :: errmsg diff --git a/physics/GFS_surface_loop_control.meta b/physics/GFS_surface_loop_control.meta index 569500a94..47ab14280 100644 --- a/physics/GFS_surface_loop_control.meta +++ b/physics/GFS_surface_loop_control.meta @@ -134,7 +134,7 @@ intent = in optional = F [nstf_name1] - standard_name = flag_for_nsstm_run + standard_name = control_for_nsstm long_name = NSSTM flag: off/uncoupled/coupled=0/1/2 units = flag dimensions = () diff --git a/physics/GFS_time_vary_pre.fv3.F90 b/physics/GFS_time_vary_pre.fv3.F90 index ba971fa67..4b7648c38 100644 --- a/physics/GFS_time_vary_pre.fv3.F90 +++ b/physics/GFS_time_vary_pre.fv3.F90 @@ -1,6 +1,7 @@ -!> \file GFS_time_vary_pre.F90 +!> \file GFS_time_vary_pre.fv3.F90 !! Contains code related to GFS physics suite setup (generic part of time_vary_step) +!>\defgroup gfs_time_vary_pre_mod GFS Time Vary Pre Module module GFS_time_vary_pre use funcphys, only: gfuncphys @@ -65,7 +66,7 @@ end subroutine GFS_time_vary_pre_finalize !> \section arg_table_GFS_time_vary_pre_timestep_init Argument Table !! \htmlinclude GFS_time_vary_pre_timestep_init.html !! - subroutine GFS_time_vary_pre_timestep_init (jdat, idat, dtp, lkm, lsm, lsm_noahmp, nsswr, & + subroutine GFS_time_vary_pre_timestep_init (jdat, idat, dtp, nsswr, & nslwr, nhfrad, idate, debug, me, master, nscyc, sec, phour, zhour, fhour, & kdt, julian, yearlen, ipt, lprnt, lssav, lsswr, lslwr, solhr, errmsg, errflg) @@ -73,10 +74,9 @@ subroutine GFS_time_vary_pre_timestep_init (jdat, idat, dtp, lkm, lsm, lsm_noahm implicit none - integer, intent(in) :: idate(4) - integer, intent(in) :: jdat(1:8), idat(1:8) - integer, intent(in) :: lkm, lsm, lsm_noahmp, & - nsswr, nslwr, me, & + integer, intent(in) :: idate(:) + integer, intent(in) :: jdat(:), idat(:) + integer, intent(in) :: nsswr, nslwr, me, & master, nscyc, nhfrad logical, intent(in) :: debug real(kind=kind_phys), intent(in) :: dtp diff --git a/physics/GFS_time_vary_pre.fv3.meta b/physics/GFS_time_vary_pre.fv3.meta index 6266889aa..fed14822b 100644 --- a/physics/GFS_time_vary_pre.fv3.meta +++ b/physics/GFS_time_vary_pre.fv3.meta @@ -52,7 +52,7 @@ name = GFS_time_vary_pre_timestep_init type = scheme [jdat] - standard_name = forecast_date_and_time + standard_name = date_and_time_of_forecast_in_united_states_order long_name = current forecast date and time units = none dimensions = (8) @@ -60,7 +60,7 @@ intent = in optional = F [idat] - standard_name = date_and_time_at_model_initialization + standard_name = date_and_time_at_model_initialization_in_iso_order long_name = initialization date and time units = none dimensions = (8) @@ -68,7 +68,7 @@ intent = in optional = F [dtp] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics timestep units = s dimensions = () @@ -76,30 +76,6 @@ kind = kind_phys intent = in optional = F -[lkm] - standard_name = flag_for_lake_surface_scheme - long_name = flag for lake surface model - units = flag - dimensions = () - type = integer - intent = in - optional = F -[lsm] - standard_name = flag_for_land_surface_scheme - long_name = flag for land surface model - units = flag - dimensions = () - type = integer - intent = in - optional = F -[lsm_noahmp] - standard_name = flag_for_noahmp_land_surface_scheme - long_name = flag for NOAH MP land surface model - units = flag - dimensions = () - type = integer - intent = in - optional = F [nsswr] standard_name = number_of_timesteps_between_shortwave_radiation_calls long_name = number of timesteps between shortwave radiation calls @@ -117,7 +93,7 @@ intent = in optional = F [nhfrad] - standard_name = number_of_timesteps_for_radiation_calls_on_physics_timestep + standard_name = number_of_timesteps_for_concurrent_radiation_and_remainder_physics_calls_after_model_initialization long_name = number of timesteps for radiation calls on physics timestep (coldstarts only) units = count dimensions = () @@ -125,7 +101,7 @@ intent = in optional = F [idate] - standard_name = date_and_time_at_model_initialization_reordered + standard_name = date_and_time_at_model_initialization_in_united_states_order long_name = initial date with different size and ordering units = none dimensions = (4) @@ -133,7 +109,7 @@ intent = in optional = F [debug] - standard_name = flag_debug + standard_name = flag_for_debug_output long_name = control flag for debug units = flag dimensions = () @@ -165,7 +141,7 @@ intent = in optional = F [sec] - standard_name = seconds_elapsed_since_model_initialization + standard_name = forecast_time_in_seconds long_name = seconds elapsed since model initialization units = s dimensions = () @@ -174,7 +150,7 @@ intent = out optional = F [phour] - standard_name = forecast_time_at_previous_timestep + standard_name = forecast_time_on_previous_timestep long_name = forecast time at the previous timestep units = h dimensions = () @@ -183,7 +159,7 @@ intent = out optional = F [zhour] - standard_name = time_since_diagnostics_zeroed + standard_name = time_elapsed_since_diagnostics_reset long_name = time since diagnostics variables have been zeroed units = h dimensions = () @@ -201,7 +177,7 @@ intent = out optional = F [kdt] - standard_name = index_of_time_step + standard_name = index_of_timestep long_name = current forecast iteration units = index dimensions = () @@ -209,7 +185,7 @@ intent = out optional = F [julian] - standard_name = julian_day + standard_name = forecast_julian_day long_name = julian day units = days dimensions = () @@ -218,7 +194,7 @@ intent = out optional = F [yearlen] - standard_name = number_of_days_in_year + standard_name = number_of_days_in_current_year long_name = number of days in a year units = days dimensions = () @@ -226,7 +202,7 @@ intent = out optional = F [ipt] - standard_name = index_for_diagnostic_printout + standard_name = index_of_horizontal_gridpoint_for_debug_output long_name = horizontal index for point used for diagnostic printout units = index dimensions = () @@ -242,7 +218,7 @@ intent = out optional = F [lssav] - standard_name = flag_diagnostics + standard_name = flag_for_diagnostics long_name = logical flag for storing diagnostics units = flag dimensions = () @@ -250,7 +226,7 @@ intent = out optional = F [lsswr] - standard_name = flag_to_calc_sw + standard_name = flag_for_calling_shortwave_radiation long_name = logical flags for sw radiation calls units = flag dimensions = () @@ -258,7 +234,7 @@ intent = out optional = F [lslwr] - standard_name = flag_to_calc_lw + standard_name = flag_for_calling_longwave_radiation long_name = logical flags for lw radiation calls units = flag dimensions = () @@ -266,7 +242,7 @@ intent = out optional = F [solhr] - standard_name = forecast_hour_of_the_day + standard_name = forecast_utc_hour long_name = time in hours after 00z at the current timestep units = h dimensions = () diff --git a/physics/GFS_time_vary_pre.scm.F90 b/physics/GFS_time_vary_pre.scm.F90 index ad98b14e3..0c34ca735 100644 --- a/physics/GFS_time_vary_pre.scm.F90 +++ b/physics/GFS_time_vary_pre.scm.F90 @@ -1,4 +1,4 @@ -!> \file GFS_time_vary_pre.F90 +!> \file GFS_time_vary_pre.scm.F90 !! Contains code related to GFS physics suite setup (generic part of time_vary_step) module GFS_time_vary_pre @@ -9,7 +9,7 @@ module GFS_time_vary_pre private - public GFS_time_vary_pre_init, GFS_time_vary_pre_run, GFS_time_vary_pre_finalize + public GFS_time_vary_pre_init, GFS_time_vary_pre_timestep_init, GFS_time_vary_pre_finalize logical :: is_initialized = .false. @@ -62,10 +62,10 @@ subroutine GFS_time_vary_pre_finalize(errmsg, errflg) end subroutine GFS_time_vary_pre_finalize -!> \section arg_table_GFS_time_vary_pre_run Argument Table -!! \htmlinclude GFS_time_vary_pre_run.html +!> \section arg_table_GFS_time_vary_pre_timestep_init Argument Table +!! \htmlinclude GFS_time_vary_pre_timestep_init.html !! - subroutine GFS_time_vary_pre_run (jdat, idat, dtp, lsm, lsm_noahmp, nsswr, & + subroutine GFS_time_vary_pre_timestep_init (jdat, idat, dtp, nsswr, & nslwr, idate, debug, me, master, nscyc, sec, phour, zhour, fhour, kdt, & julian, yearlen, ipt, lprnt, lssav, lsswr, lslwr, solhr, errmsg, errflg) @@ -73,10 +73,9 @@ subroutine GFS_time_vary_pre_run (jdat, idat, dtp, lsm, lsm_noahmp, nsswr, & implicit none - integer, intent(in) :: idate(4) - integer, intent(in) :: jdat(1:8), idat(1:8) - integer, intent(in) :: lsm, lsm_noahmp, & - nsswr, nslwr, me, & + integer, intent(in) :: idate(:) + integer, intent(in) :: jdat(:), idat(:) + integer, intent(in) :: nsswr, nslwr, me, & master, nscyc logical, intent(in) :: debug real(kind=kind_phys), intent(in) :: dtp @@ -104,14 +103,14 @@ subroutine GFS_time_vary_pre_run (jdat, idat, dtp, lsm, lsm_noahmp, nsswr, & ! Check initialization status if (.not.is_initialized) then - write(errmsg,'(*(a))') "Logic error: GFS_time_vary_pre_run called & + write(errmsg,'(*(a))') "Logic error: GFS_time_vary_pre_timestep_init called & &before GFS_time_vary_pre_init" errflg = 1 return end if !--- jdat is being updated directly inside of the time integration - !--- loop of gmtb_scm.F90 + !--- loop of scm.F90 !--- update calendars and triggers rinc(1:5) = 0 call w3difdat(jdat,idat,4,rinc) @@ -185,6 +184,6 @@ subroutine GFS_time_vary_pre_run (jdat, idat, dtp, lsm, lsm_noahmp, nsswr, & print *,' solhr ', solhr endif - end subroutine GFS_time_vary_pre_run + end subroutine GFS_time_vary_pre_timestep_init end module GFS_time_vary_pre diff --git a/physics/GFS_time_vary_pre.scm.meta b/physics/GFS_time_vary_pre.scm.meta index 6241e29f1..32793d31a 100644 --- a/physics/GFS_time_vary_pre.scm.meta +++ b/physics/GFS_time_vary_pre.scm.meta @@ -49,10 +49,10 @@ ######################################################################## [ccpp-arg-table] - name = GFS_time_vary_pre_run + name = GFS_time_vary_pre_timestep_init type = scheme [jdat] - standard_name = forecast_date_and_time + standard_name = date_and_time_of_forecast_in_united_states_order long_name = current forecast date and time units = none dimensions = (8) @@ -60,7 +60,7 @@ intent = in optional = F [idat] - standard_name = date_and_time_at_model_initialization + standard_name = date_and_time_at_model_initialization_in_iso_order long_name = initialization date and time units = none dimensions = (8) @@ -68,7 +68,7 @@ intent = in optional = F [dtp] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics timestep units = s dimensions = () @@ -76,22 +76,6 @@ kind = kind_phys intent = in optional = F -[lsm] - standard_name = flag_for_land_surface_scheme - long_name = flag for land surface model - units = flag - dimensions = () - type = integer - intent = in - optional = F -[lsm_noahmp] - standard_name = flag_for_noahmp_land_surface_scheme - long_name = flag for NOAH MP land surface model - units = flag - dimensions = () - type = integer - intent = in - optional = F [nsswr] standard_name = number_of_timesteps_between_shortwave_radiation_calls long_name = number of timesteps between shortwave radiation calls @@ -109,7 +93,7 @@ intent = in optional = F [idate] - standard_name = date_and_time_at_model_initialization_reordered + standard_name = date_and_time_at_model_initialization_in_united_states_order long_name = initial date with different size and ordering units = none dimensions = (4) @@ -117,7 +101,7 @@ intent = in optional = F [debug] - standard_name = flag_debug + standard_name = flag_for_debug_output long_name = control flag for debug units = flag dimensions = () @@ -149,7 +133,7 @@ intent = in optional = F [sec] - standard_name = seconds_elapsed_since_model_initialization + standard_name = forecast_time_in_seconds long_name = seconds elapsed since model initialization units = s dimensions = () @@ -158,7 +142,7 @@ intent = out optional = F [phour] - standard_name = forecast_time_at_previous_timestep + standard_name = forecast_time_on_previous_timestep long_name = forecast time at the previous timestep units = h dimensions = () @@ -167,7 +151,7 @@ intent = out optional = F [zhour] - standard_name = time_since_diagnostics_zeroed + standard_name = time_elapsed_since_diagnostics_reset long_name = time since diagnostics variables have been zeroed units = h dimensions = () @@ -185,7 +169,7 @@ intent = out optional = F [kdt] - standard_name = index_of_time_step + standard_name = index_of_timestep long_name = current forecast iteration units = index dimensions = () @@ -193,7 +177,7 @@ intent = out optional = F [julian] - standard_name = julian_day + standard_name = forecast_julian_day long_name = julian day units = days dimensions = () @@ -202,7 +186,7 @@ intent = out optional = F [yearlen] - standard_name = number_of_days_in_year + standard_name = number_of_days_in_current_year long_name = number of days in a year units = days dimensions = () @@ -210,7 +194,7 @@ intent = out optional = F [ipt] - standard_name = index_for_diagnostic_printout + standard_name = index_of_horizontal_gridpoint_for_debug_output long_name = horizontal index for point used for diagnostic printout units = index dimensions = () @@ -226,7 +210,7 @@ intent = out optional = F [lssav] - standard_name = flag_diagnostics + standard_name = flag_for_diagnostics long_name = logical flag for storing diagnostics units = flag dimensions = () @@ -234,7 +218,7 @@ intent = out optional = F [lsswr] - standard_name = flag_to_calc_sw + standard_name = flag_for_calling_shortwave_radiation long_name = logical flags for sw radiation calls units = flag dimensions = () @@ -242,7 +226,7 @@ intent = out optional = F [lslwr] - standard_name = flag_to_calc_lw + standard_name = flag_for_calling_longwave_radiation long_name = logical flags for lw radiation calls units = flag dimensions = () @@ -250,7 +234,7 @@ intent = out optional = F [solhr] - standard_name = forecast_hour_of_the_day + standard_name = forecast_utc_hour long_name = time in hours after 00z at the current timestep units = h dimensions = () diff --git a/physics/aerclm_def.F b/physics/aerclm_def.F index 84852a1de..3862aa1b1 100644 --- a/physics/aerclm_def.F +++ b/physics/aerclm_def.F @@ -2,8 +2,8 @@ module aerclm_def use machine , only : kind_phys implicit none - integer, parameter :: levsaer=50, ntrcaerm=15, timeaer=12 - integer :: latsaer, lonsaer, ntrcaer + integer, parameter :: levsaer=72, ntrcaerm=15, timeaer=12 + integer :: latsaer, lonsaer, ntrcaer, levsw character*10 :: specname(ntrcaerm) real (kind=kind_phys):: aer_time(13) @@ -13,7 +13,7 @@ module aerclm_def real (kind=kind_phys), allocatable, dimension(:,:,:,:) :: aer_pres real (kind=kind_phys), allocatable, dimension(:,:,:,:,:) :: aerin - data aer_time/15.5, 45., 74.5, 105., 135.5, 166., 196.5, + data aer_time/15.5, 45., 74.5, 105., 135.5, 166., 196.5, & 227.5, 258., 288.5, 319., 349.5, 380.5/ data specname /'DU001','DU002','DU003','DU004','DU005', diff --git a/physics/aerinterp.F90 b/physics/aerinterp.F90 index e7cd6ca20..dbcf73603 100644 --- a/physics/aerinterp.F90 +++ b/physics/aerinterp.F90 @@ -11,7 +11,7 @@ module aerinterp private - public :: read_aerdata, setindxaer, aerinterpol + public :: read_aerdata, setindxaer, aerinterpol, read_aerdataf contains @@ -32,11 +32,6 @@ SUBROUTINE read_aerdata (me, master, iflip, idate, errmsg, errflg) logical :: file_exist integer, allocatable :: invardims(:) - real(kind=kind_io4),allocatable,dimension(:,:,:) :: buff - real(kind=kind_io4),allocatable,dimension(:,:,:,:):: buffx - real(kind=kind_io4),allocatable,dimension(:,:) :: pres_tmp - real(kind=kind_io8),allocatable,dimension(:) :: aer_lati - real(kind=kind_io8),allocatable,dimension(:) :: aer_loni ! !! =================================================================== if (me == master) then @@ -48,15 +43,23 @@ SUBROUTINE read_aerdata (me, master, iflip, idate, errmsg, errflg) endif ! !! =================================================================== +!! check if all necessary files exist +!! =================================================================== + do imon = 1, timeaer + write(mn,'(i2.2)') imon + fname=trim("aeroclim.m"//mn//".nc") + inquire (file = fname, exist = file_exist) + if (.not. file_exist) then + errmsg = 'Error in read_aerdata: file ' // trim(fname) // ' not found' + errflg = 1 + return + endif + enddo +! +!! =================================================================== !! fetch dim spec and lat/lon from m01 data set !! =================================================================== fname=trim("aeroclim.m"//'01'//".nc") - inquire (file = fname, exist = file_exist) - if (.not. file_exist) then - errmsg = 'Error in read_aerdata: file ' // trim(fname) // ' not found' - errflg = 1 - return - endif call nf_open(fname , nf90_NOWRITE, ncid) vname = trim(specname(1)) @@ -72,51 +75,59 @@ SUBROUTINE read_aerdata (me, master, iflip, idate, errmsg, errflg) ! specify latsaer, lonsaer, hmx lonsaer = dim1 latsaer = dim2 - hmx = int(dim1/2) ! to swap long from W-E to E-W + levsw = dim3 if(me==master) then print *, 'MERRA2 dim: ',dim1, dim2, dim3 endif ! allocate arrays - if (.not. allocated(aer_loni)) then - allocate (aer_loni(lonsaer)) - allocate (aer_lati(latsaer)) - endif if (.not. allocated(aer_lat)) then allocate(aer_lat(latsaer)) allocate(aer_lon(lonsaer)) - allocate(aerin(lonsaer,latsaer,levsaer,ntrcaerm,timeaer)) - allocate(aer_pres(lonsaer,latsaer,levsaer,timeaer)) endif ! construct lat/lon array call nf_inq_varid(ncid, 'lat', varid) - call nf_get_var(ncid, varid, aer_lati) + call nf_get_var(ncid, varid, aer_lat) call nf_inq_varid(ncid, 'lon', varid) - call nf_get_var(ncid, varid, aer_loni) - - do i = 1, hmx ! flip from (-180,180) to (0,360) - if(aer_loni(i)<0.) aer_loni(i)=aer_loni(i)+360. - aer_lon(i+hmx) = aer_loni(i) - aer_lon(i) = aer_loni(i+hmx) - enddo + call nf_get_var(ncid, varid, aer_lon) + call nf_close(ncid) + END SUBROUTINE read_aerdata +! +!********************************************************************** + SUBROUTINE read_aerdataf (iamin, iamax, jamin, jamax, & + me, master, iflip, idate, errmsg, errflg) + use machine, only: kind_phys, kind_io4, kind_io8 + use aerclm_def + use netcdf - do i = 1, latsaer - aer_lat(i) = aer_lati(i) - enddo +!--- in/out + integer, intent(in) :: me, master, iflip, idate(4) + integer, intent(in) :: iamin, iamax, jamin, jamax + character(len=*), intent(inout) :: errmsg + integer, intent(inout) :: errflg - call nf_close(ncid) +!--- locals + integer :: ncid, varid + integer :: i, j, k, n, ii, imon, klev + character :: fname*50, mn*2, vname*10 + logical :: file_exist + integer, allocatable :: invardims(:) + real(kind=kind_io4),allocatable,dimension(:,:,:) :: buff + real(kind=kind_io4),allocatable,dimension(:,:,:,:):: buffx + real(kind=kind_io4),allocatable,dimension(:,:) :: pres_tmp +! + if (.not. allocated(aerin)) then + allocate(aerin(iamin:iamax,jamin:jamax,levsaer,ntrcaerm,timeaer)) + allocate(aer_pres(iamin:iamax,jamin:jamax,levsaer,timeaer)) + endif ! allocate local working arrays - if (.not. allocated(buff)) then - allocate (buff(lonsaer, latsaer, dim3)) - allocate (pres_tmp(lonsaer,dim3)) - endif - if (.not. allocated(buffx)) then - allocate (buffx(lonsaer, latsaer, dim3,1)) - endif + allocate (buff(lonsaer, latsaer, levsw)) + allocate (pres_tmp(lonsaer, levsw)) + allocate (buffx(lonsaer, latsaer, levsw, 1)) !! =================================================================== !! loop thru m01 - m12 for aer/pres array @@ -124,24 +135,17 @@ SUBROUTINE read_aerdata (me, master, iflip, idate, errmsg, errflg) do imon = 1, timeaer write(mn,'(i2.2)') imon fname=trim("aeroclim.m"//mn//".nc") - inquire (file = fname, exist = file_exist) - if (.not. file_exist) then - errmsg = 'Error in read_aerdata: file ' // trim(fname) // ' not found' - errflg = 1 - return - endif - call nf_open(fname , nf90_NOWRITE, ncid) ! ====> construct 3-d pressure array (Pa) call nf_inq_varid(ncid, "DELP", varid) call nf_get_var(ncid, varid, buff) - do j = 1, latsaer - do i = 1, lonsaer + do j = jamin, jamax + do i = iamin, iamax ! constract pres_tmp (top-down), note input is top-down pres_tmp(i,1) = 0. - do k=2, dim3 + do k=2, levsw pres_tmp(i,k) = pres_tmp(i,k-1)+buff(i,j,k) enddo !k-loop enddo !i-loop (lon) @@ -151,11 +155,10 @@ SUBROUTINE read_aerdata (me, master, iflip, idate, errmsg, errflg) if ( iflip == 0 ) then ! data from toa to sfc klev = k else ! data from sfc to top - klev = ( dim3 - k ) + 1 + klev = ( levsw - k ) + 1 endif - do i = 1, hmx - aer_pres(i+hmx,j,k,imon)= 1.d0*pres_tmp(i,klev) - aer_pres(i,j,k,imon) = 1.d0*pres_tmp(i+hmx,klev) + do i = iamin, iamax + aer_pres(i,j,k,imon) = 1.d0*pres_tmp(i,klev) enddo !i-loop (lon) enddo !k-loop (lev) enddo !j-loop (lat) @@ -168,43 +171,35 @@ SUBROUTINE read_aerdata (me, master, iflip, idate, errmsg, errflg) call nf_inq_varid(ncid, vname, varid) call nf_get_var(ncid, varid, buffx) - do j = 1, latsaer - do k = 1, levsaer + do j = jamin, jamax + do k = 1, levsaer ! input is from toa to sfc - if ( iflip == 0 ) then ! data from toa to sfc - klev = k - else ! data from sfc to top - klev = ( dim3 - k ) + 1 - endif - do i = 1, hmx - aerin(i+hmx,j,k,ii,imon) = 1.d0*buffx(i,j,klev,1) - if(aerin(i+hmx,j,k,ii,imon)<0.or.aerin(i+hmx,j,k,ii,imon)>1.) then - aerin(i+hmx,j,k,ii,imon) = 0. - end if - aerin(i,j,k,ii,imon) = 1.d0*buffx(i+hmx,j,klev,1) - if(aerin(i,j,k,ii,imon)<0.or.aerin(i,j,k,ii,imon)>1.) then - aerin(i,j,k,ii,imon) = 0. - end if - enddo !i-loop (lon) - enddo !k-loop (lev) - enddo !j-loop (lat) - - ENDDO ! ii-loop (ntracaerm) + if ( iflip == 0 ) then ! data from toa to sfc + klev = k + else ! data from sfc to top + klev = ( levsw - k ) + 1 + endif + do i = iamin, iamax + aerin(i,j,k,ii,imon) = 1.d0*buffx(i,j,klev,1) + if(aerin(i,j,k,ii,imon) < 0 .or. aerin(i,j,k,ii,imon) > 1.) then + aerin(i,j,k,ii,imon) = 1.e-15 + endif + enddo !i-loop (lon) + enddo !k-loop (lev) + enddo !j-loop (lat) + + ENDDO ! ii-loop (ntracaerm) ! close the file call nf_close(ncid) enddo !imon-loop !--- - deallocate (aer_loni, aer_lati) deallocate (buff, pres_tmp) deallocate (buffx) - - END SUBROUTINE read_aerdata -! -!********************************************************************** + END SUBROUTINE read_aerdataf ! SUBROUTINE setindxaer(npts,dlat,jindx1,jindx2,ddy,dlon, & - iindx1,iindx2,ddx,me,master) + iindx1,iindx2,ddx,me,master) ! USE MACHINE, ONLY: kind_phys use aerclm_def, only: aer_lat, jaero=>latsaer, & @@ -261,18 +256,19 @@ END SUBROUTINE setindxaer !********************************************************************** !********************************************************************** ! - SUBROUTINE aerinterpol(me,master,npts,IDATE,FHOUR,jindx1,jindx2, & - ddy,iindx1,iindx2,ddx,lev,prsl,aerout) + SUBROUTINE aerinterpol(me,master,nthrds,npts,IDATE,FHOUR,jindx1,jindx2, & + ddy,iindx1,iindx2,ddx,lev,prsl,aerout) ! USE MACHINE, ONLY : kind_phys use aerclm_def implicit none integer i1,i2, iday,j,j1,j2,l,npts,nc,n1,n2,lev,k,i,ii - real(kind=kind_phys) fhour,temj, tx1, tx2,temi + real(kind=kind_phys) fhour,temj, tx1, tx2,temi, tem + real(kind=kind_phys), dimension(npts) :: temij,temiy,temjx,ddxy ! - integer JINDX1(npts), JINDX2(npts),iINDX1(npts),iINDX2(npts) - integer me,idate(4), master + integer JINDX1(npts), JINDX2(npts), iINDX1(npts), iINDX2(npts) + integer me,idate(4), master, nthrds integer IDAT(8),JDAT(8) ! real(kind=kind_phys) DDY(npts), ddx(npts),ttt @@ -284,16 +280,16 @@ SUBROUTINE aerinterpol(me,master,npts,IDATE,FHOUR,jindx1,jindx2, & real(4) rinc4(5) integer w3kindreal,w3kindint ! - IDAT=0 - IDAT(1)=IDATE(4) - IDAT(2)=IDATE(2) - IDAT(3)=IDATE(3) - IDAT(5)=IDATE(1) - RINC=0. - RINC(2)=FHOUR + IDAT = 0 + IDAT(1) = IDATE(4) + IDAT(2) = IDATE(2) + IDAT(3) = IDATE(3) + IDAT(5) = IDATE(1) + RINC = 0. + RINC(2) = FHOUR call w3kind(w3kindreal,w3kindint) - if(w3kindreal==4) then - rinc4=rinc + if(w3kindreal == 4) then + rinc4 = rinc CALL W3MOVDAT(RINC4,IDAT,JDAT) else CALL W3MOVDAT(RINC,IDAT,JDAT) @@ -304,11 +300,11 @@ SUBROUTINE aerinterpol(me,master,npts,IDATE,FHOUR,jindx1,jindx2, & jday = 0 call w3doxdat(jdat,jdow,jdoy,jday) rjday = jdoy + jdat(5) / 24. - IF (RJDAY .LT. aer_time(1)) RJDAY = RJDAY+365. + IF (RJDAY < aer_time(1)) RJDAY = RJDAY+365. ! n2 = 13 do j=2, 12 - if (rjday .lt. aer_time(j)) then + if (rjday < aer_time(j)) then n2 = j exit endif @@ -319,62 +315,86 @@ SUBROUTINE aerinterpol(me,master,npts,IDATE,FHOUR,jindx1,jindx2, & tx2 = 1.0 - tx1 if (n2 > 12) n2 = n2 -12 -! + do j=1,npts + TEMJ = 1.0 - DDY(J) + TEMI = 1.0 - DDX(J) + temij(j) = TEMI*TEMJ + temiy(j) = TEMI*DDY(j) + temjx(j) = TEMJ*DDX(j) + ddxy(j) = DDX(j)*DDY(J) + enddo + +#ifndef __GFORTRAN__ +!$OMP parallel num_threads(nthrds) default(none) & +!$OMP shared(npts,ntrcaer,aerin,aer_pres,prsl) & +!$OMP shared(ddx,ddy,jindx1,jindx2,iindx1,iindx2) & +!$OMP shared(aerpm,aerpres,aerout,n1,n2,lev,nthrds) & +!$OMP shared(temij,temiy,temjx,ddxy) & +!$OMP private(l,j,k,ii,i1,i2,j1,j2,tem) & +!$OMP copyin(tx1,tx2) firstprivate(tx1,tx2) + +!$OMP do +#endif DO L=1,levsaer DO J=1,npts - J1 = JINDX1(J) - J2 = JINDX2(J) - TEMJ = 1.0 - DDY(J) - I1 = IINDX1(J) - I2 = IINDX2(J) - TEMI = 1.0 - DDX(J) + J1 = JINDX1(J) + J2 = JINDX2(J) + I1 = IINDX1(J) + I2 = IINDX2(J) DO ii=1,ntrcaer - aerpm(j,L,ii) = & - tx1*(TEMI*TEMJ*aerin(I1,J1,L,ii,n1)+DDX(j)*DDY(J)*aerin(I2,J2,L,ii,n1)& - +TEMI*DDY(j)*aerin(I1,J2,L,ii,n1)+DDX(j)*TEMJ*aerin(I2,J1,L,ii,n1))& - +tx2*(TEMI*TEMJ*aerin(I1,J1,L,ii,n2)+DDX(j)*DDY(J)*aerin(I2,J2,L,ii,n2) & - +TEMI*DDY(j)*aerin(I1,J2,L,ii,n2)+DDX(j)*TEMJ*aerin(I2,J1,L,ii,n2)) + aerpm(j,L,ii) = & + tx1*(TEMIJ(j)*aerin(I1,J1,L,ii,n1)+DDXY(j)*aerin(I2,J2,L,ii,n1) & + +TEMIY(j)*aerin(I1,J2,L,ii,n1)+temjx(j)*aerin(I2,J1,L,ii,n1))& + +tx2*(TEMIJ(j)*aerin(I1,J1,L,ii,n2)+DDXY(j)*aerin(I2,J2,L,ii,n2) & + +TEMIY(j)*aerin(I1,J2,L,ii,n2)+temjx(j)*aerin(I2,J1,L,ii,n2)) ENDDO - aerpres(j,L) = & - tx1*(TEMI*TEMJ*aer_pres(I1,J1,L,n1)+DDX(j)*DDY(J)*aer_pres(I2,J2,L,n1)& - +TEMI*DDY(j)*aer_pres(I1,J2,L,n1)+DDX(j)*TEMJ*aer_pres(I2,J1,L,n1))& - +tx2*(TEMI*TEMJ*aer_pres(I1,J1,L,n2)+DDX(j)*DDY(J)*aer_pres(I2,J2,L,n2) & - +TEMI*DDY(j)*aer_pres(I1,J2,L,n2)+DDX(j)*TEMJ*aer_pres(I2,J1,L,n2)) - + aerpres(j,L) = & + tx1*(TEMIJ(j)*aer_pres(I1,J1,L,n1)+DDXY(j)*aer_pres(I2,J2,L,n1) & + +TEMIY(j)*aer_pres(I1,J2,L,n1)+temjx(j)*aer_pres(I2,J1,L,n1))& + +tx2*(TEMIJ(j)*aer_pres(I1,J1,L,n2)+DDXY(j)*aer_pres(I2,J2,L,n2) & + +TEMIY(j)*aer_pres(I1,J2,L,n2)+temjx(j)*aer_pres(I2,J1,L,n2)) ENDDO ENDDO +#ifndef __GFORTRAN__ +!$OMP end do ! don't flip, input is the same direction as GFS (bottom-up) +!$OMP do +#endif DO J=1,npts DO L=1,lev - if(prsl(j,L).ge.aerpres(j,1)) then + if(prsl(j,L) >= aerpres(j,1)) then DO ii=1, ntrcaer - aerout(j,L,ii)=aerpm(j,1,ii) !! sfc level + aerout(j,L,ii) = aerpm(j,1,ii) !! sfc level ENDDO - else if(prsl(j,L).le.aerpres(j,levsaer)) then + else if(prsl(j,L) <= aerpres(j,levsaer)) then DO ii=1, ntrcaer - aerout(j,L,ii)=aerpm(j,levsaer,ii) !! toa top + aerout(j,L,ii) = aerpm(j,levsaer,ii) !! toa top ENDDO else DO k=1, levsaer-1 !! from sfc to toa - IF(prsl(j,L)aerpres(j,k+1)) then - i1=k - i2=min(k+1,levsaer) + IF(prsl(j,L) < aerpres(j,k) .and. prsl(j,L)>aerpres(j,k+1)) then + i1 = k + i2 = min(k+1,levsaer) exit ENDIF ENDDO - temi = prsl(j,L)-aerpres(j,i2) - temj = aerpres(j,i1) - prsl(j,L) - tx1 = temi/(aerpres(j,i1) - aerpres(j,i2)) - tx2 = temj/(aerpres(j,i1) - aerpres(j,i2)) + tem = 1.0 / (aerpres(j,i1) - aerpres(j,i2)) + tx1 = (prsl(j,L) - aerpres(j,i2)) * tem + tx2 = (aerpres(j,i1) - prsl(j,L)) * tem DO ii = 1, ntrcaer - aerout(j,L,ii)= aerpm(j,i1,ii)*tx1 + aerpm(j,i2,ii)*tx2 + aerout(j,L,ii) = aerpm(j,i1,ii)*tx1 + aerpm(j,i2,ii)*tx2 ENDDO endif ENDDO !L-loop ENDDO !J-loop -! +#ifndef __GFORTRAN__ +!$OMP end do + +!$OMP end parallel +#endif + RETURN END SUBROUTINE aerinterpol diff --git a/physics/cires_orowam2017.f b/physics/cires_orowam2017.f index 4170a3d79..c20f98f42 100644 --- a/physics/cires_orowam2017.f +++ b/physics/cires_orowam2017.f @@ -4,7 +4,7 @@ subroutine oro_wam_2017(im, levs,npt,ipt, kref,kdt,me,master, & sinlat, xlatd, taup, taud, pkdis) ! USE MACHINE , ONLY : kind_phys - use ugwp_common , only : grav, omega2 + use ugwp_common_v0 , only : grav, omega2 ! implicit none @@ -121,7 +121,7 @@ subroutine oro_wam_2017(im, levs,npt,ipt, kref,kdt,me,master, taub_kx(1:nw) = tau_kx(1:nw) * taub(i) wkdis(:,:) = kedmin - call oro_meanflow(levs, nzi, u1(j,:), v1(j,:), t1(j,:), + call oro_meanflow_v0(levs, nzi, u1(j,:), v1(j,:), t1(j,:), & prsi(j,:), prsL(j,:), del(j,:), rho(i,:), & bn2(i,:), uzi, rhoi,ktur, kalp,dzi, & xn(i), yn(i)) @@ -275,10 +275,10 @@ end subroutine oro_wam_2017 ! define mean flow and dissipation for OGW-kx spectrum ! !------------------------------------------------------------- - subroutine oro_meanflow(nz, nzi, u1, v1, t1, pint, pmid, + subroutine oro_meanflow_v0(nz, nzi, u1, v1, t1, pint, pmid, & delp, rho, bn2, uzi, rhoi, ktur, kalp, dzi, xn, yn) - use ugwp_common , only : grav, rgrav, rdi, velmin, dw2min + use ugwp_common_v0 , only : grav, rgrav, rdi, velmin, dw2min implicit none integer :: nz, nzi @@ -336,4 +336,51 @@ subroutine oro_meanflow(nz, nzi, u1, v1, t1, pint, pmid, rhoi(k) = rhoi(k-1)*.5 dzi(k) = dzi(k-1) - end subroutine oro_meanflow + end subroutine oro_meanflow_v0 + + subroutine ugwpv0_tofd1d(levs, sigflt, elvmax, zsurf, + & zpbl, u, v, zmid, utofd, vtofd, epstofd, krf_tofd) + use machine , only : kind_phys + use ugwp_common_v0 , only : rcpd2 + use ugwpv0_oro_init, only : n_tofd, const_tofd, ze_tofd + use ugwpv0_oro_init, only : a12_tofd, ztop_tofd +! + implicit none + integer :: levs + real(kind_phys), dimension(levs) :: u, v, zmid + real(kind_phys) :: sigflt, elvmax, zpbl, zsurf + real(kind_phys), dimension(levs) :: utofd, vtofd + real(kind_phys), dimension(levs) :: epstofd, krf_tofd +! +! locals +! + integer :: i, k + real(kind_phys) :: sghmax = 5. + real(kind_phys) :: sgh2, ekin, zdec, rzdec, umag, zmet + real(kind_phys) :: zarg, ztexp, krf +! + utofd =0.0 ; vtofd = 0.0 + epstofd =0.0 ; krf_tofd =0.0 +! + zdec = max(n_tofd*sigflt, zpbl) ! ntimes*sgh_turb or Zpbl + zdec = min(ze_tofd, zdec) ! cannot exceed 18 km + rzdec = 1.0/zdec + sgh2 = max(sigflt*sigflt, sghmax*sghmax) ! 25 meters dz-of the first layer + + do k=1, levs + zmet = zmid(k)-zsurf + if (zmet > ztop_tofd) cycle + ekin = u(k)*u(k) + v(k)*v(k) + umag = sqrt(ekin) + zarg = zmet*rzdec + ztexp = exp(-zarg*sqrt(zarg)) + krf = const_tofd* a12_tofd *sgh2* zmet ** (-1.2) *ztexp + + utofd(k) = -krf*u(k) + vtofd(k) = -krf*v(k) + epstofd(k) = rcpd2*krf*ekin ! more accurate heat/mom form using "implicit tend-solver" + ! to update momentum and temp-re; epstofd(k) can be skipped + krf_tofd(k) = krf + enddo +! + end subroutine ugwpv0_tofd1d diff --git a/physics/cires_tauamf_data.F90 b/physics/cires_tauamf_data.F90 new file mode 100644 index 000000000..e0d43e74e --- /dev/null +++ b/physics/cires_tauamf_data.F90 @@ -0,0 +1,213 @@ +module cires_tauamf_data + + use machine, only: kind_phys +!........................................................................................... +! tabulated GW-sources: GRACILE/Ern et al., 2018 and/or Resolved GWs from C384-Annual run +!........................................................................................... +implicit none + + integer :: ntau_d1y, ntau_d2t + real(kind=kind_phys), allocatable :: ugwp_taulat(:) + real(kind=kind_phys), allocatable :: tau_limb(:,:), days_limb(:) + logical :: flag_alloctau = .false. + character(len=255):: ugwp_taufile = 'ugwp_limb_tau.nc' + + public :: read_tau_amf, cires_indx_ugwp, tau_amf_interp + +contains + + subroutine read_tau_amf(me, master, errmsg, errflg) + + use netcdf + integer, intent(in) :: me, master + integer :: ncid, iernc, vid, dimid, status + integer :: k + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg +! + + iernc=NF90_OPEN(trim(ugwp_taufile), nf90_nowrite, ncid) + + if(iernc.ne.0) then + write(errmsg,'(*(a))') "read_tau_amf: cannot open file_limb_tab data-file ", & + trim(ugwp_taufile) + print *, 'cannot open ugwp-v1 tau-file=',trim(ugwp_taufile) + errflg = 1 + return + else + + + status = nf90_inq_dimid(ncid, "lat", DimID) +! if (status /= nf90_noerr) call handle_err(status) +! + status = nf90_inquire_dimension(ncid, DimID, len =ntau_d1y ) + + status = nf90_inq_dimid(ncid, "days", DimID) + status = nf90_inquire_dimension(ncid, DimID, len =ntau_d2t ) + + if (me == master) print *, ntau_d1y, ntau_d2t, ' dimd of tau_ngw ugwp-v1 ' + if (ntau_d2t .le. 0 .or. ntau_d1y .le. 0) then + print *, 'ugwp-v1 tau-file=', trim(ugwp_taufile) + print *, ' ugwp-v1: ', 'ntau_d2t=',ntau_d2t, 'ntau_d2t=',ntau_d1y + stop + endif + + if (.not.allocated(ugwp_taulat)) allocate (ugwp_taulat(ntau_d1y )) + if (.not.allocated(days_limb)) allocate (days_limb(ntau_d2t)) + if (.not.allocated(tau_limb)) allocate (tau_limb(ntau_d1y, ntau_d2t )) + + iernc=nf90_inq_varid( ncid, 'DAYS', vid ) + iernc= nf90_get_var( ncid, vid, days_limb) + iernc=nf90_inq_varid( ncid, 'LATS', vid ) + iernc= nf90_get_var( ncid, vid, ugwp_taulat) + iernc=nf90_inq_varid( ncid, 'ABSMF', vid ) + iernc= nf90_get_var( ncid, vid, tau_limb) + + iernc=nf90_close(ncid) + + endif + + end subroutine read_tau_amf + + subroutine cires_indx_ugwp (npts, me, master, dlat,j1_tau,j2_tau, w1_j1tau, w2_j2tau) + + use machine, only: kind_phys + + implicit none + + integer, intent(in) :: npts, me, master + real(kind=kind_phys) , dimension(npts), intent(in) :: dlat + + integer, dimension(npts), intent(inout) :: j1_tau, j2_tau + real(kind=kind_phys) , dimension(npts), intent(inout) :: w1_j1tau, w2_j2tau + +!locals + + integer :: i,j, j1, j2 +! + do j=1,npts + j2_tau(j) = ntau_d1y + do i=1,ntau_d1y + if (dlat(j) < ugwp_taulat(i)) then + j2_tau(j) = i + exit + endif + enddo + + + j2_tau(j) = min(j2_tau(j),ntau_d1y) + j1_tau(j) = max(j2_tau(j)-1,1) + + if (j1_tau(j) /= j2_tau(j) ) then + w2_j2tau(j) = (dlat(j) - ugwp_taulat(j1_tau(j))) & + / (ugwp_taulat(j2_tau(j))-ugwp_taulat(j1_tau(j))) + else + w2_j2tau(j) = 1.0 + endif + w1_j1tau(j) = 1.0 - w2_j2tau(j) + enddo + return + end subroutine cires_indx_ugwp + + subroutine tau_amf_interp(me, master, im, idate, fhour, j1_tau,j2_tau, ddy_j1, ddy_j2, tau_ddd) + use machine, only: kind_phys + implicit none + +!input + integer, intent(in) :: me, master + integer, intent(in) :: im, idate(4) + real(kind=kind_phys), intent(in) :: fhour + + real(kind=kind_phys), intent(in), dimension(im) :: ddy_j1, ddy_j2 + integer , intent(in), dimension(im) :: j1_tau,j2_tau +!ouput + real(kind=kind_phys), dimension(im) :: tau_ddd +!locals + + integer :: i, j1, j2, it1, it2 , iday + integer :: ddd + real(kind=kind_phys) :: tx1, tx2, w1, w2, fddd +! +! define day of year ddd ..... from the old-fashioned "GFS-style" +! + call gfs_idate_calendar(idate, fhour, ddd, fddd) + + it1 = 2 + do iday=1, ntau_d2t + if (fddd .lt. days_limb(iday) ) then + it2 = iday + exit + endif + enddo + + it2 = min(it2,ntau_d2t) + it1 = max(it2-1,1) + if (it2 > ntau_d2t ) then + print *, ' Error in time-interpolation for tau_amf_interp ' + print *, ' it1, it2, ntau_d2t ', it1, it2, ntau_d2t + print *, ' Error in time-interpolation see cires_tauamf_data.F90 ' + stop + endif + + w2 = (fddd-days_limb(it1))/(days_limb(it2)-days_limb(it1)) + w1 = 1.0-w2 + + do i=1, im + j1 = j1_tau(i) + j2 = j2_tau(i) + tx1 = tau_limb(j1, it1)*ddy_j1(i)+tau_limb(j2, it1)*ddy_j2(i) + tx2 = tau_limb(j1, it2)*ddy_j1(i)+tau_limb(j2, it2)*ddy_j2(i) + tau_ddd(i) = tx1*w1 + w2*tx2 + enddo + + end subroutine tau_amf_interp + + subroutine gfs_idate_calendar(idate, fhour, ddd, fddd) + + use machine, only: kind_phys + implicit none +! input + integer, intent(in) :: idate(4) + real(kind=kind_phys), intent(in) :: fhour +!out + integer, intent(out) :: ddd + real(kind=kind_phys), intent(out) :: fddd +! +!locals +! + real(kind=kind_phys) :: rinc(5), rjday + integer :: jdow, jdoy, jday + real(4) :: rinc4(5) + integer :: w3kindreal, w3kindint + + integer :: iw3jdn + integer :: jd1, jddd + + integer idat(8),jdat(8) + + + idat(1:8) = 0 + idat(1) = idate(4) + idat(2) = idate(2) + idat(3) = idate(3) + idat(5) = idate(1) + rinc(1:5) = 0. + rinc(2) = fhour +! + call w3kind(w3kindreal,w3kindint) + if(w3kindreal==4) then + rinc4 = rinc + call w3movdat(rinc4, idat,jdat) + else + call w3movdat(rinc, idat,jdat) + endif +! jdate(8)- date and time (yr, mo, day, [tz], hr, min, sec) + jdow = 0 + jdoy = 0 + jday = 0 + call w3doxdat(jdat,jdow, ddd, jday) + fddd = float(ddd) + jdat(5) / 24. + end subroutine gfs_idate_calendar + +end module cires_tauamf_data diff --git a/physics/cires_ugwp.F90 b/physics/cires_ugwp.F90 index 21b331041..6efce96f5 100644 --- a/physics/cires_ugwp.F90 +++ b/physics/cires_ugwp.F90 @@ -10,11 +10,12 @@ !! 3. GW Effects: Unified representation of GW impacts on the "resolved" flow for all sources (energy-balanced schemes for momentum, heat and mixing). !! https://www.weather.gov/media/sti/nggps/Presentations%202017/02%20NGGPS_VYUDIN_2017_.pdf +!>\defgroup cires_ugwp_run Unified Gravity Wave Physics General Algorithm module cires_ugwp use machine, only: kind_phys - use cires_ugwp_module, only: knob_ugwp_version, cires_ugwp_mod_init, cires_ugwp_mod_finalize + use cires_ugwpv0_module, only: knob_ugwp_version, cires_ugwpv0_mod_init, cires_ugwpv0_mod_finalize use gwdps, only: gwdps_run @@ -39,7 +40,7 @@ module cires_ugwp ! subroutine cires_ugwp_init (me, master, nlunit, input_nml_file, logunit, & fn_nml2, lonr, latr, levs, ak, bk, dtp, cdmbgwd, cgwf, & - pa_rf_in, tau_rf_in, con_p0, do_ugwp, errmsg, errflg) + pa_rf_in, tau_rf_in, con_p0, gwd_opt,do_ugwp, errmsg, errflg) !---- initialization of cires_ugwp implicit none @@ -54,9 +55,10 @@ subroutine cires_ugwp_init (me, master, nlunit, input_nml_file, logunit, & integer, intent (in) :: latr real(kind=kind_phys), intent (in) :: ak(:), bk(:) real(kind=kind_phys), intent (in) :: dtp - real(kind=kind_phys), intent (in) :: cdmbgwd(4), cgwf(2) ! "scaling" controls for "old" GFS-GW schemes + real(kind=kind_phys), intent (in) :: cdmbgwd(:), cgwf(:) ! "scaling" controls for "old" GFS-GW schemes real(kind=kind_phys), intent (in) :: pa_rf_in, tau_rf_in real(kind=kind_phys), intent (in) :: con_p0 + integer, intent(in) :: gwd_opt logical, intent (in) :: do_ugwp character(len=*), intent (in) :: fn_nml2 @@ -75,9 +77,17 @@ subroutine cires_ugwp_init (me, master, nlunit, input_nml_file, logunit, & errflg = 0 if (is_initialized) return + + ! Consistency checks + if (gwd_opt/=1) then + write(errmsg,'(*(a))') "Logic error: namelist choice of gravity wave & + & drag is different from cires_ugwp scheme" + errflg = 1 + return + end if if (do_ugwp .or. cdmbgwd(3) > 0.0) then - call cires_ugwp_mod_init (me, master, nlunit, input_nml_file, logunit, & + call cires_ugwpv0_mod_init (me, master, nlunit, input_nml_file, logunit, & fn_nml2, lonr, latr, levs, ak, bk, con_p0, dtp, & cdmbgwd(1:2), cgwf, pa_rf_in, tau_rf_in) else @@ -120,7 +130,7 @@ subroutine cires_ugwp_finalize(errmsg, errflg) if (.not.is_initialized) return - call cires_ugwp_mod_finalize() + call cires_ugwpv0_mod_finalize() is_initialized = .false. @@ -136,8 +146,6 @@ end subroutine cires_ugwp_finalize ! order = dry-adj=>conv=mp-aero=>radiation -sfc/land- chem -> vertdiff-> [rf-gws]=> ion-re ! ----------------------------------------------------------------------- !>@brief These subroutines and modules execute the CIRES UGWP Version 0 -!>\defgroup cires_ugwp_run Unified Gravity Wave Physics General Algorithm -!> @{ !! The physics of NGWs in the UGWP framework (Yudin et al. 2018 \cite yudin_et_al_2018) is represented by four GW-solvers, which is introduced in Lindzen (1981) \cite lindzen_1981, Hines (1997) \cite hines_1997, Alexander and Dunkerton (1999) \cite alexander_and_dunkerton_1999, and Scinocca (2003) \cite scinocca_2003. The major modification of these GW solvers is represented by the addition of the background dissipation of temperature and winds to the saturation criteria for wave breaking. This feature is important in the mesosphere and thermosphere for WAM applications and it considers appropriate scale-dependent dissipation of waves near the model top lid providing the momentum and energy conservation in the vertical column physics (Shaw and Shepherd 2009 \cite shaw_and_shepherd_2009). In the UGWP-v0, the modification of Scinocca (2003) \cite scinocca_2003 scheme for NGWs with non-hydrostatic and rotational effects for GW propagations and background dissipation is represented by the subroutine \ref fv3_ugwp_solv2_v0. In the next release of UGWP, additional GW-solvers will be implemented along with physics-based triggering of waves and stochastic approaches for selection of GW modes characterized by horizontal phase velocities, azimuthal directions and magnitude of the vertical momentum flux (VMF). !! !! In UGWP-v0, the specification for the VMF function is adopted from the GEOS-5 global atmosphere model of GMAO NASA/GSFC, as described in Molod et al. (2015) \cite molod_et_al_2015 and employed in the MERRRA-2 reanalysis (Gelaro et al., 2017 \cite gelaro_et_al_2017). The Fortran subroutine \ref slat_geos5_tamp describes the latitudinal shape of VMF-function as displayed in Figure 3 of Molod et al. (2015) \cite molod_et_al_2015. It shows that the enhanced values of VMF in the equatorial region gives opportunity to simulate the QBO-like oscillations in the equatorial zonal winds and lead to more realistic simulations of the equatorial dynamics in GEOS-5 operational and MERRA-2 reanalysis products. For the first vertically extended version of FV3GFS in the stratosphere and mesosphere, this simplified function of VMF allows us to tune the model climate and to evaluate multi-year simulations of FV3GFS with the MERRA-2 and ERA-5 reanalysis products, along with temperature, ozone, and water vapor observations of current satellite missions. After delivery of the UGWP-code, the EMC group developed and tested approach to modulate the zonal mean NGW forcing by 3D-distributions of the total precipitation as a proxy for the excitation of NGWs by convection and the vertically-integrated (surface - tropopause) Turbulent Kinetic Energy (TKE). The verification scores with updated NGW forcing, as reported elsewhere by EMC researchers, display noticeable improvements in the forecast scores produced by FV3GFS configuration extended into the mesosphere. @@ -156,45 +164,49 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr dudt_mtb,dudt_ogw, dudt_tms, du3dt_mtb, du3dt_ogw, du3dt_tms, & dudt, dvdt, dtdt, rdxzb, con_g, con_pi, con_cp, con_rd, con_rv, con_fvirt, & con_omega, rain, ntke, q_tke, dqdt_tke, lprnt, ipr, & - ldu3dt_ogw, ldv3dt_ogw, ldt3dt_ogw, ldu3dt_cgw, ldv3dt_cgw, ldt3dt_cgw, & + dtend, dtidx, index_of_x_wind, index_of_y_wind, index_of_temperature, & + index_of_process_orographic_gwd, index_of_process_nonorographic_gwd, & ldiag3d, lssav, flag_for_gwd_generic_tend, errmsg, errflg) implicit none ! interface variables integer, intent(in) :: me, master, im, levs, ntrac, kdt, lonr, nmtvr - integer, intent(in), dimension(im) :: kpbl - real(kind=kind_phys), intent(in), dimension(im) :: oro, oro_uf, hprime, oc, theta, sigma, gamma + integer, intent(in), dimension(:) :: kpbl + real(kind=kind_phys), intent(in), dimension(:) :: oro, oro_uf, hprime, oc, theta, sigma, gamma logical, intent(in) :: flag_for_gwd_generic_tend ! elvmax is intent(in) for CIRES UGWP, but intent(inout) for GFS GWDPS - real(kind=kind_phys), intent(inout), dimension(im) :: elvmax - real(kind=kind_phys), intent(in), dimension(im, 4) :: clx, oa4 - real(kind=kind_phys), intent(in), dimension(im) :: xlat, xlat_d, sinlat, coslat, area - real(kind=kind_phys), intent(in), dimension(im, levs) :: del, ugrs, vgrs, tgrs, prsl, prslk, phil - real(kind=kind_phys), intent(in), dimension(im, levs+1) :: prsi, phii - real(kind=kind_phys), intent(in), dimension(im, levs, ntrac):: qgrs - real(kind=kind_phys), intent(in) :: dtp, cdmbgwd(4) + real(kind=kind_phys), intent(inout), dimension(:) :: elvmax + real(kind=kind_phys), intent(in), dimension(:, :) :: clx, oa4 + real(kind=kind_phys), intent(in), dimension(:) :: xlat, xlat_d, sinlat, coslat, area + real(kind=kind_phys), intent(in), dimension(:, :) :: del, ugrs, vgrs, tgrs, prsl, prslk, phil + real(kind=kind_phys), intent(in), dimension(:, :) :: prsi, phii + real(kind=kind_phys), intent(in), dimension(:,:,:):: qgrs + real(kind=kind_phys), intent(in) :: dtp, cdmbgwd(:) logical, intent(in) :: do_ugwp, do_tofd, ldiag_ugwp - real(kind=kind_phys), intent(out), dimension(im) :: dusfcg, dvsfcg - real(kind=kind_phys), intent(out), dimension(im) :: zmtb, zlwb, zogw, rdxzb - real(kind=kind_phys), intent(out), dimension(im) :: tau_mtb, tau_ogw, tau_tofd, tau_ngw - real(kind=kind_phys), intent(out), dimension(im, levs):: gw_dudt, gw_dvdt, gw_dtdt, gw_kdis - real(kind=kind_phys), intent(out), dimension(im, levs):: dudt_mtb, dudt_ogw, dudt_tms + real(kind=kind_phys), intent(out), dimension(:) :: dusfcg, dvsfcg + real(kind=kind_phys), intent(out), dimension(:) :: zmtb, zlwb, zogw, rdxzb + real(kind=kind_phys), intent(out), dimension(:) :: tau_mtb, tau_ogw, tau_tofd, tau_ngw + real(kind=kind_phys), intent(out), dimension(:, :):: gw_dudt, gw_dvdt, gw_dtdt, gw_kdis + real(kind=kind_phys), intent(out), dimension(:, :):: dudt_mtb, dudt_ogw, dudt_tms + + ! dtend is only allocated if ldiag=.true. + real(kind=kind_phys), optional, intent(inout) :: dtend(:,:,:) + integer, intent(in) :: dtidx(:,:), & + index_of_x_wind, index_of_y_wind, index_of_temperature, & + index_of_process_orographic_gwd, index_of_process_nonorographic_gwd - ! These arrays are only allocated if ldiag=.true. - real(kind=kind_phys), intent(inout), dimension(:,:) :: ldu3dt_ogw, ldv3dt_ogw, ldt3dt_ogw - real(kind=kind_phys), intent(inout), dimension(:,:) :: ldu3dt_cgw, ldv3dt_cgw, ldt3dt_cgw logical, intent(in) :: ldiag3d, lssav ! These arrays only allocated if ldiag_ugwp = .true. - real(kind=kind_phys), intent(out), dimension(:,:) :: du3dt_mtb, du3dt_ogw, du3dt_tms + real(kind=kind_phys), intent(inout), dimension(:,:) :: du3dt_mtb, du3dt_ogw, du3dt_tms - real(kind=kind_phys), intent(inout), dimension(im, levs):: dudt, dvdt, dtdt + real(kind=kind_phys), intent(inout), dimension(:, :):: dudt, dvdt, dtdt real(kind=kind_phys), intent(in) :: con_g, con_pi, con_cp, con_rd, con_rv, con_fvirt, con_omega - real(kind=kind_phys), intent(in), dimension(im) :: rain + real(kind=kind_phys), intent(in), dimension(:) :: rain integer, intent(in) :: ntke real(kind=kind_phys), intent(in), dimension(:,:) :: q_tke, dqdt_tke @@ -206,7 +218,7 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr integer, intent(out) :: errflg ! local variables - integer :: i, k + integer :: i, k, idtend real(kind=kind_phys), dimension(im) :: sgh30 real(kind=kind_phys), dimension(im, levs) :: Pdvdt, Pdudt real(kind=kind_phys), dimension(im, levs) :: Pdtdt, Pkdis @@ -280,20 +292,25 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr if(ldiag3d .and. lssav .and. .not. flag_for_gwd_generic_tend) then - do k=1,levs - do i=1,im - ldu3dt_ogw(i,k) = ldu3dt_ogw(i,k) + Pdudt(i,k)*dtp - ldv3dt_ogw(i,k) = ldv3dt_ogw(i,k) + Pdvdt(i,k)*dtp - ldt3dt_ogw(i,k) = ldt3dt_ogw(i,k) + Pdtdt(i,k)*dtp - enddo - enddo + idtend = dtidx(index_of_x_wind,index_of_process_orographic_gwd) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + Pdudt*dtp + endif + idtend = dtidx(index_of_y_wind,index_of_process_orographic_gwd) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + Pdvdt*dtp + endif + idtend = dtidx(index_of_temperature,index_of_process_orographic_gwd) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + Pdtdt*dtp + endif endif if (cdmbgwd(3) > 0.0) then ! 2) non-stationary GW-scheme with GMAO/MERRA GW-forcing - call slat_geos5_tamp(im, tamp_mpa, xlat_d, tau_ngw) + call slat_geos5_tamp_v0(im, tamp_mpa, xlat_d, tau_ngw) if (abs(1.0-cdmbgwd(3)) > 1.0e-6) then if (cdmbgwd(4) > 0.0) then @@ -365,38 +382,21 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr dudt_mtb = 0. ; dudt_ogw = 0. ; dudt_tms = 0. endif -#if 0 - !============================================================================= - ! make "ugwp eddy-diffusion" update for gw_dtdt/gw_dudt/gw_dvdt by solving - ! vert diffusion equations & update "Statein%tgrs, Statein%ugrs, Statein%vgrs" - !============================================================================= - ! 3) application of "eddy"-diffusion to "smooth" UGWP-related tendencies - !------------------------------------------------------------------------------ - do k=1,levs - do i=1,im - ed_dudt(i,k) = 0.0 ; ed_dvdt(i,k) = 0.0 ; ed_dtdt(i,k) = 0.0 - enddo - enddo - - call edmix_ugwp_v0(im, levs, dtp, tgrs, ugrs, vgrs, qgrs(:,:,1), & - del, prsl, prsi, phil, prslk, gw_dudt, gw_dvdt, gw_dtdt, gw_kdis, & - ed_dudt, ed_dvdt, ed_dtdt, me, master, kdt) - gw_dtdt = gw_dtdt*(1.-pked) + ed_dtdt*pked - gw_dvdt = gw_dvdt*(1.-pked) + ed_dvdt*pked - gw_dudt = gw_dudt*(1.-pked) + ed_dudt*pked -#endif - if(ldiag3d .and. lssav .and. .not. flag_for_gwd_generic_tend) then - do k=1,levs - do i=1,im - ldu3dt_cgw(i,k) = ldu3dt_cgw(i,k) + (gw_dudt(i,k) - Pdudt(i,k))*dtp - ldv3dt_cgw(i,k) = ldv3dt_cgw(i,k) + (gw_dvdt(i,k) - Pdvdt(i,k))*dtp - ldt3dt_cgw(i,k) = ldt3dt_cgw(i,k) + (gw_dtdt(i,k) - Pdtdt(i,k))*dtp - enddo - enddo + idtend = dtidx(index_of_x_wind,index_of_process_nonorographic_gwd) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + (gw_dudt - Pdudt)*dtp + endif + idtend = dtidx(index_of_y_wind,index_of_process_nonorographic_gwd) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + (gw_dvdt - Pdvdt)*dtp + endif + idtend = dtidx(index_of_temperature,index_of_process_nonorographic_gwd) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + (gw_dtdt - Pdtdt)*dtp + endif endif end subroutine cires_ugwp_run !! @} -!>@} end module cires_ugwp diff --git a/physics/cires_ugwp.meta b/physics/cires_ugwp.meta index d7d7da286..12d0f5541 100644 --- a/physics/cires_ugwp.meta +++ b/physics/cires_ugwp.meta @@ -1,8 +1,9 @@ [ccpp-table-properties] name = cires_ugwp type = scheme -# DH* 20200804 - this is a result of the nasty hack to call gwdps from within ugwp! - dependencies = cires_ugwp_triggers.F90,cires_ugwp_initialize.F90,cires_ugwp_solvers.F90,cires_ugwp_utils.F90,cires_orowam2017.f,cires_vert_lsatdis.F90,cires_vert_orodis.F90,cires_vert_wmsdis.F90,cires_ugwp_module.F90,gwdps.f,machine.F,ugwp_driver_v0.F +# DH* 20200804 - this is a result of the nasty hack to call gwdps from within ugwp-v0! + dependencies=cires_ugwp_triggers.F90,cires_ugwp_initialize.F90 + dependencies=cires_orowam2017.f,cires_ugwp_module.F90,gwdps.f,machine.F,ugwp_driver_v0.F ######################################################################## [ccpp-arg-table] @@ -25,7 +26,7 @@ intent = in optional = F [nlunit] - standard_name = iounit_namelist + standard_name = iounit_of_namelist long_name = fortran unit number for opening namelist file units = none dimensions = () @@ -33,16 +34,16 @@ intent = in optional = F [input_nml_file] - standard_name = namelist_filename_for_internal_file_reads + standard_name = filename_of_internal_namelist long_name = character string to store full namelist contents units = none - dimensions = (number_of_lines_of_namelist_filename_for_internal_file_reads) + dimensions = (number_of_lines_in_internal_namelist) type = character kind = len=* intent = in optional = F [logunit] - standard_name = iounit_log + standard_name = iounit_of_log long_name = fortran unit number for writing logfile units = none dimensions = () @@ -50,7 +51,7 @@ intent = in optional = F [fn_nml2] - standard_name = namelist_filename + standard_name = filename_of_namelist long_name = namelist filename for ugwp units = none dimensions = () @@ -75,7 +76,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () @@ -83,25 +84,25 @@ intent = in optional = F [ak] - standard_name = a_parameter_of_the_hybrid_coordinate + standard_name = sigma_pressure_hybrid_coordinate_a_coefficient long_name = a parameter for sigma pressure level calculations units = Pa - dimensions = (number_of_vertical_layers_for_radiation_calculations_plus_one) + dimensions = (vertical_interface_dimension_for_radiation) type = real kind = kind_phys intent = in optional = F [bk] - standard_name = b_parameter_of_the_hybrid_coordinate + standard_name = sigma_pressure_hybrid_coordinate_b_coefficient long_name = b parameter for sigma pressure level calculations units = none - dimensions = (number_of_vertical_layers_for_radiation_calculations_plus_one) + dimensions = (vertical_interface_dimension_for_radiation) type = real kind = kind_phys intent = in optional = F [dtp] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics timestep units = s dimensions = () @@ -110,7 +111,7 @@ intent = in optional = F [cdmbgwd] - standard_name = multiplication_factors_for_mountain_blocking_and_orographic_gravity_wave_drag + standard_name = multiplicative_tunable_parameters_for_mountain_blocking_and_orographic_gravity_wave_drag long_name = multiplication factors for cdmb and gwd units = none dimensions = (4) @@ -119,7 +120,7 @@ intent = in optional = F [cgwf] - standard_name = multiplication_factors_for_convective_gravity_wave_drag + standard_name = tunable_parameters_for_convective_gravity_wave_drag long_name = multiplication factor for convective GWD units = none dimensions = (2) @@ -128,7 +129,7 @@ intent = in optional = F [pa_rf_in] - standard_name = pressure_cutoff_for_rayleigh_damping + standard_name = air_pressure_at_bottom_extent_of_rayleigh_damping long_name = pressure level from which Rayleigh Damping is applied units = Pa dimensions = () @@ -137,7 +138,7 @@ intent = in optional = F [tau_rf_in] - standard_name = time_scale_for_rayleigh_damping + standard_name = timescale_for_rayleigh_damping long_name = time scale for Rayleigh damping in days units = d dimensions = () @@ -154,8 +155,16 @@ kind = kind_phys intent = in optional = F +[gwd_opt] + standard_name = control_for_drag_suite_gravity_wave_drag + long_name = flag to choose gwd scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F [do_ugwp] - standard_name = do_ugwp + standard_name = flag_for_unified_gravity_wave_physics_gravity_wave_drag_scheme long_name = flag to activate CIRES UGWP units = flag dimensions = () @@ -207,7 +216,7 @@ name = cires_ugwp_run type = scheme [do_ugwp] - standard_name = do_ugwp + standard_name = flag_for_unified_gravity_wave_physics_gravity_wave_drag_scheme long_name = flag to activate CIRES UGWP units = flag dimensions = () @@ -239,7 +248,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () @@ -255,7 +264,7 @@ intent = in optional = F [dtp] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics timestep units = s dimensions = () @@ -264,7 +273,7 @@ intent = in optional = F [kdt] - standard_name = index_of_time_step + standard_name = index_of_timestep long_name = current forecast iteration units = index dimensions = () @@ -280,8 +289,8 @@ intent = in optional = F [oro] - standard_name = orography - long_name = orography + standard_name = height_above_mean_sea_level + long_name = height_above_mean_sea_level units = m dimensions = (horizontal_loop_extent) type = real @@ -289,8 +298,8 @@ intent = in optional = F [oro_uf] - standard_name = orography_unfiltered - long_name = unfiltered orography + standard_name = unfiltered_height_above_mean_sea_level + long_name = unfiltered height_above_mean_sea_level units = m dimensions = (horizontal_loop_extent) type = real @@ -299,7 +308,7 @@ optional = F [hprime] standard_name = standard_deviation_of_subgrid_orography - long_name = standard deviation of subgrid orography + long_name = standard deviation of subgrid height_above_mean_sea_level units = m dimensions = (horizontal_loop_extent) type = real @@ -316,7 +325,7 @@ optional = F [oc] standard_name = convexity_of_subgrid_orography - long_name = convexity of subgrid orography + long_name = convexity of subgrid height_above_mean_sea_level units = none dimensions = (horizontal_loop_extent) type = real @@ -334,7 +343,7 @@ optional = F [sigma] standard_name = slope_of_subgrid_orography - long_name = slope of subgrid orography + long_name = slope of subgrid height_above_mean_sea_level units = none dimensions = (horizontal_loop_extent) type = real @@ -343,7 +352,7 @@ optional = F [gamma] standard_name = anisotropy_of_subgrid_orography - long_name = anisotropy of subgrid orography + long_name = anisotropy of subgrid height_above_mean_sea_level units = none dimensions = (horizontal_loop_extent) type = real @@ -352,7 +361,7 @@ optional = F [elvmax] standard_name = maximum_subgrid_orography - long_name = maximum of subgrid orography + long_name = maximum of subgrid height_above_mean_sea_level units = m dimensions = (horizontal_loop_extent) type = real @@ -361,7 +370,7 @@ optional = F [clx] standard_name = fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height - long_name = horizontal fraction of grid box covered by subgrid orography higher than critical height + long_name = horizontal fraction of grid box covered by subgrid height_above_mean_sea_level higher than critical height units = frac dimensions = (horizontal_loop_extent,4) type = real @@ -370,7 +379,7 @@ optional = F [oa4] standard_name = asymmetry_of_subgrid_orography - long_name = asymmetry of subgrid orography + long_name = asymmetry of subgrid height_above_mean_sea_level units = none dimensions = (horizontal_loop_extent,4) type = real @@ -378,7 +387,7 @@ intent = in optional = F [do_tofd] - standard_name = turb_oro_form_drag_flag + standard_name = flag_for_turbulent_orographic_form_drag_in_unified_gravity_wave_physics_gravitiy_wave_drag_scheme long_name = flag for turbulent orographic form drag units = flag dimensions = () @@ -386,7 +395,7 @@ intent = in optional = F [ldiag_ugwp] - standard_name = diag_ugwp_flag + standard_name = flag_for_unified_gravity_wave_physics_diagnostics long_name = flag for CIRES UGWP Diagnostics units = flag dimensions = () @@ -394,7 +403,7 @@ intent = in optional = F [cdmbgwd] - standard_name = multiplication_factors_for_mountain_blocking_and_orographic_gravity_wave_drag + standard_name = multiplicative_tunable_parameters_for_mountain_blocking_and_orographic_gravity_wave_drag long_name = multiplication factors for cdmb and gwd units = none dimensions = (4) @@ -451,7 +460,7 @@ standard_name = x_wind long_name = zonal wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -460,7 +469,7 @@ standard_name = y_wind long_name = meridional wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -469,7 +478,7 @@ standard_name = air_temperature long_name = model layer mean temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -478,7 +487,7 @@ standard_name = tracer_concentration long_name = model layer mean tracer concentration units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = in @@ -487,7 +496,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -496,16 +505,16 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [prslk] - standard_name = dimensionless_exner_function_at_model_layers + standard_name = dimensionless_exner_function long_name = dimensionless Exner function at model layer centers units = none - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -514,7 +523,7 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -523,7 +532,7 @@ standard_name = geopotential long_name = geopotential at model layer centers units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -532,7 +541,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = air pressure difference between midlayers units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -564,37 +573,37 @@ intent = out optional = F [gw_dudt] - standard_name = tendency_of_x_wind_due_to_ugwp + standard_name = tendency_of_x_wind_due_to_gravity_wave_drag long_name = zonal wind tendency due to UGWP units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [gw_dvdt] - standard_name = tendency_of_y_wind_due_to_ugwp + standard_name = tendency_of_y_wind_due_to_gravity_wave_drag long_name = meridional wind tendency due to UGWP units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [gw_dtdt] - standard_name = tendency_of_air_temperature_due_to_ugwp + standard_name = tendency_of_air_temperature_due_to_gravity_wave_drag long_name = air temperature tendency due to UGWP units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [gw_kdis] - standard_name = eddy_mixing_due_to_ugwp + standard_name = atmosphere_momentum_diffusivity_due_to_gravity_wave_drag long_name = eddy mixing due to UGWP units = m2 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -666,25 +675,25 @@ standard_name = instantaneous_change_in_x_wind_due_to_mountain_blocking_drag long_name = instantaneous change in x wind due to mountain blocking drag units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [dudt_ogw] - standard_name = instantaneous_change_in_x_wind_due_to_orographic_gravity_wave_drag + standard_name = tendency_of_x_wind_due_to_mesoscale_orographic_gravity_wave_drag long_name = instantaneous change in x wind due to orographic gw drag units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [dudt_tms] - standard_name = instantaneous_change_in_x_wind_due_to_turbulent_orographic_form_drag + standard_name = tendency_of_x_wind_due_to_turbulent_orographic_form_drag long_name = instantaneous change in x wind due to TOFD units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -693,7 +702,7 @@ standard_name = time_integral_of_change_in_x_wind_due_to_mountain_blocking_drag long_name = time integral of change in x wind due to mountain blocking drag units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -702,7 +711,7 @@ standard_name = time_integral_of_change_in_x_wind_due_to_orographic_gravity_wave_drag long_name = time integral of change in x wind due to orographic gw drag units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -711,34 +720,34 @@ standard_name = time_integral_of_change_in_x_wind_due_to_turbulent_orographic_form_drag long_name = time integral of change in x wind due to TOFD units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [dudt] - standard_name = tendency_of_x_wind_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_x_wind long_name = zonal wind tendency due to model physics units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [dvdt] - standard_name = tendency_of_y_wind_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_y_wind long_name = meridional wind tendency due to model physics units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [dtdt] - standard_name = tendency_of_air_temperature_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_air_temperature long_name = air temperature tendency due to model physics units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -780,7 +789,7 @@ intent = in optional = F [con_rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -825,7 +834,7 @@ intent = in optional = F [ntke] - standard_name = index_for_turbulent_kinetic_energy + standard_name = index_of_turbulent_kinetic_energy_in_tracer_concentration_array long_name = tracer index for turbulent kinetic energy units = index dimensions = () @@ -836,16 +845,16 @@ standard_name = turbulent_kinetic_energy long_name = turbulent kinetic energy units = J - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [dqdt_tke] - standard_name = tendency_of_turbulent_kinetic_energy_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_turbulent_kinetic_energy long_name = turbulent kinetic energy tendency due to model physics units = J s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -866,62 +875,66 @@ type = integer intent = in optional = F -[ldu3dt_ogw] - standard_name = cumulative_change_in_x_wind_due_to_orographic_gravity_wave_drag - long_name = cumulative change in x wind due to orographic gravity wave drag - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) +[dtend] + standard_name = cumulative_change_of_state_variables + long_name = diagnostic tendencies for state variables + units = various + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_cumulative_change_processes) type = real kind = kind_phys + active = (flag_for_diagnostics_3D) intent = inout optional = F -[ldv3dt_ogw] - standard_name = cumulative_change_in_y_wind_due_to_orographic_gravity_wave_drag - long_name = cumulative change in y wind due to orographic gravity wave drag - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[dtidx] + standard_name = cumulative_change_of_state_variables_outer_index + long_name = index of state-variable and process in last dimension of diagnostic tendencies array AKA cumulative_change_index + units = index + dimensions = (number_of_tracers_plus_one_hundred,number_of_cumulative_change_processes) + type = integer + intent = in optional = F -[ldt3dt_ogw] - standard_name = cumulative_change_in_temperature_due_to_orographic_gravity_wave_drag - long_name = cumulative change in temperature due to orographic gravity wave drag - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[index_of_x_wind] + standard_name = index_of_x_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in optional = F -[ldu3dt_cgw] - standard_name = cumulative_change_in_x_wind_due_to_convective_gravity_wave_drag - long_name = cumulative change in x wind due to convective gravity wave drag - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[index_of_y_wind] + standard_name = index_of_y_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in optional = F -[ldv3dt_cgw] - standard_name = cumulative_change_in_y_wind_due_to_convective_gravity_wave_drag - long_name = cumulative change in y wind due to convective gravity wave drag - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[index_of_temperature] + standard_name = index_of_temperature_in_cumulative_change_index + long_name = index of temperature in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in optional = F -[ldt3dt_cgw] - standard_name = cumulative_change_in_temperature_due_to_convective_gravity_wave_drag - long_name = cumulative change in temperature due to convective gravity wave drag - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[index_of_process_orographic_gwd] + standard_name = index_of_orographic_gravity_wave_drag_process_in_cumulative_change_index + long_name = index of orographic gravity wave drag process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_process_nonorographic_gwd] + standard_name = index_of_nonorographic_gravity_wave_drag_process_in_cumulative_change_index + long_name = index of nonorographic gravity wave drag process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in optional = F [ldiag3d] - standard_name = flag_diagnostics_3D + standard_name = flag_for_diagnostics_3D long_name = flag for 3d diagnostic fields units = flag dimensions = () @@ -929,7 +942,7 @@ intent = in optional = F [lssav] - standard_name = flag_diagnostics + standard_name = flag_for_diagnostics long_name = logical flag for storing diagnostics units = flag dimensions = () @@ -937,7 +950,7 @@ intent = in optional = F [flag_for_gwd_generic_tend] - standard_name = flag_for_generic_gravity_wave_drag_tendency + standard_name = flag_for_generic_tendency_due_to_gravity_wave_drag long_name = true if GFS_GWD_generic should calculate tendencies units = flag dimensions = () diff --git a/physics/cires_ugwp_initialize.F90 b/physics/cires_ugwp_initialize.F90 index fbcc1d205..e2f7afd7b 100644 --- a/physics/cires_ugwp_initialize.F90 +++ b/physics/cires_ugwp_initialize.F90 @@ -1,41 +1,11 @@ !=============================== ! cu-cires ugwp-scheme -! initialization of selected -! init gw-solvers (1,2,3,4) +! initialization of ugwp_common_v0 +! init gw-solvers (1,2) .. no UFS-funds for (3,4) tests ! init gw-source specifications ! init gw-background dissipation -!============================== -! -! Part-0 specifications of common constants, limiters and "criiical" values - - -! module oro_state - -! integer, parameter :: kind_phys=8 -! integer, parameter :: nvaroro=14 -! real (kind=kind_phys), allocatable :: oro_stat(:, :) -! contains - -! subroutine fill_oro_stat(nx, oc, oa4, clx4, theta, gamm, sigma, elvmax, hprime) - -! real (kind=kind_phys),dimension(nx) :: oc, theta, gamm, sigma, elvmax, hprime -! real(kind=kind_phys),dimension(nx,4) :: oa4, clx4 -! integer :: i -! do i=1, nx -! oro_stat(i,1) = hprime(i) -! oro_stat(i,2) = oc(i) -! oro_stat(i,3:6) = oa4(i,1:4) -! oro_stat(i,7:10) = clx4(i,1:4) -! oro_stat(i,11) = theta(i) -! oro_stat(i,12) = gamm(i) -! oro_stat(i,13) = sigma(i) -! oro_stat(i,14) = elvmax(i) -! enddo -! end subroutine fill_oro_stat - -! end module oro_state - - module ugwp_common +!=============================== + module ugwp_common_v0 ! use machine, only: kind_phys use physcons, only : pi => con_pi, grav => con_g, rd => con_rd, & @@ -45,7 +15,7 @@ module ugwp_common real(kind=kind_phys), parameter :: grcp = grav/cpd, rgrav = 1.0d0/grav, & rdi = 1.0d0/rd, & - gor = grav/rd, gr2 = grav*gor, gocp = grav/cpd, & + gor = grav/rd, gr2 = grav*gor, gocp = grav/cpd, & rcpd = 1./cpd, rcpd2 = 0.5*rcpd, & pi2 = pi + pi, omega1 = pi2/86400.0, & omega2 = omega1+omega1, & @@ -53,7 +23,7 @@ module ugwp_common dw2min=1.0, bnv2min=1.e-6, velmin=sqrt(dw2min) - end module ugwp_common + end module ugwp_common_v0 ! ! !=================================================== @@ -61,7 +31,7 @@ end module ugwp_common !Part-1 init => wave dissipation + RFriction ! !=================================================== - subroutine init_global_gwdis(levs, zkm, pmb, kvg, ktg, krad, kion) + subroutine init_global_gwdis_v0(levs, zkm, pmb, kvg, ktg, krad, kion) implicit none integer :: levs @@ -111,51 +81,20 @@ subroutine init_global_gwdis(levs, zkm, pmb, kvg, ktg, krad, kion) kvg(k) = kvg(k-1) ktg(k) = ktg(k-1) ! - end subroutine init_global_gwdis -! -! - subroutine rf_damp_init(levs, pa_rf, tau_rf, dtp, pmb, rfdis, rfdist, levs_rf) - implicit none + end subroutine init_global_gwdis_v0 - integer :: levs - real :: pa_rf, tau_rf - real :: dtp - - real :: pmb(levs) - real :: rfdis(levs), rfdist(levs) - integer :: levs_rf - - real :: krf, krfz - integer :: k -! - rfdis(1:levs) = 1.0 - rfdist(1:levs) = 0.0 - levs_rf = levs - if (tau_rf <= 0.0 .or. pa_rf == 0.0) return - - krf = 1.0/(tau_rf*86400.0) - - do k=levs, 1, -1 - if(pmb(k) < pa_rf ) then ! applied only on constant pressure surfaces fixed pmb in "Pa" - krfz = krf*log(pa_rf/pmb(k)) - rfdis(k) = 1.0/(1.+krfz*dtp) - rfdist(k) = (rfdis(k) -1.0)/dtp ! du/dtp - levs_rf = k - endif - enddo - - end subroutine rf_damp_init + ! ======================================================================== ! Part 2 - sources ! wave sources ! ======================================================================== ! -! ugwp_oro_init +! ugwpv0_oro_init ! !========================================================================= - module ugwp_oro_init + module ugwpv0_oro_init - use ugwp_common, only : bnv2min, grav, grcp, fv, grav, cpd, grcp, pi + use ugwp_common_v0, only : bnv2min, grav, grcp, fv, grav, cpd, grcp, pi implicit none ! @@ -230,7 +169,7 @@ module ugwp_oro_init contains ! - subroutine init_oro_gws(nwaves, nazdir, nstoch, effac, & + subroutine init_oro_gws_v0(nwaves, nazdir, nstoch, effac, & lonr, kxw, cdmbgwd ) ! ! @@ -270,195 +209,10 @@ subroutine init_oro_gws(nwaves, nazdir, nstoch, effac, & !.................................................................... ! ! print *, ' init_oro_gws 2-1cdmb', cdmbgwd(2), cdmbgwd(1) - end subroutine init_oro_gws -! - - end module ugwp_oro_init -! ========================================================================= -! -! ugwp_conv_init -! -!========================================================================= - module ugwp_conv_init - - implicit none - real :: eff_con ! scale factors for conv GWs - integer :: nwcon ! number of waves - integer :: nazcon ! number of azimuths - integer :: nstcon ! flag for stochastic choice of launch level above Conv-cloud - real :: con_dlength - real :: con_cldf - - real, parameter :: cmin = 5 !2.5 - real, parameter :: cmax = 95. !82.5 - real, parameter :: cmid = 22.5 - real, parameter :: cwid = cmid - real, parameter :: bns = 2.e-2, bns2 = bns*bns, bns4=bns2*bns2 - real, parameter :: mstar = 6.28e-3/2. ! 2km - real :: dc - - real, allocatable :: ch_conv(:), spf_conv(:) - real, allocatable :: xaz_conv(:), yaz_conv(:) - contains -! - subroutine init_conv_gws(nwaves, nazdir, nstoch, effac, & - lonr, kxw, cgwf) - use ugwp_common, only : pi2, arad - implicit none - - integer :: nwaves, nazdir, nstoch - integer :: lonr - real :: cgwf(2) - real :: kxw, effac - real :: work1 = 0.5 - real :: chk, tn4, snorm - integer :: k - - nwcon = nwaves - nazcon = nazdir - nstcon = nstoch - eff_con = effac - - con_dlength = pi2*arad/float(lonr) - con_cldf = cgwf(1) * work1 + cgwf(2) *(1.-work1) -! -! allocate & define spectra in "selected direction": "dc" "ch(nwaves)" -! - if (.not. allocated(ch_conv)) allocate (ch_conv(nwaves)) - if (.not. allocated(spf_conv)) allocate (spf_conv(nwaves)) - if (.not. allocated(xaz_conv)) allocate (xaz_conv(nazdir)) - if (.not. allocated(yaz_conv)) allocate (yaz_conv(nazdir)) - - dc = (cmax-cmin)/float(nwaves-1) -! -! we may use different spectral "shapes" -! for example FVS-93 "Desabeius" -! E(s=1, t=3,m, w, k) ~ m^s/(m*^4 + m^4) ~ m^-3 saturated tail -! - do k = 1,nwaves - chk = cmin + (k-1)*dc - tn4 = (mstar*chk)**4 - ch_conv(k) = chk - spf_conv(k) = bns4*chk/(bns4+tn4) - enddo - - snorm = sum(spf_conv) - spf_conv = spf_conv/snorm*1.5 - - call init_nazdir(nazdir, xaz_conv, yaz_conv) - end subroutine init_conv_gws - - - end module ugwp_conv_init -!========================================================================= -! -! ugwp_fjet_init -! -!========================================================================= - - module ugwp_fjet_init - implicit none - real :: eff_fj ! scale factors for conv GWs - integer :: nwfj ! number of waves - integer :: nazfj ! number of azimuths - integer :: nstfj ! flag for stochastic choice of launch level above Conv-cloud -! - real, parameter :: fjet_trig=0. ! if ( abs(frgf) > fjet_trig ) launch GW-packet - - - real, parameter :: cmin = 2.5 - real, parameter :: cmax = 67.5 - real :: dc - real, allocatable :: ch_fjet(:) , spf_fjet(:) - real, allocatable :: xaz_fjet(:), yaz_fjet(:) - contains - subroutine init_fjet_gws(nwaves, nazdir, nstoch, effac, lonr, kxw) - use ugwp_common, only : pi2, arad - implicit none - - integer :: nwaves, nazdir, nstoch - integer :: lonr - real :: kxw, effac , chk - - integer :: k - - nwfj = nwaves - nazfj = nazdir - nstfj = nstoch - eff_fj = effac - - if (.not. allocated(ch_fjet)) allocate (ch_fjet(nwaves)) - if (.not. allocated(spf_fjet)) allocate (spf_fjet(nwaves)) - if (.not. allocated(xaz_fjet)) allocate (xaz_fjet(nazdir)) - if (.not. allocated(yaz_fjet)) allocate (yaz_fjet(nazdir)) - - dc = (cmax-cmin)/float(nwaves-1) - do k = 1,nwaves - chk = cmin + (k-1)*dc - ch_fjet(k) = chk - spf_fjet(k) = 1.0 - enddo - call init_nazdir(nazdir, xaz_fjet, yaz_fjet) - - end subroutine init_fjet_gws - - end module ugwp_fjet_init -! -!========================================================================= -! -! - module ugwp_okw_init -!========================================================================= - implicit none - - real :: eff_okw ! scale factors for conv GWs - integer :: nwokw ! number of waves - integer :: nazokw ! number of azimuths - integer :: nstokw ! flag for stochastic choice of launch level above Conv-cloud -! - real, parameter :: okw_trig=0. ! if ( abs(okwp) > okw_trig ) launch GW-packet - - real, parameter :: cmin = 2.5 - real, parameter :: cmax = 67.5 - real :: dc - real, allocatable :: ch_okwp(:), spf_okwp(:) - real, allocatable :: xaz_okwp(:), yaz_okwp(:) - - contains + end subroutine init_oro_gws_v0 ! - subroutine init_okw_gws(nwaves, nazdir, nstoch, effac, lonr, kxw) - - use ugwp_common, only : pi2, arad - implicit none - - integer :: nwaves, nazdir, nstoch - integer :: lonr - real :: kxw, effac , chk - - integer :: k - - nwokw = nwaves - nazokw = nazdir - nstokw = nstoch - eff_okw = effac - - if (.not. allocated(ch_okwp)) allocate (ch_okwp(nwaves)) - if (.not. allocated(spf_okwp)) allocate (spf_okwp(nwaves)) - if (.not. allocated(xaz_okwp)) allocate (xaz_okwp(nazdir)) - if (.not. allocated(yaz_okwp)) allocate (yaz_okwp(nazdir)) - dc = (cmax-cmin)/float(nwaves-1) - do k = 1,nwaves - chk = cmin + (k-1)*dc - ch_okwp(k) = chk - spf_okwp(k) = 1. - enddo - - call init_nazdir(nazdir, xaz_okwp, yaz_okwp) - - end subroutine init_okw_gws - - end module ugwp_okw_init + end module ugwpv0_oro_init !=============================== end of GW sources ! ! init specific gw-solvers (1,2,3,4) @@ -468,7 +222,7 @@ end module ugwp_okw_init ! Part -3 init wave solvers !=============================== - module ugwp_lsatdis_init + module ugwpv0_lsatdis_init implicit none integer :: nwav, nazd @@ -478,7 +232,7 @@ module ugwp_lsatdis_init ! contains - subroutine initsolv_lsatdis(me, master, nwaves, nazdir, nstoch, effac, do_physb, kxw) + subroutine initsolv_lsatdis_v0(me, master, nwaves, nazdir, nstoch, effac, do_physb, kxw) implicit none ! @@ -508,14 +262,14 @@ subroutine initsolv_lsatdis(me, master, nwaves, nazdir, nstoch, effac, do_physb eff = effac endif ! - end subroutine initsolv_lsatdis + end subroutine initsolv_lsatdis_v0 ! - end module ugwp_lsatdis_init + end module ugwpv0_lsatdis_init ! ! - module ugwp_wmsdis_init + module ugwpv0_wmsdis_init - use ugwp_common, only : pi, pi2 + use ugwp_common_v0, only : pi, pi2 implicit none real, parameter :: maxdudt = 250.e-5 @@ -539,8 +293,6 @@ module ugwp_wmsdis_init real, parameter :: zfluxglob= 3.75e-3 real , parameter :: nslope=1 ! the GW sprctral slope at small-m -! integer, parameter :: klaunch=55 ! 32 - ~ 1km ;55 - 5.5 km ; 52 4.7km ; 60-7km index for selecting launch level -! integer, parameter :: ilaunch=klaunch integer , parameter :: iazidim=4 ! number of azimuths integer , parameter :: incdim=25 ! number of discrete cx - spectral elements in launch spectrum @@ -563,11 +315,8 @@ module ugwp_wmsdis_init real, allocatable :: zcosang(:), zsinang(:) contains !============================================================================ - subroutine initsolv_wmsdis(me, master, nwaves, nazdir, nstoch, effac, do_physb, kxw) + subroutine initsolv_wmsdis_v0(me, master, nwaves, nazdir, nstoch, effac, do_physb, kxw) -! call initsolv_wmsdis(me, master, knob_ugwp_wvspec(2), knob_ugwp_azdir(2), & -! knob_ugwp_stoch(2), knob_ugwp_effac(2), do_physb_gwsrcs, kxw) -! implicit none ! !input -control for solvers: @@ -680,25 +429,7 @@ subroutine initsolv_wmsdis(me, master, nwaves, nazdir, nstoch, effac, do_physb, print * endif - - end subroutine initsolv_wmsdis + end subroutine initsolv_wmsdis_v0 ! -! make a list of all-initilized parameters needed for "gw_solver_wmsdis" -! - - end module ugwp_wmsdis_init -!========================================================================= -! -! work TODO for 2-extra WAM-solvers: -! DSPDIS (Hines)+ADODIS (Alexander-Dunkerton-Ortland) -! -!========================================================================= - subroutine init_dspdis - implicit none - end subroutine init_dspdis - - subroutine init_adodis - implicit none - end subroutine init_adodis - + end module ugwpv0_wmsdis_init diff --git a/physics/cires_ugwp_initialize_v1.F90 b/physics/cires_ugwp_initialize_v1.F90 deleted file mode 100644 index 4258680ea..000000000 --- a/physics/cires_ugwp_initialize_v1.F90 +++ /dev/null @@ -1,805 +0,0 @@ -!=============================== -! cu-cires ugwp-scheme -! initialization of selected -! init gw-solvers (1,2,3,4) -! init gw-source specifications -! init gw-background dissipation -!============================== -! -! Part-0 specifications of common constants, limiters and "criiical" values -! -! - - module ugwp_common_v1 -! -! use machine, only : kind_phys -! use physcons, only : pi => con_pi, grav => con_g, rd => con_rd, & -! rv => con_rv, cpd => con_cp, fv => con_fvirt,& -! arad => con_rerth - implicit none - - real, parameter :: grav =9.81, cpd = 1004. - real, parameter :: rd = 287.0 , rv =461.5 - real, parameter :: grav2 = grav + grav - real, parameter :: rgrav = 1.0/grav, rgrav2= rgrav*rgrav - - real, parameter :: fv = rv/rd - 1.0 - real, parameter :: rdi = 1.0 / rd, rcpd = 1./cpd, rcpd2 = 0.5/cpd - real, parameter :: gor = grav/rd - real, parameter :: gr2 = grav*gor - real, parameter :: grcp = grav*rcpd, gocp = grcp - real, parameter :: rcpdl = cpd*rgrav ! 1/[g/cp] == cp/g - real, parameter :: grav2cpd = grav*grcp ! g*(g/cp)= g^2/cp - - real, parameter :: pi = 4.*atan(1.0), pi2 = 2.*pi, pih = .5*pi - real, parameter :: rad_to_deg=180.0/pi, deg_to_rad=pi/180.0 - - real, parameter :: arad = 6370.e3 -! - real, parameter :: bnv2min = (pi2/1800.)*(pi2/1800.) - real, parameter :: bnv2max = (pi2/30.)*(pi2/30.) - - real, parameter :: dw2min=1.0, velmin=sqrt(dw2min), minvel = 0.5 - real, parameter :: omega1 = pi2/86400. - real, parameter :: omega2 = 2.*omega1, omega3 = 3.*omega1 - real, parameter :: hpscale= 7000., rhp=1./hpscale, rhp2=.5*rhp, rh4 = 0.25*rhp - real, parameter :: mkzmin = pi2/80.0e3, mkz2min = mkzmin*mkzmin - real, parameter :: mkzmax = pi2/500., mkz2max = mkzmax*mkzmax - real, parameter :: cdmin = 2.e-2/mkzmax - end module ugwp_common_v1 -! -! -!=================================================== -! -!Part-1 init => wave dissipation + RFriction -! -!=================================================== - subroutine init_global_gwdis_v1(levs, zkm, pmb, kvg, ktg, krad, kion, con_pi, & - pa_rf, tau_rf, me, master) - - - implicit none - integer , intent(in) :: me, master - integer , intent(in) :: levs - real, intent(in) :: con_pi, pa_rf, tau_rf - real, intent(in) :: zkm(levs), pmb(levs) ! in km-Pa - real, intent(out), dimension(levs+1) :: kvg, ktg, krad, kion -! -!locals + data -! - integer :: k - real, parameter :: vusurf = 2.e-5 - real, parameter :: musurf = vusurf/1.95 - real, parameter :: hpmol = 8.5 -! - real, parameter :: kzmin = 0.1 - real, parameter :: kturbo = 100. - real, parameter :: zturbo = 130. - real, parameter :: zturw = 30. - real, parameter :: inv_pra = 3. !kt/kv =inv_pr -! - real, parameter :: alpha = 1./86400./15. ! height variable see Zhu-1993 from 60-days => 6 days - real :: pa_alp = 750. ! super-RF parameters - real :: tau_alp = 10. ! days (750 Pa /10days) -! - real, parameter :: kdrag = 1./86400./30. !parametrization for WAM for FV3GFS SuperRF - real, parameter :: zdrag = 100. - real, parameter :: zgrow = 50. -! - real :: vumol, mumol, keddy, ion_drag - real :: rf_fv3, rtau_fv3, ptop, pih_dlog -! - real :: ae1 ,ae2 - real :: pih - - pih = 0.5*con_pi - - pa_alp = pa_rf - tau_alp = tau_rf - - ptop = pmb(levs) - rtau_fv3 = 1./86400./tau_alp - pih_dlog = pih/log(pa_alp/ptop) - - do k=1, levs - ae1 = -zkm(k)/hpmol - vumol = vusurf*exp(ae1) - mumol = musurf*exp(ae1) - ae2 = -((zkm(k)-zturbo) /zturw)**2 - keddy = kturbo*exp(ae2) - - kvg(k) = vumol + keddy - ktg(k) = mumol + keddy*inv_pra - - krad(k) = alpha -! - ion_drag = kdrag -! - kion(k) = ion_drag! -! add Rayleigh_Super of FV3 for pmb < pa_alp -! - if (pmb(k) .le. pa_alp) then - rf_fv3=rtau_fv3*sin(pih_dlog*log(pa_alp/pmb(k)))**2 - krad(k) = krad(k) + rf_fv3 - kion(k) = kion(k) + rf_fv3 - - endif - -! write(6,132) zkm(k), kvg(k), kvg(k)*(6.28/5000.)**2, kion(k) - enddo - - k= levs+1 - kion(k) = kion(k-1) - krad(k) = krad(k-1) - kvg(k) = kvg(k-1) - ktg(k) = ktg(k-1) - if (me == master) then - write(6, * ) ' zkm(k), kvg(k), kvg(k)*(6.28/5000.)**2, kion(k) ' - do k=1, levs, 1 - write(6,132) zkm(k), kvg(k), kvg(k)*(6.28/5000.)**2, kion(k), pmb(k) - enddo - endif -! - 132 format( 2x, F8.3,' dis-scales:', 4(2x, E10.3)) - - end subroutine init_global_gwdis_v1 -! -! - subroutine rf_damp_init_v1(levs, pa_rf, tau_rf, dtp, pmb, rfdis, rfdist, levs_rf) - implicit none - - integer :: levs - real :: pa_rf, tau_rf - real :: dtp - - real :: pmb(levs) - real :: rfdis(levs), rfdist(levs) - integer :: levs_rf - - real :: krf, krfz - integer :: k -! - rfdis(1:levs) = 1.0 - rfdist(1:levs) = 0.0 - levs_rf = levs - if (tau_rf <= 0.0 .or. pa_rf == 0.0) return - - krf = 1.0/(tau_rf*86400.0) - - do k=levs, 1, -1 - if(pmb(k) < pa_rf ) then ! applied only on constant pressure surfaces fixed pmb in "Pa" - krfz = krf*log(pa_rf/pmb(k)) - rfdis(k) = 1.0/(1.+krfz*dtp) - rfdist(k) = (rfdis(k) -1.0)/dtp ! du/dtp - levs_rf = k - endif - enddo - - end subroutine rf_damp_init_v1 -! ======================================================================== -! Part 2 - sources -! wave sources -! ======================================================================== -! -! ugwp_oro_init_v1 -! -!========================================================================= - module ugwp_oro_init_v1 - - use ugwp_common_v1, only : bnv2min, grav, grcp, fv, grav, cpd, grcp, pi - use ugwp_common_v1, only : mkzmin, mkz2min - implicit none -! -! constants and "crirtical" values to run oro-mtb_gw physics -! -! choice of oro-scheme: strver = 'vay_2018' , 'gfs_2018', 'kdn_2005', 'smc_2000' -! -! - real, parameter :: hncrit=9000. ! max value in meters for elvmax - real, parameter :: hminmt=50. ! min mtn height (*j*) - real, parameter :: sigfac=4.0 ! mb3a expt test for elvmax factor -! -! - real, parameter :: minwnd=1.0 ! min wind component (*j*) - real, parameter :: dpmin=5000.0 ! minimum thickness of the reference layer in pa - real, parameter :: hpmax=2400.0, hpmin=25.0 - - character(len=8) :: strver = 'gfs_2018' - character(len=8) :: strbase = 'gfs_2018' - real, parameter :: rimin=-10., ric=0.25 - -! - real, parameter :: efmin=0.5, efmax=10.0 - - - real, parameter :: sigma_std=1./100., gamm_std=1.0 - - real, parameter :: frmax=10., frc =1.0, frmin =0.01 -! - - real, parameter :: ce=0.8, ceofrc=ce/frc, cg=0.5 - real, parameter :: gmax=1.0, veleps=1.0, factop=0.5 -! - real, parameter :: rlolev=50000.0 -! - - -! hncrit set to 8000m and sigfac added to enhance elvmax mtn hgt - - - - real, parameter :: kxoro=6.28e-3/200. ! - real, parameter :: coro = 0.0 - integer, parameter :: nridge=2 - - real :: cdmb ! scale factors for mtb - real :: cleff ! scale factors for orogw - integer :: nworo ! number of waves - integer :: nazoro ! number of azimuths - integer :: nstoro ! flag for stochastic launch above SG-peak - - integer, parameter :: mdir = 8 - real, parameter :: fdir=.5*mdir/pi - - integer nwdir(mdir) - data nwdir/6,7,5,8,2,3,1,4/ - save nwdir - - real, parameter :: odmin = 0.1, odmax = 10.0 -!------------------------------------------------------------------------------ -! small-scale orography parameters for TOFD of Beljaars et al., 2004, QJRMS -!------------------------------------------------------------------------------ - - integer, parameter :: n_tofd = 2 ! depth of SSO for TOFD compared with Zpbl - real, parameter :: const_tofd = 0.0759 ! alpha*beta*Cmd*Ccorr*2.109 = 12.*1.*0.005*0.6*2.109 = 0.0759 - real, parameter :: ze_tofd = 1500.0 ! BJ's z-decay in meters - real, parameter :: a12_tofd = 0.0002662*0.005363 ! BJ's k-spect const for sigf2 * a1*a2*exp(-[z/zdec]**1.5] - real, parameter :: ztop_tofd = 10.*ze_tofd ! no TOFD > this height too higher 15 km -!------------------------------------------------------------------------------ -! - real, parameter :: fcrit_sm = 0.7, fcrit_sm2 = fcrit_sm * fcrit_sm - real, parameter :: fcrit_gfs = 0.7 - real, parameter :: fcrit_mtb = 0.7 - - real, parameter :: zbr_pi = (1.0/2.0)*pi - real, parameter :: zbr_ifs = 0.5*pi - - contains -! - subroutine init_oro_gws(nwaves, nazdir, nstoch, effac, & - lonr, kxw, cdmbgwd ) -! -! - integer :: nwaves, nazdir, nstoch - integer :: lonr - real :: cdmbgwd(2) ! scaling factors for MTb (1) & (2) for cleff = cleff * cdmbgwd(2) - ! high res-n "larger" MTB and "less-active" cleff in GFS-2018 - real :: cdmbX - real :: kxw - real :: effac ! it is analog of cdmbgwd(2) for GWs, off for now -!-----------------------------! GFS-setup for cdmb & cleff -! cdmb = 4.0 * (192.0/IMX) -! cleff = 0.5E-5 / SQRT(IMX/192.0) = 0.5E-5*SQRT(192./IMX) -! - real, parameter :: lonr_refmb = 4.0 * 192.0 - real, parameter :: lonr_refgw = 192.0 - -! copy to "ugwp_oro_init_v1" => nwaves, nazdir, nstoch - - nworo = nwaves - nazoro = nazdir - nstoro = nstoch - - cdmbX = lonr_refmb/float(lonr) - cdmb = cdmbX - if (cdmbgwd(1) >= 0.0) cdmb = cdmb * cdmbgwd(1) - - cleff = 0.5e-5 * sqrt(lonr_refgw/float(lonr)) !* effac - -!!! cleff = kxw * sqrt(lonr_refgw/float(lonr)) !* effac - - if (cdmbgwd(2) >= 0.0) cleff = cleff * cdmbgwd(2) -! -!.................................................................... -! higher res => smaller h' ..&.. higher kx -! flux_gwd ~ 'u'^2*kx/kz ~kxu/n ~1/dx *u/n tau ~ h'*h'*kx*kx = const (h'-less kx-grow) -!.................................................................... -! -! print *, ' init_oro_gws 2-1cdmb', cdmbgwd(2), cdmbgwd(1) - end subroutine init_oro_gws -! - - end module ugwp_oro_init_v1 -! ========================================================================= -! -! ugwp_conv_init_v1 -! -!========================================================================= - module ugwp_conv_init_v1 - - implicit none - real :: eff_con ! scale factors for conv GWs - integer :: nwcon ! number of waves - integer :: nazcon ! number of azimuths - integer :: nstcon ! flag for stochastic choice of launch level above Conv-cloud - real :: con_dlength - real :: con_cldf - - real, parameter :: cmin = 5 !2.5 - real, parameter :: cmax = 95. !82.5 - real, parameter :: cmid = 22.5 - real, parameter :: cwid = cmid - real, parameter :: bns = 2.e-2, bns2 = bns*bns, bns4=bns2*bns2 - real, parameter :: mstar = 6.28e-3/2. ! 2km - real :: dc - - real, allocatable :: ch_conv(:), spf_conv(:) - real, allocatable :: xaz_conv(:), yaz_conv(:) - contains -! - subroutine init_conv_gws(nwaves, nazdir, nstoch, effac, & - con_pi, arad, lonr, kxw, cgwf) - - implicit none - - integer :: nwaves, nazdir, nstoch - integer :: lonr - real :: con_pi, arad - real :: cgwf(2) - real :: kxw, effac - real :: work1 = 0.5 - real :: chk, tn4, snorm - integer :: k - - nwcon = nwaves - nazcon = nazdir - nstcon = nstoch - eff_con = effac - - con_dlength = 2.0*con_pi*arad/float(lonr) - con_cldf = cgwf(1) * work1 + cgwf(2) *(1.-work1) -! -! allocate & define spectra in "selected direction": "dc" "ch(nwaves)" -! - if (.not. allocated(ch_conv)) allocate (ch_conv(nwaves)) - if (.not. allocated(spf_conv)) allocate (spf_conv(nwaves)) - if (.not. allocated(xaz_conv)) allocate (xaz_conv(nazdir)) - if (.not. allocated(yaz_conv)) allocate (yaz_conv(nazdir)) - - dc = (cmax-cmin)/float(nwaves-1) -! -! we may use different spectral "shapes" -! for example FVS-93 "Desabeius" -! E(s=1, t=3,m, w, k) ~ m^s/(m*^4 + m^4) ~ m^-3 saturated tail -! - do k = 1,nwaves - chk = cmin + (k-1)*dc - tn4 = (mstar*chk)**4 - ch_conv(k) = chk - spf_conv(k) = bns4*chk/(bns4+tn4) - enddo - - snorm = sum(spf_conv) - spf_conv = spf_conv/snorm*1.5 - - call init_nazdir(con_pi, nazdir, xaz_conv, yaz_conv) - end subroutine init_conv_gws - - - end module ugwp_conv_init_v1 -!========================================================================= -! -! ugwp_fjet_init_v1 -! -!========================================================================= - - module ugwp_fjet_init_v1 - implicit none - real :: eff_fj ! scale factors for conv GWs - integer :: nwfj ! number of waves - integer :: nazfj ! number of azimuths - integer :: nstfj ! flag for stochastic choice of launch level above Conv-cloud -! - real, parameter :: fjet_trig=0. ! if ( abs(frgf) > fjet_trig ) launch GW-packet - - - real, parameter :: cmin = 2.5 - real, parameter :: cmax = 67.5 - real :: dc - real, allocatable :: ch_fjet(:) , spf_fjet(:) - real, allocatable :: xaz_fjet(:), yaz_fjet(:) - contains - subroutine init_fjet_gws(nwaves, nazdir, nstoch, effac, & - con_pi, lonr, kxw) - implicit none - - integer :: nwaves, nazdir, nstoch - integer :: lonr - real :: con_pi - real :: kxw, effac , chk - - integer :: k - - nwfj = nwaves - nazfj = nazdir - nstfj = nstoch - eff_fj = effac - - if (.not. allocated(ch_fjet)) allocate (ch_fjet(nwaves)) - if (.not. allocated(spf_fjet)) allocate (spf_fjet(nwaves)) - if (.not. allocated(xaz_fjet)) allocate (xaz_fjet(nazdir)) - if (.not. allocated(yaz_fjet)) allocate (yaz_fjet(nazdir)) - - dc = (cmax-cmin)/float(nwaves-1) - do k = 1,nwaves - chk = cmin + (k-1)*dc - ch_fjet(k) = chk - spf_fjet(k) = 1.0 - enddo - call init_nazdir(con_pi, nazdir, xaz_fjet, yaz_fjet) - - end subroutine init_fjet_gws - - end module ugwp_fjet_init_v1 -! -!========================================================================= -! -! - module ugwp_okw_init_v1 -!========================================================================= - implicit none - - real :: eff_okw ! scale factors for conv GWs - integer :: nwokw ! number of waves - integer :: nazokw ! number of azimuths - integer :: nstokw ! flag for stochastic choice of launch level above Conv-cloud -! - real, parameter :: okw_trig=0. ! if ( abs(okwp) > okw_trig ) launch GW-packet - - real, parameter :: cmin = 2.5 - real, parameter :: cmax = 67.5 - real :: dc - real, allocatable :: ch_okwp(:), spf_okwp(:) - real, allocatable :: xaz_okwp(:), yaz_okwp(:) - - contains -! - subroutine init_okw_gws(nwaves, nazdir, nstoch, effac, & - con_pi, lonr, kxw) - - implicit none - - integer :: nwaves, nazdir, nstoch - integer :: lonr - real :: con_pi - real :: kxw, effac , chk - - integer :: k - - nwokw = nwaves - nazokw = nazdir - nstokw = nstoch - eff_okw = effac - - if (.not. allocated(ch_okwp)) allocate (ch_okwp(nwaves)) - if (.not. allocated(spf_okwp)) allocate (spf_okwp(nwaves)) - if (.not. allocated(xaz_okwp)) allocate (xaz_okwp(nazdir)) - if (.not. allocated(yaz_okwp)) allocate (yaz_okwp(nazdir)) - dc = (cmax-cmin)/float(nwaves-1) - do k = 1,nwaves - chk = cmin + (k-1)*dc - ch_okwp(k) = chk - spf_okwp(k) = 1. - enddo - - call init_nazdir(con_pi, nazdir, xaz_okwp, yaz_okwp) - - end subroutine init_okw_gws - - end module ugwp_okw_init_v1 - -!=============================== end of GW sources -! -! init specific gw-solvers (1,2,3,4) -! - -!=============================== -! Part -3 init wave solvers -!=============================== - - module ugwp_lsatdis_init_v1 - implicit none - - integer :: nwav, nazd - integer :: nst - real :: eff - integer, parameter :: incdim = 4, iazdim = 4 -! - contains - - subroutine initsolv_lsatdis(me, master, nwaves, nazdir, nstoch, effac, do_physb, kxw) - - implicit none -! - integer :: me, master - integer :: nwaves, nazdir - integer :: nstoch - real :: effac - logical :: do_physb - real :: kxw -! -!locals: define azimuths and Ch(nwaves) - domain when physics-based soureces -! are not actibve -! - integer :: inc, jk, jl, iazi, i, j, k - - if( nwaves == 0 .or. nstoch == 1 ) then -! redefine from the default - nwav = incdim - nazd = iazdim - nst = 0 - eff = 1.0 - else -! from input_nml multi-wave spectra - nwav = nwaves - nazd = nazdir - nst = nstoch - eff = effac - endif -! - end subroutine initsolv_lsatdis -! - end module ugwp_lsatdis_init_v1 -! -! - module ugwp_wmsdis_init_v1 - - use ugwp_common_v1, only : arad, pi, pi2, hpscale, rhp, rhp2, rh4, omega2 - use ugwp_common_v1, only : bnv2max, bnv2min, minvel - use ugwp_common_v1, only : mkzmin, mkz2min, mkzmax, mkz2max, cdmin - implicit none - - real, parameter :: maxdudt = 250.e-5, maxdtdt=15.e-2 - real, parameter :: dked_min =0.01, dked_max=250.0 - - real, parameter :: gptwo=2.0 - - real , parameter :: bnfix = pi2/300., bnfix2= bnfix * bnfix - real , parameter :: bnfix4 = bnfix2 * bnfix2 - real , parameter :: bnfix3 = bnfix2 * bnfix -! -! make parameter list that will be passed to SOLVER -! -! integer, parameter :: klaunch=55 ! 32 - ~ 1km ;55 - 5.5 km ; 52 4.7km ; 60-7km index for selecting launch level -! integer, parameter :: ilaunch=klaunch - - integer , parameter :: iazidim=4 ! number of azimuths - integer , parameter :: incdim=25 ! number of discrete cx - spectral elements in launch spectrum - real , parameter :: ucrit=cdmin - - real , parameter :: zcimin = 2.5 - real , parameter :: zcimax = 125.0 - real , parameter :: zgam = 0.25 -! -! Verical spectra -! - real , parameter :: pind_wd = 5./3. - real , parameter :: sind_kz = 1. - real , parameter :: tind_kz = 3. - real , parameter :: stind_kz = sind_kz + tind_kz -! -! from kmob_ugwp namelist -! - real :: nslope ! the GW sprctral slope at small-m - real :: lzstar - real :: lzmin - real :: lzmax - real :: lhmet - real :: tamp_mpa !amplitude for GEOS-5/MERRA-2 - real :: tau_min ! min of GW MF 0.25 mPa - integer :: ilaunch - real :: gw_eff - - real :: v_kxw, rv_kxw, v_kxw2 - - - -!=========================================================================== - integer :: nwav, nazd, nst - real :: eff - - real :: zaz_fct, zms - real, allocatable :: zci(:), zci4(:), zci3(:),zci2(:), zdci(:) - real, allocatable :: zcosang(:), zsinang(:) - real, allocatable :: lzmet(:), czmet(:), mkzmet(:), dczmet(:), dmkz(:) - -! -! GW-eddy constants for wave-mode dissipation by background and stability of -! "final" flow after application of GW-effects -! - real, parameter :: iPr_pt = 0.5 - real, parameter :: lturb = 30., sc2 = lturb*lturb ! stable on 80-km TL lmix ~ 500 met. - real, parameter :: ulturb=150., sc2u = ulturb* ulturb ! unstable - real, parameter :: ric =0.25 - real, parameter :: rimin = -10., prmin = 0.25 - real, parameter :: prmax = 4.0 -! - contains -!============================================================================ - subroutine initsolv_wmsdis(me, master, nwaves, nazdir, nstoch, effac, do_physb, kxw) - -! call initsolv_wmsdis(me, master, knob_ugwp_wvspec(2), knob_ugwp_azdir(2), & -! knob_ugwp_stoch(2), knob_ugwp_effac(2), do_physb_gwsrcs, kxw) -! - implicit none -! -!input -control for solvers: -! nwaves, nazdir, nstoch, effac, do_physb, kxw -! -! - integer :: me, master, nwaves, nazdir, nstoch - real :: effac, kxw - logical :: do_physb - real :: dlzmet -! -!locals -! - integer :: inc, jk, jl, iazi -! - real :: zang, zang1, znorm - real :: zx1, zx2, ztx, zdx, zxran, zxmin, zxmax, zx, zpexp - real :: fpc, fpc_dc - real :: ae1,ae2 - if( nwaves == 0) then -! -! redefine from the deafault -! - nwav = incdim - nazd = iazidim - nst = 0 - eff = 1.0 - gw_eff = eff - else -! -! from input.nml -! - nwav = nwaves - nazd = nazdir - nst = nstoch - gw_eff = effac - endif - - - v_kxw = pi2/lhmet ; v_kxw2 = v_kxw*v_kxw - rv_kxw = 1./v_kxw - - allocate ( zci(nwav), zci4(nwav), zci3(nwav),zci2(nwav), zdci(nwav) ) - allocate ( zcosang(nazd), zsinang(nazd) ) - allocate (lzmet(nwav), czmet(nwav), mkzmet(nwav), dczmet(nwav), dmkz(nwav) ) - - if (me == master) then - print *, 'ugwp_v1: init_gw_wmsdis_control ' -! - print *, 'ugwp_v1: WMS_DIS launch layer ', ilaunch - print *, 'ugwp_v1: WMS_DIS tot_mflux in mpa', tamp_mpa*1000. - print *, 'ugwp_v1: WMS_DIS lhmet in km ' , lhmet*1.e-3 - endif - - zpexp = gptwo * 0.5 ! gptwo=2 , zpexp = 1. - -! -! set up azimuth directions and some trig factors -! -! - zang = pi2 / float(nazd) - -! get normalization factor to ensure that the same amount of momentum -! flux is directed (n,s,e,w) no mater how many azimuths are selected. -! - znorm = 0.0 - do iazi=1, nazd - zang1 = (iazi-1)*zang - zcosang(iazi) = cos(zang1) - zsinang(iazi) = sin(zang1) - znorm = znorm + abs(zcosang(iazi)) - enddo -! zaz_fct = 1.0 - zaz_fct = 2.0 / znorm ! correction factor for azimuthal sums - -! define coordinate transform for "Ch" ....x = 1/c stretching transform -! ----------------------------------------------- -! -! x=1/Cphase transform -! see eq. 28-30 Scinocca 2003. x = 1/c stretching transform -! - zxmax = 1.0 / zcimin - zxmin = 1.0 / zcimax - zxran = zxmax - zxmin - zdx = zxran / real(nwav-1) ! dkz -! - ae1=zxran/zgam - zx1 = zxran/(exp(ae1)-1.0 ) ! zgam =1./4. - zx2 = zxmin - zx1 - -! -! computations for zci =1/zx, stretching "accuracy" is not "accurate" spectra transform -! it represents additional "empirical" redistribution of "spectral" mode in C-space -! - zms = pi2 / lzstar - - do inc=1, nwav - ztx = real(inc-1)*zdx+zxmin - ae1 = (ztx-zxmin)/zgam - zx = zx1*exp(ae1)+zx2 !eq.(29-30),Scinocca-2003 - zci(inc) = 1.0 /zx ! - zdci(inc) = zci(inc)**2*(zx1/zgam)*exp(ae1)*zdx ! - zci4(inc) = (zms*zci(inc))**4 - zci2(inc) = (zms*zci(inc))**2 - zci3(inc) = (zms*zci(inc))**3 - enddo -! -! -! alternatuve lzmax-lzmin -! -! - dlzmet = (lzmax-lzmin)/ real(nwav-1) - do inc=1, nwav - lzmet(inc) = lzmin + (inc-1)*dlzmet - mkzmet(inc) = pi2/lzmet(inc) - zci(inc) =lzmet(inc)/(pi2/bnfix) - zci4(inc) = (zms*zci(inc))**4 - zci2(inc) = (zms*zci(inc))**2 - zci3(inc) = (zms*zci(inc))**3 - - enddo - - zdx = (zci(nwav)-zci(1))/ real(nwav-1) - - - if (me == master) then - print * - print *, 'ugwp_v0: zcimin=' , zcimin - print *, 'ugwp_v0: zcimax=' , zcimax - print *, 'ugwp_v0: zgam= ', zgam - print * - -! print *, ' ugwp_v1 nslope=', nslope - print * - print *, 'ugwp_v1: zcimin/zci=' , maxval(zci) - print *, 'ugwp_v1: zcimax/zci=' , minval(zci) - print *, 'ugwp_v1: cd_crit=', ucrit - print *, 'ugwp_v1: launch_level', ilaunch - print *, ' ugwp_v1 lzstar=', lzstar - print *, ' ugwp_v1 nslope=', nslope - - print * - do inc=1, nwav - zdci(inc) = zdx - if (nslope == 1) fpc = bnfix4*zci(inc)/ (bnfix4+zci4(inc)) - if (nslope == 0) fpc = bnfix3*zci(inc)/ (bnfix3+zci3(inc)) - fpc_dc = fpc * zdci(inc) - write(6,111) inc, zci(inc), zdci(inc),ucrit, fpc, fpc_dc, 6.28e-3/bnfix*zci(inc) - enddo - endif - 111 format( 'wms-zci', i4, 7 (3x, F8.3)) - - end subroutine initsolv_wmsdis -! -! make a list of all-initilized parameters needed for "gw_solver_wmsdis" -! - - end module ugwp_wmsdis_init_v1 -!========================================================================= -! -! work TODO for 2-extra WAM-solvers: -! DSPDIS (Hines)+ADODIS (Alexander-Dunkerton-Ortland) -! -!========================================================================= - subroutine init_dspdis_v1 - implicit none - end subroutine init_dspdis_v1 - - subroutine init_adodis_v1 - implicit none - end subroutine init_adodis_v1 - diff --git a/physics/cires_ugwp_module.F90 b/physics/cires_ugwp_module.F90 index 51c297237..620386ead 100644 --- a/physics/cires_ugwp_module.F90 +++ b/physics/cires_ugwp_module.F90 @@ -1,17 +1,12 @@ ! -module cires_ugwp_module +module cires_ugwpv0_module ! ! driver is called after pbl & before chem-parameterizations ! -!.................................................................................... -! order = dry-adj=>conv=mp-aero=>radiation -sfc/land- chem -> vertdiff-> [rf-gws]=> ion-re -!................................................................................... -! -! + implicit none logical :: module_is_initialized -!logical :: do_ugwp = .false. ! control => true - ugwp false old gws + rayeleigh friction logical :: do_physb_gwsrcs = .false. ! control for physics-based GW-sources logical :: do_rfdamp = .false. ! control for Rayleigh friction inside ugwp_driver @@ -54,7 +49,7 @@ module cires_ugwp_module data knob_ugwp_azdir /2, 4, 4,4/ ! number of wave azimuths for- (oro, fronts, conv, imbf-okwp] data knob_ugwp_stoch /0, 0, 0,0/ ! 0 - deterministic ; 1 - stochastic, non-activated option data knob_ugwp_effac /1.,1.,1.,1./ ! efficiency factors for- (oro, fronts, conv, imbf-owp] - integer :: knob_ugwp_version = 0 + integer :: knob_ugwp_version = 0 ! version control had sense under IPD in CCPP=> to SUITES integer :: launch_level = 55 ! namelist /cires_ugwp_nml/ knob_ugwp_solver, knob_ugwp_source,knob_ugwp_wvspec, knob_ugwp_azdir, & @@ -106,16 +101,14 @@ module cires_ugwp_module ! init of cires_ugwp (_init) called from GFS_driver.F90 ! ! ----------------------------------------------------------------------- - subroutine cires_ugwp_mod_init (me, master, nlunit, input_nml_file, logunit, & + subroutine cires_ugwpv0_mod_init (me, master, nlunit, input_nml_file, logunit, & fn_nml, lonr, latr, levs, ak, bk, pref, dtp, cdmvgwd, cgwf, & pa_rf_in, tau_rf_in) - use ugwp_oro_init, only : init_oro_gws - use ugwp_conv_init, only : init_conv_gws - use ugwp_fjet_init, only : init_fjet_gws - use ugwp_okw_init, only : init_okw_gws - use ugwp_wmsdis_init, only : initsolv_wmsdis, ilaunch - use ugwp_lsatdis_init, only : initsolv_lsatdis + use ugwpv0_oro_init, only : init_oro_gws_v0 + use ugwpv0_wmsdis_init, only : initsolv_wmsdis_v0, ilaunch + use ugwpv0_lsatdis_init, only : initsolv_lsatdis_v0 + implicit none integer, intent (in) :: me @@ -132,7 +125,6 @@ subroutine cires_ugwp_mod_init (me, master, nlunit, input_nml_file, logunit, & real, intent (in) :: cdmvgwd(2), cgwf(2) ! "scaling" controls for "old" GFS-GW schemes real, intent (in) :: pa_rf_in, tau_rf_in -! integer, parameter :: logunit = 6 integer :: ios logical :: exists real :: dxsg @@ -155,8 +147,6 @@ subroutine cires_ugwp_mod_init (me, master, nlunit, input_nml_file, logunit, & read (nlunit, nml = cires_ugwp_nml) close (nlunit) #endif - - ! ilaunch = launch_level @@ -173,13 +163,6 @@ subroutine cires_ugwp_mod_init (me, master, nlunit, input_nml_file, logunit, & ! effective kxw - resolution-aware ! dxsg = pi2*arad/float(lonr) * knob_ugwp_ndx4lh -! -! kxw = pi2/dxsg -! -! init global background dissipation for ugwp -> 4d-variable for fv3wam linked with pbl-vert_diff -! - -! allocate(fcor(latr), fcor2(latr) ) ! allocate( kvg(levs+1), ktg(levs+1) ) allocate( krad(levs+1), kion(levs+1) ) @@ -195,50 +178,22 @@ subroutine cires_ugwp_mod_init (me, master, nlunit, input_nml_file, logunit, & ! ! Part-1 :init_global_gwdis ! - call init_global_gwdis(levs, zkm, pmb, kvg, ktg, krad, kion) - call rf_damp_init (levs, pa_rf, tau_rf, dtp, pmb, rfdis, rfdist, levs_rf) + call init_global_gwdis_v0(levs, zkm, pmb, kvg, ktg, krad, kion) + ! -! Part-2 :init_SOURCES_gws +! Part-2 :init_SOURCES_gws -- only orowaves, but ugwp-v0 is based on gwdps.f of EMC ! ! ! call init-solver for "stationary" multi-wave spectra and sub-grid oro ! - call init_oro_gws( knob_ugwp_wvspec(1), knob_ugwp_azdir(1), & + call init_oro_gws_v0( knob_ugwp_wvspec(1), knob_ugwp_azdir(1), & knob_ugwp_stoch(1), knob_ugwp_effac(1), lonr, kxw, cdmvgwd ) ! ! call init-sources for "non-sationary" multi-wave spectra ! do_physb_gwsrcs=.true. - IF (do_physb_gwsrcs) THEN - - if (me == master) print *, ' do_physb_gwsrcs ', do_physb_gwsrcs, ' in cires_ugwp_init ' - if (knob_ugwp_wvspec(4) > 0) then -! okw - call init_okw_gws(knob_ugwp_wvspec(4), knob_ugwp_azdir(4), & - knob_ugwp_stoch(4), knob_ugwp_effac(4), lonr, kxw ) - if (me == master) print *, ' init_okw_gws ' - endif - - if (knob_ugwp_wvspec(3) > 0) then -! fronts - call init_fjet_gws(knob_ugwp_wvspec(3), knob_ugwp_azdir(3), & - knob_ugwp_stoch(3), knob_ugwp_effac(3), lonr, kxw ) - if (me == master) print *, ' init_fjet_gws ' - endif - - if (knob_ugwp_wvspec(2) > 0) then -! conv - call init_conv_gws(knob_ugwp_wvspec(2), knob_ugwp_azdir(2), & - knob_ugwp_stoch(2), knob_ugwp_effac(2), lonr, kxw, cgwf ) - if (me == master) & - print *, ' init_convective GWs cgwf', knob_ugwp_wvspec(2), knob_ugwp_azdir(2) - - endif - - ENDIF !IF (do_physb_gwsrcs) - !====================== ! Part-3 :init_SOLVERS ! ===================== @@ -247,428 +202,40 @@ subroutine cires_ugwp_mod_init (me, master, nlunit, input_nml_file, logunit, & ! if (knob_ugwp_solver==1) then ! - call initsolv_lsatdis(me, master, knob_ugwp_wvspec(2), knob_ugwp_azdir(2), & + call initsolv_lsatdis_v0(me, master, knob_ugwp_wvspec(2), knob_ugwp_azdir(2), & knob_ugwp_stoch(2), knob_ugwp_effac(2), do_physb_gwsrcs, kxw ) endif if (knob_ugwp_solver==2) then - call initsolv_wmsdis(me, master, knob_ugwp_wvspec(2), knob_ugwp_azdir(2), & + call initsolv_wmsdis_v0(me, master, knob_ugwp_wvspec(2), knob_ugwp_azdir(2), & knob_ugwp_stoch(2), knob_ugwp_effac(2), do_physb_gwsrcs, kxw) endif -! -! other solvers not yet tested for fv3gfs -! -!< if (knob_ugwp_solver==3) call init_dspdis -!< if (knob_ugwp_solver==4) call init_adodis -! + !====================== module_is_initialized = .true. - if (me == master) print *, ' VAY-ugwp is initialized ', module_is_initialized - - end subroutine cires_ugwp_mod_init - -! ----------------------------------------------------------------------- -! -! driver of cires_ugwp (_driver) -! called from GFS_physics_driver.F90 -! -! ----------------------------------------------------------------------- -! call cires_ugwp_driver & -! (im, levs, dtp, kdt, me, lprnt, Model%lonr, & -! Model%prslrd0, Model%ral_ts, Model%cdmbgwd, & -! Grid%xlat, Grid%xlat_d, Grid%sinlat, Grid%coslat, & -! Statein, delp_gws, Oro_stat, & -! dusfcg, dvsfcg, gw_dudt, gw_dvdt, gw_dtdt, gw_kdis, & -! Diag%gwp_ax, Diag%gwp_axo, Diag%gwp_axc, Diag%gwp_axf, & -! Diag%gwp_ay, Diag%gwp_ayo, Diag%gwp_ayc, Diag%gwp_ayf, & -! Diag%gwp_dtdt, Diag%gwp_kdis, Diag%gwp_okw, Diag%gwp_fgf, & -! Diag%gwp_dcheat, Diag%gwp_precip, Diag%gwp_klevs, & -! Diag%zmtb, Diag%gwp_scheat, dlength, cldf, & -! Diag%tau_tofd, Diag%tau_mtb, Diag%tau_ogw, Diag%tau_ngw, & -! Diag%zmtb, Diag%zlwb, Diag%zogw, Diag%du3dt_mtb, & -! Diag%du3dt_ogw, Diag%du3dt_tms ) - - subroutine cires_ugwp_driver & - (im, levs, dtp, kdt, me, lprnt, lonr, & - pa_rf, tau_rf, cdmbgwd, xlat, xlatd, sinlat, coslat, & - ugrs, vgrs, tgrs, qgrs, prsi, prsl, prslk, phii, phil, & - delp, orostat, kpbl, & - dusfc, dvsfc, dudt, dvdt, dtdt, kdis, & - axtot, axo, axc, axf, aytot, ayo, ayc, ayf, & - eps_tot, ekdis, trig_okw, trig_fgf, & - dcheat, precip, cld_klevs, zmtb, scheat, dlength, cldf, & - taus_sso, taus_ogw, tauf_ogw, tauf_ngw, & - ugw_zmtb, ugw_zlwb, ugw_zogw, ugw_axmtb, ugw_axlwb, ugw_axtms ) - -! - use machine, only: kind_phys - use physcons, only: con_cp, con_fvirt, con_g, con_rd - use ugwp_common, only: omega2 -! -! - use ugwp_okw_init, only : & - eff_okw, nstokw, nwokw, ch_okwp, nazokw, spf_okwp, xaz_okwp, yaz_okwp - use ugwp_conv_init, only : & - eff_con, nstcon, nwcon, ch_conv, nazcon, spf_conv, xaz_conv, yaz_conv - use ugwp_fjet_init, only : & - eff_fj, nstfj, nwfj, ch_fjet, nazfj, spf_fjet, xaz_fjet, yaz_fjet - -! - implicit none -! - - logical :: lprnt - integer :: me, im, levs, kdt, lonr - real(kind_phys) :: dtp - real(kind_phys) :: pa_rf, tau_rf - real(kind_phys) :: cdmbgwd(2) - - integer, intent(in) :: kpbl(im) - real(kind_phys) :: hpbl(im) - real(kind_phys), intent(in) :: orostat(im, 14) - real(kind_phys), intent(in), dimension(im,levs) :: ugrs, vgrs, & - tgrs, qgrs, prsi, prsl, prslk, phii, phil, delp -! - real(kind_phys), dimension(im) :: xlat, xlatd, sinlat, coslat - real(kind_phys), dimension(im, levs) :: trig_okw, trig_fgf - real(kind_phys), dimension(im) :: precip ! precip-n rates and - integer , dimension(im, 3) :: cld_klevs ! indices fo cloud top/bot/? - real(kind_phys), dimension(im, levs) :: dcheat, scheat ! deep and shal conv heat tend. - - - real(kind_phys), dimension(im) :: dlength ! tail-grid box scale in meters - real(kind_phys), dimension(im) :: cldf ! "bizzard" old cgwd-tuning knobs dimensionless -!=================== -! tendency + kdis -!=================== - real(kind_phys), dimension(im, levs) :: dudt, dvdt, dtdt, kdis - real(kind_phys), dimension(im, levs) :: axtot, axo, axc, axf - real(kind_phys), dimension(im, levs) :: aytot, ayo, ayc, ayf - real(kind_phys), dimension(im, levs) :: eps_tot, ekdis - -! - real(kind_phys), dimension(im, levs) :: eds_o, kdis_o - real(kind_phys), dimension(im, levs) :: eds_c, kdis_c - real(kind_phys), dimension(im, levs) :: eds_f, kdis_f - real(kind_phys), dimension(im, levs) :: ax_rf, ay_rf, eps_rf -! -!================================================================================== -! diagnostics for OGW & NGW + SSO effects axmtb, axlwb, axtms -!================================================================================== - real(kind_phys), dimension(im) :: dusfc, dvsfc - real(kind_phys), dimension(im) :: taus_sso, taus_ogw, tauf_ogw, tauf_ngw - real(kind_phys), dimension(im) :: ugw_zmtb, ugw_zlwb, ugw_zogw - real(kind_phys), dimension(im, levs) :: ugw_axmtb,ugw_axlwb, ugw_axtms - real(kind_phys), dimension(im, levs) :: tauz_ogw, tauz_ngw, wtauz - -! -! knob_ugwp_source=[ 1, 1, 1, 0 ] -! oro conv nst imbal-okw -! locals -! - integer :: i, j, k, istype, ido -! -! internal diagnostics for oro-waves, lee waves, and mtb : -! - real(kind_phys), dimension(im) :: dusfc_mb, dvsfc_mb, dusfc_ogw, dvsfc_ogw - real(kind_phys), dimension(im) :: dusfc_lwb, dvsfc_lwb - real(kind_phys), dimension(im) :: zmtb, zlwb, zogw ! GW-launch levels in "meters" -! - real(kind_phys), dimension(im) :: fcor, c2f2 -! -! three sources with different: a) spectra-content/azimuth; b) efficiency ;c) spectral shape -! - real(kind_phys), dimension(im) :: taub_con, taub_fj, taub_okw - integer , dimension(im) :: klev_okw, klev_fj, klev_con - integer , dimension(im) :: if_okw, if_con, if_fj - integer :: nf_okw, nf_con, nf_fj -! - dudt = 0. - dvdt = 0. - dtdt = 0. - kdis = 0. - axo = 0. ; axc = 0. ; axf = 0. - ayo = 0. ; ayc = 0. ; ayf = 0. - eds_o = 0. ; kdis_o = 0. ; eds_f = 0. ; kdis_f = 0. ; eds_c = 0. ; kdis_c = 0. - ax_rf = 0. ; ay_rf = 0. ; eps_rf = 0 - - hpbl(:) = 2000. ! hpbl (1:im) = phil(1:im, kpbl(1:im)) -! - - do i=1, im - fcor(i) = omega2*sinlat(i) - c2f2(i) = fcor(i)*fcor(i)/(kxw*kxw) - enddo - -! i=im -! print *, i, fcor(i), 6.28e-3/kxw, sqrt(c2f2(i)) -! print *, maxval(statein%prsl/statein%tgrs)/287. , ' density ' - -! -! -! What can be computed for ALL types of GWs? => -! "Br-Vi frequency"with "limits" in case of "conv-unstable" layers -! Background dissipation: Molecular + Eddy -! Wind projections may differ from GW-sources/propagation azimuths -! - do istype=1, size(knob_ugwp_source) - - ido = knob_ugwp_source(istype) ! 0 or 1 off or active - - ugwp_azdir = knob_ugwp_azdir(istype) - ugwp_stoch = knob_ugwp_stoch(istype) - ugwp_nws = knob_ugwp_wvspec(istype) - ugwp_effac = knob_ugwp_effac(istype) - -! -! oro-gw effects -! - if (ido == 1 .and. istype ==1 ) then -! -! 1. solve for OGW effects on the mean flow -! 2. all parts of ORO effexra inside: MTB TOFD LeeWB OGW-drag -! - call ugwp_oro(im, levs, dtp, kdt, me, lprnt, & - fcor, c2f2, ugrs, vgrs, tgrs, & - qgrs, prsi, delp, prsl, prslk, phii, phil, & - orostat, hpbl, axo, ayo, eds_o, kdis_o, & - dusfc, dvsfc, dusfc_mb, dvsfc_mb, dusfc_ogw, dvsfc_ogw, & - dusfc_lwb, dvsfc_lwb, zmtb, zlwb, zogw,tauf_ogw,tauz_ogw,& - ugw_axmtb,ugw_axlwb, ugw_axtms) -! -! taus_sso, taus_ogw, tauz_ogw, tauz_ngw, tauf_ogw, tauf_ngw, & -! ugw_zmtb, ugw_zlwb, ugw_zogw, ugw_axmtb,ugw_axlwb, ugw_axtms -! collect column-integrated "dusfc, dvsfc" only for oro-waves -! - taus_sso = dusfc_mb + dusfc_lwb + dusfc_ogw - taus_ogw = dusfc_ogw - ugw_zmtb = zmtb - ugw_zlwb = zlwb - ugw_zogw = zogw -! tauz_ogw/tauf_ogw => output -! ugwp_azdir, ugwp_stoch, ugwp_nws ..... "multi-wave + stochastic" -! -! stationary gw-mode ch=0, with "gw_solver_linsat" -! compute column-integrated "dusfc, dvsfc" only for oro-waves -! - dudt = dudt + axo * ugwp_effac - dvdt = dvdt + ayo * ugwp_effac - dtdt = dtdt + eds_o * ugwp_effac - kdis = kdis + kdis_o* ugwp_effac -! print *, ' ido istype ORO=1 ', ido, istype, ' ugwp_oro as a solver ' - endif - - if (ido == 1 .and. istype ==2 ) then -! -! convective gw effects -! -! 1. specify spectra + forcing nstcon, nwcon, ch_conv, nazcon, spf_conv -! - call get_spectra_tau_convgw & - (nwcon, im, levs, dcheat, scheat, precip, cld_klevs, & - xlatd, sinlat, coslat, taub_con, klev_con, if_con, nf_con) -! -! 2. solve for GW effects on the mean flow -! - if ( nf_con > 0) then - - klev_con(:) = 52 ! ~5 km -! -!eff_con, nstcon, nwcon, ch_conv, nazcon, spf_conv, xaz_conv, yaz_conv -! - if (knob_ugwp_solver == 1) call gw_solver_linsatdis & - (im, levs, dtp, kdt, me, taub_con, klev_con, if_con, nf_con, & - nwcon, ch_conv, nazcon, spf_conv, xaz_conv, yaz_conv, & - fcor, c2f2, ugrs, vgrs, tgrs, qgrs, prsi, delp, & - prsl, prslk, phii, phil, & - axc, ayc, eds_c, kdis_c, wtauz) - - - if (knob_ugwp_solver == 2) then -! print *, ' before CONV-2 ', ido, istype, ' gw_solver_wmsdis ', knob_ugwp_solver - call gw_solver_wmsdis & - (im, levs, dtp, kdt, me, taub_con, klev_con, if_con, nf_con, & - nwfj, ch_fjet, nazfj, spf_fjet, xaz_fjet, yaz_fjet, & - fcor, c2f2, ugrs, vgrs, tgrs, & - qgrs, prsi, delp, prsl, prslk, phii, phil, & - axc, ayc, eds_c, kdis_c, wtauz) -! print *, ' after ido istype CONV-2 ', ido, istype, ' gw_solver_wmsdis ', knob_ugwp_solver - endif - - dudt = dudt + axc * ugwp_effac - dvdt = dvdt + ayc * ugwp_effac - dtdt = dtdt + eds_c * ugwp_effac - kdis = kdis + kdis_c * ugwp_effac - - tauz_ngw = wtauz - - endif - - endif - - if (ido == 1 .and. istype ==3 ) then -! -! nonstationary gw effects -! -! 1. specify spectra + forcing -! - call get_spectra_tau_nstgw (nwfj, im, levs, & - trig_fgf, xlatd, sinlat, coslat, taub_fj, klev_fj, if_fj, nf_fj) -! -! 2. solve for GW effects on the mean flow -! - print *, ' tau_nstgw nf_fj-GW triggers ', nf_fj, ' ugwp_solver = ', knob_ugwp_solver - if ( nf_fj > 0) then - - if (knob_ugwp_solver == 1) call gw_solver_linsatdis & - (im, levs, dtp, kdt, me, taub_fj, klev_fj, if_fj, nf_fj, & - nwfj, ch_fjet, nazfj, spf_fjet, xaz_fjet, yaz_fjet, & - fcor, c2f2, ugrs, vgrs, tgrs, & - qgrs, prsi, delp, prsl, prslk, phii, phil, & - axf, ayf, eds_f, kdis_f, wtauz) - - - - if (knob_ugwp_solver == 2) call gw_solver_wmsdis & - (im, levs, dtp, kdt, me, taub_fj, klev_fj, if_fj, nf_fj, & - nwfj, ch_fjet, nazfj, spf_fjet, xaz_fjet, yaz_fjet, & - fcor, c2f2, ugrs, vgrs, tgrs, & - qgrs, prsi, delp, prsl, prslk, phii, phil, & - axf, ayf, eds_f, kdis_f, wtauz) - - dudt = dudt + axf * ugwp_effac - dvdt = dvdt + ayf * ugwp_effac - dtdt = dtdt + eds_f * ugwp_effac - kdis = kdis + kdis_f * ugwp_effac - tauz_ngw = wtauz - print *, ' ido istype for FJ 1-4 ', ido, istype, ' gw_solver_wmsdis ', knob_ugwp_solver - - endif - endif -! print *, ' ido istype for okw 1-4 ', ido, istype - if (ido == 1 .and. istype == 4 ) then -! -! nonstationary gw effects due to both "convection +fronts/jets " = imbalance of rs-flow -! -! 1. specify spectra + forcing -! - call get_spectra_tau_okw (nwokw, im, levs,& - trig_okw, xlatd, sinlat, coslat, taub_okw, klev_okw, if_okw, nf_okw) -! -! 2. solve for GW effects on the mean flow -! - if ( nf_okw > 0) then -! - if (knob_ugwp_solver == 1) call gw_solver_linsatdis & - (im, levs, dtp, kdt, me, taub_okw, klev_okw, if_okw, nf_okw, & - nwfj, ch_fjet, nazfj, spf_fjet, xaz_fjet, yaz_fjet, & - fcor, c2f2, ugrs, vgrs, tgrs, & - qgrs, prsi, delp, prsl, prslk, phii, phil, & - axf, ayf, eds_f, kdis_f, wtauz) - - - if (knob_ugwp_solver == 2) call gw_solver_wmsdis & - (im, levs, dtp, kdt, me, taub_okw, klev_okw, if_okw, nf_okw, & - nwfj, ch_fjet, nazfj, spf_fjet, xaz_fjet, yaz_fjet, & - fcor, c2f2, ugrs, vgrs, tgrs, & - qgrs, prsi, delp, prsl, prslk, phii, phil, & - axf, ayf, eds_f, kdis_f, wtauz) - - dudt = dudt + axf * ugwp_effac - dvdt = dvdt + ayf * ugwp_effac - dtdt = dtdt + eds_f * ugwp_effac - kdis = kdis + kdis_f * ugwp_effac - tauz_ngw = wtauz - endif - endif -! -! broad gw-spectra -! - 356 continue - enddo -! -! gw-diag only -! - axtot = dudt - aytot = dvdt - eps_tot = dtdt - -! -! optional rf-damping -! - if (do_rfdamp) then -! -! - call rf_damp(im, levs, levs_rf, dtp, rfdis, rfdist, ugrs, vgrs, ax_rf, ay_rf, eps_rf) -! -! gw-diag only + rf-damping ..... now orchestrate it with FV3-dycore RF-damping -! - do k=levs_rf, levs - - dudt(:,k) = dudt(:,k) + ax_rf(:,k) - dvdt(:,k) = dvdt(:,k) + ay_rf(:,k) - dtdt(:,k) = dtdt(:,k) + eps_rf(:,k) - - enddo - - endif -!================================================================================ -! To update U-V-T STATE by [dudt dvdt dtdt kdis+rf] => Solve 3-diag VD-equation -!================================================================================ -! to do for fv3wam=> -! joint eddy+molecular viscosity/conductivity/diffusion -! requires "dqdt" + dudt_vis, dvdt_vis. dtdt_cond - -! print *, ' cires_ugwp_driver +++++++++++++++++ ' -! - end subroutine cires_ugwp_driver - - -!============================================= - - - subroutine cires_ugwp_advance -!----------------------------------------------------------------------- -! -! options for the day-to-day variable sources/spectra + diagnostics -! for stochastic "triggers" -! diagnose GW-source functions * FGF + OKWP + SGO/CONV from IAU-fields -! or use for stochastic GWP-sources "memory" -!----------------------------------------------------------------------- - implicit none -! -! update sources -! a) physics-based triggers for multi-wave -! b) stochastic-based spectra and amplitudes -! c) use "memory" on GW-spectra from previous time-step -! d) update "background" GW dissipation as needed -! - end subroutine cires_ugwp_advance - + end subroutine cires_ugwpv0_mod_init ! ! ----------------------------------------------------------------------- ! finalize of cires_ugwp (_finalize) ! ----------------------------------------------------------------------- - - subroutine cires_ugwp_mod_finalize + subroutine cires_ugwpv0_mod_finalize ! ! deallocate sources/spectra & some diagnostics need to find where "deaalocate them" ! before "end" of the FV3GFS ! implicit none ! -! deallocate arrays employed in: -! cires_ugwp_advance / cires_ugwp_driver / cires_ugwp_init +! deallocate arrays employed in V0 ! deallocate( kvg, ktg ) deallocate( krad, kion ) deallocate( zkm, pmb ) deallocate( rfdis, rfdist) - end subroutine cires_ugwp_mod_finalize + end subroutine cires_ugwpv0_mod_finalize ! - end module cires_ugwp_module + end module cires_ugwpv0_module diff --git a/physics/cires_ugwp_module_v1.F90 b/physics/cires_ugwp_module_v1.F90 deleted file mode 100644 index fd41d8175..000000000 --- a/physics/cires_ugwp_module_v1.F90 +++ /dev/null @@ -1,672 +0,0 @@ - -module cires_ugwp_module_v1 - -! -! driver is called after pbl & before chem-parameterizations -! it uses ugwp_common (like phys_cons) and some module-param od solvers/sources init-modules -!.................................................................................... -! order = dry-adj=>conv=mp-aero=>radiation -sfc/land- chem -> vertdiff-> [rf-gws]=> ion-re -!................................................................................... -! -! - use ugwp_common_v1, only : arad, pi, pi2, hpscale, rhp, rhp2, rh4 - implicit none - logical :: module_is_initialized -!logical :: do_ugwp = .false. ! control => true - ugwp false old gws + rayeleigh friction - character(len=8) :: strsolver='pss-1986' - logical :: do_physb_gwsrcs = .false. ! control for physics-based GW-sources - logical :: do_rfdamp = .false. ! control for Rayleigh friction inside ugwp_driver - integer, parameter :: idebug_gwrms=1 ! control for diag computaions pw wind-temp GW-rms and MF fluxs - logical, parameter :: do_adjoro = .false. - real, parameter :: max_kdis = 250. ! 400 m2/s - real, parameter :: max_axyz = 250.e-5 ! 400 m/s/day - real, parameter :: max_eps = max_kdis*4.e-7 ! ~16 K/day max_kdis*BN2/cp - real, parameter :: maxdudt = max_axyz - real, parameter :: maxdtdt = max_eps - real, parameter :: dked_min = 0.01 - real, parameter :: dked_max = max_kdis - - - real, parameter :: hps = hpscale - real, parameter :: hpskm = hps/1000. -! - - real, parameter :: ricrit = 0.25 - real, parameter :: frcrit = 0.50 - real, parameter :: linsat = 1.00 - real, parameter :: linsat2 = linsat*linsat -! -! integer :: curday_ugwp ! yyyymmdd 20150101 -! integer :: ddd_ugwp ! ddd of year from 1-366 - - integer :: knob_ugwp_solver=1 ! 1, 2, 3, 4 - (linsat, ifs_2010, ad_gfdl, dsp_dis) - integer, dimension(4) :: knob_ugwp_source=(/1,0,1,0/) ! [1,0,1,1] - (oro, fronts, conv, imbf-owp] - integer, dimension(4) :: knob_ugwp_wvspec=(/1,32,32,32/) ! number of waves for- (oro, fronts, conv, imbf-owp] - integer, dimension(4) :: knob_ugwp_azdir=(/2,4,4,4/) ! number of wave azimuths for- (oro, fronts, conv, imbf-owp] - integer, dimension(4) :: knob_ugwp_stoch=(/0,0,0,0/) ! 0 - deterministic ; 1 - stochastic - real, dimension(4) :: knob_ugwp_effac=(/1.,1.,1.,1./) ! efficiency factors for- (oro, fronts, conv, imbf-owp] - - integer :: knob_ugwp_doaxyz=1 ! 1 -gwdrag - integer :: knob_ugwp_doheat=1 ! 1 -gwheat - integer :: knob_ugwp_dokdis=0 ! 1 -gwmixing - integer :: knob_ugwp_ndx4lh = 2 ! n-number of "unresolved" "n*dx" for lh_gw - integer :: knob_ugwp_nslope = 1 ! spectral"growth" S-slope of GW-energy spectra mkz^S - - real :: knob_ugwp_palaunch = 500.e2 ! fixed pressure layer in Pa for "launch" of NGWs - real :: knob_ugwp_lzmax = 12.5e3 ! 12.5 km max-VERT-WL of GW-spectra - real :: knob_ugwp_lzstar = 2.0e3 ! UTLS mstar = 6.28/lzstar 2-2.5 km - real :: knob_ugwp_lzmin = 1.5e3 ! 1.5 km min-VERT-WL of GW-spectra - real :: knob_ugwp_taumin = 0.25e-3 - real :: knob_ugwp_tauamp = 7.75e-3 ! range from 30.e-3 to 3.e-3 ( space-borne values) - real :: knob_ugwp_lhmet = 200.e3 ! 200 km -! - real :: kxw = pi2/200.e3 ! single horizontal wavenumber of ugwp schemes -! -! tune-ups for qbo -! - real :: knob_ugwp_qbolev = 500.e2 ! fixed pressure layer in Pa for "launch" of conv-GWs - real :: knob_ugwp_qbosin = 1.86 ! semiannual cycle of tau_qbo_src in radians - real :: knob_ugwp_qbotav = 2.285e-3 ! additional to "climate" for QBO-sg forcing - real :: knob_ugwp_qboamp = 1.191e-3 ! additional to "climate" QBO - real :: knob_ugwp_qbotau = 10. ! relaxation time scale in days - real :: knob_ugwp_qbolat = 15. ! qbo-domain for extra-forcing - real :: knob_ugwp_qbowid = 7.5 ! qbo-attenuation for extra-forcing - character(len=8) :: knob_ugwp_orosolv='pss-1986' - - character(len=255) :: ugwp_qbofile = 'qbo_zmf_2009_2018.nc' - character(len=255) :: ugwp_taufile = 'ugwp_limb_tau.nc' - -! character(len=250) :: knob_ugwp_qbofile='qbo_zmf_2009_2018.nc'! -! character(len=250) :: knob_ugwp_amffile='mern_zmf_amf_12month.nc' -! character(len=255) :: file_limb_tab='ugwp_limb_tau.nc' - -! integer, parameter :: ny_tab=73, nt_tab=14 -! real, parameter :: rdy_tab = 1./2.5, rdd_tab = 1./30. -! real :: days_tab(nt_tab), lat_tab(ny_tab) -! real :: abmf_tab(ny_tab,nt_tab) - - integer :: ugwp_azdir - integer :: ugwp_stoch - - integer :: ugwp_src - integer :: ugwp_nws - real :: ugwp_effac - -! - integer :: knob_ugwp_version = 0 - integer :: launch_level = 55 -! - namelist /cires_ugwp_nml/ knob_ugwp_solver, knob_ugwp_source,knob_ugwp_wvspec, knob_ugwp_azdir, & - knob_ugwp_stoch, knob_ugwp_effac,knob_ugwp_doaxyz, knob_ugwp_doheat, knob_ugwp_dokdis, & - knob_ugwp_ndx4lh, knob_ugwp_version, knob_ugwp_palaunch, knob_ugwp_nslope, knob_ugwp_lzmax, & - knob_ugwp_lzmin, knob_ugwp_lzstar, knob_ugwp_lhmet, knob_ugwp_tauamp, knob_ugwp_taumin, & - knob_ugwp_qbolev, knob_ugwp_qbosin, knob_ugwp_qbotav, knob_ugwp_qboamp, knob_ugwp_qbotau, & - knob_ugwp_qbolat, knob_ugwp_qbowid, knob_ugwp_orosolv - -!&cires_ugwp_nml -! knob_ugwp_solver=2 -! knob_ugwp_source=1,1,1,0 -! knob_ugwp_wvspec=1,32,32,32 -! knob_ugwp_azdir =2, 4, 4,4 -! knob_ugwp_stoch =0, 0, 0,0 -! knob_ugwp_effac=1, 1, 1,1 -! knob_ugwp_doaxyz=1 -! knob_ugwp_doheat=1 -! knob_ugwp_dokdis=0 -! knob_ugwp_ndx4lh=4 -!/ -! -! allocatable arrays, initilized during "cires_ugwp_init" & -! released during "cires_ugwp_finalize" -! - real, allocatable :: kvg(:), ktg(:), krad(:), kion(:) - real, allocatable :: zkm(:), pmb(:) - real, allocatable :: rfdis(:), rfdist(:) - integer :: levs_rf - real :: pa_rf, tau_rf -! -! tabulated GW-sources -! - integer :: ntau_d1y, ntau_d2t, nqbo_d1y, nqbo_d2z, nqbo_d3t - real, allocatable :: ugwp_taulat(:), ugwp_qbolat(:) - real, allocatable :: tau_limb(:,:), days_limb(:) - real, allocatable :: uzmf_merra(:,:,:), days_merra(:), pmb127(:) - real, allocatable :: uqboe(:,:) - real, allocatable :: days_y4ddd(:), zkm127(:) - real, allocatable :: tau_qbo(:), stau_qbo(:) - integer,allocatable :: days_y4md(:) - real, allocatable :: vert_qbo(:) - -! -! limiters -! - real, parameter :: latqbo =20., widqbo=15., taurel = 21600. - integer, parameter :: kz2 = 127-7, kz1= 127-49, kz5=5 ! 64km - 18km -! - -!====================================================================== - real, parameter :: F_coriol=1 ! Coriolis effects - real, parameter :: F_nonhyd=1 ! Nonhydrostatic waves - real, parameter :: F_kds =0 ! Eddy mixing due to GW-unstable below - real, parameter :: iPr_ktgw =1./3., iPr_spgw=iPr_ktgw - real, parameter :: iPr_turb =1./3., iPr_mol =1.95 - real, parameter :: rhp1=1./hps, rh2=0.5*rhp1, rhp4 = rh2*rh2 - real, parameter :: khp = 0.287*rhp1 ! R/Cp/Hp - real, parameter :: cd_ulim = 1.0 ! critical level precision or Lz ~ 0 ~dz of model - - contains -! -! ----------------------------------------------------------------------- -! -! init of cires_ugwp (_init) called from CCPP cap file -! -! ----------------------------------------------------------------------- - - - - subroutine cires_ugwp_init_v1 (me, master, nlunit, logunit, jdat_gfs, con_pi, & - con_rerth, fn_nml2, lonr, latr, levs, ak, bk, pref, dtp, cdmvgwd, & - cgwf, pa_rf_in, tau_rf_in, errmsg, errflg) -! -! input_nml_file ='input.nml'=fn_nml ..... OLD_namelist and cdmvgwd(4) Corrected Bug Oct 4 -! - use netcdf - use ugwp_oro_init_v1, only : init_oro_gws - use ugwp_conv_init_v1, only : init_conv_gws - use ugwp_fjet_init_v1, only : init_fjet_gws - use ugwp_okw_init_v1, only : init_okw_gws - use ugwp_wmsdis_init_v1, only : initsolv_wmsdis - - use ugwp_lsatdis_init_v1, only : initsolv_lsatdis - - - use ugwp_wmsdis_init_v1, only : ilaunch, nslope, lhmet, lzmax, lzmin, lzstar - use ugwp_wmsdis_init_v1, only : tau_min, tamp_mpa - implicit none - - integer, intent (in) :: me - integer, intent (in) :: master - integer, intent (in) :: nlunit - integer, intent (in) :: logunit - integer, intent (in) :: lonr - integer, intent (in) :: levs - integer, intent (in) :: latr - integer, intent (in) :: jdat_gfs(8) - real, intent (in) :: ak(levs+1), bk(levs+1), pref - real, intent (in) :: dtp - real, intent (in) :: cdmvgwd(2), cgwf(2) ! "scaling" controls for "old" GFS-GW dims(2) !!! - real, intent (in) :: pa_rf_in, tau_rf_in, con_pi, con_rerth - - character(len=64), intent (in) :: fn_nml2 - character(len=64), parameter :: fn_nml='input.nml' - - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - -! character, intent (in) :: input_nml_file -! integer, parameter :: logunit = 6 - integer :: ios - logical :: exists - real :: dxsg - - integer :: ncid, iernc, vid, dimid, status - integer :: k - integer :: ddd_ugwp, curday_ugwp - real, dimension(6) :: avqbo = (/0.05, 0.1, 0.25, 0.5, 0.75, 0.95/) -! - if (me == master) print *, trim (fn_nml), ' GW-namelist file ' - inquire (file =trim (fn_nml) , exist = exists) -! - if (.not. exists) then - if (me == master) & - write (6, *) 'separate ugwp :: namelist file: ', trim (fn_nml), ' does not exist' - else - open (unit = nlunit, file = trim(fn_nml), action = 'read', status = 'old', iostat = ios) - endif - rewind (nlunit) - read (nlunit, nml = cires_ugwp_nml) - close (nlunit) -! - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - - strsolver= knob_ugwp_orosolv - pa_rf = pa_rf_in - tau_rf = tau_rf_in - - curday_ugwp = jdat_gfs(1)*10000 + jdat_gfs(2)*100 +jdat_gfs(3) - call calendar_ugwp(jdat_gfs(1), jdat_gfs(2), jdat_gfs(3), ddd_ugwp) - -! write version number and namelist to log file - if (me == master) then - write (logunit, *) " ================================================================== " - write (logunit, *) "cires_ugwp_namelist_extended_v1" - write (logunit, nml = cires_ugwp_nml) - write (logunit, *) " ================================================================== " - - write (6, *) " ================================================================== " - write (6, *) "cires_ugwp_namelist_extended_v1" - write (6, nml = cires_ugwp_nml) - write (6, *) " ================================================================== " - write (6, *) "calendar_ugwp ddd_ugwp=", ddd_ugwp - write (6, *) "calendar_ugwp curday_ugwp=", curday_ugwp - write (6, *) " ================================================================== " - write (6, *) ddd_ugwp, ' jdat_gfs ddd of year ' - endif -! -! effective kxw - resolution-aware -! - dxsg = pi2*arad/float(lonr) * knob_ugwp_ndx4lh - kxw = pi2/knob_ugwp_lhmet -! -! kxw = pi2/dxsg -! -! init global background dissipation for ugwp -> 4d-variable for fv3wam linked with pbl-vert_diff -! - -! allocate(fcor(latr), fcor2(latr) ) -! - allocate( kvg(levs+1), ktg(levs+1) ) - allocate( krad(levs+1), kion(levs+1) ) - allocate( zkm(levs), pmb(levs) ) - allocate( rfdis(levs), rfdist(levs) ) - - allocate (vert_qbo(levs)) - -! -! ak -pa bk-dimensionless from surf => tol_lid_pressure =0 -! - - do k=1, levs - pmb(k) = 1.e0*(ak(k) + pref*bk(k)) ! Pa -unit Pref = 1.e5, pmb = Pa - zkm(k) = -hpskm*alog(pmb(k)/pref) - enddo - vert_qbo(1:levs) = 0. - - do k=kz1, kz2 - vert_qbo(k)=1. - if (k.le.(kz1+kz5)) vert_qbo(k) = avqbo(k+1-kz1) - if (k.ge.(kz2-kz5)) vert_qbo(k) = avqbo(kz2+1-k) - if (me == master) print *, 'vertqbo', vert_qbo(k), zkm(k) - enddo - -! -! find ilaunch -! - - do k=levs, 1, -1 - if (pmb(k) .gt. knob_ugwp_palaunch ) exit - enddo - - launch_level = max(k-1, 5) ! above 5-layers from the surface - -! -! Part-1 :init_global_gwdis_v1 -! - call init_global_gwdis_v1(levs, zkm, pmb, kvg, ktg, krad, kion, con_pi, & - pa_rf, tau_rf, me, master) - call rf_damp_init_v1 (levs, pa_rf, tau_rf, dtp, pmb, rfdis, rfdist, levs_rf) -! -! Part-2 :init_SOURCES_gws -! - -! -! call init-solver for "stationary" multi-wave spectra and sub-grid oro -! - call init_oro_gws( knob_ugwp_wvspec(1), knob_ugwp_azdir(1), & - knob_ugwp_stoch(1), knob_ugwp_effac(1), lonr, kxw, cdmvgwd ) -! -! call init-sources for "non-sationary" multi-wave spectra -! - do_physb_gwsrcs=.true. - - IF (do_physb_gwsrcs) THEN - - if (me == master) print *, ' do_physb_gwsrcs ', do_physb_gwsrcs, ' in cires_ugwp_init_v1 ' - if (knob_ugwp_wvspec(4) > 0) then -! okw - call init_okw_gws(knob_ugwp_wvspec(4), knob_ugwp_azdir(4), & - knob_ugwp_stoch(4), knob_ugwp_effac(4), & - con_pi, lonr, kxw ) - if (me == master) print *, ' init_okw_gws ' - endif - - if (knob_ugwp_wvspec(3) > 0) then -! fronts - call init_fjet_gws(knob_ugwp_wvspec(3), knob_ugwp_azdir(3), & - knob_ugwp_stoch(3), knob_ugwp_effac(3), & - con_pi, lonr, kxw ) - if (me == master) print *, ' init_fjet_gws ' - endif - - if (knob_ugwp_wvspec(2) > 0) then -! conv - call init_conv_gws(knob_ugwp_wvspec(2), knob_ugwp_azdir(2), & - knob_ugwp_stoch(2), knob_ugwp_effac(2), & - con_pi, con_rerth, lonr, kxw, cgwf ) - if (me == master) & - print *, ' init_convective GWs cgwf', knob_ugwp_wvspec(2), knob_ugwp_azdir(2) - - endif - - ENDIF !IF (do_physb_gwsrcs) -! -! -! Tabulated sources -! -! goto 121 - - iernc=NF90_OPEN(trim(ugwp_taufile), nf90_nowrite, ncid) - - if(iernc.ne.0) then - write(errmsg,'(*(a))') "Cannot open file_limb_tab data-file ", & - trim(ugwp_taufile) - errflg = 1 - return - else - - - status = nf90_inq_dimid(ncid, "lat", DimID) -! if (status /= nf90_noerr) call handle_err(status) -! - status = nf90_inquire_dimension(ncid, DimID, len =ntau_d1y ) - - status = nf90_inq_dimid(ncid, "days", DimID) - status = nf90_inquire_dimension(ncid, DimID, len =ntau_d2t ) - if (me == master) print *, ntau_d1y, ntau_d2t, ' dimd-tlimb ' - allocate (ugwp_taulat(ntau_d1y ), days_limb(ntau_d2t)) - allocate ( tau_limb (ntau_d1y, ntau_d2t )) - - iernc=nf90_inq_varid( ncid, 'DAYS', vid ) - iernc= nf90_get_var( ncid, vid, days_limb) - iernc=nf90_inq_varid( ncid, 'LATS', vid ) - iernc= nf90_get_var( ncid, vid, ugwp_taulat) - iernc=nf90_inq_varid( ncid, 'ABSMF', vid ) - iernc= nf90_get_var( ncid, vid, tau_limb) - - iernc=nf90_close(ncid) - - endif -! - iernc=NF90_OPEN(trim(ugwp_qbofile), nf90_nowrite, ncid) - - if(iernc.ne.0) then - write(errmsg,'(*(a))') "Cannot open qbofile data-file ", & - trim(ugwp_qbofile) - errflg = 1 - return - else - - status = nf90_inq_dimid(ncid, "lat", DimID) - status = nf90_inquire_dimension(ncid, DimID, len =nqbo_d1y ) - status = nf90_inq_dimid(ncid, "lev", DimID) - status = nf90_inquire_dimension(ncid, DimID, len =nqbo_d2z) - status = nf90_inq_dimid(ncid, "days", DimID) - status = nf90_inquire_dimension(ncid, DimID, len =nqbo_d3t ) - if (me == master) print *, nqbo_d1y, nqbo_d2z, nqbo_d3t, ' dims tauqbo ' - allocate (ugwp_qbolat(nqbo_d1y ), days_merra(nqbo_d3t) ) - allocate (zkm127(nqbo_d2z), pmb127(nqbo_d2z)) - allocate ( uzmf_merra (nqbo_d1y, nqbo_d2z, nqbo_d3t )) - allocate ( uqboe (nqbo_d2z, nqbo_d3t )) - allocate (days_y4ddd(nqbo_d3t), days_y4md(nqbo_d3t) ) - allocate (tau_qbo(nqbo_d3t), stau_qbo(nqbo_d3t) ) - - iernc=nf90_inq_varid( ncid, 'DAYS', vid ) - iernc= nf90_get_var( ncid, vid, days_merra) - - iernc=nf90_inq_varid( ncid, 'Y4MD', vid ) - iernc= nf90_get_var( ncid, vid, days_y4md) - - iernc=nf90_inq_varid( ncid, 'Y4DDD', vid ) - iernc= nf90_get_var( ncid, vid, days_y4ddd) - - iernc=nf90_inq_varid( ncid, 'LATS', vid ) - iernc= nf90_get_var( ncid, vid, ugwp_qbolat) - - iernc=nf90_inq_varid( ncid, 'LEVS', vid ) - iernc= nf90_get_var( ncid, vid, zkm127) - - - iernc=nf90_inq_varid( ncid, 'UQBO', vid ) - iernc= nf90_get_var( ncid, vid, uzmf_merra) - - iernc=nf90_inq_varid( ncid, 'TAUQBO', vid ) - iernc= nf90_get_var( ncid, vid, tau_qbo) - - iernc=nf90_inq_varid( ncid, 'STAUQBO', vid ) - iernc= nf90_get_var( ncid, vid, stau_qbo) - iernc=nf90_inq_varid( ncid, 'UQBOE', vid ) - iernc= nf90_get_var( ncid, vid, uqboe) - iernc=nf90_close(ncid) - endif - - if (me == master) then - print * - print *, ' ugwp_tabulated files input ' - print *, ' ugwp_taulat ', ugwp_taulat - print *, ' days ', days_limb - print *, ' TAU-limb ', maxval(tau_limb)*1.e3, minval(tau_limb)*1.e3 - print *, ' TAU-qbo ', maxval(stau_qbo)*1.e3, minval(stau_qbo)*1.e3 - print *, ' YMD-qbo ', maxval(days_y4md), minval(days_y4md) - print *, ' YDDD-qbo ', maxval(days_y4ddd), minval(days_y4ddd) - print *, ' uzmf_merra ',maxval(uzmf_merra), minval(uzmf_merra) - print *, ' uEq_merra ',maxval(uqboe), minval(uqboe) - print * - endif - -! -121 continue -! endif ! tabulated sources SABER/HIRDLS/QBO - -!====================== -! Part-3 :init_SOLVERS -! ===================== -! -! call init-solvers for "broad" non-stationary multi-wave spectra -! - if (knob_ugwp_solver==1) then -! - call initsolv_lsatdis(me, master, knob_ugwp_wvspec(2), knob_ugwp_azdir(2), & - knob_ugwp_stoch(2), knob_ugwp_effac(2), do_physb_gwsrcs, kxw ) - endif - if (knob_ugwp_solver==2) then -! -! re-assign from namelists -! - nslope = knob_ugwp_nslope ! the GW sprctral slope at small-m - lzstar = knob_ugwp_lzstar - lzmax = knob_ugwp_lzmax - lzmin = knob_ugwp_lzmin - lhmet = knob_ugwp_lhmet - tamp_mpa =knob_ugwp_tauamp !amplitude for GEOS-5/MERRA-2 - tau_min =knob_ugwp_taumin ! min of GW MF 0.25 mPa - ilaunch = launch_level - kxw = pi2/lhmet - call initsolv_wmsdis(me, master, knob_ugwp_wvspec(2), knob_ugwp_azdir(2), & - knob_ugwp_stoch(2), knob_ugwp_effac(2), do_physb_gwsrcs, kxw) - endif -! -! other solvers not yet tested for fv3gfs -! -!< if (knob_ugwp_solver==3) call init_dspdis -!< if (knob_ugwp_solver==4) call init_adodis -! - -!====================== - module_is_initialized = .true. - if (me == master) print *, ' CIRES-ugwp-V1 is initialized ', module_is_initialized - - end subroutine cires_ugwp_init_v1 - - -!============================================= - - - subroutine cires_ugwp_advance -!----------------------------------------------------------------------- -! -! options for the day-to-day variable sources/spectra + diagnostics -! for stochastic "triggers" -! diagnose GW-source functions * FGF + OKWP + SGO/CONV from IAU-fields -! or use for stochastic GWP-sources "memory" -!----------------------------------------------------------------------- - implicit none -! -! update sources -! a) physics-based triggers for multi-wave -! b) stochastic-based spectra and amplitudes -! c) use "memory" on GW-spectra from previous time-step -! d) update "background" GW dissipation as needed -! - end subroutine cires_ugwp_advance - -! -! ----------------------------------------------------------------------- -! finalize of cires_ugwp (_finalize) -! ----------------------------------------------------------------------- - - - subroutine cires_ugwp_finalize -! -! deallocate sources/spectra & some diagnostics need to find where "deaalocate them" -! before "end" of the FV3GFS -! - implicit none -! -! deallocate arrays employed in: -! cires_ugwp_advance / cires_ugwp_driver / cires_ugwp_init -! - deallocate( kvg, ktg ) - deallocate( krad, kion ) - deallocate( zkm, pmb ) - deallocate( rfdis, rfdist) - deallocate(ugwp_taulat, ugwp_qbolat) - deallocate(tau_limb, uzmf_merra) - deallocate(days_limb, days_merra, pmb127) - - end subroutine cires_ugwp_finalize - -! -! -! -! - subroutine calendar_ugwp(yr, mm, dd, ddd_ugwp) -! -! computes day of year to get tau_limb forcing written with 1-day precision -! - implicit none - integer, intent(in) :: yr, mm, dd - integer :: ddd_ugwp - - integer :: iw3jdn - integer :: jd1, jddd - jd1 = iw3jdn(yr,1,1) - jddd = iw3jdn(yr,mm,dd) - ddd_ugwp = jddd-jd1+1 - - end subroutine calendar_ugwp - - - subroutine cires_indx_ugwp (npts, me, master, dlat,j1_tau,j2_tau, w1_j1tau, w2_j2tau, & - j1_qbo,j2_qbo, w1_j1qbo, w2_j2qbo, dexp_latqbo ) - - implicit none -! -! ntau_d1y, ntau_d2t, nqbo_d1y, nqbo_d2z, nqbo_d3t -! ugwp_taulat(:), ugwp_qbolat(:), ugwp_merlat(:) -! - integer :: npts, me, master - integer, dimension(npts) :: j1_tau,j2_tau, j1_qbo, j2_qbo - real , dimension(npts) :: dlat, w1_j1tau, w2_j2tau, w1_j1qbo, w2_j2qbo - real , dimension(npts) :: dexp_latqbo - real :: widqbo2, xabs -! - integer i,j, j1, j2 -! -! weights for tau_limb w1_j1tau, w2_j2tau -! - do j=1,npts - j2_qbo(j) = nqbo_d1y - do i=1, nqbo_d1y - if (dlat(j) < ugwp_qbolat(i)) then - j2_qbo(j) = i - exit - endif - enddo - - - j2_qbo(j) = min(j2_qbo(j),nqbo_d1y) - j1_qbo(j) = max(j2_qbo(j)-1,1) - - if (j1_qbo(j) /= j2_qbo(j) ) then - w2_j2qbo(j) = (dlat(j) - ugwp_qbolat(j1_qbo(j))) & - / (ugwp_qbolat(j2_qbo(j))-ugwp_qbolat(j1_qbo(j))) - - else - w2_j2qbo(j) = 1.0 - endif - w1_j1qbo(j) = 1.0 - w2_j2qbo(j) - -! - enddo -! -! weights for tau_limb w1_j1tau, w2_j2tau -! - do j=1,npts - j2_tau(j) = ntau_d1y - do i=1,ntau_d1y - if (dlat(j) < ugwp_taulat(i)) then - j2_tau(j) = i - exit - endif - enddo - - - j2_tau(j) = min(j2_tau(j),ntau_d1y) - j1_tau(j) = max(j2_tau(j)-1,1) - - if (j1_tau(j) /= j2_tau(j) ) then - w2_j2tau(j) = (dlat(j) - ugwp_taulat(j1_tau(j))) & - / (ugwp_taulat(j2_tau(j))-ugwp_taulat(j1_tau(j))) - - else - w2_j2tau(j) = 1.0 - endif - w1_j1tau(j) = 1.0 - w2_j2tau(j) - - enddo - widqbo2 =1./widqbo/widqbo - do j=1,npts - dexp_latqbo(j) =0. - xabs =abs(dlat(j)) - if (xabs .le. latqbo) then - dexp_latqbo(j) = exp(-xabs*xabs*widqbo2) - if (xabs .le. 4.0 ) dexp_latqbo(j) =1. -! print *, ' indx_ugwp dexp=', dexp_latqbo(j), nint(dlat(j)) - endif - enddo - - if (me == master ) then -222 format( 2x, 'vay-wqbo', I4, 5(2x, F10.3)) -223 format( 2x, 'vay-limb', I4, 5(2x, F10.3)) - print *, 'vay_indx_ugwp ', size(dlat), ' npts ', npts - do j=1,npts - j1 = j1_tau(j) - j2 = j2_tau(j) - write(6,223) j, ugwp_taulat(j1), dlat(j), ugwp_taulat(j2), w2_j2tau(j), w1_j1tau(j) - enddo - print * - do j=1,npts - j1 = j1_qbo(j) - j2 = j2_qbo(j) - write(6,222) j, ugwp_qbolat(j1), dlat(j), ugwp_qbolat(j2), w2_j2qbo(j), w1_j1qbo(j) - enddo - endif - end subroutine cires_indx_ugwp - -! - end module cires_ugwp_module_v1 - diff --git a/physics/cires_ugwp_ngw_utils.F90 b/physics/cires_ugwp_ngw_utils.F90 deleted file mode 100644 index 4b2a19884..000000000 --- a/physics/cires_ugwp_ngw_utils.F90 +++ /dev/null @@ -1,73 +0,0 @@ -module cires_ugwp_ngw_utils - - -contains - - - subroutine tau_limb_advance(me, master, im, levs, ddd, curdate, & - j1_tau, j2_tau, ddy_j1tau, ddy_j2tau, tau_sat, kdt ) - - - - - use machine, only : kind_phys - - use cires_ugwp_module_v1, only : ntau_d1y, ntau_d2t - use cires_ugwp_module_v1, only : ugwp_taulat, days_limb, tau_limb - -! use cires_ugwp_module, only : ugwp_qbolat, days_merra, pmb127, days_y4md, days_y4ddd -! use cires_ugwp_module, only : tau_qbo, stau_qbo, uqboe, u2 => uzmf_merra - - implicit none - - integer, intent(in) :: me, master, im, levs, ddd, curdate, kdt - integer, intent(in), dimension(im) :: j1_tau, j2_tau - - real , intent(in), dimension(im) :: ddy_j1tau, ddy_j2tau - - real, intent(out) :: tau_sat(im) - - integer :: i, j1, j2, k, it1, it2, iday - real :: tem, tx1, tx2, w1, w2, day2, day1, ddx - integer :: yr1, yr2 -! - integer :: iqbo1=1 -! - - - - it1 = 2 - do iday=1, ntau_d2t - if (float(ddd) .lt. days_limb(iday) ) then - it2 = iday - exit - endif - enddo - it2 = min(it2,ntau_d2t) - it1 = max(it2-1,1) - if (it2 > ntau_d2t ) then - print *, ' it1, it2, ntau_d2t ', it1, it2, ntau_d2t - stop - endif - w2 = (float(ddd)-days_limb(it1))/(days_limb(it2)-days_limb(it1)) - w1 = 1.0-w2 - do i=1, im - j1 = j1_tau(i) - j2 = j2_tau(i) - tx1 = tau_limb(j1, it1)*ddy_j1tau(i)+tau_limb(j2, it1)*ddy_j2tau(i) - tx2 = tau_limb(j1, it2)*ddy_j1tau(i)+tau_limb(j2, it2)*ddy_j2tau(i) - tau_sat(i) = tx1*w1 + w2*tx2 - enddo - - if (me == master ) then - print*, maxval(tau_limb), minval(tau_limb), ' tau_limb ' - print*, ntau_d2t - print*, days_limb(1) , days_limb(ntau_d2t) , ddd, ' days-taulimb ' - print*, 'curdate ', curdate - print*, maxval(tau_sat), minval(tau_sat), ' tau_sat_fv3 ' - endif - return - - end subroutine tau_limb_advance - -end module cires_ugwp_ngw_utils diff --git a/physics/cires_ugwp_orolm97_v1.F90 b/physics/cires_ugwp_orolm97_v1.F90 deleted file mode 100644 index fd692a825..000000000 --- a/physics/cires_ugwp_orolm97_v1.F90 +++ /dev/null @@ -1,1008 +0,0 @@ -module cires_ugwp_orolm97_v1 - - -contains - - - - subroutine gwdps_oro_v1(im, km, imx, do_tofd, & - pdvdt, pdudt, pdtdt, pkdis, u1,v1,t1,q1,kpbl, & - prsi,del,prsl,prslk, zmeti, zmet, dtp, kdt, hprime, & - oc, oa4, clx4, theta, sigmad, gammad, elvmaxd, & - grav, con_omega, rd, cpd, rv, pi, arad, fv, sgh30, & - dusfc, dvsfc, xlatd, sinlat, coslat, sparea, & - cdmbgwd, me, master, rdxzb, & - zmtb, zogw, tau_mtb, tau_ogw, tau_tofd, & - dudt_mtb, dudt_ogw, dudt_tms) -!---------------------------------------- -! ugwp_v1: gwdps_oro_v1 following recent updates of Lott & Miller 1997 -! eventually will be replaced with more "advanced"LLWB -! and multi-wave solver that produce competitive FV3GFS-skills -! -! computation of kref for ogw + coorde diagnostics -! all constants/parameters inside cires_ugwp_initialize.f90 -!---------------------------------------- - - use machine , only : kind_phys - use ugwp_common_v1, only : dw2min, velmin - - use ugwp_oro_init_v1, only : rimin, ric, efmin, efmax , & - hpmax, hpmin, sigfaci => sigfac , & - dpmin, minwnd, hminmt, hncrit , & - rlolev, gmax, veleps, factop , & - frc, ce, ceofrc, frmax, cg, & - fdir, mdir, nwdir, & - cdmb, cleff, fcrit_gfs, fcrit_mtb, & - n_tofd, ze_tofd, ztop_tofd - - use cires_ugwp_module_v1, only : kxw, max_kdis, max_axyz - - use cires_orowam2017, only : oro_wam_2017 - - use cires_vert_orodis_v1, only : ugwp_tofd1d - - -! use sso_coorde, only : pgwd, pgwd4 -!---------------------------------------- - implicit none - real(kind=kind_phys), parameter :: pgwd=1, pgwd4= pgwd - real(kind=kind_phys), parameter :: sigfac = 3, sigfacs = 0.5 - character(len=8) :: strsolver='pss-1986' ! current operational solver or 'wam-2017' - real(kind=kind_phys) :: gammin = 0.00999999 - real(kind=kind_phys), parameter :: nhilmax = 25. - real(kind=kind_phys), parameter :: sso_min = 3000. - logical, parameter :: do_adjoro = .false. -!---------------------------------------- - - integer, intent(in) :: im, km, imx, kdt - integer, intent(in) :: me, master - logical, intent(in) :: do_tofd - - - - integer, intent(in) :: kpbl(im) ! index for the pbl top layer! - real(kind=kind_phys), intent(in) :: dtp ! time step - real(kind=kind_phys), intent(in) :: cdmbgwd(2) - - real(kind=kind_phys), intent(in) :: hprime(im), oc(im), oa4(im,4), & - clx4(im,4), theta(im), sigmad(im), & - gammad(im), elvmaxd(im) - - real(kind=kind_phys), intent(in) :: grav, con_omega, rd, cpd, rv, & - pi, arad, fv - real(kind=kind_phys), intent(in) :: sgh30(im) - real(kind=kind_phys), intent(in), dimension(im,km) :: & - u1, v1, t1, q1,del, prsl, prslk, zmet - - real(kind=kind_phys), intent(in),dimension(im,km+1):: prsi, zmeti - real(kind=kind_phys), intent(in) :: xlatd(im),sinlat(im), coslat(im) - real(kind=kind_phys), intent(in) :: sparea(im) - -! -!output -phys-tend - real(kind=kind_phys),dimension(im,km),intent(out) :: & - pdvdt, pdudt, pkdis, pdtdt -! output - diag-coorde - real(kind=kind_phys),dimension(im,km),intent(out) :: & - dudt_mtb, dudt_ogw, dudt_tms -! - real(kind=kind_phys),dimension(im) :: rdxzb, zmtb, zogw , & - tau_ogw, tau_mtb, tau_tofd, dusfc, dvsfc - -! -!--------------------------------------------------------------------- -! # of permissible sub-grid orography hills for "any" resolution < 25 -! correction for "elliptical" hills based on shilmin-area =sgrid/25 -! 4.*gamma*b_ell*b_ell >= shilmin -! give us limits on [b_ell & gamma *b_ell] > 5 km =sso_min -! gamma_min = 1/4*shilmin/sso_min/sso_min -!23.01.2019: cdmb = 4.*192/768_c192=1 x 0.5 -! 192: cdmbgwd = 0.5, 2.5 -! cleff = 2.5*0.5e-5 * sqrt(192./768.) => lh_eff = 1004. km -! 6*dx = 240 km 8*dx = 320. ~ 3-5 more effective OGW-lin -!--------------------------------------------------------------------- -! -! locals SSO -! - real(kind=kind_phys) :: vsigma(im), vgamma(im) - - real(kind=kind_phys) :: ztoph,zlowh,ph_blk, dz_blk - real(kind=kind_phys) :: shilmin, sgrmax, sgrmin - real(kind=kind_phys) :: belpmin, dsmin, dsmax -! real(kind=kind_phys) :: arhills(im) ! not used why do we need? - real(kind=kind_phys) :: xlingfs - -! -! locals mean flow ...etc -! - real(kind=kind_phys), dimension(im,km) :: ri_n, bnv2, ro - real(kind=kind_phys), dimension(im,km) :: vtk, vtj, velco -!mtb - real(kind=kind_phys), dimension(im) :: oa, clx , sigma, gamma, & - elvmax, wk - real(kind=kind_phys), dimension(im) :: pe, ek, up - - real(kind=kind_phys), dimension(im,km) :: db, ang, uds - - real(kind=kind_phys) :: zlen, dbtmp, r, phiang, dbim, zr - real(kind=kind_phys) :: eng0, eng1, cosang2, sinang2 - real(kind=kind_phys) :: bgam, cgam, gam2, rnom, rdem -! -! tofd -! some constants now in "use ugwp_oro_init" + "use ugwp_common" -! -!================== - real(kind=kind_phys) :: unew, vnew, zpbl, sigflt, zsurf - real(kind=kind_phys), dimension(km) :: utofd1, vtofd1 - real(kind=kind_phys), dimension(km) :: epstofd1, krf_tofd1 - real(kind=kind_phys), dimension(km) :: up1, vp1, zpm - - real(kind=kind_phys),dimension(im, km) :: axtms, aytms -! -! ogw -! - logical icrilv(im) -! - real(kind=kind_phys), dimension(im) :: xn, yn, ubar, vbar, ulow, & - roll, bnv2bar, scor, dtfac, xlinv, delks, delks1 -! - real(kind=kind_phys) :: taup(im,km+1), taud(im,km) - real(kind=kind_phys) :: taub(im), taulin(im), heff, hsat, hdis - - integer, dimension(im) :: kref, idxzb, ipt, kreflm, iwklm, iwk, izlow - -! -!check what we need -! - real(kind=kind_phys) :: bnv, fr, ri_gw, brvf - real(kind=kind_phys) :: tem, tem1, tem2, temc, temv - real(kind=kind_phys) :: ti, rdz, dw2, shr2, bvf2 - real(kind=kind_phys) :: rdelks, efact, coefm, gfobnv - real(kind=kind_phys) :: scork, rscor, hd, fro, sira - real(kind=kind_phys) :: dtaux, dtauy, zmetp, zmetk - - real(kind=kind_phys) :: grav2, rcpdt, windik, wdir - real(kind=kind_phys) :: sigmin, dxres,sigres,hdxres, cdmb4, mtbridge - - real(kind=kind_phys) :: kxridge, inv_b2eff, zw1, zw2 - real(kind=kind_phys) :: belps, aelps, nhills, selps - - real(kind=kind_phys) :: rgrav, rcpd, rcpd2, rad_to_deg, deg_to_rad - real(kind=kind_phys) :: pi2, rdi, gor, grcp, gocp, gr2, bnv2min - -! -! various integers -! - integer :: kmm1, kmm2, lcap, lcapp1 - integer :: npt, kbps, kbpsp1,kbpsm1 - integer :: kmps, idir, nwd, klcap, kp1, kmpbl, kmll - integer :: k_mtb, k_zlow, ktrial, klevm1 - integer :: i, j, k -! -! initialize gamma and sigma - gamma(:) = gammad(:) - sigma(:) = sigmad(:) -! - rcpdt = 1.0 / (cpd*dtp) - grav2 = grav + grav -! - rgrav = 1.0/grav - rcpd = 1.0/cpd - rcpd2 = 0.5/cpd - rad_to_deg=180.0/pi - deg_to_rad=pi/180.0 - pi2 = 2.*pi - rdi = 1.0/rd - gor = grav/rd - grcp = grav*rcpd - gocp = grcp - gr2 = grav*gor - bnv2min = (pi2/1800.)*(pi2/1800.) -! -! mtb-blocking sigma_min and dxres => cires_initialize -! - sgrmax = maxval(sparea) ; sgrmin = minval(sparea) - dsmax = sqrt(sgrmax) ; dsmin = sqrt(sgrmin) - - dxres = pi2*arad/float(imx) - hdxres = 0.5*dxres -! shilmin = sgrmin/nhilmax ! not used - moorthi - -! gammin = min(sso_min/dsmax, 1.) ! moorthi - with this results are not reproducible - gammin = min(sso_min/dxres, 1.) ! moorthi - -! sigmin = 2.*hpmin/dsmax !dxres ! moorthi - this will not reproduce - sigmin = 2.*hpmin/dxres !dxres - -! if (kdt == 1) then -! print *, sgrmax, sgrmin , ' min-max sparea ' -! print *, 'sigmin-hpmin-dsmax', sigmin, hpmin, dsmax -! print *, 'dxres/dsmax ', dxres, dsmax -! print *, ' shilmin gammin ', shilmin, gammin -! endif - - kxridge = float(imx)/arad * cdmbgwd(2) - - if (me == master .and. kdt == 1) then - print *, ' gwdps_v0 kxridge ', kxridge - print *, ' gwdps_v0 scale2 ', cdmbgwd(2) - print *, ' gwdps_v0 imx ', imx - print *, ' gwdps_v0 gam_min ', gammin - print *, ' gwdps_v0 sso_min ', sso_min - endif - - do i=1,im - idxzb(i) = 0 - zmtb(i) = 0.0 - zogw(i) = 0.0 - rdxzb(i) = 0.0 - tau_ogw(i) = 0.0 - tau_mtb(i) = 0.0 - dusfc(i) = 0.0 - dvsfc(i) = 0.0 - tau_tofd(i) = 0.0 -! - ipt(i) = 0 -! - enddo - - do k=1,km - do i=1,im - pdvdt(i,k) = 0.0 - pdudt(i,k) = 0.0 - pdtdt(i,k) = 0.0 - pkdis(i,k) = 0.0 - dudt_mtb(i,k) = 0.0 - dudt_ogw(i,k) = 0.0 - dudt_tms(i,k) = 0.0 - enddo - enddo - -! ---- for lm and gwd calculation points -!cires_ugwp_initialize.F90: real, parameter :: hpmax=2400.0, hpmin=25.0 -!cires_ugwp_initialize.F90: real, parameter :: hminmt=50. ! min mtn height (*j*) -!---- for lm and gwd calculation points - - - npt = 0 - - do i = 1,im - if ( elvmaxd(i) >= hminmt .and. hprime(i) >= hpmin ) then - npt = npt + 1 - ipt(npt) = i - endif - enddo - - if (npt == 0) then -! print *, 'oro-npt = 0 elvmax ', maxval(elvmaxd), hminmt -! print *, 'oro-npt = 0 hprime ', maxval(hprime), hpmin - return ! no gwd/mb calculation done - endif -!======================================================== - -! - if (do_adjoro ) then - - do i = 1,im -! arhills(i) = 1.0 -! - sigres = max(sigmin, sigma(i)) -! if (sigma(i) < sigmin) sigma(i)= sigmin - dxres = sqrt(sparea(i)) - if (2.*hprime(i)/sigres > dxres) sigres=2.*hprime(i)/dxres - aelps = min(2.*hprime(i)/sigres, 0.5*dxres) - if (gamma(i) > 0.0 ) belps = min(aelps/gamma(i),.5*dxres) -! -! small-scale "turbulent" oro-scales < sso_min -! - if( aelps < sso_min ) then - -! a, b > sso_min upscale ellipse a/b > 0.1 a>sso_min & h/b=>new_sigm -! - aelps = sso_min - if (belps < sso_min ) then - gamma(i) = 1.0 - belps = aelps*gamma(i) - else - gamma(i) = min(aelps/belps, 1.0) - endif - - sigma(i) = 2.*hprime(i)/aelps - gamma(i) = min(aelps/belps, 1.0) - - endif - - selps = belps*belps*gamma(i)*4. ! ellipse area of the el-c hill - nhills = min(nhilmax, sparea(i)/selps) -! arhills(i) = max(nhills, 1.0) - -!333 format( ' nhil: ', i6, 4(2x, f9.3), 2(2x, e9.3)) -! if (kdt==1 ) -! & write(6,333) nint(nhills)+1,xlatd(i), hprime(i),aelps*1.e-3, -! & belps*1.e-3, sigma(i),gamma(i) - - - enddo - endif !(do_adjoro ) - - - - do i=1,npt - iwklm(i) = 2 - idxzb(i) = 0 - kreflm(i) = 0 - enddo - - do k=1,km - do i=1,im - db(i,k) = 0.0 - ang(i,k) = 0.0 - uds(i,k) = 0.0 - enddo - enddo - - kmm1 = km - 1 ; kmm2 = km - 2 ; kmll = kmm1 - lcap = km ; lcapp1 = lcap + 1 - - cdmb4 = 0.25*cdmb - - do i = 1, npt - j = ipt(i) - elvmax(j) = min (elvmaxd(j)*0. + sigfac * hprime(j), hncrit) - izlow(i) = 1 ! surface-level - enddo -! - do k = 1, kmm1 - do i = 1, npt - j = ipt(i) - ztoph = sigfac * hprime(j) - zlowh = sigfacs* hprime(j) - zmetp = zmet(j,k+1) - zmetk = zmet(j,k) -! if (( elvmax(j) <= zmetp) .and. (elvmax(j).ge.zmetk) ) -! & iwklm(i) = max(iwklm(i), k+1 ) - if (( ztoph <= zmetp) .and. (ztoph >= zmetk) ) iwklm(i) = max(iwklm(i), k+1 ) - if (zlowh <= zmetp .and. zlowh >= zmetk) izlow(i) = max(izlow(i),k) - - enddo - enddo -! - do k = 1,km - do i =1,npt - j = ipt(i) - vtj(i,k) = t1(j,k) * (1.+fv*q1(j,k)) - vtk(i,k) = vtj(i,k) / prslk(j,k) - ro(i,k) = rdi * prsl(j,k) / vtj(i,k) ! density mid-levels - taup(i,k) = 0.0 - enddo - enddo -! -! check ri_n or ri_mf computation -! - do k = 1,kmm1 - do i =1,npt - j = ipt(i) - rdz = 1. / (zmet(j,k+1) - zmet(j,k)) - tem1 = u1(j,k) - u1(j,k+1) - tem2 = v1(j,k) - v1(j,k+1) - dw2 = tem1*tem1 + tem2*tem2 - shr2 = max(dw2,dw2min) * rdz * rdz -! ti = 2.0 / (t1(j,k)+t1(j,k+1)) -! bvf2 = grav*(gocp+rdz*(vtj(i,k+1)-vtj(i,k)))* ti -! ri_n(i,k) = max(bvf2/shr2,rimin) ! richardson number -! - bvf2 = grav2 * rdz * (vtk(i,k+1)-vtk(i,k))/ (vtk(i,k+1)+vtk(i,k)) - - bnv2(i,k+1) = max( bvf2, bnv2min ) - ri_n(i,k+1) = bnv2(i,k)/shr2 ! richardson number consistent with bnv2 -! -! add here computation for ktur and ogw-dissipation fro ve-gfs -! - enddo - enddo - k = 1 - do i = 1, npt - bnv2(i,k) = bnv2(i,k+1) - enddo -! -! level iwklm => zmet(j,k) < sigfac * hprime(j) < zmet(j,k+1) -! - do i = 1, npt - j = ipt(i) - k_zlow = izlow(i) - if (k_zlow == iwklm(i)) k_zlow = 1 - delks(i) = 1.0 / (prsi(j,k_zlow) - prsi(j,iwklm(i))) -! delks1(i) = 1.0 /(prsl(j,k_zlow) - prsl(j,iwklm(i))) - ubar (i) = 0.0 - vbar (i) = 0.0 - roll (i) = 0.0 - pe (i) = 0.0 - ek (i) = 0.0 - bnv2bar(i) = 0.0 - enddo -! - do i = 1, npt - k_zlow = izlow(i) - if (k_zlow == iwklm(i)) k_zlow = 1 - do k = k_zlow, iwklm(i)-1 ! kreflm(i)= iwklm(i)-1 - j = ipt(i) ! laye-aver rho, u, v - rdelks = del(j,k) * delks(i) - ubar(i) = ubar(i) + rdelks * u1(j,k) ! trial mean u below - vbar(i) = vbar(i) + rdelks * v1(j,k) ! trial mean v below - roll(i) = roll(i) + rdelks * ro(i,k) ! trial mean ro below -! - bnv2bar(i) = bnv2bar(i) + .5*(bnv2(i,k)+bnv2(i,k+1))* rdelks - enddo - enddo -! - do i = 1, npt - j = ipt(i) -! -! integrate from ztoph = sigfac*hprime down to zblk if exists -! find ph_blk, dz_blk like in LM-97 and ifs -! - ph_blk =0. - do k = iwklm(i), 1, -1 - phiang = atan2(v1(j,k),u1(j,k))*rad_to_deg - ang(i,k) = ( theta(j) - phiang ) - if ( ang(i,k) > 90. ) ang(i,k) = ang(i,k) - 180. - if ( ang(i,k) < -90. ) ang(i,k) = ang(i,k) + 180. - ang(i,k) = ang(i,k) * deg_to_rad - uds(i,k) = max(sqrt(u1(j,k)*u1(j,k) + v1(j,k)*v1(j,k)), velmin) -! - if (idxzb(i) == 0 ) then - dz_blk = zmeti(j,k+1) - zmeti(j,k) - pe(i) = pe(i) + bnv2(i,k) *( elvmax(j) - zmet(j,k) ) * dz_blk - - up(i) = max(uds(i,k) * cos(ang(i,k)), velmin) - ek(i) = 0.5 * up(i) * up(i) - - ph_blk = ph_blk + dz_blk*sqrt(bnv2(i,k))/up(i) - -! --- dividing stream lime is found when pe =exceeds ek. oper-l gfs -! if ( pe(i) >= ek(i) ) then - if ( ph_blk >= fcrit_gfs ) then - idxzb(i) = k - zmtb (j) = zmet(j, k) - rdxzb(j) = real(k, kind=kind_phys) - endif - - endif - enddo -! -! alternative expression: zmtb = max(heff*(1. -fcrit_gfs/fr), 0) -! fcrit_gfs/fr -! - goto 788 - - bnv = sqrt( bnv2bar(i) ) - heff = 2.*min(hprime(j),hpmax) - zw2 = ubar(i)*ubar(i)+vbar(i)*vbar(i) - ulow(i) = sqrt(max(zw2,dw2min)) - fr = heff*bnv/ulow(i) - zw1 = max(heff*(1. -fcrit_gfs/fr), 0.0) - zw2 = zmet(j,2) - if (fr > fcrit_gfs .and. zw1 > zw2 ) then - do k=2, kmm1 - zmetp = zmet(j,k+1) - zmetk = zmet(j,k) - if (zw1 <= zmetp .and. zw1 >= zmetk) exit - enddo - idxzb(i) = k - zmtb (j) = zmet(j, k) - else - zmtb (j) = 0. - idxzb(i) = 0 - endif - -788 continue -! -! --- the drag for mtn blocked flow -! - if ( idxzb(i) > 0 ) then - -! (4.16)-ifs - gam2 = gamma(j)*gamma(j) - bgam = 1.0 - 0.18*gamma(j) - 0.04*gam2 - cgam = 0.48*gamma(j) + 0.30*gam2 - - do k = idxzb(i)-1, 1, -1 - zlen = sqrt( (zmtb(j)-zmet(j,k) )/(zmet(j,k ) + hprime(j)) ) - tem = cos(ang(i,k)) - cosang2 = tem * tem - sinang2 = 1.0 - cosang2 -! -! cos =1 sin =0 => 1/r= gam zr = 2.-gam -! cos =0 sin =1 => 1/r= 1/gam zr = 2.- 1/gam -! - rdem = cosang2 + gam2 * sinang2 - rnom = cosang2*gam2 + sinang2 -! -! metoffice dec 2010 -! correction of h. wells & a. zadra for the -! aspect ratio of the hill seen by mean flow -! (1/r , r-inverse below: 2-r) - - rdem = max(rdem, 1.e-6) - r = sqrt(rnom/rdem) - zr = max( 2. - r, 0. ) - - sigres = max(sigmin, sigma(j)) - if (hprime(j)/sigres > dxres) sigres = hprime(j)/dxres - mtbridge = zr * sigres*zlen / hprime(j) -! (4.15)-ifs -! dbtmp = cdmb4 * mtbridge * & -! & max(cos(ang(i,k)), gamma(j)*sin(ang(i,k))) -! (4.16)-ifs - dbtmp = cdmb4*mtbridge*(bgam* cosang2 +cgam* sinang2) - db(i,k)= dbtmp * uds(i,k) - enddo -! - endif - enddo -!............................. -!............................. -! end mtn blocking section -!............................. -!............................. -! -!--- orographic gravity wave drag section -! -! scale cleff between im=384*2 and 192*2 for t126/t170 and t62 -! inside "cires_ugwp_initialize.f90" now -! - kmpbl = km / 2 - iwk(1:npt) = 2 -! -! meto/UK-scheme: -! k_mtb = max(k_zmtb, k_n*hprime/2] to reduce diurnal variations taub_ogw -! - do k=3,kmpbl - do i=1,npt - j = ipt(i) - tem = (prsi(j,1) - prsi(j,k)) - if (tem < dpmin) iwk(i) = k ! dpmin=50 mb - -!=============================================================== -! lev=111 t=311.749 hkm=0.430522 ps-p(iwk)=52.8958 -! below "hprime" - source of ogws and below zblk !!! -! 27 2 kpbl ~ 1-2 km < hprime -!=============================================================== - enddo - enddo -! -! iwk - adhoc gfs-parameter to select ogw-launch level between -! level ~0.4-0.5 km from surface or/and pbl-top -! in ugwp-v1: options to modify as htop ~ (2-3)*hprime > zmtb -! in ugwp-v0 we ensured that : zogw > zmtb -! - - kbps = 1 - kmps = km - k_mtb = 1 - do i=1,npt - j = ipt(i) - k_mtb = max(1, idxzb(i)) - - kref(i) = max(iwk(i), kpbl(j)+1 ) ! reference level pbl or smt-else ???? - kref(i) = max(kref(i), iwklm(i) ) ! iwklm => sigfac*hprime - - if (kref(i) <= k_mtb) kref(i) = k_mtb + 1 ! layer above zmtb - kbps = max(kbps, kref(i)) - kmps = min(kmps, kref(i)) -! - delks(i) = 1.0 / (prsi(j,k_mtb) - prsi(j,kref(i))) - ubar (i) = 0.0 - vbar (i) = 0.0 - roll (i) = 0.0 - bnv2bar(i)= 0.0 - enddo -! - kbpsp1 = kbps + 1 - kbpsm1 = kbps - 1 - k_mtb = 1 -! - do i = 1,npt - k_mtb = max(1, idxzb(i)) - do k = k_mtb,kbps !kbps = max(kref) ;kmps= min(kref) - if (k < kref(i)) then - j = ipt(i) - rdelks = del(j,k) * delks(i) - ubar(i) = ubar(i) + rdelks * u1(j,k) ! mean u below kref - vbar(i) = vbar(i) + rdelks * v1(j,k) ! mean v below kref - roll(i) = roll(i) + rdelks * ro(i,k) ! mean ro below kref - bnv2bar(i) = bnv2bar(i) + .5*(bnv2(i,k)+bnv2(i,k+1))* rdelks - endif - enddo - enddo -! -! orographic asymmetry parameter (oa), and (clx) - do i = 1,npt - j = ipt(i) - wdir = atan2(ubar(i),vbar(i)) + pi - idir = mod(nint(fdir*wdir),mdir) + 1 - nwd = nwdir(idir) - oa(i) = (1-2*int( (nwd-1)/4 )) * oa4(j,mod(nwd-1,4)+1) - clx(i) = clx4(j,mod(nwd-1,4)+1) - enddo -! - do i = 1,npt - dtfac(i) = 1.0 - icrilv(i) = .false. ! initialize critical level control vector - ulow(i) = max(sqrt(ubar(i)*ubar(i)+vbar(i)*vbar(i)),velmin) - xn(i) = ubar(i) / ulow(i) - yn(i) = vbar(i) / ulow(i) - enddo -! - do k = 1, kmm1 - do i = 1,npt - j = ipt(i) - velco(i,k) = 0.5 * ((u1(j,k)+u1(j,k+1))*xn(i)+ (v1(j,k)+v1(j,k+1))*yn(i)) - - enddo - enddo -! -!------------------ -! v0: incorporates latest modifications for kxridge and heff/hsat -! and taulin for fr <=fcrit_gfs -! and concept of "clipped" hill if zmtb > 0. to make -! the integrated "tau_sso = tau_ogw +tau_mtb" close to reanalysis data -! it is still used the "single-orowave"-approach along ulow-upwind -! -! in contrast to the 2-orthogonal wave (2otw) schemes of ifs/meto/e-canada -! 2otw scheme requires "aver angle" and wind projections on 2 axes of ellipse a-b -! with 2-stresses: taub_a & taub_b as of Phillips (1984) -!------------------ - taub(:) = 0. ; taulin(:)= 0. - do i = 1,npt - j = ipt(i) - bnv = sqrt( bnv2bar(i) ) - heff = min(hprime(j),hpmax) - - if( zmtb(j) > 0.) heff = max(sigfac*heff-zmtb(j), 0.)/sigfac - if (heff <= 0) cycle - - hsat = fcrit_gfs*ulow(i)/bnv - heff = min(heff, hsat) - - fr = min(bnv * heff /ulow(i), frmax) -! - efact = (oa(i) + 2.) ** (ceofrc*fr) - efact = min( max(efact,efmin), efmax ) -! - coefm = (1. + clx(i)) ** (oa(i)+1.) -! - xlinv(i) = coefm * cleff ! effective kxw for lin-wave - xlingfs = coefm * cleff -! - tem = fr * fr * oc(j) - gfobnv = gmax * tem / ((tem + cg)*bnv) -! -!new specification of xlinv(i) & taulin(i) - - sigres = max(sigmin, sigma(j)) - if (heff/sigres > hdxres) sigres = heff/hdxres - inv_b2eff = 0.5*sigres/heff - kxridge = 1.0 / sqrt(sparea(j)) - xlinv(i) = xlingfs !or max(kxridge, inv_b2eff) ! 6.28/lx ..0.5*sigma(j)/heff = 1./lridge - taulin(i) = 0.5*roll(i)*xlinv(i)*bnv*ulow(i)*heff*heff*pgwd4 - - if ( fr > fcrit_gfs ) then - taub(i) = xlinv(i) * roll(i) * ulow(i) * ulow(i) & - * ulow(i) * gfobnv * efact ! nonlinear flux tau0...xlinv(i) -! - else -! taub(i) = taulin(i) ! linear flux for fr <= fcrit_gfs - taub(i) = xlinv(i) * roll(i) * ulow(i) * ulow(i) & - * ulow(i) * gfobnv * efact -! - endif -! -! - k = max(1, kref(i)-1) - tem = max(velco(i,k)*velco(i,k), dw2min) - scor(i) = bnv2(i,k) / tem ! scorer parameter below kref level -! -! diagnostics for zogw > zmtb -! - zogw(j) = zmeti(j, kref(i) ) - enddo -! -!----set up bottom values of stress -! - do k = 1, kbps - do i = 1,npt - if (k <= kref(i)) taup(i,k) = taub(i) - enddo - enddo - - if (strsolver == 'pss-1986') then - -!====================================================== -! v0-gfs orogw-solver of palmer et al 1986 -"pss-1986" -! in v1-orogw linsatdis of "wam-2017" -! with llwb-mechanism for -! rotational/non-hydrostat ogws important for -! highres-fv3gfs with dx < 10 km -!====================================================== - - do k = kmps, kmm1 ! vertical level loop from min(kref) - kp1 = k + 1 - do i = 1, npt -! - if (k >= kref(i)) then - icrilv(i) = icrilv(i) .or. ( ri_n(i,k) < ric).or. (velco(i,k) <= 0. ) - endif - enddo -! - do i = 1,npt - if (k >= kref(i)) then - if (.not.icrilv(i) .and. taup(i,k) > 0.0 ) then - temv = 1.0 / max(velco(i,k), velmin) -! - if (oa(i) > 0. .and. kp1 < kref(i)) then -! - scork = bnv2(i,k) * temv * temv - rscor = min(1.0, scork / scor(i)) - scor(i) = scork - else - rscor = 1. - endif -! - brvf = sqrt(bnv2(i,k)) ! brent-vaisala frequency interface -! tem1 = xlinv(i)*(ro(i,kp1)+ro(i,k))*brvf*velco(i,k)*0.5 - - tem1 = xlinv(i)*(ro(i,kp1)+ro(i,k))*brvf*0.5 & - * max(velco(i,k), velmin) - hd = sqrt(taup(i,k) / tem1) - fro = brvf * hd * temv -! -! rim is the "wave"-richardson number by palmer,shutts, swinbank 1986 -! - - tem2 = sqrt(ri_n(i,k)) - tem = 1. + tem2 * fro - ri_gw = ri_n(i,k) * (1.0-fro) / (tem * tem) -! -! check stability to employ the 'dynamical saturation hypothesis' -! of palmer,shutts, swinbank 1986 -! - if (ri_gw <= ric .and.(oa(i) <= 0. .or. kp1 >= kref(i) )) then - temc = 2.0 + 1.0 / tem2 - hd = velco(i,k) * (2.*sqrt(temc)-temc) / brvf - taup(i,kp1) = tem1 * hd * hd - else - taup(i,kp1) = taup(i,k) * rscor - endif -! - taup(i,kp1) = min(taup(i,kp1), taup(i,k)) - endif - endif - enddo - enddo -! -! zero momentum deposition at the top model layer -! - taup(1:npt,km+1) = taup(1:npt,km) -! -! calculate wave acc-n: - (grav)*d(tau)/d(p) = taud -! - do k = 1,km - do i = 1,npt - taud(i,k) = grav*(taup(i,k+1) - taup(i,k))/del(ipt(i),k) - enddo - enddo - -!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!------if the gravity wave drag would force a critical line in the -!------layers below sigma=rlolev during the next deltim timestep, -!------then only apply drag until that critical line is reached. -! empirical implementation of the llwb-mechanism: lower level wave breaking -! by limiting "ax = dtfac*ax" due to possible llwb around kref and 500 mb -! critical line [v - ax*dtp = 0.] is smt like "llwb" for stationary ogws -!2019: this option limits sensitivity of taux/tauy to increase/decrease of taub -!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - do k = 1,kmm1 - do i = 1,npt - if (k >= kref(i) .and. prsi(ipt(i),k) >= rlolev) then - - if(taud(i,k) /= 0.) then - tem = dtp * taud(i,k) ! tem = du/dt-oro*dt => U/dU vs 1 - dtfac(i) = min(dtfac(i),abs(velco(i,k)/tem)) ! reduce Ax= Ax*(1, or U/dU <=1) -! dtfac(i) = 1.0 - endif - endif - enddo - enddo -! -!--------------------------- orogw-solver of gfs pss-1986 -! - else -! -!-----------Unified orogw-solver of wam2017 -! -! sigres = max(sigmin, sigma(j)) -! if (heff/sigres.gt.dxres) sigres=heff/dxres -! inv_b2eff = 0.5*sigres/heff -! xlinv(i) = max(kxridge, inv_b2eff) ! 0.5*sigma(j)/heff = 1./lridge - - dtfac(:) = 1.0 - - call oro_wam_2017(im, km, npt, ipt, kref, kdt, me, master, & - dtp, dxres, taub, u1, v1, t1, xn, yn, bnv2, ro, prsi,prsl, & - grav, con_omega, rd, & - del, sigma, hprime, gamma, theta, sinlat, xlatd, taup, taud, pkdis) - - endif ! oro_wam_2017 - linsatdis-solver of wam-2017 -! -!---- above orogw-solver of wam2017 -! -! tofd as in beljaars-2004 -! -! --------------------------- - if( do_tofd ) then - axtms(:,:) = 0.0 ; aytms(:,:) = 0.0 - if ( kdt == 1 .and. me == 0) then - print *, 'vay do_tofd from surface to ', ztop_tofd - endif - do i = 1,npt - j = ipt(i) - zpbl = zmet( j, kpbl(j) ) - - sigflt = min(sgh30(j), 0.3*hprime(j)) ! cannot exceed 30% of ls-sso - - zsurf = zmeti(j,1) - do k=1,km - zpm(k) = zmet(j,k) - up1(k) = u1(j,k) - vp1(k) = v1(j,k) - enddo - - call ugwp_tofd1d(km, cpd, sigflt, elvmaxd(j), zsurf, zpbl, & - up1, vp1, zpm, utofd1, vtofd1, epstofd1, krf_tofd1) - - do k=1,km - axtms(j,k) = utofd1(k) - aytms(j,k) = vtofd1(k) -! -! add tofd to gw-tendencies -! - pdvdt(j,k) = pdvdt(j,k) + aytms(j,k) - pdudt(j,k) = pdudt(j,k) + axtms(j,k) - enddo -!2018-diag - tau_tofd(j) = sum( utofd1(1:km)* del(j,1:km)) - enddo - endif ! do_tofd - -!-------------------------------------------- -! combine oro-drag effects MB +TOFD + OGWs -!-------------------------------------------- -! + diag-3d - - dudt_tms = axtms - tau_ogw = 0. - tau_mtb = 0. - - do k = 1,km - do i = 1,npt - j = ipt(i) -! - eng0 = 0.5*(u1(j,k)*u1(j,k)+v1(j,k)*v1(j,k)) -! - if ( k < idxzb(i) .and. idxzb(i) /= 0 ) then -! -! if blocking layers -- no ogws -! - dbim = db(i,k) / (1.+db(i,k)*dtp) - pdvdt(j,k) = - dbim * v1(j,k) +pdvdt(j,k) - pdudt(j,k) = - dbim * u1(j,k) +pdudt(j,k) - eng1 = eng0*(1.0-dbim*dtp)*(1.-dbim*dtp) - - dusfc(j) = dusfc(j) - dbim * u1(j,k) * del(j,k) - dvsfc(j) = dvsfc(j) - dbim * v1(j,k) * del(j,k) -!2018-diag - dudt_mtb(j,k) = -dbim * u1(j,k) - tau_mtb(j) = tau_mtb(j) + dudt_mtb(j,k)* del(j,k) - - else -! -! ogw-s above blocking height -! - taud(i,k) = taud(i,k) * dtfac(i) - dtaux = taud(i,k) * xn(i) * pgwd - dtauy = taud(i,k) * yn(i) * pgwd - - pdvdt(j,k) = dtauy +pdvdt(j,k) - pdudt(j,k) = dtaux +pdudt(j,k) - - unew = u1(j,k) + dtaux*dtp ! pdudt(j,k)*dtp - vnew = v1(j,k) + dtauy*dtp ! pdvdt(j,k)*dtp - eng1 = 0.5*(unew*unew + vnew*vnew) -! - dusfc(j) = dusfc(j) + dtaux * del(j,k) - dvsfc(j) = dvsfc(j) + dtauy * del(j,k) -!2018-diag - dudt_ogw(j,k) = dtaux - tau_ogw(j) = tau_ogw(j) +dtaux*del(j,k) - endif -! -! local energy deposition sso-heat -! - pdtdt(j,k) = max(eng0-eng1,0.)*rcpdt - enddo - enddo -! dusfc w/o tofd sign as in the era-i, merra and cfsr - do i = 1,npt - j = ipt(i) - dusfc(j) = -rgrav * dusfc(j) - dvsfc(j) = -rgrav * dvsfc(j) - tau_mtb(j) = -rgrav * tau_mtb(j) - tau_ogw(j) = -rgrav * tau_ogw(j) - tau_tofd(j) = -rgrav * tau_tofd(j) - enddo - - return - - -!============ debug ------------------------------------------------ - if (kdt <= 2 .and. me == 0) then - print *, 'vgw-oro done gwdps_v0 in ugwp-v0 step-proc ', kdt, me -! - print *, maxval(pdudt)*86400., minval(pdudt)*86400, 'vgw_axoro' - print *, maxval(pdvdt)*86400., minval(pdvdt)*86400, 'vgw_ayoro' -! print *, maxval(kdis), minval(kdis), 'vgw_kdispro m2/sec' - print *, maxval(pdtdt)*86400., minval(pdtdt)*86400,'vgw_epsoro' - print *, maxval(zmtb), ' z_mtb ', maxval(tau_mtb), ' tau_mtb ' - print *, maxval(zogw), ' z_ogw ', maxval(tau_ogw), ' tau_ogw ' -! print *, maxval(tau_tofd), ' tau_tofd ' -! print *, maxval(axtms)*86400., minval(axtms)*86400, 'vgw_axtms' -! print *,maxval(dudt_mtb)*86400.,minval(dudt_mtb)*86400,'vgw_axmtb' - if (maxval(abs(pdudt))*86400. > 100.) then - - print *, maxval(u1), minval(u1), ' u1 gwdps-v0 ' - print *, maxval(v1), minval(v1), ' v1 gwdps-v0 ' - print *, maxval(t1), minval(t1), ' t1 gwdps-v0 ' - print *, maxval(q1), minval(q1), ' q1 gwdps-v0 ' - print *, maxval(del), minval(del), ' del gwdps-v0 ' - print *, maxval(zmet),minval(zmet), 'zmet' - print *, maxval(zmeti),minval(zmeti), 'zmeti' - print *, maxval(prsi), minval(prsi), ' prsi ' - print *, maxval(prsl), minval(prsl), ' prsl ' - print *, maxval(ro), minval(ro), ' ro-dens ' - print *, maxval(bnv2(1:npt,:)), minval(bnv2(1:npt,:)),' bnv2 ' - print *, maxval(kpbl), minval(kpbl), ' kpbl ' - print *, maxval(sgh30), maxval(hprime), maxval(elvmax),'oro-d' - print * - do i =1, npt - j= ipt(i) - print *,zogw(j)/hprime(j), zmtb(j)/hprime(j), & - zmet(j,1)*1.e-3, nint(hprime(j)/sigma(j)) -! -!.................................................................... -! -! zogw/hp=5.9 zblk/hp=10.7 zm=11.1m ridge/2=2,489m/9,000m -! from 5 to 20 km , we need to count for "ridges" > dx/4 ~ 15 km -! we must exclude blocking by small ridges -! vay-kref < iblk zogw-lev 15 block-level: 39 -! -! velmin => 1.0, 0.01, 0.1 etc.....unification of wind limiters -! max(sqrt(u1(j,k)*u1(j,k) + v1(j,k)*v1(j,k)), minwnd) -! max(dw2,dw2min) * rdz * rdz -! ulow(i) = max(sqrt(ubar(i)*ubar(i) + vbar(i)*vbar(i)), 1.0) -! tem = max(velco(i,k)*velco(i,k), 0.1) -! temv = 1.0 / max(velco(i,k), 0.01) -! & * max(velco(i,k),0.01) -!.................................................................... - enddo - print * - stop - endif - endif - -!cires_ugwp_solv2_v1.f90 - return - end subroutine gwdps_oro_v1 - - -end module cires_ugwp_orolm97_v1 diff --git a/physics/cires_ugwp_post.F90 b/physics/cires_ugwp_post.F90 index 68c90bc55..bc75f10f3 100644 --- a/physics/cires_ugwp_post.F90 +++ b/physics/cires_ugwp_post.F90 @@ -1,11 +1,11 @@ !> \file cires_ugwp_post.F90 !! This file contains + +!>\defgroup cires_ugwp_post_mod CIRES UGWP Scheme Post module cires_ugwp_post contains -!>\defgroup cires_ugwp_post CIRES UGWP Scheme Post -!! @{ subroutine cires_ugwp_post_init () end subroutine cires_ugwp_post_init @@ -71,5 +71,4 @@ end subroutine cires_ugwp_post_run subroutine cires_ugwp_post_finalize () end subroutine cires_ugwp_post_finalize -!! @} end module cires_ugwp_post diff --git a/physics/cires_ugwp_post.meta b/physics/cires_ugwp_post.meta index 80b8ce1ca..d72052d34 100644 --- a/physics/cires_ugwp_post.meta +++ b/physics/cires_ugwp_post.meta @@ -8,7 +8,7 @@ name = cires_ugwp_post_run type = scheme [ldiag_ugwp] - standard_name = diag_ugwp_flag + standard_name = flag_for_unified_gravity_wave_physics_diagnostics long_name = flag for CIRES UGWP Diagnostics units = flag dimensions = () @@ -16,7 +16,7 @@ intent = in optional = F [dtf] - standard_name = time_step_for_dynamics + standard_name = timestep_for_dynamics long_name = dynamics timestep units = s dimensions = () @@ -33,7 +33,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () @@ -41,28 +41,28 @@ intent = in optional = F [gw_dtdt] - standard_name = tendency_of_air_temperature_due_to_ugwp + standard_name = tendency_of_air_temperature_due_to_gravity_wave_drag long_name = air temperature tendency due to UGWP units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [gw_dudt] - standard_name = tendency_of_x_wind_due_to_ugwp + standard_name = tendency_of_x_wind_due_to_gravity_wave_drag long_name = zonal wind tendency due to UGWP units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [gw_dvdt] - standard_name = tendency_of_y_wind_due_to_ugwp + standard_name = tendency_of_y_wind_due_to_gravity_wave_drag long_name = meridional wind tendency due to UGWP units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -134,25 +134,25 @@ standard_name = instantaneous_change_in_x_wind_due_to_mountain_blocking_drag long_name = instantaneous change in x wind due to mountain blocking drag units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [dudt_ogw] - standard_name = instantaneous_change_in_x_wind_due_to_orographic_gravity_wave_drag + standard_name = tendency_of_x_wind_due_to_mesoscale_orographic_gravity_wave_drag long_name = instantaneous change in x wind due to orographic gw drag units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [dudt_tms] - standard_name = instantaneous_change_in_x_wind_due_to_turbulent_orographic_form_drag + standard_name = tendency_of_x_wind_due_to_turbulent_orographic_form_drag long_name = instantaneous change in x wind due to TOFD units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -224,7 +224,7 @@ standard_name = time_integral_of_change_in_x_wind_due_to_mountain_blocking_drag long_name = time integral of change in x wind due to mountain blocking drag units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -233,7 +233,7 @@ standard_name = time_integral_of_change_in_x_wind_due_to_orographic_gravity_wave_drag long_name = time integral of change in x wind due to orographic gw drag units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -242,7 +242,7 @@ standard_name = time_integral_of_change_in_x_wind_due_to_turbulent_orographic_form_drag long_name = time integral of change in x wind due to TOFD units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -251,7 +251,7 @@ standard_name = time_integral_of_change_in_x_wind_due_to_nonstationary_gravity_wave long_name = time integral of change in x wind due to NGW units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -260,34 +260,34 @@ standard_name = time_integral_of_change_in_y_wind_due_to_nonstationary_gravity_wave long_name = time integral of change in y wind due to NGW units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [dtdt] - standard_name = tendency_of_air_temperature_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_air_temperature long_name = air temperature tendency due to model physics units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [dudt] - standard_name = tendency_of_x_wind_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_x_wind long_name = zonal wind tendency due to model physics units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [dvdt] - standard_name = tendency_of_y_wind_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_y_wind long_name = meridional wind tendency due to model physics units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/cires_ugwp_solv2_v1_mod.F90 b/physics/cires_ugwp_solv2_v1_mod.F90 deleted file mode 100644 index 46a5fb833..000000000 --- a/physics/cires_ugwp_solv2_v1_mod.F90 +++ /dev/null @@ -1,829 +0,0 @@ -module cires_ugwp_solv2_v1_mod - - -contains - - -!--------------------------------------------------- -! Broad spectrum FVS-1993, mkz^nSlope with nSlope = 0, 1,2 -! dissipative solver with NonHyd/ROT-effects -! reflected GWs treated as waves with "negligible" flux, -! they are out of given column -!--------------------------------------------------- - subroutine cires_ugwp_solv2_v1(im, levs, dtp , & - tm , um, vm, qm, prsl, prsi, zmet, zmeti, & - prslk, xlatd, sinlat, coslat, & - grav, cpd, rd, rv, omega, pi, fv, & - pdudt, pdvdt, pdtdt, dked, tauabs, wrms, trms, & - tau_ngw, mpi_id, master, kdt) -! -!-------------------------------------------------------------------------------- -! nov 2015 alternative gw-solver for nggps-wam -! nov 2017 nh/rotational gw-modes for nh-fv3gfs -! oct 2019 adding empirical satellite-based -! source function and *F90 CIRES-style of the code -! -------------------------------------------------------------------------------- -! - - use machine, only : kind_phys - - use cires_ugwp_module_v1,only : krad, kvg, kion, ktg - - use cires_ugwp_module_v1,only : knob_ugwp_doheat, knob_ugwp_dokdis, idebug_gwrms - - use ugwp_common_v1 , only : dw2min, velmin, hpscale, rhp, rh4 -! - use ugwp_wmsdis_init_v1, only : v_kxw, rv_kxw, v_kxw2, tamp_mpa, tau_min, ucrit, & - maxdudt, gw_eff, dked_min, dked_max, maxdtdt, & - nslope, ilaunch, zms, & - zci, zdci, zci4, zci3, zci2, & - zaz_fct, zcosang, zsinang, nwav, nazd, & - zcimin, zcimax, rimin, sc2, sc2u, ric -! - implicit none -!23456 - - integer, intent(in) :: levs ! vertical level - integer, intent(in) :: im ! horiz tiles - - real ,intent(in) :: dtp ! model time step - real ,intent(in) :: vm(im,levs) ! meridional wind - real ,intent(in) :: um(im,levs) ! zonal wind - real ,intent(in) :: qm(im,levs) ! spec. humidity - real ,intent(in) :: tm(im,levs) ! kinetic temperature - - real ,intent(in) :: prsl(im,levs) ! mid-layer pressure - real ,intent(in) :: prslk(im,levs) ! mid-layer exner function - real ,intent(in) :: zmet(im,levs) ! meters now !!!!! phil =philg/grav - real ,intent(in) :: prsi(im,levs+1) ! interface pressure - real ,intent(in) :: zmeti(im,levs+1) ! interface geopi/meters - real ,intent(in) :: xlatd(im) ! lat was in radians, now with xlat_d in degrees - real ,intent(in) :: sinlat(im) - real ,intent(in) :: coslat(im) - real ,intent(in) :: tau_ngw(im) - - integer, intent(in):: mpi_id, master, kdt - - real ,intent(in) :: grav, cpd, rd, rv, omega, pi, fv -! -! -! out-gw effects -! - real ,intent(out) :: pdudt(im,levs) ! zonal momentum tendency - real ,intent(out) :: pdvdt(im,levs) ! meridional momentum tendency - real ,intent(out) :: pdtdt(im,levs) ! gw-heating (u*ax+v*ay)/cp - real ,intent(out) :: dked(im,levs) ! gw-eddy diffusion -! -! GW diagnostics => next move it to "module_gw_diag" -! - real ,intent(out) :: tauabs(im,levs) ! - real ,intent(out) :: wrms(im,levs) ! - real ,intent(out) :: trms(im,levs) ! - - real :: zwrms(nwav,nazd), wrk1(levs), wrk2(levs) - real :: atrms(nazd, levs),awrms(nazd, levs), akzw(nwav,nazd, levs+1) -! -! local =========================================================================================== - real :: taux(levs+1) ! EW component of vertical momentum flux (pa) - real :: tauy(levs+1) ! NS component of vertical momentum flux (pa) - real :: fpu(nazd, levs+1) ! az-momentum flux - real :: ui(nazd, levs+1) ! azimuthal wind - - real :: fden_bn(levs+1) ! density/brent - real :: flux_z(nwav,levs+1) - real :: flux(nwav, nazd) -! -! =============================================================================================== -! ilaunch:levs ....... MOORTHI's improvements -! all computations of GW-effects include interface layers from ilaunch+1 to levs +1 -! at k=levs+1, extrapolation of MF-state has been made, "ideally" all spectral modes should -! be absorbed; 2-options for this "ideal" requirement -! a) properly truncate GW-spectra ; b) dissipate all GW-energy in the top layers ( GW-sponge) -!===================================================================================================== -! - real :: bn(levs+1) ! interface BV-frequency - real :: bn2(levs+1) ! interface BV*BV-frequency - real :: rhoint(levs+1) ! interface density - real :: uint(levs+1) ! interface zonal wind - real :: vint(levs+1) ! meridional wind - - real :: irhodz_mid(levs), dzdt(levs+1), bnk(levs+1), rhobnk(levs+1) - - real :: v_zmet(levs+1) - real :: vueff(levs+1) - real :: dfdz_v(nazd, levs) ! axj = -df*rho/dz directional momentum deposition - - - real :: suprf(levs+1) ! RF-super linear dissipation - - real, dimension(levs) :: atm , aum, avm, aqm, aprsl, azmet - real, dimension(levs+1) :: aprsi, azmeti - - real :: wrk3(levs) - real, dimension(levs) :: uold, vold, told, unew, vnew, tnew - real, dimension(levs) :: dktur, rho, rhomid, adif, cdif - - real :: rdci(nwav), rci(nwav) - real :: wave_act(nwav, nazd) ! active waves at given vert-level - real :: ul(nazd) ! velocity in azimuthal direction at launch level - real :: bvi, bvi2, bvi3, bvi4, rcms ! BV at launch level - real :: c2f2, cf1 - - - real :: flux_norm ! norm-factor - real :: taub_src, rho_src -! -! scalars -! - real :: zthm, dtau, cgz, ucrit_maxdc - real :: vm_zflx_mode, vc_zflx_mode - real :: kzw2, kzw3, kdsat, cdf2, cdf1, wdop2,v_cdp2 - real :: ucrit_max - real :: pwrms, ptrms - real :: zu, zcin, zcin2, zcin3, zcin4, zcinc - real :: zatmp, fluxs, zdep, ze1, ze2 -! - real :: rcpdl, grav2cpd, rcpd, rcpd2, pi2, rad_to_deg - real :: deg_to_rad, rdi, gor, grcp, gocp, bnv2min, bnv2max, gr2 - real :: grav2, rgrav, rgrav2, mkzmin, mkz2min -! - real :: zdelp, zdelm, taud_min - real :: tvc, tvm, ptc, ptm - real :: umfp, umfm, umfc, ucrit3 - real :: fmode, expdis, fdis - real :: v_kzi, v_kzw, v_cdp, v_wdp, tx1, fcorsat, dzcrit - real :: v_wdi, v_wdpc - real :: ugw, vgw, ek1, ek2, rdtp, rdtp2 - - integer :: j, jj, k, kk, inc, jk, jkp, jl, iaz - integer :: ksrc, km2, km1, kp1, ktop -! -! Kturb-part -! - - real :: uz, vz, shr2 , ritur, ktur - - real :: kamp, zmetk, zgrow - real :: stab, stab_dt, dtstab - integer :: nstab, ist, anstab(levs) - real :: w1, w2, w3, dtdif - - real :: dzmetm, dzmetp, dzmetf, bdif, kturp - real :: bnrh_src -!-------------------------------------------------------------------------- -! - - if (mpi_id == master .and. kdt < 2) then - print *, im, levs, dtp, kdt, ' vay-solv2-v1' - print *, minval(tm), maxval(tm), ' min-max-tm ' - print *, minval(vm), maxval(vm), ' min-max-vm ' - print *, minval(um), maxval(um), ' min-max-um ' - print *, minval(qm), maxval(qm), ' min-max-qm ' - print *, minval(prsl), maxval(prsl), ' min-max-Pmid ' - print *, minval(prsi), maxval(prsi), ' min-max-Pint ' - print *, minval(zmet), maxval(zmet), ' min-max-Zmid ' - print *, minval(zmeti), maxval(zmeti), ' min-max-Zint ' - print *, minval(prslk), maxval(prslk), ' min-max-Exner ' - print *, minval(tau_ngw), maxval(tau_ngw), ' min-max-taungw ' - print *, tau_min, ' tau_min ', tamp_mpa, ' tamp_mpa ' -! - endif - - if (idebug_gwrms == 1) then - tauabs=0.0; wrms =0.0 ; trms =0.0 - endif - - - grav2 = grav + grav - rgrav = 1.0/grav - rgrav2 = rgrav*rgrav - rdi = 1.0/rd - gor = grav/rd - gr2 = grav*gor - rcpd = 1.0/cpd - rcpd2 = 0.5/cpd - rcpdl = cpd*rgrav ! 1/[g/cp] == cp/g - pi2 = 2.0*pi - grcp = grav*rcpd - gocp = grcp - grav2cpd = grav*grcp ! g*(g/cp)= g^2/cp - rad_to_deg=180.0/pi - deg_to_rad=pi/180.0 - bnv2min = (pi2/1800.)*(pi2/1800.) - bnv2max = (pi2/30.)*(pi2/30.) - mkzmin = pi2/80.0e3 - mkz2min = mkzmin*mkzmin - - rci(:) = 1./zci(:) - rdci(:) = 1./zdci(:) - - rdtp = 1./dtp - rdtp2 = 0.5*rdtp -! -! launch level control ksrc > 2 -! - - ksrc= max(ilaunch, 3) - km2 = ksrc - 2 - km1 = ksrc - 1 - kp1 = ksrc + 1 - ktop= levs+1 - - do k=1,levs - suprf(k) = kion(k) ! approximate 1-st order damping with Fast super-RF of FV3 - pdvdt(:,k) = 0.0 - pdudt(:,k) = 0.0 - pdtdt(:,k) = 0.0 - dked(: ,k) = 0.0 - enddo - -!----------------------------------------------------------- -! column-based j=1,im pjysics with 1D-arrays -!----------------------------------------------------------- - DO j=1, im - - jl =j - tx1 = 2*omega * sinlat(j) *rv_kxw - cf1 = abs(tx1) - c2f2 = tx1 * tx1 - ucrit_max = max(ucrit, cf1) - ucrit3 = ucrit_max*ucrit_max*ucrit_max -! -! ngw-fluxes at all gridpoints (with tau_min at least) -! - taub_src = max(tau_ngw(jl), tau_min) - aum(km2:levs) = um(jl,km2:levs) - avm(km2:levs) = vm(jl,km2:levs) - atm(km2:levs) = tm(jl,km2:levs) - aqm(km2:levs) = qm(jl,km2:levs) - aprsl(km2:levs) = prsl(jl,km2:levs) - azmet(km2:levs) = zmet(jl,km2:levs) - aprsi(km2:levs+1) = prsi(jl,km2:levs+1) - azmeti(km2:levs+1) = zmeti(jl,km2:levs+1) - - rho_src = aprsl(ksrc)*rdi/atm(ksrc) - -! --------------------------------------------- -! interface mean flow parameters launch -> levs+1 -! --------------------------------------------- - do jk= km1,levs - tvc = atm(jk) * (1. +fv*aqm(jk)) - tvm = atm(jk-1) * (1. +fv*aqm(jk-1)) - ptc = tvc/ prslk(jl, jk) - ptm = tvm/prslk(jl,jk-1) -! - zthm = 2.0 / (tvc+tvm) -! - uint(jk) = 0.5 *(aum(jk-1)+aum(jk)) - vint(jk) = 0.5 *(avm(jk-1)+avm(jk)) - rhomid(jk) = aprsl(jk)*rdi/atm(jk) - rhoint(jk) = aprsi(jk)*rdi*zthm ! rho = p/(RTv) - zdelp = azmeti(jk+1)-azmeti(jk) ! >0 ...... dz-meters - zdelm = 1./(azmet(jk)-azmet(jk-1)) ! 1/dz ...... 1/meters - dzdt(jk) = dtp/zdelp -! -! bvf2 = grav2 * zdelm * (ptc-ptm)/ (ptc + ptm) ! N2=[g/PT]*(dPT/dz) -! - bn2(jk) = grav2cpd*zthm * (1.0+rcpdl*(tvc-tvm)*zdelm) - bn2(jk) = max(min(bn2(jk), bnv2max), bnv2min) - bn(jk) = sqrt(bn2(jk)) - bnk(jk) = bn(jk)*v_kxw - rhobnk(jk)=rhoint(jk)/bnk(jk)*v_kxw - wrk3(jk)= 1./zdelp/rhomid(jk) ! 1/rho_mid(k)/[Z_int(k+1)-Z_int(k)] - irhodz_mid(jk) = rdtp*zdelp*rhomid(jk)/rho_src - - v_zmet(jk) = 2.*zdelp ! 2*kzi*[Z_int(k+1)-Z_int(k)] -! -! -! diagnostics -Kzz above PBL -! - uz = aum(jk) - aum(jk-1) - vz = avm(jk) - avm(jk-1) - shr2 = (max(uz*uz+vz*vz, dw2min)) * zdelm *zdelm - - zmetk = azmet(jk)* rh4 ! mid-layer height k_int => k_int+1 - zgrow = exp(zmetk) - ritur = bn2(jk)/shr2 - kamp = sqrt(shr2)*sc2 *zgrow - w1 = 1./(1. + 5*ritur) - ktur= min(max(kamp * w1 * w1, dked_min)+kvg(k), dked_max) - zmetk = azmet(jk)* rhp - vueff(jk) = ktur*0. + 2.e-5*exp( zmetk) - enddo - - if (idebug_gwrms == 1) then - do jk= km1,levs - wrk1(jk) = rv_kxw/rhoint(jk) - wrk2(jk)= rgrav2*zthm*zthm*bn2(jk) ! dimension [K*K]*(c2/m2) - enddo - endif - -! -! extrapolating values for ktop = levs+1 (lev-interface for prsi(levs+1) =/= 0) -! - jk = levs - - suprf(ktop) = kion(jk) - - rhoint(ktop) = aprsi(ktop)*rdi/atm(jk) - - uint(ktop) = aum(jk) - vint(ktop) = avm(jk) - - v_zmet(ktop) = v_zmet(jk) - vueff(ktop) = vueff(jk) - bn2(ktop) = bn2(jk) - bn(ktop) = bn(jk) - bnk(ktop) = bn(ktop)*v_kxw - - rhobnk(ktop) = rhoint(ktop)/bnk(ktop)*v_kxw - - bvi = bn(ksrc); bvi2 = bvi * bvi; - bvi3 = bvi2*bvi; bvi4 = bvi2 * bvi2; rcms = zms/bvi - bnrh_src = bvi/rhoint(ksrc) -! -! define intrinsic velocity (relative to ilaunch) u(z)-u(zo), and coefficinets -! ------------------------------------------------------------------------------------------ - do iaz=1, nazd - ul(iaz) = zcosang(iaz) *uint(ksrc) + zsinang(iaz) *vint(ksrc) - enddo -! - do jk=ksrc, ktop - do iaz=1, nazd - zu = zcosang(iaz)*uint(jk) + zsinang(iaz)*vint(jk) - ui(iaz, jk) = zu !- ul(iaz)*0. - enddo - enddo -! ----------------------------------------- -! set launch momentum flux spectral density -! ----------------------------------------- - - fpu(1, ksrc) =0. - do inc=1,nwav - zcin = zci(inc) - zcin4 = zci4(inc)/bvi4 -! - if(nslope == 0) then - zcin3 = zci3(inc)/bvi3 - flux(inc,1) = zcin/(1.+zcin3) - endif - - if(nslope == 1) flux(inc,1) = zcin/(1.+zcin4) - if(nslope == 2) flux(inc,1)= zcin/(1.+zcin4*zcin*rcms) - -! integrate (flux x dx) - fpu(1,ksrc) = fpu(1,ksrc) + flux(inc,1)*zdci(inc) - - do iaz=1,nazd - akzw(inc, iaz,ksrc:ktop) = bvi*rci(inc) - enddo - - enddo -! - flux_norm = taub_src / fpu(1, ksrc) -! - do iaz=1,nazd - fpu(iaz, ksrc) = taub_src - enddo - -! adjust rho/bn vertical factors for saturated fluxes (E(m) ~m^-3) - bnrh_src=bnrh_src*flux_norm - do jk=ksrc, ktop - fden_bn(jk) = bnrh_src*rhoint(jk) / bn(jk) !*bvi/rhoint(ksrc) - enddo - -! - do inc=1, nwav - flux(inc,1) = flux_norm*flux(inc,1) - enddo - - if (idebug_gwrms == 1) then - pwrms =0. - ptrms =0. - tx1 = real(nazd)/rhoint(ksrc)*rv_kxw - ze2 = wrk2(ksrc) ! (bvi*atm(ksrc)*rgrav)**2 - do inc=1, nwav - v_kzw = bvi*rci(inc) - ze1 = flux(inc,1)*zdci(inc)*tx1*v_kzw - pwrms = pwrms + ze1 - ptrms = ptrms + ze1 * ze2 - enddo - wrms(jl, ksrc) = pwrms - trms(jl, ksrc) = ptrms - endif - -! copy flux-1 into other azimuths -! -------------------------------- - do iaz=2, nazd - do inc=1,nwav - flux(inc,iaz) = flux(inc,1) - enddo - enddo - -! constant flux below ilaunch - do jk=km1, ksrc - do inc=1, nwav - flux_z(inc,jk)=flux(inc,1) - enddo - enddo - - wave_act(:,:) = 1.0 -! vertical do-loop - do jk=ksrc, levs - jkp = jk+1 -! azimuth do-loop - do iaz=1, nazd - - umfp = ui(iaz, jkp) - umfm = ui(iaz, jk) - umfc = .5*(umfm + umfp) -! wave-cin loop - do inc=1, nwav - - zcin = zci(inc) ! zcin =/0 by definition - zcinc = rci(inc) - - if(wave_act(inc,iaz) == 1.0) then -!======================================================================= -! discrete mode -! saturated limit wfit = kzw*kzw*kt; wfdt = wfit/(kxw*cx)*betat -! & dissipative kzi = 2.*kzw*(wfdm+wfdt)*dzpi(k) -!======================================================================= - - v_cdp = zcin - umfp - - if (v_cdp .le. ucrit_max) then -! -! between layer [k-1,k or jk-jkp] (Chi - Uk) -> ucrit_max ; wave's absorption -! - wave_act(inc,iaz) =0. - akzw(inc, iaz, jkp) = pi/v_zmet(jk) ! pi2/dzmet - fluxs = 0.0 !max(0., rhobnk(jkp)*ucrit3)*rdci(inc) - flux(inc,iaz) = fluxs - flux_z(inc,jkp) = fluxs -! ucrit_maxdc =0. - else - - v_wdp = v_kxw*v_cdp - wdop2 = v_wdp* v_wdp - v_cdp2=v_cdp*v_cdp -! -! rotational cut-off -! - cdf2 = v_cdp2 - c2f2 - - if (cdf2 > 0.0) then - kzw2 = (bn2(jkp)-wdop2)/Cdf2 - else - kzw2 = mkz2min - endif - - if ( kzw2 > mkz2min ) then - v_kzw = sqrt(kzw2) - akzw(inc, iaz, jkp) = v_kzw -! -!linsatdis: kzw2, kzw3, kdsat, c2f2, cdf2, cdf1 -! -!kzw2 = (bn2(k)-wdop2)/Cdf2 - rhp4 - v_kx2w ! full lin DS-NGW (N2-wd2)*k2=(m2+k2+[1/2H]^2)*(wd2-f2) -! Kds = kxw*Cdf1*rhp2/kzw3 -! - v_cdp = sqrt( cdf2 ) - v_wdp = v_kxw * v_cdp - v_wdi = kzw2*vueff(jk) + supRF(jk) ! supRF - diss due to FRF-FV3dycore for "all" vars - v_wdpc = sqrt(v_wdp*v_wdp +v_wdi*v_wdi) - v_kzi = v_kzw*v_wdi/v_wdpc -! - ze1 = v_kzi*v_zmet(jk) - - if (ze1 .ge. 1.e-2) then - expdis = max(exp(-ze1), 0.01) - else - expdis = 1./(1.+ ze1) - endif - -! - wave_act(inc,iaz) = 1.0 - fmode = flux(inc,iaz) - - else ! kzw2 <= mkz2min large "Lz"-reflection - - expdis = 1.0 - v_kzw = mkzmin - - v_cdp = 0. ! no effects of reflected waves - wave_act(inc,iaz) = 0.0 - akzw(inc, iaz, jkp) = v_kzw - fmode = 0. - endif - - fdis = fmode*expdis -! -! saturated flux + wave dissipation - Keddy_gwsat in UGWP-V1 -! linsatdis = 1.0 , here: u'^2 ~ linsatdis* [v_cdp*v_cdp] -! -! fluxs= fden_bn(jkp)*cdf2*zcinc - fluxs= fden_bn(jkp)*sqrt(cdf2) - -! -! S2003 fluxs= fden_bn(jk)*(zcin-ui(jk,iaz))**2/zcin -! WM2001 fluxs= fden_bn(jk)*(zcin-ui(jk,iaz)) -! - zdep = wave_act(inc,iaz)* (fdis-fluxs) - if(zdep > 0.0 ) then -! subs on sat-limit - flux(inc,iaz) = fluxs - flux_z(inc,jkp) = fluxs - else -! assign dis-ve flux - flux(inc,iaz) = fdis - flux_z(inc,jkp) = fdis - endif - -! cgz = bnk(jk)/max(mkz2min, kzw2) - - dtau = flux_z(inc,jk)-flux_z(inc,jkp) - if (dtau .lt. 0) flux_z(inc,jkp) = flux_z(inc,jk) - -! if (dtau .ge. ucrit_maxdc) then -! flux_z(inc,jkp) = max(flux_z(inc,jk)-ucrit_maxdc, 0.) -! ze1 = zci(inc)-umfc-ucrit_maxdc -! write(6,287) dzdt(jk)/cgz, dtau/ucrit_maxdc, flux_z(inc,jkp)*1.e3, fluxs*1.e3, jk, zci(inc), ze1 -! -! endif -! 287 format(' dtau >ucrit_max', 4(2x, F12.7), I4, 2x, 2(2x,F8.3)) -! - - endif ! coriolis or CL condition-checkif => (v_cdp .le. ucrit_max) then - endif ! only for waves w/o CL-absorption wave_act=1 - - -! - enddo ! wave-inc-loop -! -! integrate over spectral modes fpu(y, z, azimuth) wave_act(jl,inc,iaz)*flux(jl,inc,iaz)*[d("zcinc")] -! - if (idebug_gwrms == 1) then - pwrms =0. - ptrms =0. -! new arrays - - do inc=1, nwav - if (wave_act(inc,iaz) > 0.) then - v_kzw =akzw(inc, iaz, jk) - ze1 = flux(inc,iaz)*v_kzw*zdci(inc)*wrk1(jk) - pwrms = pwrms + ze1 - ptrms = ptrms + ze1*wrk2(jk) - endif - enddo - Awrms(iaz, jk) = pwrms - Atrms(iaz, jk) = ptrms - endif - - - dfdz_v(iaz, jk) = 0.0 - fpu(iaz, jkp) = 0.0 - - do inc=1, nwav - if (wave_act(inc,iaz) > 0.) then - - zcinc =zdci(inc) - vc_zflx_mode = flux(inc,iaz) - fpu(iaz, jkp) = fpu(iaz,jkp) + vc_zflx_mode*zcinc - -!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -! (heat deposition integration over spectral mode for each azimuth -! later sum over selected azimuths as "non-negative" scalars) -! cdf1 = sqrt( (zci(inc)-umfc)**2-c2f2) -!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -! zdelp = wrk3(jk)*cdf1 *zcinc - zdelp = wrk3(jk)*abs(zci(inc)-umfc) *zcinc - vm_zflx_mode = flux_z(inc,jk) - dfdz_v(iaz, jk) = dfdz_v(iaz,jk) +(vm_zflx_mode-vc_zflx_mode)*zdelp ! heating >0 - endif - enddo !waves inc=1,nwav - - ze1 =fpu(iaz, jk) - if (fpu(iaz, jkp) > ze1 ) fpu(iaz, jkp) = ze1 -! -------------- - enddo ! end Azimuth do-loop - -! -! extra- eddy wave dissipation to limit GW-rms -! tx1 = sum(abs(dfdz_v(jk,1:nazd)))/bn2(jk) -! ze1=max(dked_min, tx1) -! ze2=min(dked_max, ze1) -! vueff(jkp) = ze2 + vueff(jkp) -! - - - enddo ! end Vertical do-loop -! -! top-layers constant interface-fluxes and zero-heat -! - fpu(1:nazd,ktop) = fpu(1:nazd, levs) - dfdz_v(1:nazd, levs) = 0.0 - -! --------------------------------------------------------------------- -! sum contribution for total zonal and meridional fluxes + -! energy dissipation -! --------------------------------------------------- -! -!======================================================================== -! at the source level and below taux = 0 (taux_E=-taux_W by assumption) -!======================================================================== - - - - do jk=ksrc, levs - taux(jk) = 0.0 - tauy(jk) = 0.0 - do iaz=1,nazd - taux(jk) = taux(jk) + fpu(iaz,jk)*zcosang(iaz) - tauy(jk) = tauy(jk) + fpu(iaz,jk)*zsinang(iaz) - pdtdt(jl,jk) = pdtdt(jl,jk)+ dfdz_v(iaz,jk) - enddo - enddo - jk = ktop; taux(jk)=0.; tauy(jk)=0. - do iaz=1,nazd - taux(jk) = taux(jk) + fpu(iaz,jk)*zcosang(iaz) - tauy(jk) = tauy(jk) + fpu(iaz,jk)*zsinang(iaz) - enddo - - if (idebug_gwrms == 1) then - - do jk=kp1, levs - do iaz=1,nazd - wrms(jl,jk) =wrms(jl,jk) + Awrms(iaz,jk) - trms(jl,jk) =trms(jl,jk) + Atrms(iaz,jk) - tauabs(jl,jk)=tauabs(jl,jk) + fpu(iaz,jk) - enddo - enddo - - endif -! - - do jk=ksrc,levs - jkp = jk + 1 - zdelp = wrk3(jk)*gw_eff - ze1 = (taux(jkp)-taux(jk))* zdelp - ze2 = (tauy(jkp)-tauy(jk))* zdelp - - if (abs(ze1) >= maxdudt ) then - ze1 = sign(maxdudt, ze1) - endif - if (abs(ze2) >= maxdudt ) then - ze2 = sign(maxdudt, ze2) - endif - pdudt(jl,jk) = -ze1 - pdvdt(jl,jk) = -ze2 -! -! Cx =0 based Cx=/= 0. above -! -! - if (knob_ugwp_doheat == 1) then -! -! ek1 =aum(jk)*aum(jk) +avm(jk)*avm(jk) -! ugw = aum(jk)- ze1*dtp; vgw = avm(jk)- ze2*dtp -! ek2 = ugw*ugw +vgw*vgw -! pdtdt(jl,jk) = rdtp2*max(ek1-ek2, 0.0) !=ze1*um + 0.5*ze1^2*dtp -! pdtdt(jl,jk) = max(ze1*aum(jk) + ze2*avm(jk), 0.) ! gw_eff => in "ze1 and ze2" - pdtdt(jl,jk) = max(pdtdt(jl,jk) , 0.)*gw_eff - endif - - if (abs(pdtdt(jl,jk)) >= maxdtdt ) pdtdt(jl,jk) = maxdtdt - ze1 = max(dked_min, pdtdt(jl,jk)/bn2(jk)) - dked(jl,jk) = min(dked_max, ze1) - - enddo -! -! add limiters/efficiency for "unbalanced ics" if it is needed -! - do jk=ksrc,levs - pdtdt(jl,jk) = pdtdt(jl,jk)*rcpd - enddo -! - dktur(1:levs) = dked(jl,1:levs) -! - do ist= 1, 3 - do jk=ksrc,levs-1 - adif(jk) = .25*(dktur(jk-1)+ dktur(jk+1)) + .5*dktur(jk) - enddo - dktur(ksrc:levs-1) = adif(ksrc:levs-1) - enddo - -! dked(jl, ksrc:levs-1) = dktur(ksrc:levs-1) -! dked(jl, levs) =dked(jl, levs-1) - -! -! perform "diffusive" 3-point smoothing of "u-v-t" -! from the surface to the "top" -! - if (knob_ugwp_dokdis == 2) then - - uold(1:levs) = aum(1:levs)+pdudt(jl,1:levs)*dtp - vold(1:levs) = avm(1:levs)+pdvdt(jl,1:levs)*dtp - told(1:levs) = atm(1:levs)+pdtdt(jl,1:levs)*dtp - - do jk=1,levs - zmetk= azmet(jk)*rhp - ktur = kvg(k) + 2.e-5*exp( zmetk) - dktur(jk) = dked(jl,jk) + ktur - enddo - - dzmetm= azmet(ksrc)- azmet(ksrc-1) - - do jk=2,levs-1 - dzmetf = (azmeti(jk+1)- azmeti(jk))*rhomid(jk) - ktur = .5*(dktur(jk-1)+dktur(jk)) *rhoint(jk)/dzmetf - kturp = .5*(dktur(jk+1)+dktur(jk))*rhoint(jk+1)/dzmetf - - dzmetp = azmet(jk+1)-azmet(jk) - Adif(jk) = ktur/dzmetm - Cdif(jk) = kturp/dzmetp - bdif = adif(jk)+cdif(jk) - if (rdtp < bdif ) then - Anstab(jk) = nint( bdif/rdtp + 1) - else - Anstab(jk) = 1 - endif - dzmetm = dzmetp - enddo - - nstab = maxval( Anstab(ksrc:levs-1)) - if (nstab .ge. 2) print *, 'nstab ', nstab - dtdif = dtp/real(nstab) - do ist= 1, nstab - do k=ksrc,levs-1 - Bdif = nstab*rdtp-Adif(k)-Cdif(k) - unew(k) = uold(k)*Bdif+ uold(k-1)*Adif(k) + uold(k)*Cdif(k) - vnew(k) = vold(k)*Bdif+ vold(k-1)*Adif(k) + vold(k)*Cdif(k) - tnew(k) = told(k)*Bdif+ told(k-1)*Adif(k) + told(k)*Cdif(k) - enddo - uold = unew*dtdif - vold = vnew*dtdif - told = tnew*dtdif - enddo -! -! create "smoothed" tendencies by molecular + GW-eddy diffusion -! - do k=ksrc,levs-1 - pdtdt(jl,jk)= rdtp*(told(k) - tm(jl,k)) - ze2 = rdtp*(uold(k) - aum(k)) - ze1 = rdtp*(vold(k) - avm(k)) - if (abs(pdtdt(jl,jk)) >= maxdtdt ) pdtdt(jl,jk) = maxdtdt - if (abs(ze1) >= maxdudt ) then - ze1 = sign(maxdudt, ze1) - endif - if (abs(ze2) >= maxdudt ) then - ze2 = sign(maxdudt, ze2) - endif - pdudt(jl, k) = ze2 - pdvdt(jl, k) = ze1 -! -! add eddy viscosity heating -! pdtdt(jl,jk) = pdtdt(jl,jk) - max(ze1*aum(jk) + ze2*avm(jk), 0.) *rcpd -! - enddo - - - ENDIF ! dissipative IF-loop for "abrupt" tendencies - - enddo ! J-loop -! - - - RETURN - -! -! Print/Debugging ----------------------------------------------------------------------- -! - 239 continue - if (kdt ==1 .and. mpi_id == master) then -! - print *, 'ugwp-vay: nazd-nw-ilaunch=', nazd, nwav,ilaunch, maxval(kvg), ' kvg ' - print *, 'ugwp-vay: zdci(inc)=' , maxval(zdci), minval(zdci) - print *, 'ugwp-vay: zcimax=' , maxval(zci) ,' zcimin=' , minval(zci) -! print *, 'ugwp-vay: tau_ngw=' , maxval(taub_src)*1.e3, minval(taub_src)*1.e3, tau_min - - print * - - endif - - if (kdt == 1 .and. mpi_id == master) then - print *, 'vgw done nstab ', nstab -! - print *, maxval(pdudt)*86400., minval(pdudt)*86400, 'vgw ax ugwp' - print *, maxval(pdvdt)*86400., minval(pdvdt)*86400, 'vgw ay ugwp' - print *, maxval(dked)*1., minval(dked)*1, 'vgw keddy m2/sec ugwp' - print *, maxval(pdtdt)*86400., minval(pdtdt)*86400,'vgw eps ugwp' -! -! print *, ' ugwp -heating rates ' - endif - - - - return - end subroutine cires_ugwp_solv2_v1 - - -end module cires_ugwp_solv2_v1_mod diff --git a/physics/cires_ugwp_solvers.F90 b/physics/cires_ugwp_solvers.F90 deleted file mode 100644 index 6736daf6a..000000000 --- a/physics/cires_ugwp_solvers.F90 +++ /dev/null @@ -1,664 +0,0 @@ -! GW SOLVERS: -!=========== SOLVER_ORODIS; SOLVER_WMSDIS, SOLVER_LSATDIS -! + RF_DAMP if it is needed along with ugwp_tofd -!=========== -! Note in contrast to dycore vertical indices: surface=1 top=levs -! -! Collection of main friction-GWD solvers -! -! subroutine ugwp_oro -! -! subroutine gw_solver_linsatdis -! subroutine gw_solver_wmsdis -! subroutine rf_damp -! -! =========== -! -! - subroutine ugwp_oro(im, levs, dtp, kdt,me, lprnt, fcor, c2f2, & - u, v, tkin, pint, delp, pmid, pexner, gzint, gzmid, orostat, & - hpbl, axz, ayz, edis, kdis, dusfc, dvsfc, & - dusfc_mb, dvsfc_mb, dusfc_ogw, dvsfc_ogw, dusfc_lwb, dvsfc_lwb, & - zmtb, zlwb, zogw, tauf_ogw, tauz_ogw, axmtb, axlwb, axtms ) -!---------------------------------------------------------------------- -! COORDE-output: 6-hour inst: U, V, T, PMSL, PS, HT (ounce) -! 3D 6-hr aver: DYN-U, SSO-U, PBL-U, AF-U1.... -! 2D 6-hr aver: tau_SSO, tau_GWD, tau_BL; & -! tau_sso = tau_mtb + tau_tofd + tau_lwb +tau_ogw -! ZM 6-hr aver: tau_RES = PS*dH/dx -zonal mean -! Experiments: Midlat 80-200km -! LR_CTL; ; LR_NOSSO with TOFD/TMS; -! LR_NOGWD (MTN+TOFD); LR_GWD4 --- 4 times taub -!---------------------------------------------------------------------- - use machine , only : kind_phys - use ugwp_oro_init, only : cdmb, cleff, sigfac, hncrit, hpmin, hminmt - use ugwp_oro_init, only : gamm_std, sigma_std - use ugwp_common , only : rgrav, grav, cpd, rd, rv, rcpd, rcpd2 - - - use ugwp_common , only : pi, rad_to_deg, deg_to_rad, pi2 - - use cires_ugwp_module, only : kxw, max_kdis, max_axyz - - implicit none - logical :: lprnt - integer :: im, levs - integer :: me - integer :: kdt - real(kind_phys) :: dtp - real(kind_phys), dimension(im) :: hpbl ! pbl-height in meters - real(kind_phys), dimension(im) :: fcor, c2f2 - real(kind_phys), dimension(im, 14) :: orostat - real(kind_phys), dimension(im, levs) :: u, v, tkin, q - - real(kind_phys), dimension(im, levs) :: pmid, pexner, gzmid, delp - real(kind_phys), dimension(im, levs+1) :: pint, gzint - - - real(kind_phys), dimension(im, levs) :: axz, ayz, edis, kdis ! total 6-hr averaged tendencies - real(kind_phys), dimension(im, levs) :: krf2d - real(kind_phys), dimension(im, levs) :: tauz_ogw, axmtb, axlwb, axtms ! 3-sub components axogw = axz-(axmtb+axlwb+axtms) - real(kind_phys), dimension(im) :: tauf_ogw ! total-source momentum flux - - real(kind_phys), dimension(im) :: zmtb, zlwb, zogw - - real(kind_phys), dimension(im) :: dusfc, dvsfc ! total tausfc_sso - real(kind_phys), dimension(im) :: dusfc_mb, dvsfc_mb ! integrated tau_mtb - real(kind_phys), dimension(im) :: dusfc_ogw, dvsfc_ogw ! integrated tau_ogw - real(kind_phys), dimension(im) :: dusfc_lwb, dvsfc_lwb ! integrated tau_lwb - real(kind_phys), dimension(im) :: dusfc_tofd, dvsfc_tofd ! integrated tau_tofd - -! -! mu=hprime gamm=a/b sigma theta -! which stand for the standard deviation, the anisotropy, the slope and the orientation of the orography. -! - real(kind_phys) :: elvmax(im) - real(kind_phys) :: hprime(im) - - real(kind_phys) :: theta !the orienatation, angle - real(kind_phys) :: sigma !the slope dh/dx - real(kind_phys) :: gamm !the anisotropy see ifs-oro - - real(kind_phys) :: oc, oa4(4), clx4(4) !kim & doyle 2005 .... attempt to do TOFD ..? -! - integer, allocatable :: k_elev(:), k_mtb(:), k_ogw(:), k_lee(:), k_tofd(:) - - real(kind_phys) wk(im) - - real(kind_phys) eng0, eng1 -! -! -! - real(kind_phys), dimension(levs) :: up, vp, tp, qp, dp, zpm, pmid1, pex - - real(kind_phys), dimension(levs+1) :: taudz, rhoi, rim_z, pint1, zpi - real(kind_phys), dimension(levs) :: drtau, kdis_oro -! - real (kind_phys) :: elvp, elvpd, dtaux, dtauy - real(kind_phys) :: loss, mtb_fric, mbx, mby - real(kind_phys) :: sigflt - - real(kind_phys) :: zpbl = 2000. ! can be passed from PBL physics as in gwdps.f -! - logical icrilv(im) -! -!---- mountain/oro gravity wave drag +TOFD -! - real(kind=kind_phys), dimension(levs) :: utofd1, vtofd1, epstofd1, krf_tofd1 -! - real(kind=kind_phys), dimension(levs) :: drlee, drmtb, drlow, drogw - real(kind_phys) :: r_cpdt, acc_lim - real(kind_phys), dimension(im) :: tautot, tauogw, taumtb, taulee, taurf - real(kind_phys) :: xn, yn, umag, kxridge, & - tx1, tx2 - real(kind=kind_phys),dimension(levs+1):: tau_src - - integer :: npt, krefj, kdswj, kotr, i, j, k - integer :: ipt(im) - -! -! copy 1D -! - do i=1, im - hprime(i) = orostat(i, 1) - elvmax(i) = orostat(i, 14) -! - tautot(i) = 0.0 - tauogw(i) = 0.0 - taumtb(i) = 0.0 - taulee(i) = 0.0 - taurf(i) = 0.0 -! - dusfc(i) = 0.0 - dvsfc(i) = 0.0 - dusfc_mb(i) = 0.0 - dvsfc_mb(i) = 0.0 - dusfc_ogw(i) = 0.0 - dvsfc_ogw(i) = 0.0 - dusfc_lwb(i) = 0.0 - dvsfc_lwb(i) = 0.0 - dusfc_tofd(i) = 0.0 - dvsfc_tofd(i) = 0.0 - tauf_ogw(i) = 0.0 -! - zmtb(i) = -99. - zlwb(i) = -99. - zogw(i) = -99. - ipt(i) = 0 - enddo -! print *, maxval(hprime), maxval(elvmax), ' check hprime -elevmax ugwp_oro' -! -! 3-part of oro-effects + ked_oro -! - do k=1, levs - do i=1, im - axz(i,k) = 0.0 - ayz(i,k) = 0.0 - edis(i,k) = 0.0 - kdis(i,k) = 0.0 - krf2d(i,k) = 0.0 - tauz_ogw(i,k) = 0.0 - axmtb(i:,k) = 0.0 - axlwb(i,k) = 0.0 - axtms(i,k) = 0.0 - enddo - enddo - -! -! optional diag 3-parts of drag: [tx_ogw, tx_mtb, tx_lee] -! -! ----do we have orography for mtb and gwd calculation points ? -! - npt = 0 - do i = 1,im - if ( (elvmax(i) > hminmt) .and. (hprime(i) > hpmin) ) then - npt = npt + 1 - ipt(npt) = i - - endif - enddo - if (npt == 0) return ! no ororgraphy ====> gwd/mb calculation done - -! allocate(iwklm(npt), idxzb(npt), kreflm(npt)) - allocate( k_elev(npt), k_mtb(npt), k_ogw(npt), k_lee(npt), k_tofd(npt)) - do i=1,npt - k_ogw (i) = 2 - k_tofd(i) = 2 - k_lee (i) = 2 - k_mtb(i) = 0 - k_elev(i) = 2 - enddo -! -! controls through: use ugwp_oro_init -! main ORO-loop sigfac = n*sigma = [1.5, 2, 2.5, 4]*hprime -! - - - do i = 1, npt -! - j = ipt(i) - - elvpd = elvmax(j) - elvp = min (elvpd + sigfac * hprime(j), hncrit) - - sigma = orostat(j,13) - gamm = orostat(j,12) - theta = orostat(j,11)*deg_to_rad - - if (sigma == 0.0 ) then - sigma = sigma_std - gamm = gamm_std - theta = 0.0 - endif - - oc = orostat(j,2) - oa4(1) = orostat(j,3) - oa4(2) = orostat(j,4) - oa4(3) = orostat(j,5) - oa4(4) = orostat(j,6) - clx4(1) = orostat(j,7) - clx4(2) = orostat(j,8) - clx4(3) = orostat(j,9) - clx4(4) = orostat(j,10) -! -! do column-based diagnostics "more-efficient" for oro-places -! - - do k=1,levs - up(k) = u(j,k) - vp(k) = v(j,k) - tp(k) = tkin(j,k) - qp(k) = q(j,k) - dp(k) = delp(j,k) - - zpm(k) = gzmid(j,k) * rgrav - pmid1(k) = pmid(j,k) - pex(k) = pexner(j,k) - enddo - do k=1,levs+1 - zpi(k) = gzint(j,k) * rgrav - pint1(k) = pint(j,k) - enddo -! -! elvp- k-index: iwklm k_elvp = index for elvmax + 4*hprime, "elevation index" -! GFS-2017 - do k=1, levs-1 - if (elvp <= zpi(k+1) .and. elvp > zpi(k)) then - k_elev(i) = k+1 !......simply k+1 next interface level - exit - endif - enddo -! if (elvp .ge. 300. ) then -! write(6,333) elvp, zpi(1), elvpd, hprime(j), sigfac, hncrit -! pause -! endif -!333 format(6(3x, F10.3)) -! -! SSO effects: TOFD-drag/friction coefficients can be calculated -! - sigflt = hprime(j)*0.01 ! turb SSo(j) ...small-scale orography < 2-5 km .... - zpbl = hpbl(j) - - call ugwp_tofd1d(levs, sigflt, elvPd, zpi(1), zpbl, up, vp, zpm, & - utofd1, vtofd1, epstofd1, krf_tofd1) - - do k=1, levs - krf2d(j,k) = krf_tofd1(k) - axtms(j,k) = utofd1(k) -!------- -! nullify ORO-tendencies -! - drmtb(k) = 0.0 - drlee(k) = 0.0 - drtau(k) = 0.0 - drlow(k) = 0.0 - enddo - -!------- -! -! levels of k_mtb(i)/mtb + kdswj/dwlee + krefj/ogwd inside next "subs" -! zmtb, zlwb, zogw -! drmtb, drlow/drlee, drogw -!------- -! -! mtb : drmtb => 1-st order friction as well as TurbulentOro-Drag -! - call ugwp_drag_mtb( k_elev(i), levs, & - elvpd, elvp, hprime(j), sigma, theta, oc, oa4, clx4, gamm, zpbl, & - up, vp, tp, qp, dp, zpm, zpi, pmid1, pint1, k_mtb(i), drmtb, taumtb(j)) - - axmtb(j,1:levs) = drmtb(1:levs)*up(1:levs) -! -! print * , k_elev(i), k_mtb(i) , taumtb(j)*1.e3, ' k_elev, k_mtb , taumtb ' -! -! tautot = taulee+tauogw + rho*drlee = -d[taulee(z)]/dz -! - - - call ugwp_taub_oro(levs, k_mtb(i), kxw, taumtb(j), fcor(j), & - hprime(j) , sigma, theta, oc, oa4, clx4, gamm, elvp, & - up, vp, tp, qp, dp, zpm, zpi, pmid1, pint1, xn, yn, umag, & - tautot(j), tauogw(j), taulee(j), drlee, tau_src, & - kxridge, kdswj, krefj, kotr) - -! print *, k_mtb(i), kxw, taumtb(j), fcor(j),hprime(j), ' af ugwp_taub_oro ' -! print *, kdswj, krefj, kotr, ' kdswj, krefj, kotr ' - - - tauf_ogw(j) = tautot(j) - axlwb(j,1:levs) = drlee(1:levs) - - if ( k_mtb(i) > 0) zmtb(j) = zpi(k_mtb(i))- zpi(1) - if ( krefj > 0) zogw(j) = zpi(krefj) - zpi(1) - if ( kdswj > 0) zlwb(j) = zpi(kdswj) - zpi(1) -! if ( k_mtb(i) > 0 .and. zmtb(j) > zogw(j)) print *, ' zmtb > zogw ', zmtb(j), zogw(j) -! -! tau: tauogw, kxw/kxridge ATTENTION c2f2(j) = fcor(j)*fcor(j)/kxridge/kxridge -! - if ( (krefj > 1) .and. ( abs(tauogw(j)) > 0.) ) then -! - call ugwp_oro_lsatdis( krefj, levs, tauogw(j), tautot(j), tau_src, kxw, & - fcor(j), kxridge, up, vp, tp, qp, dp, zpm, zpi, pmid1, pint1, & - xn, yn, umag, drtau, kdis_oro) -! - else - drtau = 0. - endif - - tauz_ogw(j,1:levs) = tau_src(1:levs) - - r_cpdt = rcpd2/dtp -! -! - do k = 1,levs -! -! project to x-dir & y=dir and do diagnostics -! & apply limiters and output separate oro-effects -! - drlow(k) = drtau(k) + drlee(k) - acc_lim = min(abs(drlow(k)), max_axyz) - drlow(k) = sign(acc_lim, drlow(k)) - - dtaux = drlow(k) * xn + utofd1(k) - dtauy = drlow(k) * yn + vtofd1(k) - - eng0 = up(k)*up(k)+vp(k)*vp(k) - eng1 = 0.0 -! - if (k < k_mtb(i) .and. drmtb(k) /= 0 ) then - loss = 1.0 / (1.0+drmtb(k)*dtp) - mtb_fric = drmtb(k)*loss -! - mbx = mtb_fric * up(k) - mby = mtb_fric * vp(k) -! - ayz(j,k) = -mby !+ ayz(j,k) - axz(j,k) = -mbx !+ axz(j,k) -! - eng1 = eng0*loss*loss +eng1 - dusfc(j) = dusfc(j) - mbx * dp(k) - dvsfc(j) = dvsfc(j) - mby * dp(k) - endif -! - ayz(j,k) = dtauy + ayz(j,k) - axz(j,k) = dtaux + axz(j,k) -! - tx1 = u(j,k) + dtaux*dtp - tx2 = v(j,k) + dtauy*dtp - eng1 = tx1*tx1 + tx2*tx2 + eng1 - - dusfc(j) = dusfc(j) + dtaux * dp(k) - dvsfc(j) = dvsfc(j) + dtauy * dp(k) - - edis(j,k) = max(eng0-eng1, 0.0) * r_cpdt !+ epstofd1(k) - kdis(j,k) = min(kdis_oro(k), max_kdis ) - - enddo -! - dusfc(j) = -rgrav * dusfc(j) - dvsfc(j) = -rgrav * dvsfc(j) -! -! oro-locations -! - enddo ! ipt - oro-loop .... "fraction of Land" in the grid box - deallocate(k_elev, k_mtb, k_ogw, k_lee, k_tofd ) -! - end subroutine ugwp_oro -! -! - subroutine gw_solver_linsatdis(im, levs, dtp, kdt, me, & - taub, klev, if_src, nf_src, nw, ch, naz, spf, xaz, yaz, & - fcor, c2f2, u, v, t, q, prsi, delp, prsl, prslk, phii, phil, & - ax, ay, eps, ked, tauz) - - use ugwp_common , only : rgrav, grav, cpd, rd, rv, rcpd, rcpd2 - use ugwp_common , only : pi, rad_to_deg, deg_to_rad, pi2 - - use cires_ugwp_module, only : kxw, max_kdis, max_axyz, max_eps - use cires_ugwp_module, only : kvg, ktg, krad, kion - - implicit none - integer :: im, levs - integer :: me, kdt, nw, naz, nf_src - real :: dtp - integer, dimension(im) :: klev, if_src - real, dimension(im) :: taub, fcor, c2f2 - - real, dimension(naz) :: xaz, yaz - real, dimension(nw ) :: ch, spf -!========================== - real, dimension(im, levs) :: u, v, t, delp, prsl, prslk, phil, q - real, dimension(im, levs+1) :: prsi , phii -!========================== - real, dimension(im, levs) :: ax, ay, eps, ked, tauz - - real, dimension(levs) :: u1, v1, t1, dp, pmid, zmid, pex1, & - q1, rho - real, dimension(levs+1) :: pint , zint, ui, vi, ti, & - bn2i, bvi, rhoi - integer :: i, j, k, ksrc - real, dimension(nw) :: taub_spect -! real, dimension(levs) :: ax1, ay1, eps1 -! real, dimension(levs+1) :: ked1, tau1 - real :: chm, ss - real, parameter :: dsp = 1./20. - logical :: pfirst=.true. - - save pfirst -128 Format (2x, I4, 4(2x, F10.3)) - -! do i=1, nw -! spf(i) = exp(-Ch(i)*dsp) -! enddo -! ss = sum(spf) -! spf(1:nw) = spf(1:nw)/ss - - if (pfirst ) then - j = 1 - ksrc = klev(j) - taub_spect(1:nw) = spf(1:nw)*taub(j) - print * - chm = 0. - do i=1, nw - write(6, 128) i, spf(i), taub_spect(i)*1.e3, ch(i), ch(i)-chm - chm = ch(i) - enddo - - print * - !pause - endif - - do j=1,im - if (if_src(j) == 1) then -! -! compute GW-effects -! prsi, delp, prsl, prslk, phii, phil -! - do k=1,levs - u1(k) = u(j,k) - v1(k) = v(j,k) - t1(k) = t(j,k) - q1(k) = q(j,k) ! H2O-index -1 in tracer-array - dp(k) = delp(j,k) - - zmid(k) = phil(j,k) * rgrav - pmid(k) = prsl(j,k) -! pex1(k) = prslk(j,k) - enddo - do k=1,levs+1 - zint(k) = phii(j,k) * rgrav - pint(k) = prsi(j,k) - enddo - - call mflow_tauz(levs, u1, v1, t1, q1, dp, zmid, zint, & - pmid, pint, rho, ui, vi, ti, bn2i, bvi, rhoi) -! - ksrc = klev(j) - taub_spect(1:nw) = spf(1:nw)*taub(j)/rhoi(ksrc) - if (pfirst .and. j ==1 ) then - - print *, maxval(taub_spect)/kxw*bvi(ksrc)/ch(1), ' Urms ' - print *, maxval(zmid), minval(zmid) , ' zmid ' - print *, maxval(zint), minval(zint) , ' zint ' - print *, maxval(rho), minval(rho) , ' rho ' - print *, maxval(rhoi), minval(rhoi) , ' rhoi ' - print *, maxval(ti), minval(ti) , ' tempi ' - print *, maxval(ui), minval(ui) , ' ui ' - print *, maxval(u1), minval(u1) , ' ++++ u1 ' - print *, maxval(vi), minval(vi) , ' vi ' - print *, maxval(v1), minval(v1) , ' ++++ v1 ' - print *, maxval(pint), minval(pint) , ' pint ' - !pause - endif -! - call ugwp_lsatdis_naz(levs, ksrc, nw, naz, kxw, taub_spect, & - ch, xaz, yaz, fcor(j), c2f2(j), dp, & - zmid, zint, pmid, pint, rho, ui, vi, ti, & - kvg, ktg, krad, kion, bn2i, bvi, rhoi, & - ax(j,1:levs), ay(j,1:levs), eps(j,1:levs), & - ked(j,1:levs), tauz(j,1:levs)) -! kvg, ktg, krad, kion, bn2i, bvi, rhoi, ax1, ay1, eps1, ked1, tau1) - - if (pfirst .and. j ==1 ) then - - print *, maxval(taub_spect)/kxw*bvi(ksrc)/ch(1), ' Urms ' - print *, maxval(zmid), minval(zmid) , ' zmid ' - print *, maxval(zint), minval(zint) , ' zint ' - print *, maxval(rho), minval(rho) , ' rho ' - print *, maxval(rhoi), minval(rhoi) , ' rhoi ' - print *, maxval(ti), minval(ti) , ' rhoi ' - print *, maxval(ui), minval(ui) , ' ui ' - print *, maxval(vi), minval(vi) , ' vi ' - print *, maxval(pint), minval(pint) , ' pint ' - !pause - endif -! -! ax(j,:) = ax1 -! ay(j,:) = ay1 -! eps(j,:) = eps1 -! ked(j,:) = ked1(1:levs) -! tauz(j,:) = tau1(1:levs) - endif - - enddo - pfirst = .false. -! -! spectral solver for discrete spectra of GWs in N-azimiths -! Linear saturation with background dissipation -! - end subroutine gw_solver_linsatdis -! - subroutine gw_solver_wmsdis(im, levs, dtp, kdt, me, & - taub, klev, if_src, nf_src, nw, ch, naz, spf, xaz, yaz, & - fcor, c2f2, u, v, t, q, prsi, delp, prsl, prslk, phii, phil, & - ax, ay, eps, ked, tauz) -! use para_taub, only : tau_ex - use ugwp_common , only : rgrav, grav, cpd, rd, rv, rcpd, rcpd2 - use ugwp_common , only : pi, rad_to_deg, deg_to_rad, pi2 - - use cires_ugwp_module, only : kxw, max_kdis, max_axyz, max_eps - use cires_ugwp_module, only : kvg, ktg, krad, kion - - implicit none - integer :: im, levs, me, kdt, nw, naz, nf_src - real :: dtp - - integer, dimension(im) :: klev, if_src - real, dimension(im) :: taub, fcor, c2f2 - - real, dimension(naz) :: xaz, yaz - real, dimension(nw ) :: ch, spf -!========================== - real, dimension(im, levs) :: u, v, t, delp, prsl, prslk, phil, q - real, dimension(im, levs+1) :: prsi , phii -!========================== - real, dimension(im, levs) :: ax, ay, eps, ked, tauz - - real, dimension(levs) :: u1, v1, t1, dp, pmid, zmid, pex1, q1, rho - real, dimension(levs+1) :: pint , zint, ui, vi, ti, bn2i, bvi, rhoi - - integer :: i, j, k, ksrc - real, dimension(nw) :: taub_spect -! real, dimension(levs) :: ax1, ay1, eps1 -! real,dimension(levs+1) :: ked1, tau1 - real :: tau_ex - -! print *, nf_src, 'nf_src ... gw_solver_wmsdis ' -! print *, if_src, 'if_src ... gw_solver_wmsdis ' - - do j=1,im - if (if_src(j) == 1) then -! -! compute gw-effects -! prsi, delp, prsl, prslk, phii, phil -! - do k=1,levs - u1(k) = u(j,k) - v1(k) = v(j,k) - t1(k) = t(j,k) - q1(k) = q(j,k) ! h2o-index -1 in tracer-array - dp(k) = delp(j,k) - - zmid(k) = phil(j,k) *rgrav - pmid(k) = prsl(j,k) -! pex1(k) = prslk(j,k) - enddo - do k=1,levs+1 - zint(k) = phii(j,k)*rgrav - pint(k) = prsi(j,k) - enddo - - call mflow_tauz(levs, u1, v1, t1, q1, dp, zmid, zint, & - pmid, pint, rho, ui, vi, ti, bn2i, bvi, rhoi) -! -! any extras bkg-arrays -! - ksrc = klev(j) -!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -! -! more work for spectral setup for different "slopes" -! -!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - tau_ex = taub(j) - taub_spect(1:nw) = spf(1:nw)/rhoi(ksrc) *tau_ex ! check it ....*tau_ex(j) - -! -! call FVS93_ugwps(nw, ch, dch, taub_spect, spnorm, nslope, bn2i(ksrc), bvi(ksrc), bnrho(ksrc)) -! -! print *, ' bf ugwp_wmsdis_naz ksrc', ksrc, zmid(ksrc) - - call ugwp_wmsdis_naz(levs, ksrc, nw, naz, kxw, tau_ex, ch, xaz, yaz, & - fcor(j), c2f2(j), dp, zmid, zint, pmid, pint, & - rho, ui, vi, ti, kvg, ktg, krad, kion, bn2i, bvi, & - rhoi, ax(j,1:levs), ay(j,1:levs), eps(j,1:levs), & - ked(j,1:levs), tauz(j,1:levs)) -! kvg, ktg, krad, kion, bn2i, bvi, rhoi, ax1, ay1, eps1, ked1, tau1) - -! print *, ' after ugwp_wmsdis_naz ksrc', ksrc, zint(ksrc) - -! subroutine ugwp_wmsdis_naz(levs, ksrc, nw, naz, kxw, taub_lat, ch, xaz, yaz, & -! fcor, c2f2, dp, zmid, zint, pmid, pint, rho, ui, vi, ti, & -! kvg, ktg, krad, kion, bn2i, bvi, rhoi, ax, ay, eps, ked) - -! ax(j,:) = ax1 -! ay(j,:) = ay1 -! eps(j,:) = eps1 -! ked(j,:) = ked1(1:levs) -! tauz(j,:) = tau1(1:levs) - - endif - - enddo -! -! ugwp_wmsdis_naz everything similar to linsat , except spectral saturation -! -! - return - end subroutine gw_solver_wmsdis -! -! - subroutine rf_damp(im, levs, levs_rf, dtp, rfdis, rfdist, u, v, ax, ay, eps) - use ugwp_common, only : rcpd2 - - implicit none - - integer :: im, levs, levs_rf - real :: dtp - real, dimension(levs) :: rfdis, rfdist - real, dimension(im, levs) :: u, v, ax, ay, eps - real :: ud, vd, rdtp - integer :: i, k - - rdtp = 1.0 / dtp - - do k= levs_rf, levs - do i=1,im - ud = rfdis(k)*u(i,k) - vd = rfdis(k)*u(i,k) - ax(i,k) = rfdist(k)*u(i,k) - ay(i,k) = rfdist(k)*v(i,k) - eps(i,k) = rcpd2*(u(i,k)*u(i,k) +v(i,k)*v(i,k) -ud*ud -vd*vd) - enddo - enddo - end subroutine rf_damp -! diff --git a/physics/cires_ugwp_triggers.F90 b/physics/cires_ugwp_triggers.F90 index c345a8e85..4a8b97590 100644 --- a/physics/cires_ugwp_triggers.F90 +++ b/physics/cires_ugwp_triggers.F90 @@ -1,473 +1,5 @@ - subroutine ugwp_triggers - implicit none - write(6,*) ' physics-based triggers for UGWP ' - end subroutine ugwp_triggers -! - SUBROUTINE subs_diag_geo(nx, ny, lat, lon, rlat, rlon, dy, dx, & - cosv, rlatc, brcos, brcos2, dlam1, dlam2, dlat, divJp, divJm) - use ugwp_common , only : deg_to_rad - - implicit none - integer :: nx, ny - real :: lon(nx), lat(ny) - real :: rlon(nx), rlat(ny) , cosv(ny), tanlat(ny) - real :: rlatc(ny-1), brcos(ny), brcos2(ny) - real :: earth_r, ra1, ra2, dx, dy, dlat - real :: dlam1(ny), dlam2(ny), divJp(ny), divJm(ny) - integer :: j -! -! specify common constants and -! geometric factors to compute deriv-es etc ... -! coriolis coslat tan etc... -! - earth_r = 6370.e3 - ra1 = 1.0 / earth_r - ra2 = ra1*ra1 -! - rlat = lat*deg_to_rad - rlon = lon*deg_to_rad - tanlat = atan(rlat) - cosv = cos(rlat) - dy = rlat(2)-rlat(1) - dx = rlon(2)-rlon(1) -! - do j=1, ny-1 - rlatc(j) = 0.5 * (rlat(j)+rlat(j+1)) - enddo -! - do j=2, ny-1 - brcos(j) = 1.0 / cos(rlat(j))*ra1 - enddo - - brcos(1) = brcos(2) - brcos(ny) = brcos(ny-1) - brcos2 = brcos*brcos -! - dlam1 = brcos / (dx+dx) - dlam2 = brcos2 / (dx*dx) - - dlat = ra1 / (dy+dy) - - divJp = dlat*cosv - divJM = dlat*cosv -! - do j=2, ny-1 - divJp(j) = dlat*cosv(j+1)/cosv(j) - divJM(j) = dlat*cosv(j-1)/cosv(j) - enddo - divJp(1) = divjp(2) !*divjp(1)/divjp(2) - divJp(ny) = divjp(1) - divJM(1) = divjM(2) !*divjM(1)/divjM(2) - divJM(ny) = divjM(1) -! - return - end SUBROUTINE subs_diag_geo -! - subroutine get_xy_pt(V, Vx, Vy, nx, ny, dlam1, dlat) -!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -! compute for each Vert-column: grad(V) -! periodic in X and central diff ... -!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - implicit none - integer :: nx, ny - real :: V(nx, ny), dlam1(ny), dlat - real :: Vx(nx, ny), Vy(nx, ny) - integer :: i, j - do i=2, nx-1 - Vx(i,:) = dlam1(:)*(V(i+1,:)-V(i-1,:)) - enddo - Vx(1,:) = dlam1(:)*(V(2,:)-V(nx,:)) - Vx(nx,:) = dlam1(:)*(V(1,:)-V(nx-1,:)) - - do j=2, ny-1 - Vy(:,j) = dlat*(V(:,j+1)-V(:, j-1)) - enddo - Vy(:, 1) = dlat*2.*(V(:,2)-V(:,1)) - Vy(:,ny) = dlat*2.*(V(:,ny)-V(:,ny-1)) - - end subroutine get_xy_pt - - subroutine get_xyd_wind( V, Vx, Vy, Vyd, nx, ny, dlam1, dlat, divJp, divJm) -! -! compute for each Vert-column: grad(V) -!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - implicit none - integer :: nx, ny - real :: V(nx, ny), dlam1(ny), dlat - real :: Divjp(ny), Divjm(ny) - real :: Vx(nx, ny), Vy(nx, ny), Vyd(nx, ny) - integer :: i, j - do i=2, nx-1 - Vx(i,:) = dlam1(:)*(V(i+1,:)-V(i-1,:)) - enddo - Vx(1,:) = dlam1(:)*(V(2,:)-V(nx,:)) - Vx(nx,:) = dlam1(:)*(V(1,:)-V(nx-1,:)) - - do j=2, ny-1 - Vy(:,j) = dlat*(V(:,j+1)-V(:, j-1)) - enddo - Vy(:, 1) = dlat*2.*(V(:,2)-V(:,1)) - Vy(:,ny) = dlat*2.*(V(:,ny)-V(:,ny-1)) -!~~~~~~~~~~~~~~~~~~~~ -! 1/cos*d(vcos)/dy -!~~~~~~~~~~~~~~~~~~~~ - do j=2, ny-1 - Vyd(:,j) = divJP(j)*V(:,j+1)-V(:, j-1)*divJM(j) - enddo - Vyd(:, 1) = Vyd(:,2) - Vyd(:,ny) = Vyd(:,ny-1) - - end subroutine get_xyd_wind - - subroutine trig3d_fjets( nx, ny, nz, U, V, T, Q, P3D, PS, delp, delz, lon, lat, pmid, trig3d_fgf) - implicit none - integer :: nx, ny, nz - real :: lon(nx), lat(ny) -! - real, dimension(nz) :: pmid - real, dimension(nx, ny, nz) :: U, V, T, Q, delp, delz, p3d - real, dimension(nx, ny ) :: PS - real, dimension(nx, ny, nz) :: trig3d_fgf -! -! locals -! - real, dimension(nx, ny) :: ux, uy, uyd, vy, vx, vyd, ptx, pty - integer :: k, i, j - - real, parameter :: cappa=2./7., pref=1.e5 - real, dimension(nx, ny) :: pt, w1, w2 - - real :: rlon(nx), rlat(ny) , cosv(ny), tanlat(ny) - real :: rlatc(ny-1), brcos(ny), brcos2(ny) - - real :: dx, dy, dlat - real :: dlam1(ny), dlam2(ny), divJp(ny), divJm(ny) - - - call subs_diag_geo(nx, ny, lat, lon, rlat, rlon, dy, dx, & - cosv, rlatc, brcos, brcos2, dlam1, dlam2, dlat, divJp, divJm) - - do k=1, nz - w1(:,:) = P3d(:,:,k) - w2(:,:) = T(:,:,k) - - pt = w2*(pref/w1)**cappa - call get_xy_pt(Pt, ptx, pty, nx, ny, dlam1, dlat) - w1(:,:) = V(:,:, K) - call get_xyd_wind( w1, Vx, Vy, Vyd, nx, ny, dlam1, dlat, divJp, divJm) - w1(:,:) = U(:,:, K) - call get_xyd_wind( w1, Ux, Uy, Uyd, nx, ny, dlam1, dlat, divJp, divJm) - - trig3d_fgf(:,:,k) = -ptx*ptx*ux - pty*pty*vy -(vx+uyd)*ptx*pty - - enddo - end subroutine trig3d_fjets - - subroutine trig3d_okubo( nx, ny, nz, U, V, T, Q, P3d, PS, delp, delz, lon, lat, pmid, trig3d_okw) - implicit none - integer :: nx, ny, nz - real :: lon(nx), lat(ny) -! - real, dimension(nz) :: pmid - real, dimension(nx, ny, nz) :: U, V, T, Q, delp, delz, p3d - real, dimension(nx, ny ) :: PS - real, dimension(nx, ny, nz) :: trig3d_okw -! -! locals -! - real, dimension(nx, ny) :: ux, uy, uyd, vy, vx, vyd, ptx, pty - integer :: k, i, j - - real, parameter :: cappa=2./7., pref=1.e5 - real, dimension(nx, ny) :: pt, w1, w2, d1 - - real :: rlon(nx), rlat(ny) , cosv(ny), tanlat(ny) - real :: rlatc(ny-1), brcos(ny), brcos2(ny) - - real :: dx, dy, dlat - real :: dlam1(ny), dlam2(ny), divJp(ny), divJm(ny) - - call subs_diag_geo(nx, ny, lat, lon, rlat, rlon, dy, dx, & - cosv, rlatc, brcos, brcos2, dlam1, dlam2, dlat, divJp, divJm) - - do k=1, nz - w1(:,:) = P3d(:,:,k) - w2(:,:) = T(:,:,k) - - pt = w2*(pref/w1)**cappa - call get_xy_pt(Pt, ptx, pty, nx, ny, dlam1, dlat) - w1(:,:) = V(:,:, K) - call get_xyd_wind( w1, Vx, Vy, Vyd, nx, ny, dlam1, dlat, divJp, divJm) - w1(:,:) = U(:,:, K) - call get_xyd_wind( w1, Ux, Uy, Uyd, nx, ny, dlam1, dlat, divJp, divJm) - - trig3d_okw(:,:,k) = -ptx*ptx*ux - pty*pty*vy -(vx+uyd)*ptx*pty - w1 = (Ux -Vy)*(Ux-Vy) + (Vx +Uy)*(Vx+Uy) ! S2 - W2 = (Vx - Uyd)*(Vx - Uyd) - D1 = Ux + Vyd - trig3d_okw(:,:,k) = W1 -W2 -! trig3d_okw(:, :, k) =S2 -W2 -! trig3d_okw(:, :, k) =D1*D1 + 4*(Vx*Uyd -Ux*Vyd) ! ocean -! trig3d_okw(:, :, k) = trig3d_okw(:,:,k) + D1*D1 + 2.*D1*sqrt(abs(W1-W2)) ! S2 =W1Ted-luk - enddo - end subroutine trig3d_okubo -! - subroutine trig3d_dconv(nx, ny, nz, U, V, T, Q, P3d, PS, delp, delz, lon, lat, pmid, trig3d_conv, & - dcheat3d, precip2d, cld_klevs2d, scheat3d) - - implicit none - integer :: nx, ny, nz - real :: lon(nx), lat(ny) -! - real, dimension(nz) :: pmid - real, dimension(nx, ny, nz) :: U, V, T, Q, delp, delz, p3d - real, dimension(nx, ny ) :: PS - real, dimension(nx, ny, nz) :: trig3d_conv - - real, dimension(nx, ny, nz) :: dcheat3d, scheat3d - real, dimension(nx, ny ) :: precip2d - integer,dimension(nx, ny, 3 ):: cld_klevs2d - integer :: k - end subroutine trig3d_dconv - - subroutine cires_3d_triggers( nx, ny, nz, lon, lat, pmid, & - U, V, W, T, Q, delp, delz, p3d, PS, HS, Hyam, Hybm, Hyai, Hybi, & - trig3d_okw, trig3d_fgf, trig3d_conv, & - dcheat3d, precip2d, cld_klevs2d, scheat3d) - - implicit none - integer :: nx, ny, nz - real :: lon(nx), lat(ny) -! -! reversed ??? Hyai, Hybi , pmid -! - real, dimension(nz+2) :: Hyai, Hybi - real, dimension(nz+1) :: Hyam, Hybm -! - real, dimension(nz) :: pmid - real, dimension(nx, ny, nz) :: U, V, W, T, Q, delp, delz, p3d - real, dimension(nx, ny ) :: PS, HS - real, dimension(nx, ny, nz) :: trig3d_okw, trig3d_fgf, trig3d_conv - real, dimension(nx, ny, nz) :: dcheat3d, scheat3d - real, dimension(nx, ny ) :: precip2d - integer,dimension(nx, ny, 3 ):: cld_klevs2d - real :: dzkm, zkm - integer :: k -!================================================================================== -! fgf and OW-triggers -! read PRECIP + SH/DC conv heating + cloud-top-bot-middle from "separate" file !!! -! -!=================================================================================== - - call trig3d_fjets( nx, ny, nz, U, V, T, Q, P3D, PS, delp, delz, lon, lat, pmid, trig3d_fgf) - call trig3d_okubo( nx, ny, nz, U, V, T, Q, P3D, PS, delp, delz, lon, lat, pmid, trig3d_okw) - call trig3d_dconv(nx, ny, nz, U, V, T, Q, P3D, PS, delp, delz, lon, lat, pmid, trig3d_conv, & - dcheat3d, precip2d, cld_klevs2d, scheat3d) -!===================================================================================================== -! output of triggers: trig3d_fgf, trig3d_okw, trig3d_conv, cheat3d, precip2d, cld_klevs2d, scheat3d -! -! Bulk momentum flux=/ 0 and levels for launches -! -!===================================================================================================== - 111 format(i6, 4(3x, F8.3), ' trigger-grid ') - - do k=1, nz-1 - zkm = -7.*alog(pmid(k)*1.e-3) - dzkm = zkm +7.*alog(pmid(k+1)*1.e-3) - write(6,111) k, hybi(k), pmid(k), zkm, dzkm !' triggers ' - enddo - - end subroutine cires_3d_triggers -!================================================================================== -! tot-flux launch 0 or 1 # of Launches -! specify time-dep bulk sources: taub, klev, if_src, nf_src -! -!================================================================================== - subroutine get_spectra_tau_convgw & - (nw, im, levs, dcheat, scheat, precip, icld, xlatd, sinlat, coslat,taub, klev, if_src, nf_src) ! -! temporarily can put GEOS-5/MERRA-2 GW-lat dependent function -! - integer :: nw, im, levs - integer,dimension(im,3) :: icld - real, dimension(im, levs) :: dcheat, scheat - real, dimension(im) :: precip, xlatd, sinlat, coslat - real, dimension(im) :: taub - integer, dimension(im) :: klev, if_src - integer :: nf_src -! -! locals - real, parameter :: precip_max = 100. ! mm/day - real, parameter :: tau_amp = 35.e-3 ! 35 mPa - - integer :: i, k, klow, ktop, kmid - real :: dtot, dmax, daver -! - nf_src = 0 - if_src(1:im) = 0 - taub(1:im) = 0.0 - do i=1, im - klow = icld(i,1) - ktop = icld(i,2) - kmid= icld(i,3) - if (klow == -99 .and. ktop == -99) then - cycle - else - klev(i) = ktop - k = klow - klev(i) = k - dmax = abs(dcheat(i,k) + scheat(i,k)) - do k=klow+1, ktop - dtot =abs(dcheat(i,k) + scheat(i,k)) - if ( dtot > dmax) then - klev(i) = k - dmax = dtot - endif - enddo -! -! klev as max( dcheat(i,k) + scheat) -! vertical width of conv-heating -! -! counts/triiger=1 & taub(i) -! - nf_src = nf_src +1 - if_src(i) = 1 - taub(i) = tau_amp* precip(i)/precip_max*coslat(i) - endif - - enddo -! -! 100 mb launch and MERRA-2 slat-forcing -! - call Slat_geos5(im, xlatd, taub) - nf_src =im - do i=1, im - if_src(i) = 1 - klev(i) = 127-45 - enddo - -! with info on precip/clouds/dc_heat create Bulk -! taub(im), klev(im) -! -! print *, ' get_spectra_tau_convgw ' - end subroutine get_spectra_tau_convgw -! - subroutine get_spectra_tau_nstgw(nw, im, levs, trig_fgf, xlatd, sinlat, coslat, taub, klev, if_src, nf_src) - integer :: nw, im, levs - real, dimension(im, levs) :: trig_fgf -! real, dimension(im, levs+1) :: pint - real, dimension(im) :: xlatd, sinlat, coslat - real, dimension(im) :: taub - integer, dimension(im) :: klev, if_src - integer :: nf_src -! locals - real, parameter :: tlim_fgf = 100. ! trig_fgf > tlim_fgf, launch waves should scale-dependent - real, parameter :: tau_amp = 35.e-3 ! 35 mPa - real, parameter :: pmax = 750.e2, pmin = 100.e2 - integer, parameter :: klow =127-92, ktop=127-45 - integer, parameter :: kwidth = ktop-klow+1 - integer :: i, k, kex - real :: dtot, dmax, daver - real :: fnorm, tau_min - nf_src = 0 - if_src(1:im) = 0 - taub(1:im) = 0.0 - fnorm = 1.0 / float(kwidth) - tau_min = tau_amp*fnorm - do i=1, im -! -! only trop-c fjets so find max(trig_fgf) => klev -! use abs-values to scale tau_amp -! - - k = klow - klev(i) = k - dmax = abs(trig_fgf(i,k)) - kex = 0 - if (dmax >= tlim_fgf) kex = kex+1 - do k=klow+1, ktop - dtot = abs(trig_fgf(i,k)) - if (dtot >= tlim_fgf) kex = kex+1 - if ( dtot > dmax) then - klev(i) = k - dmax = dtot - endif - enddo - - if (dmax .ge. tlim_fgf) then - nf_src = nf_src +1 - if_src(i) = 1 - taub(i) = tau_min*float(kex) !* precip(i)/precip_max*coslat(i) - endif - - enddo -! -! print *, ' get_spectra_tau_nstgw ' - call Slat_geos5(im, xlatd, taub) - nf_src =im - do i=1, im - if_src(i) = 1 - klev(i) = 127-45 - enddo -! - end subroutine get_spectra_tau_nstgw -! - subroutine get_spectra_tau_okw(nw, im, levs, trig_okw, xlatd, sinlat, coslat, taub, klev, if_src, nf_src) - integer :: nw, im, levs - real, dimension(im, levs) :: trig_okw -! real, dimension(im, levs+1) :: pint - real, dimension(im) :: xlatd, sinlat, coslat - real, dimension(im) :: taub - integer, dimension(im) :: klev, if_src - integer :: nf_src -! locals - real, parameter :: tlim_okw = 100. ! trig_fgf > tlim_fgf, launch waves should scale-dependent - real, parameter :: tau_amp = 35.e-3 ! 35 mPa - real, parameter :: pmax = 750.e2, pmin = 100.e2 - integer, parameter :: klow =127-92, ktop=127-45 - integer, parameter :: kwidth = ktop-klow+1 - integer :: i, k, kex - real :: dtot, dmax, daver - real :: fnorm, tau_min - - nf_src = 0 - if_src(1:im) = 0 - taub(1:im) = 0.0 - fnorm = 1./float(kwidth) - tau_min = tau_amp*fnorm - print *, ' get_spectra_tau_okwgw ' - do i=1, im - k = klow - klev(i) = k - dmax = abs(trig_okw(i,k)) - kex = 0 - if (dmax >= tlim_okw) kex = kex+1 - do k=klow+1, ktop - dtot = abs(trig_okw(i,k)) - if (dtot >= tlim_fgf ) kex = kex+1 - if ( dtot > dmax) then - klev(i) = k - dmax = dtot - endif - enddo -! - if (dmax >= tlim_okw) then - nf_src = nf_src + 1 - if_src(i) = 1 - taub(i) = tau_min*float(kex) !* precip(i)/precip_max*coslat(i) - endif - - enddo - print *, ' get_spectra_tau_okwgw ' - end subroutine get_spectra_tau_okw -! -! -! -!>\ingroup cires_ugwp_run -!> @{ -!! -!! - subroutine slat_geos5_tamp(im, tau_amp, xlatdeg, tau_gw) + subroutine slat_geos5_tamp_v0(im, tau_amp, xlatdeg, tau_gw) !================= ! GEOS-5 & MERRA-2 lat-dependent GW-source function tau(z=Zlaunch) =rho* !================= @@ -498,9 +30,9 @@ subroutine slat_geos5_tamp(im, tau_amp, xlatdeg, tau_gw) tau_gw(i) = tau_amp*flat_gw enddo ! - end subroutine slat_geos5_tamp + end subroutine slat_geos5_tamp_v0 - subroutine slat_geos5(im, xlatdeg, tau_gw) + subroutine slat_geos5_v0(im, xlatdeg, tau_gw) !================= ! GEOS-5 & MERRA-2 lat-dependent GW-source function tau(z=Zlaunch) =rho* !================= @@ -537,9 +69,10 @@ subroutine slat_geos5(im, xlatdeg, tau_gw) tau_gw(i) = tau_amp*flat_gw enddo ! - end subroutine slat_geos5 - subroutine init_nazdir(naz, xaz, yaz) - use ugwp_common , only : pi2 + end subroutine slat_geos5_v0 +! + subroutine init_nazdir_v0(naz, xaz, yaz) + use ugwp_common_v0 , only : pi2 implicit none integer :: naz real, dimension(naz) :: xaz, yaz @@ -563,4 +96,4 @@ subroutine init_nazdir(naz, xaz, yaz) xaz(4) = 0.0 yaz(4) =-1.0 !S endif - end subroutine init_nazdir + end subroutine init_nazdir_v0 diff --git a/physics/cires_ugwp_triggers_v1.F90 b/physics/cires_ugwp_triggers_v1.F90 deleted file mode 100644 index 8cfd57cb7..000000000 --- a/physics/cires_ugwp_triggers_v1.F90 +++ /dev/null @@ -1,584 +0,0 @@ -module cires_ugwp_triggers_v1 - - -contains - - - subroutine ugwp_triggers - implicit none - write(6,*) ' physics-based triggers for UGWP ' - end subroutine ugwp_triggers -! - SUBROUTINE subs_diag_geo(nx, ny, lat, lon, rlat, rlon, dy, dx, con_pi, earth_r, & - cosv, rlatc, brcos, brcos2, dlam1, dlam2, dlat, divJp, divJm) - - implicit none - integer :: nx, ny - real :: lon(nx), lat(ny) - real :: rlon(nx), rlat(ny) , cosv(ny), tanlat(ny) - real :: rlatc(ny-1), brcos(ny), brcos2(ny) - real :: ra1, ra2, dx, dy, dlat - real :: con_pi, earth_r - real :: dlam1(ny), dlam2(ny), divJp(ny), divJm(ny) - integer :: j - real :: deg_to_rad -! -! specify common constants and -! geometric factors to compute deriv-es etc ... -! coriolis coslat tan etc... -! - deg_to_rad = con_pi/180.0 - ra1 = 1.0 / earth_r - ra2 = ra1*ra1 -! - rlat = lat*deg_to_rad - rlon = lon*deg_to_rad - tanlat = atan(rlat) - cosv = cos(rlat) - dy = rlat(2)-rlat(1) - dx = rlon(2)-rlon(1) -! - do j=1, ny-1 - rlatc(j) = 0.5 * (rlat(j)+rlat(j+1)) - enddo -! - do j=2, ny-1 - brcos(j) = 1.0 / cos(rlat(j))*ra1 - enddo - - brcos(1) = brcos(2) - brcos(ny) = brcos(ny-1) - brcos2 = brcos*brcos -! - dlam1 = brcos / (dx+dx) - dlam2 = brcos2 / (dx*dx) - - dlat = ra1 / (dy+dy) - - divJp = dlat*cosv - divJM = dlat*cosv -! - do j=2, ny-1 - divJp(j) = dlat*cosv(j+1)/cosv(j) - divJM(j) = dlat*cosv(j-1)/cosv(j) - enddo - divJp(1) = divjp(2) !*divjp(1)/divjp(2) - divJp(ny) = divjp(1) - divJM(1) = divjM(2) !*divjM(1)/divjM(2) - divJM(ny) = divjM(1) -! - return - end SUBROUTINE subs_diag_geo -! - subroutine get_xy_pt(V, Vx, Vy, nx, ny, dlam1, dlat) -!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -! compute for each Vert-column: grad(V) -! periodic in X and central diff ... -!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - implicit none - integer :: nx, ny - real :: V(nx, ny), dlam1(ny), dlat - real :: Vx(nx, ny), Vy(nx, ny) - integer :: i, j - do i=2, nx-1 - Vx(i,:) = dlam1(:)*(V(i+1,:)-V(i-1,:)) - enddo - Vx(1,:) = dlam1(:)*(V(2,:)-V(nx,:)) - Vx(nx,:) = dlam1(:)*(V(1,:)-V(nx-1,:)) - - do j=2, ny-1 - Vy(:,j) = dlat*(V(:,j+1)-V(:, j-1)) - enddo - Vy(:, 1) = dlat*2.*(V(:,2)-V(:,1)) - Vy(:,ny) = dlat*2.*(V(:,ny)-V(:,ny-1)) - - end subroutine get_xy_pt - - subroutine get_xyd_wind( V, Vx, Vy, Vyd, nx, ny, dlam1, dlat, divJp, divJm) -! -! compute for each Vert-column: grad(V) -!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - implicit none - integer :: nx, ny - real :: V(nx, ny), dlam1(ny), dlat - real :: Divjp(ny), Divjm(ny) - real :: Vx(nx, ny), Vy(nx, ny), Vyd(nx, ny) - integer :: i, j - do i=2, nx-1 - Vx(i,:) = dlam1(:)*(V(i+1,:)-V(i-1,:)) - enddo - Vx(1,:) = dlam1(:)*(V(2,:)-V(nx,:)) - Vx(nx,:) = dlam1(:)*(V(1,:)-V(nx-1,:)) - - do j=2, ny-1 - Vy(:,j) = dlat*(V(:,j+1)-V(:, j-1)) - enddo - Vy(:, 1) = dlat*2.*(V(:,2)-V(:,1)) - Vy(:,ny) = dlat*2.*(V(:,ny)-V(:,ny-1)) -!~~~~~~~~~~~~~~~~~~~~ -! 1/cos*d(vcos)/dy -!~~~~~~~~~~~~~~~~~~~~ - do j=2, ny-1 - Vyd(:,j) = divJP(j)*V(:,j+1)-V(:, j-1)*divJM(j) - enddo - Vyd(:, 1) = Vyd(:,2) - Vyd(:,ny) = Vyd(:,ny-1) - - end subroutine get_xyd_wind - - subroutine trig3d_fjets( nx, ny, nz, U, V, T, Q, P3D, PS, delp, delz, lon, lat, & - con_pi, con_rerth, pmid, trig3d_fgf) - implicit none - integer :: nx, ny, nz - real :: lon(nx), lat(ny) - real :: con_pi, con_rerth -! - real, dimension(nz) :: pmid - real, dimension(nx, ny, nz) :: U, V, T, Q, delp, delz, p3d - real, dimension(nx, ny ) :: PS - real, dimension(nx, ny, nz) :: trig3d_fgf -! -! locals -! - real, dimension(nx, ny) :: ux, uy, uyd, vy, vx, vyd, ptx, pty - integer :: k, i, j - - real, parameter :: cappa=2./7., pref=1.e5 - real, dimension(nx, ny) :: pt, w1, w2 - - real :: rlon(nx), rlat(ny) , cosv(ny), tanlat(ny) - real :: rlatc(ny-1), brcos(ny), brcos2(ny) - - real :: dx, dy, dlat - real :: dlam1(ny), dlam2(ny), divJp(ny), divJm(ny) - - - call subs_diag_geo(nx, ny, lat, lon, rlat, rlon, dy, dx, con_pi, con_rerth, & - cosv, rlatc, brcos, brcos2, dlam1, dlam2, dlat, divJp, divJm) - - do k=1, nz - w1(:,:) = P3d(:,:,k) - w2(:,:) = T(:,:,k) - - pt = w2*(pref/w1)**cappa - call get_xy_pt(Pt, ptx, pty, nx, ny, dlam1, dlat) - w1(:,:) = V(:,:, K) - call get_xyd_wind( w1, Vx, Vy, Vyd, nx, ny, dlam1, dlat, divJp, divJm) - w1(:,:) = U(:,:, K) - call get_xyd_wind( w1, Ux, Uy, Uyd, nx, ny, dlam1, dlat, divJp, divJm) - - trig3d_fgf(:,:,k) = -ptx*ptx*ux - pty*pty*vy -(vx+uyd)*ptx*pty - - enddo - end subroutine trig3d_fjets - - subroutine trig3d_okubo( nx, ny, nz, U, V, T, Q, P3d, PS, delp, delz, lon, lat, pmid, trig3d_okw) - implicit none - integer :: nx, ny, nz - real :: lon(nx), lat(ny) - real :: con_pi, con_rerth -! - real, dimension(nz) :: pmid - real, dimension(nx, ny, nz) :: U, V, T, Q, delp, delz, p3d - real, dimension(nx, ny ) :: PS - real, dimension(nx, ny, nz) :: trig3d_okw -! -! locals -! - real, dimension(nx, ny) :: ux, uy, uyd, vy, vx, vyd, ptx, pty - integer :: k, i, j - - real, parameter :: cappa=2./7., pref=1.e5 - real, dimension(nx, ny) :: pt, w1, w2, d1 - - real :: rlon(nx), rlat(ny) , cosv(ny), tanlat(ny) - real :: rlatc(ny-1), brcos(ny), brcos2(ny) - - real :: dx, dy, dlat - real :: dlam1(ny), dlam2(ny), divJp(ny), divJm(ny) - - call subs_diag_geo(nx, ny, lat, lon, rlat, rlon, dy, dx, con_pi, con_rerth, & - cosv, rlatc, brcos, brcos2, dlam1, dlam2, dlat, divJp, divJm) - - do k=1, nz - w1(:,:) = P3d(:,:,k) - w2(:,:) = T(:,:,k) - - pt = w2*(pref/w1)**cappa - call get_xy_pt(Pt, ptx, pty, nx, ny, dlam1, dlat) - w1(:,:) = V(:,:, K) - call get_xyd_wind( w1, Vx, Vy, Vyd, nx, ny, dlam1, dlat, divJp, divJm) - w1(:,:) = U(:,:, K) - call get_xyd_wind( w1, Ux, Uy, Uyd, nx, ny, dlam1, dlat, divJp, divJm) - - trig3d_okw(:,:,k) = -ptx*ptx*ux - pty*pty*vy -(vx+uyd)*ptx*pty - w1 = (Ux -Vy)*(Ux-Vy) + (Vx +Uy)*(Vx+Uy) ! S2 - W2 = (Vx - Uyd)*(Vx - Uyd) - D1 = Ux + Vyd - trig3d_okw(:,:,k) = W1 -W2 -! trig3d_okw(:, :, k) =S2 -W2 -! trig3d_okw(:, :, k) =D1*D1 + 4*(Vx*Uyd -Ux*Vyd) ! ocean -! trig3d_okw(:, :, k) = trig3d_okw(:,:,k) + D1*D1 + 2.*D1*sqrt(abs(W1-W2)) ! S2 =W1Ted-luk - enddo - end subroutine trig3d_okubo -! - subroutine trig3d_dconv(nx, ny, nz, U, V, T, Q, P3d, PS, delp, delz, lon, lat, pmid, trig3d_conv, & - dcheat3d, precip2d, cld_klevs2d, scheat3d) - - implicit none - integer :: nx, ny, nz - real :: lon(nx), lat(ny) -! - real, dimension(nz) :: pmid - real, dimension(nx, ny, nz) :: U, V, T, Q, delp, delz, p3d - real, dimension(nx, ny ) :: PS - real, dimension(nx, ny, nz) :: trig3d_conv - - real, dimension(nx, ny, nz) :: dcheat3d, scheat3d - real, dimension(nx, ny ) :: precip2d - integer,dimension(nx, ny, 3 ):: cld_klevs2d - integer :: k - end subroutine trig3d_dconv - - subroutine cires_3d_triggers( nx, ny, nz, lon, lat, pmid, & - U, V, W, T, Q, delp, delz, p3d, PS, HS, Hyam, Hybm, Hyai, Hybi, & - con_pi, con_rerth, trig3d_okw, trig3d_fgf, trig3d_conv, & - dcheat3d, precip2d, cld_klevs2d, scheat3d) - - implicit none - integer :: nx, ny, nz - real :: lon(nx), lat(ny) - real :: con_pi, con_rerth -! -! reversed ??? Hyai, Hybi , pmid -! - real, dimension(nz+2) :: Hyai, Hybi - real, dimension(nz+1) :: Hyam, Hybm -! - real, dimension(nz) :: pmid - real, dimension(nx, ny, nz) :: U, V, W, T, Q, delp, delz, p3d - real, dimension(nx, ny ) :: PS, HS - real, dimension(nx, ny, nz) :: trig3d_okw, trig3d_fgf, trig3d_conv - real, dimension(nx, ny, nz) :: dcheat3d, scheat3d - real, dimension(nx, ny ) :: precip2d - integer,dimension(nx, ny, 3 ):: cld_klevs2d - real :: dzkm, zkm - integer :: k -!================================================================================== -! fgf and OW-triggers -! read PRECIP + SH/DC conv heating + cloud-top-bot-middle from "separate" file !!! -! -!=================================================================================== - - call trig3d_fjets( nx, ny, nz, U, V, T, Q, P3D, PS, delp, delz, lon, lat, & - con_pi, con_rerth, pmid, trig3d_fgf) - call trig3d_okubo( nx, ny, nz, U, V, T, Q, P3D, PS, delp, delz, lon, lat, pmid, trig3d_okw) - call trig3d_dconv(nx, ny, nz, U, V, T, Q, P3D, PS, delp, delz, lon, lat, pmid, trig3d_conv, & - dcheat3d, precip2d, cld_klevs2d, scheat3d) -!===================================================================================================== -! output of triggers: trig3d_fgf, trig3d_okw, trig3d_conv, cheat3d, precip2d, cld_klevs2d, scheat3d -! -! Bulk momentum flux=/ 0 and levels for launches -! -!===================================================================================================== - 111 format(i6, 4(3x, F8.3), ' trigger-grid ') - - do k=1, nz-1 - zkm = -7.*alog(pmid(k)*1.e-3) - dzkm = zkm +7.*alog(pmid(k+1)*1.e-3) - write(6,111) k, hybi(k), pmid(k), zkm, dzkm !' triggers ' - enddo - - end subroutine cires_3d_triggers -!================================================================================== -! tot-flux launch 0 or 1 # of Launches -! specify time-dep bulk sources: taub, klev, if_src, nf_src -! -!================================================================================== - subroutine get_spectra_tau_convgw & - (nw, im, levs, dcheat, scheat, precip, icld, xlatd, sinlat, coslat,taub, klev, if_src, nf_src) -! -! temporarily can put GEOS-5/MERRA-2 GW-lat dependent function -! - integer :: nw, im, levs - integer,dimension(im,3) :: icld - real, dimension(im, levs) :: dcheat, scheat - real, dimension(im) :: precip, xlatd, sinlat, coslat - real, dimension(im) :: taub - integer, dimension(im) :: klev, if_src - integer :: nf_src -! -! locals - real, parameter :: precip_max = 100. ! mm/day - real, parameter :: tau_amp = 35.e-3 ! 35 mPa - - integer :: i, k, klow, ktop, kmid - real :: dtot, dmax, daver -! - nf_src = 0 - if_src(1:im) = 0 - taub(1:im) = 0.0 - do i=1, im - klow = icld(i,1) - ktop = icld(i,2) - kmid= icld(i,3) - if (klow == -99 .and. ktop == -99) then - cycle - else - klev(i) = ktop - k = klow - klev(i) = k - dmax = abs(dcheat(i,k) + scheat(i,k)) - do k=klow+1, ktop - dtot =abs(dcheat(i,k) + scheat(i,k)) - if ( dtot > dmax) then - klev(i) = k - dmax = dtot - endif - enddo -! -! klev as max( dcheat(i,k) + scheat) -! vertical width of conv-heating -! -! counts/triiger=1 & taub(i) -! - nf_src = nf_src +1 - if_src(i) = 1 - taub(i) = tau_amp* precip(i)/precip_max*coslat(i) - endif - - enddo -! -! 100 mb launch and MERRA-2 slat-forcing -! - call Slat_geos5(im, xlatd, taub) - nf_src =im - do i=1, im - if_src(i) = 1 - klev(i) = 127-45 - enddo - -! with info on precip/clouds/dc_heat create Bulk -! taub(im), klev(im) -! -! print *, ' get_spectra_tau_convgw ' - end subroutine get_spectra_tau_convgw -! - subroutine get_spectra_tau_nstgw(nw, im, levs, trig_fgf, xlatd, sinlat, coslat, taub, klev, if_src, nf_src) - integer :: nw, im, levs - real, dimension(im, levs) :: trig_fgf -! real, dimension(im, levs+1) :: pint - real, dimension(im) :: xlatd, sinlat, coslat - real, dimension(im) :: taub - integer, dimension(im) :: klev, if_src - integer :: nf_src -! locals - real, parameter :: tlim_fgf = 100. ! trig_fgf > tlim_fgf, launch waves should scale-dependent - real, parameter :: tau_amp = 35.e-3 ! 35 mPa - real, parameter :: pmax = 750.e2, pmin = 100.e2 - integer, parameter :: klow =127-92, ktop=127-45 - integer, parameter :: kwidth = ktop-klow+1 - integer :: i, k, kex - real :: dtot, dmax, daver - real :: fnorm, tau_min - nf_src = 0 - if_src(1:im) = 0 - taub(1:im) = 0.0 - fnorm = 1.0 / float(kwidth) - tau_min = tau_amp*fnorm - do i=1, im -! -! only trop-c fjets so find max(trig_fgf) => klev -! use abs-values to scale tau_amp -! - - k = klow - klev(i) = k - dmax = abs(trig_fgf(i,k)) - kex = 0 - if (dmax >= tlim_fgf) kex = kex+1 - do k=klow+1, ktop - dtot = abs(trig_fgf(i,k)) - if (dtot >= tlim_fgf) kex = kex+1 - if ( dtot > dmax) then - klev(i) = k - dmax = dtot - endif - enddo - - if (dmax .ge. tlim_fgf) then - nf_src = nf_src +1 - if_src(i) = 1 - taub(i) = tau_min*float(kex) !* precip(i)/precip_max*coslat(i) - endif - - enddo -! -! print *, ' get_spectra_tau_nstgw ' - call Slat_geos5(im, xlatd, taub) - nf_src =im - do i=1, im - if_src(i) = 1 - klev(i) = 127-45 - enddo -! - end subroutine get_spectra_tau_nstgw -! - subroutine get_spectra_tau_okw(nw, im, levs, trig_okw, xlatd, sinlat, coslat, taub, klev, if_src, nf_src) - integer :: nw, im, levs - real, dimension(im, levs) :: trig_okw -! real, dimension(im, levs+1) :: pint - real, dimension(im) :: xlatd, sinlat, coslat - real, dimension(im) :: taub - integer, dimension(im) :: klev, if_src - integer :: nf_src -! locals - real, parameter :: tlim_okw = 100. ! trig_fgf > tlim_fgf, launch waves should scale-dependent - real, parameter :: tau_amp = 35.e-3 ! 35 mPa - real, parameter :: pmax = 750.e2, pmin = 100.e2 - integer, parameter :: klow =127-92, ktop=127-45 - integer, parameter :: kwidth = ktop-klow+1 - integer :: i, k, kex - real :: dtot, dmax, daver - real :: fnorm, tau_min - - nf_src = 0 - if_src(1:im) = 0 - taub(1:im) = 0.0 - fnorm = 1./float(kwidth) - tau_min = tau_amp*fnorm - print *, ' get_spectra_tau_okwgw ' - do i=1, im - k = klow - klev(i) = k - dmax = abs(trig_okw(i,k)) - kex = 0 - if (dmax >= tlim_okw) kex = kex+1 - do k=klow+1, ktop - dtot = abs(trig_okw(i,k)) - if (dtot >= tlim_fgf ) kex = kex+1 - if ( dtot > dmax) then - klev(i) = k - dmax = dtot - endif - enddo -! - if (dmax >= tlim_okw) then - nf_src = nf_src + 1 - if_src(i) = 1 - taub(i) = tau_min*float(kex) !* precip(i)/precip_max*coslat(i) - endif - - enddo - print *, ' get_spectra_tau_okwgw ' - end subroutine get_spectra_tau_okw -! -! -! -!>\ingroup cires_ugwp_run -!> @{ -!! -!! - subroutine slat_geos5_tamp_v1(im, tau_amp, xlatdeg, tau_gw) -!================= -! GEOS-5 & MERRA-2 lat-dependent GW-source function tau(z=Zlaunch) =rho* -!================= - implicit none - integer :: im - real :: tau_amp, xlatdeg(im), tau_gw(im) - real :: latdeg, flat_gw, tem - integer :: i - -! -! if-lat -! - do i=1, im - latdeg = abs(xlatdeg(i)) - if (latdeg < 15.3) then - tem = (latdeg-3.0) / 8.0 - flat_gw = 0.75 * exp(-tem * tem) - if (flat_gw < 1.2 .and. latdeg <= 3.0) flat_gw = 0.75 - elseif (latdeg < 31.0 .and. latdeg >= 15.3) then - flat_gw = 0.10 - elseif (latdeg < 60.0 .and. latdeg >= 31.0) then - tem = (latdeg-60.0) / 23.0 - flat_gw = 0.50 * exp(- tem * tem) - elseif (latdeg >= 60.0) then - tem = (latdeg-60.0) / 70.0 - flat_gw = 0.50 * exp(- tem * tem) - endif - tau_gw(i) = tau_amp*flat_gw - enddo -! - end subroutine slat_geos5_tamp_v1 - - subroutine slat_geos5(im, xlatdeg, tau_gw) -!================= -! GEOS-5 & MERRA-2 lat-dependent GW-source function tau(z=Zlaunch) =rho* -!================= - implicit none - integer :: im - real :: xlatdeg(im) - real :: tau_gw(im) - real :: latdeg - real, parameter :: tau_amp = 100.e-3 - real :: trop_gw, flat_gw - integer :: i -! -! if-lat -! - trop_gw = 0.75 - do i=1, im - latdeg = xlatdeg(i) - if (-15.3 < latdeg .and. latdeg < 15.3) then - flat_gw = trop_gw*exp(-( (abs(latdeg)-3.)/8.0)**2) - if (flat_gw < 1.2 .and. abs(latdeg) <= 3.) flat_gw = trop_gw - else if (latdeg > -31. .and. latdeg <= -15.3) then - flat_gw = 0.10 - else if (latdeg < 31. .and. latdeg >= 15.3) then - flat_gw = 0.10 - else if (latdeg > -60. .and. latdeg <= -31.) then - flat_gw = 0.50*exp(-((abs(latdeg)-60.)/23.)**2) - else if (latdeg < 60. .and. latdeg >= 31.) then - flat_gw = 0.50*exp(-((abs(latdeg)-60.)/23.)**2) - else if (latdeg <= -60.) then - flat_gw = 0.50*exp(-((abs(latdeg)-60.)/70.)**2) - else if (latdeg >= 60.) then - flat_gw = 0.50*exp(-((abs(latdeg)-60.)/70.)**2) - end if - tau_gw(i) = tau_amp*flat_gw - enddo -! - end subroutine slat_geos5 - subroutine init_nazdir(con_pi, naz, xaz, yaz) - implicit none - real :: con_pi - integer :: naz - real, dimension(naz) :: xaz, yaz - integer :: idir - real :: phic, drad - real :: pi2 - pi2 = 2.0*con_pi - drad = pi2/float(naz) - if (naz.ne.4) then - do idir =1, naz - Phic = drad*(float(idir)-1.0) - xaz(idir) = cos(Phic) - yaz(idir) = sin(Phic) - enddo - else -! if (naz.eq.4) then - xaz(1) = 1.0 !E - yaz(1) = 0.0 - xaz(2) = 0.0 - yaz(2) = 1.0 !N - xaz(3) =-1.0 !W - yaz(3) = 0.0 - xaz(4) = 0.0 - yaz(4) =-1.0 !S - endif - end subroutine init_nazdir - - -end module cires_ugwp_triggers_v1 - diff --git a/physics/cires_ugwp_utils.F90 b/physics/cires_ugwp_utils.F90 deleted file mode 100644 index 63a5b3238..000000000 --- a/physics/cires_ugwp_utils.F90 +++ /dev/null @@ -1,152 +0,0 @@ -! - subroutine um_flow(nz, klow, ktop, up, vp, tp, qp, dp, zpm, zpi, & - pmid, pint, bn2, uhm, vhm, bn2hm, rhohm) -! - use ugwp_common, only : bnv2min, grav, gocp, fv, rdi - implicit none -! -! mass-averaged variables between klow-ktop -! - integer, intent(in) :: nz, klow, ktop - real, dimension(nz), intent(in) :: up, vp, tp, qp, dp, zpm, pmid - real, dimension(nz+1), intent(in) :: pint, zpi - real, dimension(nz), intent(out) :: bn2 - - real :: vtj, rhok, bnv2, rdz - real :: vtkp, vtk, dzp, rhm,dphm - - real, intent(out) :: uhm, vhm, bn2hm, rhohm - - integer :: k -! - dphm = 0.0 !pint(k+1)-pint(k)) - - uhm = 0.0 ! dphm*u1(k) - vhm = 0.0 ! dphm*v1(k) - rhm = 0.0 ! - bn2hm = 0.0 ! -! - do k=klow, ktop - vtj = tp(k) * (1.+fv*qp(k)) - vtk = vtj - vtkp = tp(k+1) * (1.+fv*qp(k+1)) - rhok = rdi * pmid(k) / vtj ! density kg/m**3 - rdz = 1.0 / (zpm(k+1)-zpm(k)) -! dry -! bnv2 = grav * (rdz * ( tp(k+1)-tp(k)) +grcp) /tp(k) -! -! wet -! - bnv2 = grav * (rdz * ( vtkp- vtk) +gocp) /vtk -! if (bnv2 < 0) print *, k, bnv2, ' bnv2 < 0 ', klow, ktop - bnv2 = max(bnv2, bnv2min ) - dzp = pint(k+1)-pint(k) - - dphm = dphm + dzp - uhm = uhm + up(k)*dzp - vhm = vhm + vp(k)*dzp - rhm = rhm + rhok*dzp - bn2hm = bn2hm + bnv2 * dzp - bn2(k) = bnv2 - enddo - - uhm = uhm/dphm - vhm = vhm/dphm - rhm = rhm/dphm - bn2hm = bn2hm/dphm - rhohm = rhm/dphm -! -! print *, ' MF-BV ', bn2hm, bn2(ktop), bn2(klow) -! - end subroutine um_flow -! -! - subroutine mflow_tauz(levs, up, vp, tp, qp, dp, zpm, zpi, & - pmid, pint, rho, ui, vi, ti, bn2i, bvi, rhoi) - - use ugwp_common, only : bnv2min, grav, gocp, fv, rdi - - implicit none - - integer :: levs - real, dimension(levs) :: up, vp, tp, qp, dp, zpm, pmid - real, dimension(levs+1) :: pint, rho, zpi - real, dimension(levs) :: zdelpi, zdelpm - real :: zul, bvl - real, dimension(levs+1) :: ui, vi, bn2i, bvi, rhoi, ti, qi - - real :: vtj, rhok, bnv2, rdz - real :: vtkp, vtk, dzp - real :: vtji - integer :: k -! -! get interface values from surf to top -! - do k=2,levs - vi(k) = 0.5 *(vp(k-1) + vp(k)) - ui(k) = 0.5 *(up(k-1) + up(k)) - ti(k) = 0.5 *(tp(k-1) + tp(k)) - qi(k) = 0.5 *(qp(k-1) + qp(k)) - enddo - - k=1 - ti(k) = tp(k) - ui(k) = up(k) - vi(k) = vp(k) - qi(k) = qp(k) - k= levs - ti(k+1) = tp(k) - ui(k+1) = up(k) - vi(k+1) = vp(k) - qi(k+1)=qp(k) - - do k=1,levs-1 - vtj = tp(k) * (1.+fv*qp(k)) - vtji = ti(k) * (1.+fv*qi(k)) - rho(k) = rdi * pmid(k) / vtj ! density kg/m**3 - rhoi(k) = rdi * pint(k) / vtji - vtk = vtj - vtkp = tp(k+1) * (1.+fv*qp(k+1)) - rdz = 1. / ( zpm(k+1)-zpm(k)) - bnv2 = grav * (rdz * ( vtkp- vtk) +gocp) /vtji - bn2i(k) = max(bnv2, bnv2min ) - bvi(k) = sqrt( bn2i(k) ) - vtk = vtkp - enddo - k = levs - vtj = tp(k) ! * (1.+fv*qp(k)) - vtji = ti(k) !* (1.+fv*qi(k)) - rho(k) = rdi * pmid(k) / vtj - rhoi(k) = rdi * pint(k) / vtji - bn2i(k) = bn2i(k-1) - bvi(k) = sqrt( bn2i(k) ) - k = levs+1 - rhoi(k) = rdi * pint(k) / ti(k) - bn2i(k) = bn2i(k-1) - bvi(k) = sqrt( bn2i(k) ) -! do k=1,levs -! write(6, 121) k, zpm(k)*1.e-3, zpi(k)*1.e-3, bvi(k), rho(k), rhoi(k) -! enddo - 121 format(i5, 2x, 3(2x, F10.3), 2(2x, E10.3)) - - end subroutine mflow_tauz - -! - subroutine get_unit_vector(u, v, u_n, v_n, mag) - implicit none - real, intent(in) :: u, v - real, intent(out) :: u_n, v_n, mag -! - - mag = sqrt(u*u + v*v) - - if (mag > 0.0) then - u_n = u/mag - v_n = v/mag - else - u_n = 0. - v_n = 0. - end if - - end subroutine get_unit_vector -! diff --git a/physics/cires_ugwpv1_initialize.F90 b/physics/cires_ugwpv1_initialize.F90 new file mode 100644 index 000000000..ad39def17 --- /dev/null +++ b/physics/cires_ugwpv1_initialize.F90 @@ -0,0 +1,828 @@ +!=============================== +! cu-cires ugwp-scheme +! initialization of selected +! init gw-solvers (1,2,3,4) +! init gw-source specifications +! init gw-background dissipation +!============================== +! +! Part-0 specifications of common constants, limiters and "criiical" values +! +! + + module ugwp_common +! + use machine, only : kind_phys + + implicit none + + real(kind=kind_phys) :: pi, pi2, pih, rad_to_deg, deg_to_rad + real(kind=kind_phys) :: arad, p0s + real(kind=kind_phys) :: grav, grav2, rgrav, rgrav2 + real(kind=kind_phys) :: cpd, rd, rv, fv + real(kind=kind_phys) :: rdi, rcpd, rcpd2 + + real(kind=kind_phys) :: gor, gr2, grcp, gocp, rcpdl, grav2cpd + real(kind=kind_phys) :: bnv2min, bnv2max + real(kind=kind_phys) :: dw2min, velmin, minvel + real(kind=kind_phys) :: omega1, omega2, omega3 + real(kind=kind_phys) :: hpscale, rhp, rhp2, rh4, rhp4, khp, hpskm + real(kind=kind_phys) :: mkzmin, mkz2min, mkzmax, mkz2max, cdmin + real(kind=kind_phys) :: rcpdt + +! real(kind=kind_phys), parameter :: grav2 = grav + grav +! real(kind=kind_phys), parameter :: rgrav = 1.0/grav, rgrav2= rgrav*rgrav +! real(kind=kind_phys), parameter :: rdi = 1.0 / rd, rcpd = 1./cpd, rcpd2 = 0.5/cpd +! real(kind=kind_phys), parameter :: gor = grav/rd, rcpdt = 1./(cp*dtp) + +! real(kind=kind_phys), parameter :: gr2 = grav*gor +! real(kind=kind_phys), parameter :: grcp = grav*rcpd, gocp = grcp +! real(kind=kind_phys), parameter :: rcpdl = cpd*rgrav ! 1/[g/cp] == cp/g +! real(kind=kind_phys), parameter :: grav2cpd = grav*grcp ! g*(g/cp)= g^2/cp +! real(kind=kind_phys), parameter :: pi2 = 2.*pi, pih = .5*pi +! real(kind=kind_phys), parameter :: rad_to_deg=180.0/pi, deg_to_rad=pi/180.0 +! +! real(kind=kind_phys), parameter :: bnv2min = (pi2/1800.)*(pi2/1800.) +! real(kind=kind_phys), parameter :: bnv2max = (pi2/30.)*(pi2/30.) +! real(kind=kind_phys), parameter :: dw2min=1.0, velmin=sqrt(dw2min), minvel = 0.5 +! real(kind=kind_phys), parameter :: omega1 = pi2/86400., omega2 = 2.*omega1, omega3 = 3.*omega1 +! +! real(kind=kind_phys), parameter :: hpscale= 7000., rhp=1./hpscale, rhp2=.5*rhp, rh4 = 0.25*rhp +! real(kind=kind_phys), parameter :: mkzmin = pi2/80.0e3, mkz2min = mkzmin*mkzmin +! real(kind=kind_phys), parameter :: mkzmax = pi2/500., mkz2max = mkzmax*mkzmax +! real(kind=kind_phys), parameter :: cdmin = 2.e-2/mkzmax +! real(kind=kind_phys), parameter :: pi = 4.*atan(1.0), +! real(kind=kind_phys), parameter :: grav =9.81, cpd = 1004. +! real(kind=kind_phys), parameter :: rd = 287.0 , rv =461.5 +! real(kind=kind_phys), parameter :: fv = rv/rd - 1.0 +! real(kind=kind_phys), parameter :: arad = 6370.e3 + + end module ugwp_common + + subroutine init_nazdir(naz, xaz, yaz) + + use machine, only : kind_phys + use ugwp_common, only : pi2 + + implicit none + + integer :: naz + real(kind=kind_phys), dimension(naz) :: xaz, yaz + integer :: idir + real(kind=kind_phys) :: phic, drad + + drad = pi2/float(naz) + if (naz.ne.4) then + do idir =1, naz + Phic = drad*(float(idir)-1.0) + xaz(idir) = cos(Phic) + yaz(idir) = sin(Phic) + enddo + else +! if (naz.eq.4) then + xaz(1) = 1.0 !E + yaz(1) = 0.0 + xaz(2) = 0.0 + yaz(2) = 1.0 !N + xaz(3) =-1.0 !W + yaz(3) = 0.0 + xaz(4) = 0.0 + yaz(4) =-1.0 !S + endif + end subroutine init_nazdir +! +! +!=================================================== +! +!Part-1 init => wave dissipation + RFriction +! +!=================================================== + subroutine init_global_gwdis(levs, zkm, pmb, kvg, ktg, krad, kion, me, master) +! + use machine , only : kind_phys + use ugwp_common, only : pih, pi + + implicit none + integer , intent(in) :: me, master + integer , intent(in) :: levs + real(kind=kind_phys), intent(in) :: zkm(levs), pmb(levs) ! in km-Pa + real(kind=kind_phys), intent(out), dimension(levs+1) :: kvg, ktg, krad, kion +! +!locals + data +! + integer :: k + real(kind=kind_phys), parameter :: vusurf = 2.e-5 + real(kind=kind_phys), parameter :: musurf = vusurf/1.95 + real(kind=kind_phys), parameter :: hpmol = 7.0 +! + real(kind=kind_phys), parameter :: kzmin = 0.1 + real(kind=kind_phys), parameter :: kturbo = 100. + real(kind=kind_phys), parameter :: zturbo = 130. + real(kind=kind_phys), parameter :: zturw = 30. + real(kind=kind_phys), parameter :: inv_pra = 3. !kt/kv =inv_pr +! + real(kind=kind_phys), parameter :: alpha = 1./86400./15. ! height variable see Zhu-1993 from 60-days => 6 days + real(kind=kind_phys) :: pa_alp = 750. ! super-RF parameters from FV3-dycore GFSv17/16 sett + real(kind=kind_phys) :: tau_alp = 10. ! days (750 Pa /10days) +! + real(kind=kind_phys), parameter :: kdrag = 1./86400./30. !parametrization for WAM ion drag as e-density function + real(kind=kind_phys), parameter :: zdrag = 100. + real(kind=kind_phys), parameter :: zgrow = 50. +! + real(kind=kind_phys) :: vumol, mumol, keddy, ion_drag + real(kind=kind_phys) :: rf_fv3, rtau_fv3, ptop, pih_dlog +! + real(kind=kind_phys) :: ae1 ,ae2 +! + + ptop = pmb(levs) + rtau_fv3 = 1./86400./tau_alp + pih_dlog = pih/log(pa_alp/ptop) + + do k=1, levs + ae1 = zkm(k)/hpmol + vumol = vusurf*exp(ae1) + mumol = musurf*exp(ae1) + ae2 = -((zkm(k)-zturbo) /zturw)**2 + keddy = kturbo*exp(ae2) + + kvg(k) = vumol + keddy + ktg(k) = mumol + keddy*inv_pra + + krad(k) = alpha +! + ion_drag = kdrag +! + kion(k) = ion_drag! +! add Rayleigh_Super of FV3 for pmb < pa_alp +! + if (pmb(k) .le. pa_alp) then + rf_fv3=rtau_fv3*sin(pih_dlog*log(pa_alp/pmb(k)))**2 + krad(k) = krad(k) + rf_fv3 + kion(k) = kion(k) + rf_fv3 + + endif + +! write(6,132) zkm(k), kvg(k), kvg(k)*(6.28/5000.)**2, kion(k) + enddo + + k= levs+1 + kion(k) = kion(k-1) + krad(k) = krad(k-1) + kvg(k) = kvg(k-1) + ktg(k) = ktg(k-1) + +! if (me == master) then +! write(6, * ) ' zkm(k), kvg(k), kvg(k)*(6.28/5000.)**2, kion(k) ... init_global_gwdis' +! do k=1, levs, 1 +! write(6,132) zkm(k), kvg(k), kvg(k)*(6.28/5000.)**2, kion(k), pmb(k) +! enddo +! endif +! +! 132 format( 2x, F8.3,' dis-scales:', 4(2x, E10.3)) + + end subroutine init_global_gwdis +! +! ======================================================================== +! Part 2 - sources +! wave sources +! ======================================================================== +! +! ugwp_oro_init +! +!========================================================================= + module ugwp_oro_init + use machine , only : kind_phys + use ugwp_common, only : bnv2min, grav, grcp, fv, grav, cpd, grcp, pi + use ugwp_common, only : mkzmin, mkz2min + implicit none +! +! constants and "crirtical" values to run oro-mtb_gw physics +! +! + real(kind=kind_phys), parameter :: hncrit=9000. ! max value in meters for elvmax + real(kind=kind_phys), parameter :: hminmt=50. ! min mtn height (*j*) + real(kind=kind_phys), parameter :: sigfac=4.0 ! mb3a expt test for elvmax factor + real(kind=kind_phys), parameter :: hpmax=2500.0 + real(kind=kind_phys), parameter :: hpmin=25.0 +! +! + real(kind=kind_phys), parameter :: minwnd=1.0 ! min wind component (*j*) + real(kind=kind_phys), parameter :: dpmin=5000.0 ! minimum thickness of the reference layer in pa + + + character(len=8) :: strver = 'gfs_2018' + character(len=8) :: strbase = 'gfs_2018' + + real(kind=kind_phys), parameter :: rimin=-10., ric=0.25 + + real(kind=kind_phys), parameter :: frmax=10., frc =1.0, frmin =0.01 + real(kind=kind_phys), parameter :: ce=0.8, ceofrc=ce/frc, cg=0.5 + real(kind=kind_phys), parameter :: gmax=1.0, veleps=1.0, factop=0.5! + real(kind=kind_phys), parameter :: efmin=0.5, efmax=10.0 + + real(kind=kind_phys), parameter :: rlolev=50000.0 + integer, parameter :: mdir = 8 + real(kind=kind_phys), parameter :: fdir=mdir/(8.*atan(1.0)) + real(kind=kind_phys), parameter :: zpgeo=2.*atan(1.0) + + integer nwdir(mdir) + data nwdir/6,7,5,8,2,3,1,4/ + save nwdir + + real(kind=kind_phys), parameter :: odmin = 0.1, odmax = 10.0 + real(kind=kind_phys), parameter :: fcrit_sm = 0.7, fcrit_sm2 = fcrit_sm * fcrit_sm + real(kind=kind_phys), parameter :: fcrit_gfs = 0.7, fcrit_v1 = 0.7 + real(kind=kind_phys), parameter :: fcrit_mtb = 0.7 + + real(kind=kind_phys), parameter :: zbr_pi = zpgeo + real(kind=kind_phys), parameter :: zbr_ifs = zpgeo + +! + + real(kind=kind_phys), parameter :: kxoro=6.28e-3/200. ! + real(kind=kind_phys), parameter :: coro = 0.0 + integer,parameter :: nridge=2 + real(kind=kind_phys), parameter :: sigma_std=1./100., gamm_std=1.0 + + real(kind=kind_phys) :: cdmb ! scale factors for mtb + real(kind=kind_phys) :: cleff ! scale factors for orogw + + integer :: nworo ! number of waves + integer :: nazoro ! number of azimuths + integer :: nstoro ! flag for stochastic launch above SG-peak + + +!------------------------------------------------------------------------------ +! small-scale orography parameters for TOFD of Beljaars et al., 2004, QJRMS +! SA-option can be controlled by Integral limits of fluxes +! in B2004: klow = 0.003 1/m ~ 2km and kinf ~ 6.28/10/(Z1)~< 1 km => meters +! these limits can change strength of TOFD... choice of k0tr ~1/10 km (10km ~dx of C768) +! kmax = kdis_pbl +!------------------------------------------------------------------------------ + real(kind=kind_phys), parameter :: kmax = 6.28/(10.*25.) ! max k-tofd + real(kind=kind_phys), parameter :: k1tr = 6.28/(2100) ! max k-transition from -1.9/slope to -2.8/slope + real(kind=kind_phys), parameter :: kflt = 6.28/(18.e3) ! + real(kind=kind_phys), parameter :: k0tr = 6.28/(10.e3) ! min k-tofd + real(kind=kind_phys), parameter :: nk1tr = 2.8 + real(kind=kind_phys), parameter :: nk0tr = 1.9 + real(kind=kind_phys), parameter :: a1_tofd = kflt ** nk1tr *1.e3 + real(kind=kind_phys), parameter :: a2_tofd = k1tr ** (nk0tr-nk1tr) + real(kind=kind_phys), parameter :: fix_tofd = 2.* 0.005 * 12 *0.6 !value= 0.072 +! +! B2004 scheme is based on the empirical vertical profile of the tofd divergence: +! Ax_tofd(Z)=exp(-[Z/ze_tofd]^3/2) / Z^1.2..... +! TOFD-flux/TMS-flux must dissipate due to PBL-diffusion with spectral damping +! Here we can enhance TOFD-impact by selecting k0tr and kmax limits +! as functions of resolution and PBL-dissipation +! + integer, parameter :: n_tofd = 2 ! depth of SSO for TOFD compared with Zpbl + real(kind=kind_phys), parameter :: const_tofd = 0.0759 ! alpha*beta*Cmd*Ccorr*2.109 = 12.*1.*0.005*0.6*2.109 = 0.0759 + real(kind=kind_phys), parameter :: ze_tofd = 1500.0 ! BJ's z-decay in meters, 1.5 km + real(kind=kind_phys), parameter :: a12_tofd = 0.0002662*0.005363 ! BJ's k-spect const for sigf2 * a1*a2*exp(-[z/zdec]**1.5] + real(kind=kind_phys), parameter :: ztop_tofd = 3.*ze_tofd ! no TOFD > this height 4.5 km +!------------------------------------------------------------------------------ +! + + contains +! + subroutine init_oro_gws(nwaves, nazdir, nstoch, effac, & + lonr, kxw ) +! +! + integer :: nwaves, nazdir, nstoch + integer :: lonr + real(kind=kind_phys) :: cdmbX + real(kind=kind_phys) :: kxw + real(kind=kind_phys) :: effac ! it is analog of cdmbgwd(2) for GWs, off for now +!-----------------------------! GFS-setup for cdmb & cleff +! cdmb = 4.0 * (192.0/IMX) +! cleff = 0.5E-5 / SQRT(IMX/192.0) = 0.5E-5*SQRT(192./IMX) +! + real(kind=kind_phys), parameter :: lonr_refmb = 4.0 * 192.0 + real(kind=kind_phys), parameter :: lonr_refgw = 192.0 + real(kind=kind_phys), parameter :: cleff_ref = 0.5e-5 ! 1256 km = 10 * 125 km ??? + +! copy to "ugwp_oro_init" => nwaves, nazdir, nstoch + + nworo = nwaves + nazoro = nazdir + nstoro = nstoch + + cdmbX = lonr_refmb/float(lonr) + + cdmb = cdmbX + cleff = cleff_ref * sqrt(lonr_refgw/float(lonr)) !* effac +! + end subroutine init_oro_gws +! + + end module ugwp_oro_init +! ========================================================================= +! +! ugwp_conv_init +! +!========================================================================= + module ugwp_conv_init + + use machine , only : kind_phys + + + implicit none + real(kind=kind_phys) :: eff_con ! scale factors for conv GWs + integer :: nwcon ! number of waves + integer :: nazcon ! number of azimuths + integer :: nstcon ! flag for stochastic choice of launch level above Conv-cloud + real(kind=kind_phys) :: con_dlength + real(kind=kind_phys) :: con_cldf + + real(kind=kind_phys), parameter :: cmin = 5 !2.5 + real(kind=kind_phys), parameter :: cmax = 95. !82.5 + real(kind=kind_phys), parameter :: cmid = 22.5 + real(kind=kind_phys), parameter :: cwid = cmid + real(kind=kind_phys), parameter :: bns = 2.e-2, bns2 = bns*bns, bns4=bns2*bns2 + real(kind=kind_phys), parameter :: mstar = 6.28e-3/2. ! 2km + real(kind=kind_phys) :: dc + + real(kind=kind_phys), allocatable :: ch_conv(:), spf_conv(:) + real(kind=kind_phys), allocatable :: xaz_conv(:), yaz_conv(:) + contains +! + subroutine init_conv_gws(nwaves, nazdir, nstoch, effac, lonr, kxw) +! + use ugwp_common, only : pi2, arad + + implicit none + + + integer :: nwaves, nazdir, nstoch + integer :: lonr +! +! ccpp +! + + real(kind=kind_phys) :: kxw, effac + real(kind=kind_phys) :: work1 = 0.5 + real(kind=kind_phys) :: chk, tn4, snorm + integer :: k + + nwcon = nwaves + nazcon = nazdir + nstcon = nstoch + eff_con = effac + + con_dlength = pi2*arad/float(lonr) +! +! allocate & define spectra in "selected direction": "dc" "ch(nwaves)" +! + if (.not. allocated(ch_conv)) allocate (ch_conv(nwaves)) + if (.not. allocated(spf_conv)) allocate (spf_conv(nwaves)) + if (.not. allocated(xaz_conv)) allocate (xaz_conv(nazdir)) + if (.not. allocated(yaz_conv)) allocate (yaz_conv(nazdir)) + + dc = (cmax-cmin)/float(nwaves-1) +! +! we may use different spectral "shapes" +! for example FVS-93 "Desabeius" +! E(s=1, t=3,m, w, k) ~ m^s/(m*^4 + m^4) ~ m^-3 saturated tail +! + do k = 1,nwaves + chk = cmin + (k-1)*dc + tn4 = (mstar*chk)**4 + ch_conv(k) = chk + spf_conv(k) = bns4*chk/(bns4+tn4) + enddo + + snorm = sum(spf_conv) + spf_conv = spf_conv/snorm*1.5 + + call init_nazdir(nazdir, xaz_conv, yaz_conv) + end subroutine init_conv_gws + + + end module ugwp_conv_init +!========================================================================= +! +! ugwp_fjet_init +! +!========================================================================= + + module ugwp_fjet_init + use machine , only : kind_phys + + + + implicit none + real(kind=kind_phys) :: eff_fj ! scale factors for conv GWs + integer :: nwfj ! number of waves + integer :: nazfj ! number of azimuths + integer :: nstfj ! flag for stochastic choice of launch level above Conv-cloud +! + real(kind=kind_phys), parameter :: fjet_trig=0. ! if ( abs(frgf) > fjet_trig ) launch GW-packet + + + real(kind=kind_phys), parameter :: cmin = 2.5 + real(kind=kind_phys), parameter :: cmax = 67.5 + real(kind=kind_phys) :: dc + real(kind=kind_phys), allocatable :: ch_fjet(:) , spf_fjet(:) + real(kind=kind_phys), allocatable :: xaz_fjet(:), yaz_fjet(:) + contains + + subroutine init_fjet_gws(nwaves, nazdir, nstoch, effac,lonr, kxw) + + use ugwp_common, only : pi2, arad + + implicit none + + integer :: nwaves, nazdir, nstoch + integer :: lonr + real(kind=kind_phys) :: kxw, effac , chk + + integer :: k + + nwfj = nwaves + nazfj = nazdir + nstfj = nstoch + eff_fj = effac + + if (.not. allocated(ch_fjet)) allocate (ch_fjet(nwaves)) + if (.not. allocated(spf_fjet)) allocate (spf_fjet(nwaves)) + if (.not. allocated(xaz_fjet)) allocate (xaz_fjet(nazdir)) + if (.not. allocated(yaz_fjet)) allocate (yaz_fjet(nazdir)) + + dc = (cmax-cmin)/float(nwaves-1) + do k = 1,nwaves + chk = cmin + (k-1)*dc + ch_fjet(k) = chk + spf_fjet(k) = 1.0 + enddo + call init_nazdir(nazdir, xaz_fjet, yaz_fjet) + + end subroutine init_fjet_gws + + end module ugwp_fjet_init +! +!========================================================================= +! +! + module ugwp_okw_init +!========================================================================= + use machine , only : kind_phys + + implicit none + + real(kind=kind_phys) :: eff_okw ! scale factors for conv GWs + integer :: nwokw ! number of waves + integer :: nazokw ! number of azimuths + integer :: nstokw ! flag for stochastic choice of launch level above Conv-cloud +! + real(kind=kind_phys), parameter :: okw_trig=0. ! if ( abs(okwp) > okw_trig ) launch GW-packet + + real(kind=kind_phys), parameter :: cmin = 2.5 + real(kind=kind_phys), parameter :: cmax = 67.5 + real(kind=kind_phys) :: dc + real(kind=kind_phys), allocatable :: ch_okwp(:), spf_okwp(:) + real(kind=kind_phys), allocatable :: xaz_okwp(:), yaz_okwp(:) + + contains +! + + + subroutine init_okw_gws(nwaves, nazdir, nstoch, effac, lonr, kxw) + use ugwp_common, only : pi2, arad + + implicit none + + integer :: nwaves, nazdir, nstoch + integer :: lonr + real(kind=kind_phys) :: kxw, effac , chk + + integer :: k + + nwokw = nwaves + nazokw = nazdir + nstokw = nstoch + eff_okw = effac + + if (.not. allocated(ch_okwp)) allocate (ch_okwp(nwaves)) + if (.not. allocated(spf_okwp)) allocate (spf_okwp(nwaves)) + if (.not. allocated(xaz_okwp)) allocate (xaz_okwp(nazdir)) + if (.not. allocated(yaz_okwp)) allocate (yaz_okwp(nazdir)) + dc = (cmax-cmin)/float(nwaves-1) + do k = 1,nwaves + chk = cmin + (k-1)*dc + ch_okwp(k) = chk + spf_okwp(k) = 1. + enddo + + call init_nazdir(nazdir, xaz_okwp, yaz_okwp) +! + end subroutine init_okw_gws + + end module ugwp_okw_init + +!=============================== end of GW sources +! +! init specific gw-solvers (1,2,3,4) +! +!=============================== +! Part -3 init wave solvers +!=============================== + + module ugwp_lsatdis_init + use machine , only : kind_phys + implicit none + + integer :: nwav, nazd + integer :: nst + real(kind=kind_phys) :: eff + integer, parameter :: incdim = 4, iazdim = 4 +! + contains + + subroutine initsolv_lsatdis(me, master, nwaves, nazdir, nstoch, effac, do_physb, kxw) + + implicit none +! + integer :: me, master + integer :: nwaves, nazdir + integer :: nstoch + real(kind=kind_phys) :: effac + logical :: do_physb + real(kind=kind_phys) :: kxw +! +!locals: define azimuths and Ch(nwaves) - domain when physics-based soureces +! are not actibve +! + integer :: inc, jk, jl, iazi, i, j, k + + if( nwaves == 0 .or. nstoch == 1 ) then +! redefine from the default + nwav = incdim + nazd = iazdim + nst = 0 + eff = 1.0 + else +! from input_nml multi-wave spectra + nwav = nwaves + nazd = nazdir + nst = nstoch + eff = effac + endif +! + end subroutine initsolv_lsatdis +! + end module ugwp_lsatdis_init +! +! + module ugwp_wmsdis_init + + use machine , only : kind_phys + use ugwp_common, only : arad, pi, pi2, hpscale, rhp, rhp2, rh4, omega2 + use ugwp_common, only : bnv2max, bnv2min, minvel + use ugwp_common, only : mkzmin, mkz2min, mkzmax, mkz2max, ucrit => cdmin + + implicit none + + real(kind=kind_phys), parameter :: maxdudt = 250.e-5, maxdtdt=15.e-2 + real(kind=kind_phys), parameter :: dked_min =0.01, dked_max=250.0 + + real(kind=kind_phys), parameter :: gptwo=2.0 + + real(kind=kind_phys) , parameter :: bnfix = 6.28/300., bnfix2= bnfix * bnfix + real(kind=kind_phys) , parameter :: bnfix4 = bnfix2 * bnfix2 + real(kind=kind_phys) , parameter :: bnfix3 = bnfix2 * bnfix +! +! make parameter list that will be passed to SOLVER +! + integer , parameter :: iazidim=4 ! number of azimuths + integer , parameter :: incdim=25 ! number of discrete cx - spectral elements in launch spectrum + + real(kind=kind_phys) , parameter :: zcimin = 2.5 + real(kind=kind_phys) , parameter :: zcimax = 125.0 + real(kind=kind_phys) , parameter :: zgam = 0.25 +! +! Verical spectra +! + real(kind=kind_phys) , parameter :: pind_wd = 5./3. + real(kind=kind_phys) , parameter :: sind_kz = 1. + real(kind=kind_phys) , parameter :: tind_kz = 3. + real(kind=kind_phys) , parameter :: stind_kz = sind_kz + tind_kz +! +! copies from kmob_ugwp namelist +! + real(kind=kind_phys) :: nslope ! the GW sprctral slope at small-m + real(kind=kind_phys) :: lzstar + real(kind=kind_phys) :: lzmin + real(kind=kind_phys) :: lzmax + real(kind=kind_phys) :: lhmet + real(kind=kind_phys) :: tamp_mpa !amplitude for GEOS-5/MERRA-2 + real(kind=kind_phys) :: tau_min ! min of GW MF 0.25 mPa + integer :: ilaunch + real(kind=kind_phys) :: gw_eff + + real(kind=kind_phys) :: v_kxw, rv_kxw, v_kxw2 + + + +!=========================================================================== + integer :: nwav, nazd, nst + real(kind=kind_phys) :: eff + + real(kind=kind_phys) :: zaz_fct, zms + real(kind=kind_phys), allocatable :: zci(:), zci4(:), zci3(:),zci2(:), zdci(:) + real(kind=kind_phys), allocatable :: zcosang(:), zsinang(:) + real(kind=kind_phys), allocatable :: lzmet(:), czmet(:), mkzmet(:), dczmet(:), dmkz(:) + +! +! GW-eddy constants for wave-mode dissipation by background and stability of +! "final" flow after application of GW-effects +! + real(kind=kind_phys), parameter :: iPr_pt = 0.5 + real(kind=kind_phys), parameter :: lturb = 30., sc2 = lturb*lturb ! stable on 80-km TL lmix ~ 500 met. + real(kind=kind_phys), parameter :: ulturb=150., sc2u = ulturb* ulturb ! unstable + real(kind=kind_phys), parameter :: ric =0.25 + real(kind=kind_phys), parameter :: rimin = -10., prmin = 0.25 + real(kind=kind_phys), parameter :: prmax = 4.0 +! + contains +!============================================================================ + subroutine initsolv_wmsdis(me, master, nwaves, nazdir, nstoch, effac, do_physb, kxw, version) + +! call initsolv_wmsdis(me, master, knob_ugwp_wvspec(2), knob_ugwp_azdir(2), & +! knob_ugwp_stoch(2), knob_ugwp_effac(2), do_physb_gwsrcs, kxw,version) +! + implicit none +! +!input-control for solvers: +! nwaves, nazdir, nstoch, effac, do_physb, kxw +! +! + integer, intent(in) :: me, master, nwaves, nazdir, nstoch + integer, intent(in) :: version + + real(kind=kind_phys), intent(in) :: effac, kxw + logical, intent(in) :: do_physb + +! +!locals +! + real(kind=kind_phys) :: dlzmet + real(kind=kind_phys) :: cstar,rcstar, nslope3, fnorm, zcin + + integer :: inc, jk, jl, iazi +! + real(kind=kind_phys) :: zang, zang1, znorm + real(kind=kind_phys) :: zx1, zx2, ztx, zdx, zxran, zxmin, zxmax, zx, zpexp + real(kind=kind_phys) :: fpc, fpc_dc + real(kind=kind_phys) :: ae1,ae2 + if( nwaves == 0) then +! +! redefine from the deafault +! + nwav = incdim + nazd = iazidim + nst = 0 + eff = 1.0 + gw_eff = eff + else +! +! from input.nml +! + nwav = nwaves + nazd = nazdir + nst = nstoch + gw_eff = effac + endif + + + v_kxw = kxw ; v_kxw2 = v_kxw*v_kxw + rv_kxw = 1./v_kxw + + allocate ( zci(nwav), zci4(nwav), zci3(nwav),zci2(nwav), zdci(nwav) ) + allocate ( zcosang(nazd), zsinang(nazd) ) + allocate (lzmet(nwav), czmet(nwav), mkzmet(nwav), dczmet(nwav), dmkz(nwav) ) + +! if (me == master) then +! print *, 'ugwp_v1/v0: init_gw_wmsdis_control ' +! +! print *, 'ugwp_v1/v0: WMS_DIS launch layer ', ilaunch +! print *, 'ugwp_v1/v0: WMS_DIS tot_mflux in mpa', tamp_mpa*1000. +! print *, 'ugwp_v1/v0: WMS_DIS lhmet in km ' , lhmet*1.e-3 +! endif + + zpexp = gptwo * 0.5 ! gptwo=2 , zpexp = 1. + +! +! set up azimuth directions and some trig factors +! +! + zang = pi2 / float(nazd) + +! get normalization factor to ensure that the same amount of momentum +! flux is directed (n,s,e,w) no mater how many azimuths are selected. +! + znorm = 0.0 + do iazi=1, nazd + zang1 = (iazi-1)*zang + zcosang(iazi) = cos(zang1) + zsinang(iazi) = sin(zang1) + znorm = znorm + abs(zcosang(iazi)) + enddo +! zaz_fct = 1.0 + zaz_fct = 2.0 / znorm ! correction factor for azimuthal sums + +! define coordinate transform for "Ch" ....x = 1/c stretching transform +! ----------------------------------------------- +! +! x=1/Cphase transform +! Scinocca 2003. x = 1/c stretching transform +! + zxmax = 1.0 / zcimin + zxmin = 1.0 / zcimax + zxran = zxmax - zxmin + zdx = zxran / real(nwav-1) ! dkz +! + ae1=zxran/zgam + zx1 = zxran/(exp(ae1)-1.0 ) ! zgam =1./4. + zx2 = zxmin - zx1 + +! +! computations for zci =1/zx, stretching "accuracy" is not "accurate" spectra transform +! it represents additional "empirical" redistribution of "spectral" mode in C-space +! + zms = pi2 / lzstar + + do inc=1, nwav + ztx = real(inc-1)*zdx+zxmin + ae1 = (ztx-zxmin)/zgam + zx = zx1*exp(ae1)+zx2 !eq.(29-30),Scinocca-2003 + zci(inc) = 1.0 /zx ! + zdci(inc) = zci(inc)**2*(zx1/zgam)*exp(ae1)*zdx ! + zci4(inc) = (zms*zci(inc))**4 + zci2(inc) = (zms*zci(inc))**2 + zci3(inc) = (zms*zci(inc))**3 + enddo +! +! +! alternatuve lzmax-lzmin without x=1/c transform +! +! + if (version == 1) then + + dlzmet = (lzmax-lzmin)/ real(nwav-1) + do inc=1, nwav + lzmet(inc) = lzmin + (inc-1)*dlzmet + mkzmet(inc) = pi2/lzmet(inc) + zci(inc) =lzmet(inc)/(pi2/bnfix) + zci4(inc) = (zms*zci(inc))**4 + zci2(inc) = (zms*zci(inc))**2 + zci3(inc) = (zms*zci(inc))**3 + + enddo + + zdx = (zci(nwav)-zci(1))/ real(nwav-1) + do inc=1, nwav + zdci(inc) = zdx + enddo + + cstar = bnfix/zms + rcstar = 1./cstar + ENDIF ! if (version == 1) then + + RETURN +!=================== Diag prints after return ==================== + if (me == master) then + print * + print *, 'ugwp_v0: zcimin=' , zcimin + print *, 'ugwp_v0: zcimax=' , zcimax + print *, 'ugwp_v0: zgam= ', zgam + print * + +! print *, ' ugwp_v1 nslope=', nslope + print * + print *, 'ugwp_v1: zcimin/zci=' , maxval(zci) + print *, 'ugwp_v1: zcimax/zci=' , minval(zci) + print *, 'ugwp_v1: cd_crit=', ucrit + print *, 'ugwp_v1: launch_level', ilaunch + print *, ' ugwp_v1 lzstar=', lzstar + print *, ' ugwp_v1 nslope=', nslope + + print * + nslope3=nslope+3.0 + do inc=1, nwav + zcin =zci(inc)*rcstar + fpc = rcstar*(zcin*zcin)/(1.+ zcin**nslope3) + fpc_dc = fpc * zdci(inc) + write(6,111) inc, zci(inc), zdci(inc),ucrit, fpc, fpc_dc, 6.28e-3/bnfix*zci(inc) + enddo + endif + + + + 111 format( 'wms-zci', i4, 7 (3x, F8.3)) + + end subroutine initsolv_wmsdis +! +! + end module ugwp_wmsdis_init diff --git a/physics/cires_ugwpv1_module.F90 b/physics/cires_ugwpv1_module.F90 new file mode 100644 index 000000000..f5fe7f2ec --- /dev/null +++ b/physics/cires_ugwpv1_module.F90 @@ -0,0 +1,534 @@ + +module cires_ugwpv1_module + +! +! driver is called after pbl & before chem-parameterizations +! it uses ugwp_common (like phys_cons) and some module-param od solvers/sources init-modules +!.................................................................................... +! order = dry-adj=>conv=mp-aero=>radiation -sfc/land- chem -> vertdiff-> [rf-gws]=> ion-re +!................................................................................... +! +! + use machine, only : kind_phys + use ugwp_common, only : arad, pi, pi2, hpscale, rhp, rhp2, rh4, rhp4, khp, hpskm + use ugwp_wmsdis_init, only : ilaunch, nslope, lhmet, lzmax, lzmin, lzstar + use ugwp_wmsdis_init, only : tau_min, tamp_mpa + + implicit none + logical :: module_is_initialized + + character(len=8) :: strsolver='pss-1986' + logical :: do_physb_gwsrcs = .false. ! control for physics-based GW-sources + logical :: do_rfdamp = .false. ! control for Rayleigh friction inside ugwp_driver + integer, parameter :: idebug_gwrms=0 ! control for diag computaions pw wind-temp GW-rms and MF fluxs + logical, parameter :: do_adjoro = .false. + + real(kind=kind_phys), parameter :: max_kdis = 450. ! 400 m2/s + real(kind=kind_phys), parameter :: max_axyz = 450.e-5 ! 400 m/s/day + real(kind=kind_phys), parameter :: max_eps = max_kdis*4.e-4 ! max_kdis*BN2 + real(kind=kind_phys), parameter :: maxdudt = max_axyz + real(kind=kind_phys), parameter :: maxdtdt = max_eps*1.e-3 ! max_kdis*BN2/cp + real(kind=kind_phys), parameter :: dked_min = 0.01 + real(kind=kind_phys), parameter :: dked_max = max_kdis +! +! +! Pr = Kv/Kt < 1 for upper layers; Pr_mol = 1./1.95 check it +! + real(kind=kind_phys), parameter :: Pr_kvkt = 1./1. ! kv/kt = 1./3. + real(kind=kind_phys), parameter :: Pr_kdis = Pr_kvkt/(1.+Pr_kvkt) + + real(kind=kind_phys), parameter :: iPr_ktgw =1./3., iPr_spgw=iPr_ktgw + real(kind=kind_phys), parameter :: iPr_turb =1./3., iPr_mol =1.95 + + real(kind=kind_phys), parameter :: cd_ulim = 1.0 ! critical level precision or Lz ~ 0 ~dz of model + real(kind=kind_phys), parameter :: linsat = 1.00 + real(kind=kind_phys), parameter :: linsat2 = linsat*linsat + + real(kind=kind_phys), parameter :: ricrit = 0.25 + real(kind=kind_phys), parameter :: frcrit = 0.50 + + + integer :: knob_ugwp_version = 1 + integer :: knob_ugwp_solver=1 ! 1, 2, 3, 4 - (linsat, ifs_2010, ad_gfdl, dsp_dis) + integer, dimension(4) :: knob_ugwp_source=(/1,0,1,0/) ! [1,0,1,1] - (oro, fronts, conv, imbf-owp] + integer, dimension(4) :: knob_ugwp_wvspec=(/1,32,32,32/) ! number of waves for- (oro, fronts, conv, imbf-owp] + integer, dimension(4) :: knob_ugwp_azdir=(/2,4,4,4/) ! number of wave azimuths for-(oro, fronts, conv, imbf-owp] + integer, dimension(4) :: knob_ugwp_stoch=(/0,0,0,0/) ! 0 - deterministic ; 1 - stochastic + real(kind=kind_phys), dimension(4) :: knob_ugwp_effac=(/1.,1.,1.,1./) ! efficiency factors for- (oro, fronts, conv, imbf-owp] + + integer :: knob_ugwp_doaxyz=1 ! 1 -gwdrag + integer :: knob_ugwp_doheat=1 ! 1 -gwheat + integer :: knob_ugwp_dokdis=0 ! 1 -gwmixing + integer :: knob_ugwp_ndx4lh = 2 ! n-number of "unresolved" "n*dx" for lh_gw + integer :: knob_ugwp_nslope = 1 ! spectral"growth" S-slope of GW-energy spectra mkz^S + + real(kind=kind_phys) :: knob_ugwp_palaunch = 500.e2 ! fixed pressure layer in Pa for "launch" of NGWs + real(kind=kind_phys) :: knob_ugwp_lzmax = 12.5e3 ! 12.5 km max-VERT-WL of GW-spectra + real(kind=kind_phys) :: knob_ugwp_lzstar = 2.0e3 ! UTLS mstar = 6.28/lzstar 2-2.5 km + real(kind=kind_phys) :: knob_ugwp_lzmin = 1.5e3 ! 1.5 km min-VERT-WL of GW-spectra + real(kind=kind_phys) :: knob_ugwp_taumin = 0.25e-3 + real(kind=kind_phys) :: knob_ugwp_tauamp = 7.75e-3 ! range from 30.e-3 to 3.e-3 ( space-borne values) + real(kind=kind_phys) :: knob_ugwp_lhmet = 200.e3 ! 200 km + + logical :: knob_ugwp_tlimb = .true. + character(len=8) :: knob_ugwp_orosolv='pss-1986' + + real(kind=kind_phys) :: kxw = 6.28/200.e3 ! single horizontal wavenumber of ugwp schemes +! + integer :: ugwp_azdir + integer :: ugwp_stoch + + integer :: ugwp_src + integer :: ugwp_nws + + real(kind=kind_phys) :: ugwp_effac +! + integer :: launch_level = 55 +! + namelist /cires_ugwp_nml/ knob_ugwp_solver, knob_ugwp_source,knob_ugwp_wvspec, knob_ugwp_azdir, & + knob_ugwp_stoch, knob_ugwp_effac,knob_ugwp_doaxyz, knob_ugwp_doheat, knob_ugwp_dokdis, & + knob_ugwp_ndx4lh, knob_ugwp_version, knob_ugwp_palaunch, knob_ugwp_nslope, knob_ugwp_lzmax, & + knob_ugwp_lzmin, knob_ugwp_lzstar, knob_ugwp_lhmet, knob_ugwp_tauamp, knob_ugwp_taumin, & + knob_ugwp_tlimb, knob_ugwp_orosolv + +! +! allocatable arrays, initilized during "cires_ugwp_init" & +! released during "cires_ugwp_finalize" +! + real(kind=kind_phys), allocatable :: kvg(:), ktg(:), krad(:), kion(:) + real(kind=kind_phys), allocatable :: zkm(:), pmb(:) + real(kind=kind_phys), allocatable :: rfdis(:), rfdist(:) +! +! RF-not active now +! + integer :: levs_rf + real(kind=kind_phys) :: pa_rf, tau_rf +! +! simple modulation of tau_ngw by the total rain/precip strength +! + real(kind=kind_phys), parameter :: rain_max=8.e-5, rain_lat=41.0, rain_lim=1.e-5 + real(kind=kind_phys), parameter :: w_merra = 1.0, w_nomerra = 1.-w_merra, w_rain =1. + real(kind=kind_phys), parameter :: mtau_rain = 1.e-3, ft_min =0.5, ft_max=2 + real(kind=kind_phys), parameter :: tau_ngw_max = 20.e-3 ! 20 mPa + real(kind=kind_phys), parameter :: tau_ngw_min = .20e-3 ! .2 mPa +! +! Bushell et al. (2015) tau = tau_rainum (~3.8 km) x sqrt(Precip/base_rainum) +! + real(kind=kind_phys), parameter :: tau_rainum = 0.7488e-3 ! 0.74 mPa + real(kind=kind_phys), parameter :: base_rainum = 0.1e-5 ! ~0.1 mm/day + real(kind=kind_phys), parameter :: pbase_um =1./sqrt(base_rainum) * tau_rainum ! + integer, parameter :: metoum_rain = 0 +!================================================================= +! switches that can ba activated for NGW physics include/omit +! +! rotational, non-hydrostatic and eddy-dissipative +! F_coriol F_nonhyd F_kds +!=================================================== + real(kind=kind_phys), parameter :: F_coriol=1.0 ! Coriolis effects + real(kind=kind_phys), parameter :: F_nonhyd=1.0 ! Nonhydrostatic waves + real(kind=kind_phys), parameter :: F_kds =0.0 ! Eddy mixing due to GW-unstable below + + + contains +! +!----------------------------------------------------------------------- +! +! init of cires_ugwp (_init) called from CCPP cap file +! +! --------------------------------------------------------------------------------- +! non-ccpp .... +! +! subroutine cires_ugwp_init_v1 (me, master, nlunit, logunit, jdat_gfs, fn_nml2, & +! lonr, latr, levs, ak, bk, pref, dtp) +!----------------------------------------------------------------------------------- + + subroutine cires_ugwpv1_init (me, master, nlunit, logunit, jdat_gfs, con_pi, & + con_rerth, fn_nml2, input_nml_file, lonr, latr, levs, ak, bk, & + pref, dtp, errmsg, errflg) +! +! input_nml_file ='input.nml'=fn_nml ..... OLD_namelist and cdmvgwd(4) Corrected Bug Oct 4 +! + use netcdf + use ugwp_oro_init, only : init_oro_gws + use ugwp_conv_init, only : init_conv_gws + use ugwp_fjet_init, only : init_fjet_gws + use ugwp_okw_init, only : init_okw_gws + use ugwp_lsatdis_init, only : initsolv_lsatdis + + use ugwp_wmsdis_init, only : initsolv_wmsdis + use ugwp_wmsdis_init, only : ilaunch, nslope, lhmet, lzmax, lzmin, lzstar + use ugwp_wmsdis_init, only : tau_min, tamp_mpa + + implicit none + + integer, intent (in) :: me + integer, intent (in) :: master + integer, intent (in) :: nlunit + integer, intent (in) :: logunit + integer, intent (in) :: lonr + integer, intent (in) :: levs + integer, intent (in) :: latr + integer, intent (in) :: jdat_gfs(8) + real(kind=kind_phys), intent (in) :: ak(levs+1), bk(levs+1), pref + real(kind=kind_phys), intent (in) :: dtp +! +! consider to retire them +! + real(kind=kind_phys), intent (in) :: con_pi, con_rerth + + character(len=64), intent (in) :: fn_nml2 + character(len=*), intent (in) :: input_nml_file(:) + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + +! character, intent (in) :: input_nml_file +! + integer :: ios + logical :: exists + + integer :: ncid, iernc, vid, dimid, status + integer :: k + integer :: ddd_ugwp, curday_ugwp +! integer :: version + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + +#ifdef INTERNAL_FILE_NML + read (input_nml_file, nml = cires_ugwp_nml) +#else + if (me == master) print *, trim (fn_nml2), ' GW-namelist file ' + inquire (file =trim (fn_nml2) , exist = exists) +! + if (.not. exists) then + write(errmsg,'(3a)') 'cires_ugwpv1_init: namelist file: ', trim (fn_nml2), ' does not exist' + errflg = 1 + return + else + open (unit = nlunit, file = trim(fn_nml2), action = 'read', status = 'old', iostat = ios) + endif + rewind (nlunit) + read (nlunit, nml = cires_ugwp_nml) + close (nlunit) +#endif + + strsolver= knob_ugwp_orosolv + + curday_ugwp = jdat_gfs(1)*10000 + jdat_gfs(2)*100 +jdat_gfs(3) + call calendar_ugwp(jdat_gfs(1), jdat_gfs(2), jdat_gfs(3), ddd_ugwp) + +! write version number and namelist to log file + if (me == master) then + write (logunit, *) " ================================================================== " + write (logunit, *) "CCPP cires_ugwp_namelist_extended_v1" + write (logunit, nml = cires_ugwp_nml) + write (logunit, *) " ================================================================== " + + write (6, *) " ================================================================== " + write (6, *) "CCPP cires_ugwp_namelist_extended_v1" + write (6, nml = cires_ugwp_nml) + write (6, *) " ================================================================== " + write (6, *) "calendar_ugwp ddd_ugwp=", ddd_ugwp + write (6, *) "calendar_ugwp curday_ugwp=", curday_ugwp + write (6, *) " ================================================================== " + write (6, *) ddd_ugwp, ' jdat_gfs ddd of year ' + endif +! +! effective kxw - resolution-aware +! +! + kxw = pi2/knob_ugwp_lhmet +! +! +! init global background dissipation for ugwp -> 4d-variable for fv3wam linked with pbl-vert_diff +! +! +! allocate(fcor(latr), fcor2(latr) ) +! + allocate( kvg(levs+1), ktg(levs+1) ) + allocate( krad(levs+1), kion(levs+1) ) + allocate( zkm(levs), pmb(levs) ) + +! +! ak -pa bk-dimensionless from surf => tol_lid_pressure =0 +! + + do k=1, levs + pmb(k) = ak(k) + pref*bk(k) ! Pa -unit Pref = 1.e5, pmb = Pa + zkm(k) = -hpskm*alog(pmb(k)/pref) + enddo + +! +! find ilaunch +! + if (knob_ugwp_palaunch > 900.e2) then + write(errmsg,'(a,e16.7)') 'cires_ugwpv1_init: unrealistic value of knob_ugwp_palaunch', knob_ugwp_palaunch + errflg = 1 + return + endif + + do k=levs, 1, -1 + if (pmb(k) .gt. knob_ugwp_palaunch ) exit + enddo + + launch_level = max(k-1, 5) ! above 5-layers from the surface + if (me == master) then + print *, 'cires_ugwpv1 klev_ngw =', launch_level, nint(pmb(launch_level)) + endif +! +! Part-1 :init_global_gwdis again "damn"-con_p +! + call init_global_gwdis(levs, zkm, pmb, kvg, ktg, krad, kion, me, master) + +! +! Part-2 :init_SOURCES_gws +! + +! +! call init-solver for "stationary" multi-wave spectra and sub-grid oro +! + call init_oro_gws( knob_ugwp_wvspec(1), knob_ugwp_azdir(1), & + knob_ugwp_stoch(1), knob_ugwp_effac(1), lonr, kxw ) +! +! call init-sources for "non-sationary" multi-wave spectra +! + do_physb_gwsrcs=.true. + + IF (do_physb_gwsrcs) THEN + +! if (me == master) print *, ' do_physb_gwsrcs ', do_physb_gwsrcs, ' in cires_ugwp_init_modv1 ' + if (knob_ugwp_wvspec(4) > 0) then +! okw + call init_okw_gws(knob_ugwp_wvspec(4), knob_ugwp_azdir(4), & + knob_ugwp_stoch(4), knob_ugwp_effac(4), & + lonr, kxw ) +! if (me == master) print *, ' init_okw_gws ' + endif + + if (knob_ugwp_wvspec(3) > 0) then +! fronts + call init_fjet_gws(knob_ugwp_wvspec(3), knob_ugwp_azdir(3), & + knob_ugwp_stoch(3), knob_ugwp_effac(3), & + lonr, kxw ) +! if (me == master) print *, ' init_fjet_gws ' + endif + + if (knob_ugwp_wvspec(2) > 0) then +! conv : con_pi, con_rerth, + call init_conv_gws(knob_ugwp_wvspec(2), knob_ugwp_azdir(2), & + knob_ugwp_stoch(2), knob_ugwp_effac(2), & + lonr, kxw ) +! if (me == master) & +! print *, ' init_convective GWs ', knob_ugwp_wvspec(2), knob_ugwp_azdir(2) + + endif + + ENDIF !IF (do_physb_gwsrcs) + +!====================== +! Part-3 :init_SOLVERS +! ===================== +! +! call init-solvers for "broad" non-stationary multi-wave spectra +! + if (knob_ugwp_solver==1) then +! + kxw = pi2/lhmet + call initsolv_lsatdis(me, master, knob_ugwp_wvspec(2), knob_ugwp_azdir(2), & + knob_ugwp_stoch(2), knob_ugwp_effac(2), do_physb_gwsrcs, kxw ) + endif + if (knob_ugwp_solver == 2) then +! +! re-assign from namelists +! + nslope = knob_ugwp_nslope ! the GW sprctral slope at small-m + lzstar = knob_ugwp_lzstar + lzmax = knob_ugwp_lzmax + lzmin = knob_ugwp_lzmin + lhmet = knob_ugwp_lhmet + tamp_mpa =knob_ugwp_tauamp !amplitude for GEOS-5/MERRA-2 + tau_min =knob_ugwp_taumin ! min of GW MF 0.25 mPa + ilaunch = launch_level + + kxw = pi2/lhmet + + call initsolv_wmsdis(me, master, knob_ugwp_wvspec(2), knob_ugwp_azdir(2), & + knob_ugwp_stoch(2), knob_ugwp_effac(2), do_physb_gwsrcs, kxw, knob_ugwp_version) + + endif + + +!====================== + module_is_initialized = .true. + if (me == master) print *, ' CIRES_ugwpV1 is initialized ', module_is_initialized + + end subroutine cires_ugwpv1_init + + +!============================================= + + subroutine cires_ugwp_advance +!----------------------------------------------------------------------- +! FV3-dycore and CCPP-physics has limited options to +! add "horizontal" gradients of winds and temp-re to +! compute GW-triggers: reserved option if it will be funded ...... +! +! the day-to-day variable sources/spectra and diagnostics for stochastic "triggers" +! +! diagnose GW-source functions * FGF + OKWP + SGO/CONV from IAU-fields +! and use for stochastic GWP-sources "memory" +! +! this option is not active due to "weak" flexibility +! in communication between "ccpp/gfsphysics" and FV3-dycore +! extension of State%in is needed to pass horizontal gradients +! winds and temperature to compute "spontatneous" GW triggers +!----------------------------------------------------------------------- + implicit none +! +! update GW sources and dissipation +! a) physics-based GW triggers eliminated from cires_ugwpv1_triggers.F90 +! b) stochastic-based spectra and amplitudes is not considered +! c) use "memory" on GW-spectra from previous time-step is not considered +! d) update "background" dissipation of GWs as needed (option for FV3WAM) +! + end subroutine cires_ugwp_advance + +! +! ----------------------------------------------------------------------- +! finalize of cires_ugwp_dealloc +! ----------------------------------------------------------------------- + + + subroutine cires_ugwp_dealloc +! +! deallocate sources/spectra & some diagnostics need to find where "deaalocate them" +! before "end" of the FV3GFS +! + implicit none +! +! deallocate arrays employed in: +! cires_ugwp_advance / cires_ugwp_driver / cires_ugwp_init +! + if (allocated (kvg)) deallocate (kvg) + if (allocated (ktg)) deallocate (ktg) + if (allocated (krad)) deallocate (krad) + if (allocated (kion)) deallocate (kion) + if (allocated (zkm)) deallocate (zkm) + if (allocated (pmb)) deallocate (pmb) +! if (allocated (ugwp_taulat)) deallocate(ugwp_taulat) +! if (allocated (tau_limb)) deallocate (tau_limb) +! if (allocated (days_limb)) deallocate(days_limb) + + + end subroutine cires_ugwp_dealloc + +! +! + subroutine calendar_ugwp(yr, mm, dd, ddd_ugwp) +! +! computes day of year to get tau_limb forcing written with 1-day precision +! + implicit none + integer, intent(in) :: yr, mm, dd + integer :: ddd_ugwp + + integer :: iw3jdn + integer :: jd1, jddd + jd1 = iw3jdn(yr,1,1) + jddd = iw3jdn(yr,mm,dd) + ddd_ugwp = jddd-jd1+1 + + end subroutine calendar_ugwp + + + subroutine ngwflux_update(me, master, im, levs, kdt, ddd, curdate, & + tau_ddd, xlatd, sinlat,coslat, rain, tau_ngw) + + use machine, only: kind_phys + implicit none +!input + + integer, intent(in) :: me, master !, jdat(8) + integer, intent(in) :: im, levs, kdt + integer, intent(in) :: ddd, curdate + +! integer, intent(in), dimension(im) :: j1_tau, j2_tau +! real(kind=kind_phys), intent(in), dimension(im) :: ddy_j2tau, ddy_j1tau + + real(kind=kind_phys), intent(in), dimension(im) :: xlatd, sinlat,coslat + real(kind=kind_phys), intent(in), dimension(im) :: rain, tau_ddd + + real(kind=kind_phys), intent(inout), dimension(im) :: tau_ngw +! +! locals +! + + integer :: i, j1, j2, k, it1, it2, iday + real(kind=kind_phys) :: tem, tx1, tx2, w1, w2, wlat, rw1, rw2 + real(kind=kind_phys) :: tau_rain, flat_rain, tau_3dt + +! + +! code below inside cires_tauamf_data.F90 +! it1 = 2 +! do iday=1, ntau_d2t +! if (float(ddd) .lt. days_limb(iday) ) then +! it2 = iday +! exit +! endif +! enddo +! it2 = min(it2,ntau_d2t) +! it1 = max(it2-1,1) +! if (it2 > ntau_d2t ) then +! print *, ' it1, it2, ntau_d2t ', it1, it2, ntau_d2t +! stop +! endif +! w2 = (float(ddd)-days_limb(it1))/(days_limb(it2)-days_limb(it1)) +! w1 = 1.0-w2 +! do i=1, im +! j1 = j1_tau(i) +! j2 = j2_tau(i) +! tx1 = tau_limb(j1, it1)*ddy_j1tau(i)+tau_limb(j2, it1)*ddy_j2tau(i) +! tx2 = tau_limb(j1, it2)*ddy_j1tau(i)+tau_limb(j2, it2)*ddy_j2tau(i) +! tau_ddd(i) = tx1*w1 + w2*tx2 +! +! add modulattion by the total "rain"-strength Yudin et al.(2020-FV3GFS) and Bushell et al. (2015-UM/METO) +! + do i=1, im + tau_3dt = tau_ngw(i) * w_merra + w_nomerra *tau_ddd(i) + + if (w_rain > 0. .and. rain(i) > 0.) then + + wlat = abs(xlatd(i)) + + if (wlat <= rain_lat .and. rain(i) > rain_lim) then + flat_rain = wlat/rain_lat + rw1 = 0.75 * flat_rain ; rw2 = 1.-rw1 + + tau_rain = tau_3dt * rw1 + rw2 * mtau_rain*min(rain_max, rain(i))/rain_lim + tau_rain = tau_3dt*(1.-w_rain) + w_rain* tau_rain +! +! restict variations from the "tau_ngw" without precip-impact +! +! real, parameter :: ft_min =0.5*tau_g5 < tau_rain < ft_max =2. *tau_g5 +! + if (tau_rain < ft_min *tau_3dt) tau_rain = ft_min *tau_3dt + if (tau_rain > ft_max *tau_3dt) tau_rain = ft_max *tau_3dt + + tau_3dt = tau_rain + + endif + if (metoum_rain == 1) then + tau_rain = min( sqrt(rain(i))*pbase_um, tau_ngw_max) + tau_3dt = max(tau_ngw_min, tau_rain) + endif + endif + tau_ngw(i) = tau_3dt + enddo + + end subroutine ngwflux_update +! + end module cires_ugwpv1_module + diff --git a/physics/cires_ugwpv1_oro.F90 b/physics/cires_ugwpv1_oro.F90 new file mode 100644 index 000000000..904731b16 --- /dev/null +++ b/physics/cires_ugwpv1_oro.F90 @@ -0,0 +1,1103 @@ +module cires_ugwpv1_oro + +contains + + subroutine orogw_v1 (im, km, imx, me, master, dtp, kdt, do_tofd, & + xlatd, sinlat, coslat, sparea, & + cdmbgwd, hprime, oc, oa4, clx4, theta, sigmad, & + gammad, elvmaxd, sgh30, kpbl, & + u1 ,v1, t1, q1, prsi,del,prsl,prslk, zmeti, zmet, & + pdvdt, pdudt, pdtdt, pkdis, dusfc, dvsfc,rdxzb , & + zobl, zlwb, zogw, tau_ogw, dudt_ogw, dvdt_ogw, & + dudt_obl, dvdt_obl,dudt_ofd, dvdt_ofd, & + du_ogwcol, dv_ogwcol, du_oblcol, dv_oblcol, & + du_ofdcol, dv_ofdcol, errmsg,errflg ) + +!--------------------------------------------------------------------------- +! ugwp_v1: orogw_v1 following recent updates of Lott & Miller 1997 +! eventually will be replaced with more "advanced" LLWB +! and multi-wave solver that produce competitive FV3GFS-skills +! +! computation of kref for ogw + coorde diagnostics +! all constants/parameters inside cires_ugwp_initialize.f90 +! +! 10/2020 main updates +! (a) introduce extra diagnostics of x-y obl-ofd-ogw as in the GSL-drag +! for intercomparisons +! +! (b) quit with cdmbgwd(1:2) +! cdmbgwd(1) = 1 for all resolutions, number of hills control SA-effects +! cdmbgwd(2) = 1 ...............number of hills control SA-effects +! +! (c) cleff = pi2/(nk*dx) lheff = nk*dx (nk = 6,4,2, 1) +! alternative lheff = min( dogw=hprime/sigma*gamma, dx) +! we still not use the "broad spectral solver" +! +! (d) hefff = (nsig * hprime -znlk)/nsig, orchestrating MB and OGW +! +! (e) for linsat-solver the total "eddy" damping Ked = Ked * Nhills, +! scale-aware amplification of the momentum deposition for low-res runs +!---------------------------------------- + + use machine , only : kind_phys + use ugwp_common, only : dw2min, velmin, grav, omega1, rd, cpd, rv, pi, arad, fv + use ugwp_common, only : rcpdt, grav2, rgrav, rcpd, rcpd2 + use ugwp_common, only : rad_to_deg, deg_to_rad, pi2, pih, rdi, gor, grcp, gocp, gr2, bnv2min + + use ugwp_oro_init, only : rimin, ric, efmin, efmax, & + hpmax, hpmin, sigfaci => sigfac, & + dpmin, minwnd, hminmt, hncrit, & + rlolev, gmax, veleps, factop, & + frc, ce, ceofrc, frmax, cg, & + fdir, mdir, nwdir, & + cdmb, cleff, fcrit_v1, & + n_tofd, ze_tofd, ztop_tofd + + use cires_ugwpv1_module, only : kxw, max_kdis, max_axyz + +!---------------------------------------- + implicit none +!---------------------------------------- +! internal parameters +!---------------------------------------- + real(kind=kind_phys), parameter :: sigfac = 3 ! N*hprime height of Subgrid Hill over which SSO-flo + real(kind=kind_phys), parameter :: sigfacs = 0.25 ! M*hprime height is the low boundary of the hill + + real(kind=kind_phys), parameter :: dbmax = 1./3600./12. ! max-Krmtb in hours for u=10 m/s => 20 m/s/day + character(len=8) :: strsolver='pss-1986' ! current operational Ri-solver or 'spect_2020' + + + real(kind=kind_phys) :: gammin = 0.00999999 ! a/b = gammma_min =1% <====> + real(kind=kind_phys), parameter :: nhilmax = 15. ! max number of SSO-hills in grid-box + real(kind=kind_phys), parameter :: sso_min = 3000. ! min-lenghth of the hill, GTOP30 ~dx~1 km + + real(kind=kind_phys), parameter :: nfr = 2.+1. ! power in the emprical Function(Fr/Frc) + real(kind=kind_phys), parameter :: afr = 1. ! (Fr/Frc)^2/(afr +[Fr/Frc]^nfr), Fr = h*mkz + real(kind=kind_phys), parameter :: frnorm =afr+1.0 ! to get cont-ous taulin(Fr=Frc) = tau_nonlin(Fr=Frc) ! + real(kind=kind_phys), parameter :: max_frf =2.0 ! max-value of non-lin flux over the linear at Fr=Frc + + logical, parameter :: do_adjoro = .false. ! +!---------------------------------------- + + integer, intent(in) :: im, km, imx, kdt + integer, intent(in) :: me, master + logical, intent(in) :: do_tofd + + integer, intent(in) :: kpbl(im) ! index for the pbl top layer! + real(kind=kind_phys), intent(in) :: dtp ! time step + real(kind=kind_phys), intent(in) :: cdmbgwd(2) + + real(kind=kind_phys), intent(in) :: hprime(im), oc(im), oa4(im,4), & + clx4(im,4), theta(im), & + sigmad(im), gammad(im), elvmaxd(im) +! + real(kind=kind_phys), intent(in) :: sgh30(im) + + real(kind=kind_phys), intent(in), dimension(im,km) :: & + u1, v1, t1, q1,del, prsl, prslk, zmet + + real(kind=kind_phys), intent(in),dimension(im,km+1):: prsi, zmeti + + real(kind=kind_phys), intent(in) :: xlatd(im),sinlat(im), coslat(im) + real(kind=kind_phys), intent(in) :: sparea(im) + +! +!output -phys-tend +! + real(kind=kind_phys),dimension(im,km),intent(out) :: & + pdvdt, pdudt, pkdis, pdtdt +! output - diag-coorde + real(kind=kind_phys),dimension(im,km),intent(out) :: & + dudt_ogw,dvdt_ogw, dudt_obl,dvdt_obl, dudt_ofd,dvdt_ofd + + real(kind=kind_phys),dimension(im),intent(out) :: dusfc, dvsfc, & + du_ogwcol,dv_ogwcol, du_oblcol,dv_oblcol, du_ofdcol,dv_ofdcol +! + real(kind=kind_phys),dimension(im),intent(out) :: rdxzb + real(kind=kind_phys),dimension(im),intent(out) :: zobl, zogw, zlwb, tau_ogw + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg +! +! +! locals vars for SSO +! + + real(kind=kind_phys), dimension(im) :: oa, clx + real(kind=kind_phys), dimension(im) :: sigma, gamma, elvmax ! corrected sigmaD, gammaD, elvmaxD + + real(kind=kind_phys) :: shilmin, sgrmax, sgrmin + real(kind=kind_phys) :: belpmin, dsmin, dsmax + + real(kind=kind_phys) :: arhills(im), mkd05_hills(im) ! number of hills in the grid + real(kind=kind_phys) :: taub_kd05(im) +! +! locals mean flow ...etc +! + real(kind=kind_phys), dimension(im,km) :: ri_n, bnv2, ro + real(kind=kind_phys), dimension(im,km) :: vtk, vtj, velco +!================== +!mtb +!================== + real(kind=kind_phys) :: ztoph,zlowh,ph_blk, dz_blk + real(kind=kind_phys), dimension(im) :: wk, pe, ek, up + + real(kind=kind_phys), dimension(im,km) :: db, ang, uds + + real(kind=kind_phys) :: zlen, dbtmp, r, phiang, dbim, zr + real(kind=kind_phys) :: eng0, eng1, cosang2, sinang2 + real(kind=kind_phys) :: bgam, cgam, gam2, rnom, rdem + +!================== +! tofd +! some constants now in "use ugwp_oro_init" + "use ugwp_common" +! +!================== + + real(kind=kind_phys) :: unew, vnew, zpbl, sigflt, zsurf + real(kind=kind_phys), dimension(km) :: utofd1, vtofd1 + real(kind=kind_phys), dimension(km) :: epstofd1, krf_tofd1 + real(kind=kind_phys), dimension(km) :: up1, vp1, zpm +!================== +! ogw +!================== + real(kind=kind_phys) :: xlingfs + logical :: icrilv(im) +! + real(kind=kind_phys), dimension(im) :: xn, yn, ubar, vbar, ulow, & + roll, bnv2bar, scor, dtfac, xlinv, delks, delks1 +! + real(kind=kind_phys) :: taup(im,km+1), taud(im,km) + real(kind=kind_phys) :: taub(im), taulin(im), tausat(im), ahdxres(im) + real(kind=kind_phys) :: heff, hsat, hdis + + integer, dimension(im) :: kref, idxzb, ipt, khtop, iwk, izlow +! +! local real scalars +! + real(kind=kind_phys) :: bnv, fr, ri_gw, brvf, fr2 + real(kind=kind_phys) :: tem, tem1, tem2, temc, temv + real(kind=kind_phys) :: ti, rdz, dw2, shr2, bvf2 + real(kind=kind_phys) :: rdelks, efact, coefm, gfobnv + real(kind=kind_phys) :: scork, rscor, hd, fro, sira + real(kind=kind_phys) :: dtaux, dtauy, zmetp, zmetk + + real(kind=kind_phys) :: windik, wdir + real(kind=kind_phys) :: sigmin, dxres,sigres,hdxres, cdmb4, mtbridge + + real(kind=kind_phys) :: kxridge, inv_b2eff, zw1, zw2 + real(kind=kind_phys) :: belps, aelps, nhills, selps + +! real(kind=kind_phys) :: rgrav, rcpd, rcpd2, rad_to_deg, deg_to_rad +! real(kind=kind_phys) :: pi2, pih, rdi, gor, grcp, gocp, gr2, bnv2min + + real(kind=kind_phys) :: cleff_max ! resolution-aware max-wn + real(kind=kind_phys) :: nonh_fact ! non-hydroststic factor 1.-(kx/kz_hh)**2 + real(kind=kind_phys) :: fcrit2 + real(kind=kind_phys) :: fr_func, frnd +! +! +! local integers +! + integer :: kmm1, kmm2, lcap, lcapp1 + integer :: npt, kbps + integer :: kmps, idir, nwd, klcap, kp1, kmpbl, kmll + integer :: k_mtb, k_zlow, ktrial, klevm1 + integer :: i, j, k +! +! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 +!=========================== +! First step Check do we have sub-grid hills +! +! +! out-arrays are zreoed in unified_ugwp.F90 +! + do i=1,im + rdxzb(i) = 0.0 + dusfc(i) = 0.0 + dvsfc(i) = 0.0 + ipt(i) = 0 + enddo + +! ---- for lm and gwd calculation points +!cires_ugwp_initialize.F90: real, parameter :: hpmax=2400.0, hpmin=25.0 +!cires_ugwp_initialize.F90: real, parameter :: hminmt=50. ! min mtn height (*j*) +!---- for lm and gwd calculation points +! ccpp-gwdps.f PARAMETER (hpmax=2400.0, hpmin=1.0) parameter (elvmax > hminmt=50.) + + npt = 0 + do i = 1,im + if ( elvmaxd(i) >= hminmt .and. hprime(i) >= hpmin ) then + npt = npt + 1 + ipt(npt) = i + endif + enddo + + if (npt == 0) then +! print *, 'orogw_v1 npt = 0 elvmax ', maxval(elvmaxd), hminmt +! print *, 'orogw_v1 npt = 0 hprime ', maxval(hprime), hpmin + return ! no ogw/mbl calculation done + endif + + +!================================= +! Start if npt >= 1 +! initialize gamma and sigma for +! performing the QC of SSO inputs +!================================= + gamma(:) = gammad(:) + sigma(:) = sigmad(:) +! +!======================================================================= +! mtb-blocking sigma_min and dxres => cires_initialize (best way ....) +! + sgrmax = maxval(sparea) ; sgrmin = minval(sparea) + dsmax = sqrt(sgrmax) ; dsmin = sqrt(sgrmin) + +! ! GTOP30-arc dx~1Km res-n so sso_hill ~ (2-4)*dx + cleff_max = pi2/max(dsmin/5.,sso_min) ! maxval for kx = 6.28/(dx_min/5. ~2.5 km) for C768 + cleff_max = pi2/dsmin + + hdxres = 0.5*dsmax + + gammin = min(sso_min/hdxres, 1.) + gammin = max(0.1, gammin) + ! sigma-degined as tan(angle) = h/2: L/2= h/L + sigmin = hpmin/hdxres ! min-slope Hmin= 2*hpmin, dxres=Lmax + +! if ( kdt == 1 .and. me == master) then +! print *, ' orogw_v1 scale2 ', cdmbgwd(2) +! print *, ' orogw_v1 imx ', imx +! print *, ' orogw_v1 gam_min ', gammin +! print *, ' orogw_v1 sso_min ', sso_min +! print *, ' orogw_v1 gam_min ', gammin +! print *, ' orogw_v1 npt number of GRID-cells with hills ', npt +! endif + +!============================================================ +! Purpose to adjust oro-specification on the fly +! needs to be done 1-time during init-n for each block +! hprime sigma gamma and grid-length must be "related" +! width_mount_a = hprime/sigma < dxres cannot access dxres +! width_mount_b = width_mount_a * gamma +! +! Sellipse= pi * a*b = (width_mount_a)^2 *gamma <= Sarea +! Limiters on "elongated" hills gamma= a/b < gam_min +! Limiters on "longest" hills (b, a) <= sqrt(area) +! +! 0.01=gammin < gamma=a_hill/b_hill < 1 +! hpmin/(dx/2)=sigmin < sigma= hprime/a_ell < 1. +! Nhills = (dx*dy=Sarea)/(pi* a_hill *b_hill) +!============================================================= + + arhills(:) =0. + mkd05_hills(:) =0. + + do j = 1,npt + i = ipt(j) + dxres = sqrt(sparea(i)) + ahdxres(j) = dxres + if (gamma(i) > 1.0) gamma(i) = 1.0 + + gamma(i) = max(gammin, gamma(i)) +! +! min-adjustment: 1) abs(gamma(i)) ; 2) sigres = max(sigmin, sigma(i)) +! + sigres = max(sigmin, sigma(i)) + sigma(i) =sigres + aelps = min( hprime(i)/sigres, dxres) + belps = min(aelps/abs(gamma(i)), dxres) + gamma(i) = aelps/belps + + if (do_adjoro ) then +! +! more adjustments "lengths", gamma and sigma, assuminng H_hill=2*hprime +! + if (hprime(i) > hdxres*sigres) sigres= hprime(i)/dxres + aelps = min( hprime(i)/sigres, hdxres) + sigma(i) = sigres + if (gamma(i) > 0.0 ) belps = min(aelps/gamma(i), dxres) +! +! small-scale "turbulent" oro-hills < sso_min, sso_min_dx = 3km +! will be treated as "circular" elevations +! + if( aelps < sso_min ) then +! +! a, b > sso_min upscale ellipse a/b > 0.1 a>sso_min & h/b=>new_sigm +! + aelps = sso_min + if (belps < sso_min ) then + gamma(i) = 1.0 + belps = aelps*gamma(i) + else + gamma(i) = min(aelps/belps, 1.0) + endif + + sigma(i) = hprime(i)/aelps + gamma(i) = min(aelps/belps, 1.0) + + endif !aelps < sso_min + endif ! if (do_adjoro ) + + selps = belps*belps*gamma(i)*pi ! area of the elliptical hill + nhills = min(nhilmax, sparea(i)/selps) + arhills(j) = max(nhills, 1.0) + +! if (kdt==1 ) write(6,333) nint(nhills)+1,xlatd(i), hprime(i),aelps*1.e-3, belps*1.e-3, sigma(i),gamma(i) +! 333 format( ' nhil: ', i6, 4(2x, f9.3), 2(2x, e9.3)) + + enddo + +!======================================================================= +! mtb-blocking : LM-1997; Zadra et al. 2004 ;metoffice dec 2010 H Wells +!======================================================================= + + do i=1,npt + khtop(i) = 2 + idxzb(i) = 0 + izlow(i) = 1 + enddo + + do k=1,km + do i=1,im + db(i,k) = 0.0 + ang(i,k) = 0.0 + uds(i,k) = 0.0 + enddo + enddo + + kmm1 = km - 1 ; kmm2 = km - 2 ; kmll = kmm1 + lcap = km ; lcapp1 = lcap + 1 + cdmb4 = 0.25*cdmb + + do i = 1, npt + j = ipt(i) + elvmax(j) = min( sigfac * hprime(j), hncrit) +! +!gfsv15/16: ELVMAX(J) = min (ELVMAX(J) + sigfac * hprime(j), hncrit=8000.) +! SSO-effects from the surface to "ELVMAX" =4*hprime + ELVMAX + enddo + + +!=================================================================== +! below khtop-level H= 3*hp, and izlow = 0.5*Hp or the "first" layer +! are used tp estimate "Mean" Flow that interact with SG-HILL +! if sig*HP < Hpbl => GWs-> above PBL +! WRF: ( 1 to max(2*Hp or H_pbl) +! GFS-15/16: OGWs (1 to max(Kpbl+1, or K_dPs=(Ps-Pk=50hPa) ~ 950 mb) +! excitation above Kref +! BLOCKING: ZDOMAIN (1 - Kaver => ELVMAX(J) + sigfac * hp) +!=================================================================== + + + do k = 1, kmm1 + do i = 1, npt + j = ipt(i) + ztoph = sigfac * hprime(j) + zlowh = sigfacs* hprime(j) + zmetp = zmet(j,k+1) + zmetk = zmet(j,k) +! +! GFSv15/16: izlow=1 +! elvmax(j)=elvmaxd(J) + sig*hp: if (( elvmax(j) <= zmetp) .and. (elvmax(j).ge.zmetk) ) khtop(i) = max(khtop(i), k+1 ) +! + + if (( ztoph <= zmetp) .and. (ztoph >= zmetk) ) khtop(i) = max(khtop(i), k+1 ) + if (zlowh <= zmetp .and. zlowh >= zmetk) izlow(i) = max(izlow(i),k) + enddo + enddo +! + do k = 1,km + do i =1,npt + j = ipt(i) + vtj(i,k) = t1(j,k) * (1.+fv*q1(j,k)) + vtk(i,k) = vtj(i,k) / prslk(j,k) + ro(i,k) = rdi * prsl(j,k) / vtj(i,k) ! density mid + taup(i,k) = 0.0 + enddo + enddo +! +! perform ri_n or ri_mf computation for both OGW and OBL +!23456 + do k = 1,kmm1 + do i =1,npt + j = ipt(i) + rdz = 1. / (zmet(j,k+1) - zmet(j,k)) + tem1 = u1(j,k) - u1(j,k+1) + tem2 = v1(j,k) - v1(j,k+1) + dw2 = tem1*tem1 + tem2*tem2 + shr2 = max(dw2,dw2min) * rdz * rdz + bvf2 = grav2 * rdz * (vtk(i,k+1)-vtk(i,k))/ (vtk(i,k+1)+vtk(i,k)) + + bnv2(i,k+1) = max( bvf2, bnv2min ) + ri_n(i,k+1) = bnv2(i,k)/shr2 ! richardson number consistent with bnv2 +! having ri_n +! we may place here computation for "ktur" and ogw-dissipation for the spectral ORO-scheme +! + enddo + enddo + k = 1 +!23456 + do i = 1, npt + bnv2(i,k) = bnv2(i,k+1) + enddo +! +! level khtop => zmet(j,k) < sigfac * hprime(j) < zmet(j,k+1) +!23456 + do i = 1, npt + j = ipt(i) + k_zlow = izlow(i) + if (k_zlow == khtop(i)) k_zlow = 1 + delks(i) = 1.0 / (prsi(j,k_zlow) - prsi(j,khtop(i))) +! delks1(i) = 1.0 /(prsl(j,k_zlow) - prsl(j,khtop(i))) + ubar (i) = 0.0 + vbar (i) = 0.0 + roll (i) = 0.0 + pe (i) = 0.0 + ek (i) = 0.0 + bnv2bar(i) = 0.0 +! +! computation of the mean flow char zlow < z < ztop =sigfac*hprime +!23456 + do k = k_zlow, khtop(i)-1 + rdelks = del(j,k) * delks(i) + ubar(i) = ubar(i) + rdelks * u1(j,k) + vbar(i) = vbar(i) + rdelks * v1(j,k) + roll(i) = roll(i) + rdelks * ro(i,k) + bnv2bar(i) = bnv2bar(i) + .5*(bnv2(i,k)+bnv2(i,k+1))* rdelks + enddo + enddo +!23456 + do i = 1, npt + j = ipt(i) +! +! integrate from ztoph = sigfac*hprime down to zblk if exists +! find ph_blk, dz_blk as introduced in LM-97 and ifs +!23456 + ph_blk =0. + do k = khtop(i), 1, -1 + phiang = atan2(v1(j,k),u1(j,k)) + phiang = theta(j)*rad_to_deg - phiang + if ( phiang > pih ) phiang = phiang - pi + if ( phiang < -pih ) phiang = phiang + pi + ang(i,k) = phiang + uds(i,k) = max(sqrt(u1(j,k)*u1(j,k) + v1(j,k)*v1(j,k)), velmin) +!23456 + if (idxzb(i) == 0 ) then + dz_blk = zmeti(j,k+1) - zmeti(j,k) + pe(i) = pe(i) + bnv2(i,k) *( elvmax(j) - zmet(j,k) ) * dz_blk + up(i) = max(uds(i,k) * cos(ang(i,k)), velmin) + ek(i) = 0.5 * up(i) * up(i) + ph_blk = ph_blk + dz_blk*sqrt(bnv2(i,k))/up(i) + +! --- dividing stream lime is found when pe =exceeds ek. oper-l gfs +! if ( pe(i) >= ek(i) ) then +! --- LM97/IFS + if(ph_blk >= fcrit_v1 ) then + idxzb(i) = k + zobl (j) = zmet(j, k) + rdxzb(j) = real(k, kind=kind_phys) + endif +!23456 + endif + enddo +! +! --- the drag for the blocked flow +! + if ( idxzb(i) > 0 ) then +! +! (4.16)-ifs description +! + gam2 = gamma(j)*gamma(j) + bgam = 1.0 - 0.18*gamma(j) - 0.04*gam2 + cgam = 0.48*gamma(j) + 0.30*gam2 + do k = idxzb(i)-1, 1, -1 +!23456 +! empirical height dep-nt "blocking" length from LM-1997/IFS +! + zlen = sqrt( (zobl(j)-zmet(j,k) )/(zmet(j,k ) + hprime(j)) ) + tem = cos(ang(i,k)) + cosang2 = tem * tem + sinang2 = 1.0 - cosang2 + rdem = cosang2 + gam2 * sinang2 + rnom = cosang2*gam2 + sinang2 +! +! metoffice dec 2010 +! correction of H. Wells & A. Zadra for the +! aspect ratio of the elliptical hill seen by mean flow +! + rdem = max(rdem, 1.e-6) + r = sqrt(rnom/rdem) + zr = max( 2. - r, 0. ) + sigres = max(sigmin, sigma(j)) + mtbridge = zr * sigres*zlen / hprime(j) +! dbtmp = cdmb4*mtbridge*max(cos(ang(i,k)), gamma(j)*sin(ang(i,k))) ! (4.15)-ifs + dbtmp = cdmb4*mtbridge*(bgam* cosang2 +cgam * sinang2) ! (4.16)-ifs +! +! linear damping due to OBL [1/sec]=[U/L_block_orthogonal] +! more accurate along 2-axes of ellipse, here zr-factor is based on Phillips' analytics +! + db(i,k)= dbtmp * uds(i,k) +! if (db(i,k) > dbmax) print *, ' db > dbmax ', 1./db(i,k)/3600., uds(i,k) + db(i,k)= min(db(i,k), dbmax) + enddo +!23456 + endif + enddo +!............................. +!............................. +! finish the mtn blocking +!............................. +!............................. +! +!--- OGW section +! +! scale cleff between im=384*2 and 192*2 for t126/t170 and t62 +! inside "cires_ugwp_initialize.f90" now +! + kmpbl = km / 2 + iwk(1:npt) = 2 +! +! in meto/UK-scheme: +! k_mtb = max(k_zmtb, k_n*hprime/2] to reduce diurnal variations in taub_ogw +!23456 + do k=3,kmpbl + do i=1,npt + j = ipt(i) + tem = (prsi(j,1) - prsi(j,k)) + if (tem < dpmin) iwk(i) = k ! dpmin=50 mb from the surface + enddo + enddo +! +! in all cires-UGWP-schemes: zogw > zobl +! in ugwp-v1: we consider option for htop ~ (2-3)*hprime > zmtb +! the top of hill can be inside the PBL.... if kref = khtop +! + + kbps = 1 + kmps = km + k_mtb = 1 +!23456 + do i=1,npt + j = ipt(i) + k_mtb = max(1, idxzb(i)) + ! WRF/GSL: kogw = max(kpbl, ktop=2*var) + kref(i) = max(iwk(i), kpbl(j)+1 ) ! reference level pbl or smt-else...Zogw= sigfac*Hprime + kref(i) = max(kref(i), khtop(i) ) ! khtop => sigfac*hprime +!zogw > zobl + if (kref(i) <= k_mtb) kref(i) = k_mtb + 1 ! OGW-layer above the blocking height + kbps = max(kbps, kref(i)) + kmps = min(kmps, kref(i)) +! + delks(i) = 1.0 / (prsi(j,k_mtb) - prsi(j,kref(i))) + ubar (i) = 0.0 + vbar (i) = 0.0 + roll (i) = 0.0 + bnv2bar(i)= 0.0 + enddo +!23456===================== +! +!= we estimate MF-parameters from k= k_mtb to [kref~kpbl] > k_mtb +!computation of the mean flow for zobl < z < ztop =sigfac*hprime inb GSL ztop =max(hpbl, ztop) +!23456===================== + do i = 1,npt + k_mtb = max(1, idxzb(i)) + do k = k_mtb,kbps !kbps = max(kref) kref = (kpbl+1, khtop) + if(k < kref(i)) then + j = ipt(i) + rdelks = del(j,k) * delks(i) + ubar(i) = ubar(i) + rdelks * u1(j,k) + vbar(i) = vbar(i) + rdelks * v1(j,k) + roll(i) = roll(i) + rdelks * ro(i,k) + bnv2bar(i) = bnv2bar(i) + .5*(bnv2(i,k)+bnv2(i,k+1))* rdelks + endif + enddo + enddo +! +! orographic asymmetry parameters (oa), and (clx) [Kim & Arakawa Kim & Doyle] +!23456 + do i = 1,npt + j = ipt(i) + wdir = atan2(ubar(i),vbar(i)) + pi + idir = mod(nint(fdir*wdir),mdir) + 1 + nwd = nwdir(idir) + oa(i) = (1-2*int( (nwd-1)/4 )) * oa4(j,mod(nwd-1,4)+1) + clx(i) = clx4(j,mod(nwd-1,4)+1) ! number of "effective" hills (?) in the grid-box KA-95/KD-05 +! +!GSL-drag ->identical to above +! +! wdir = atan2(ubar(i),vbar(i)) + pi +! idir = mod(nint(fdir*wdir),mdir) + 1 +! nwd = nwdir(idir) +! oa(i) = (1-2*int( (nwd-1)/4 )) * oa4(i,mod(nwd-1,4)+1) +! ol(i) = ol4(i,mod(nwd-1,4)+1) +! + dtfac(i) = 1.0 + icrilv(i) = .false. ! initialize critical level control Logic + ulow(i) = max(sqrt(ubar(i)*ubar(i)+vbar(i)*vbar(i)),velmin) + xn(i) = ubar(i) / ulow(i) + yn(i) = vbar(i) / ulow(i) + enddo +!23456 + do k = 1, kmm1 + do i = 1,npt + j = ipt(i) + velco(i,k) = 0.5 * ((u1(j,k)+u1(j,k+1))*xn(i)+ (v1(j,k)+v1(j,k+1))*yn(i)) + enddo + enddo + + do i = 1,npt + velco(i,km) = velco(i,kmm1) + enddo +! +!------------------------------------------------------------------------ +! v0/v1: incorporates modifications for kxridge and heff/hsat +! and employs taulin for fr <=fcrit_v1 +! concept of "clipped" hill if zmtb > 0. is uded to make +! the integrated "tau_sso = tau_ogw +tau_mtb" close to reanalysis +! now it is still used the "single-orowave" along ulow-upwind +! +! in contrast ifs/meto/e-canada employ the 2-orthogonal wave (2otw) schemes of +! it requires "aver angle" and wind projections on axes of ell-hill +! with 2-stresses: taub_a/b as suggested by analytics of Phillips (1984) +!------------------------------------------------------------------------ + + taub(:) = 0. ; taulin(:)= 0. ;taub_kd05 =0. + fcrit2 =fcrit_v1*fcrit_v1 +! +! taub_oro as in KA-95/KD-05 GSL & EMC includes ALL waves (POGWs, Lee-rotors, etc...) +! here taub represents mainly OGWs with nonh_fact = 1. -(kx/kz)**2 +! LLWB for Lee-rotors (downslope dynamics and flow-splitting ) is not considered +!23456 + do i = 1,npt + j = ipt(i) + bnv = sqrt( bnv2bar(i) ) + heff = min(hprime(j),hpmax) + if( zobl(j) > 0.) heff = max(sigfac*heff-zobl(j), 0.)/sigfac + if (heff <= 0) cycle + zw1 = ulow(i)/bnv + hsat = fcrit_v1 *zw1 + heff = min(heff, hsat) + fr = heff/zw1 + fr = min(fr, frmax) + fr2 = fr*fr + zw2 = fr2 *oc(j) ! oc-values from 0 to 10 (GSL => 100) +! +! [Kim & Doyle, 2005] +! + efact = (oa(i) + 2.) ** (ceofrc*fr) ! enhnancement factor due to the resonance ampification/downstream + efact = min( max(efact,efmin), efmax ) + gfobnv = efact* gmax /(zw2 + cg) ! withoutt "multiplication" on =zw2 +! +! ! cleff_max(C768 = 6.28/(12.5 km/5.)) ..... +! xlinv(i) = min(coefm * cleff, cleff_max) +! + mkd05_hills(i) = (1. + clx(i)) ** (oa(i)+1.) ! ex-coefm (1-2) of eff-hills with "some" anizoropy as in KD-2005 + xlinv(i) = min(cleff * mkd05_hills(i), cleff_max) + taub_kd05(i) = roll(i)*xlinv(i) *(gfobnv *zw2)* (zw1 * ulow(i)* ulow(i)) +! +! old: tem = fr2*oc(j) ; gfobnv = gmax * tem / ((tem + cg)*bnv(i)) +! kx =or max(kxridge, inv_b2eff) ! 6.28/lx ..0.5*sigma(j)/heff = 1./lridge +! + sigres = sigma(j) + inv_b2eff = pi*sigres/heff ! pi2/(2b) + kxridge = pi /ahdxres(i) ! pi2/(2*dx) + xlingfs = max(inv_b2eff, kxridge) + nonh_fact = 1. - xlinv(i)*zw1 * xlinv(i)*zw1 ! 1- (kx/kz)^2 +!23456 + if (nonh_fact <= 0.) cycle ! non-hydrostatic trapping kx = kz = N/U +! + taulin(i) = xlinv(i)*roll(i)*bnv*ulow(i)*heff*heff * nonh_fact + tausat(i) = xlinv(i)*roll(i)* zw1*ulow(i)*ulow(i) *fcrit2 * nonh_fact +! +! taulin(i) = xlinv(i)*roll(i)*ulow(i)**3/bnv *fr2 => +! fr2 = (bnv*heff/Ulow)**2 + non-hydrostatic trapping effects Fr2_nh = Fr2 - kx2*heff^2 +!23456 + if(fr > fcrit_v1 ) then + frnd = fr/fcrit_v1 + fr_func = frnorm* frnd*frnd/(afr + frnd ** nfr) + taub(i) = tausat(i) *max(fr_func, max_frf) ! nonlinear flux tau0...xlinv(i) + else + taub(i) = taulin(i) ! linear flux for fr <= fcrit_v1 + endif + xlinv(i) = .5*xlinv(i) ! 1/2 rhoint-factor in Ri-solver of PSS-1986 + k = max(1, kref(i)-1) + tem = max(velco(i,k)*velco(i,k), dw2min) + scor(i) = bnv2(i,k) / tem ! scorer parameter below kref level Bn2/U2= kz^2 + zogw(j) = zmeti(j, kref(i) ) + tau_ogw(j) = taub(i) +!23456 + enddo +! +!----set up bottom values of stress +! + do i = 1,npt + taup(i, 1:kref(i) ) = taub(i) + enddo +!====================================================== +! +! Having : taub(i)/tau_ogw(j) => solve for OGW-effects +! +!====================================================== + if (strsolver == 'pss-1986') then + +!====================================================== +! v0-gfs orogw-solver of Palmer et al 1986 -"pss-1986" +! modified by KD05 with the emp.expression (11):below k=kref ??? +! tau(k+1) = tau(k)*Scorer(K+1)/Scorer(K) +! in v1-orogw linsatdis of "wam-2017" for +! rotational/non-hydrostat ogws; important for +! highres-fv3gfs with dx < 10 km +!23456====================================================== + do k = kmps, kmm1 ! vertical level loop from min(kref) + kp1 = k + 1 + do i = 1, npt + if (k >= kref(i)) then + icrilv(i) = icrilv(i) .or. ( ri_n(i,k) < ric).or. (velco(i,k) <= 0. ) + endif + enddo +! + do i = 1,npt + if (k >= kref(i)) then + if (.not.icrilv(i) .and. taup(i,k) > 0.0 ) then + zw1 = max(velco(i,k), velmin) + temv = 1.0 / zw1 +!=============== +! Condition for levels below kref(i): k+1 < kref(i)) ??? see KD05 expression (11) for LLWB only OA >0 +! k >= kref(i) and .... k+1 0. .and. kp1 < kref(i)) then + scork = bnv2(i,k) * temv * temv + rscor = min(1.0, scork / scor(i)) + scor(i) = scork + else + rscor = 1. + endif +!=============== + brvf = sqrt(bnv2(i,k)) ! brent-vaisala frequency interface + tem1 = xlinv(i)*(ro(i,kp1)+ro(i,k)) *brvf* zw1 + hd = sqrt(taup(i,k) / tem1) + fro = brvf * hd * temv +! +! rim is the "wave"-richardson number byPalmer,Shutts & Swinbank 1986 , PSS-1986 +! + tem2 = sqrt(ri_n(i,k)) + tem = 1. + tem2 * fro + ri_gw = ri_n(i,k) * (1.0-fro) / (tem * tem) +! +! check Ri-stability to employ the 'dynamical criterion' of PSS-1986 +! assuming co-existence of simultaneous Dyn-Ins and Conv-Ins +! cos(GW_phase) =1 and sin(GW_phase)=-1 +!23456 + if (ri_gw <= ric .and.(oa(i) <= 0. .or. kp1 >= kref(i) )) then + temc = 2.0 + 1.0 / tem2 + hd = zw1 * (2.*sqrt(temc)-temc) / brvf + taup(i,kp1) = tem1 * hd * hd + else + taup(i,kp1) = taup(i,k) * rscor + endif +! + taup(i,kp1) = min(taup(i,kp1), taup(i,k)) + endif ! if (.not.icrilv(i) .and. taup(i,k) > 0.0 ) + endif ! k >= kref(i)) + enddo ! oro-points + enddo ! do k = kmps, kmm1 vertical level loop +!23456 +! zero momentum deposition at the top model layer: taup(k+1) = taup(k) +! + taup(1:npt,km+1) = taup(1:npt,km) +! +! calculate wave acc-n: - (grav)*d(tau)/d(p) = taud +!23456 + do k = 1,km + do i = 1,npt + zw1 = grav*(taup(i,k+1) - taup(i,k))/del(ipt(i),k) +!====================================================================================== +! zw1 = zw1 * arhills(i) ! simple scale-awareness nhills=Grid_Area/Hil +! apply limiters for OGW tendency +!====================================================================================== + if (abs(zw1) > max_axyz ) zw1 = sign(max_axyz, zw1) + taud(i,k)= zw1 + enddo + enddo +!23456 +!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!------if the gravity wave drag would force a critical line in the +!------layers below sigma=rlolev during the next deltim timestep, +!------then only apply drag until that critical line is reached. +! empirical implementation of the llwb-mechanism: lower level wave breaking +! by limiting "ax = dtfac*ax" due to possible llwb around kref and 500 mb +! critical line [v - ax*dtp = 0.] is smt like "llwb" for stationary ogws +!2019: this option limits sensitivity of taux/tauy to variations in "taub" +!23456~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + do k = 1,kmm1 + do i = 1,npt + if (k >= kref(i) .and. prsi(ipt(i),k) >= rlolev .and. taud(i,k) /= 0.) then + tem = dtp * taud(i,k) + dtfac(i) = min(dtfac(i),abs(velco(i,k)/tem)) ! reduce Ax= Ax*(1, or U/dU <=1) +!default : dtfac(i) = 1.0 + endif + enddo + enddo +! +!--------- orogw-solver of gfs PSS-1986 is performed + else +!----------orogw-solver of wam2017 out : taup, taud, pkdis + + call oro_spectral_solver(im, km, npt, ipt, kref, kdt, me, master, & + dtp, dxres, taub, u1, v1, t1, xn, yn, bnv2, ro, prsi,prsl, & + del, sigma, hprime, gamma, theta, sinlat, xlatd, taup, taud, pkdis) + + endif ! oro_linsat - linsatdis-solver for stationary OGWs +! +!---- above orogw-solver of wam2017------------ +! +! tofd as in Beljaars-2004 IFS sep-scale ~5km +! CESM ~ 6km (TMS + OGW/OBL) +! sgh30 = varss of GSL +! ---------------------------------------------- +!23456 + if( do_tofd ) then + do i = 1,npt + j = ipt(i) + zpbl = zmet( j, kpbl(j) ) + sigflt = min(sgh30(j), 0.3*hprime(j)) ! cannot exceed 30% of ls-sso GSL-2/limits a) 250 m ; b) var_maxfd =150m + zsurf = zmeti(j,1) + do k=1,km + zpm(k) = zmet(j,k) + up1(k) = u1(j,k) + vp1(k) = v1(j,k) + enddo + + call ugwp_tofd1d(km, cpd, dtp, sigflt, zsurf, zpbl, & + up1, vp1, zpm, utofd1, vtofd1, epstofd1, krf_tofd1) + + do k=1,km + dudt_ofd(j,k) = utofd1(k) + dvdt_ofd(j,k) = vtofd1(k) +! +! add tofd to gw-tendencies +! + pdvdt(j,k) = pdvdt(j,k) + utofd1(k) + pdudt(j,k) = pdudt(j,k) + vtofd1(k) + pdtdt(j,k) = pdtdt(j,k) + epstofd1(k) + enddo + du_ofdcol(j) = sum( utofd1(1:km)* del(j,1:km)) + dv_ofdcol(j) = sum( vtofd1(1:km)* del(j,1:km)) + + dusfc(j) = dusfc(j) + du_ofdcol(j) + dvsfc(j) = dvsfc(j) + dv_ofdcol(j) + enddo + endif ! do_tofd +!23456 +!-------------------------------------------- +! combine oro-drag effects MB +TOFD + OGWs + diag-3d +!-------------------------------------------- +!234546 + do k = 1,km + do i = 1,npt + j = ipt(i) + eng0 = 0.5*(u1(j,k)*u1(j,k)+v1(j,k)*v1(j,k)) + if ( k < idxzb(i) .and. idxzb(i) /= 0 ) then +! +! if blocking layers -- no ogw effects +! + dbim = db(i,k) / (1.+db(i,k)*dtp) + dudt_obl(j,k) = -dbim * u1(j,k) + dvdt_obl(j,k) = -dbim * v1(j,k) + + pdvdt(j,k) = dudt_obl(j,k) +pdvdt(j,k) + pdudt(j,k) = dvdt_obl(j,k) +pdudt(j,k) + du_oblcol(j) = du_oblcol(j) + dudt_obl(j,k)* del(j,k) + dv_oblcol(j) = dv_oblcol(j) + dvdt_obl(j,k)* del(j,k) + dusfc(j) = dusfc(j) + du_oblcol(j) + dvsfc(j) = dvsfc(j) + dv_oblcol(j) +!23456 + else +! +! ogw-s above blocking height +! + taud(i,k) = taud(i,k) * dtfac(i) + dtaux = taud(i,k) * xn(i) + dtauy = taud(i,k) * yn(i) +! + dudt_ogw(j,k) = dtaux + dvdt_ogw(j,k) = dtauy +! + pdvdt(j,k) = dtauy +pdvdt(j,k) + pdudt(j,k) = dtaux +pdudt(j,k) + +! + du_ogwcol(j) = du_ogwcol(j) + dtaux * del(j,k) + dv_ogwcol(j) = dv_ogwcol(j) + dtauy * del(j,k) +! + dusfc(j) = dusfc(j) + du_ogwcol(j) + dvsfc(j) = dvsfc(j) + dv_ogwcol(j) + endif +!23456 +!============ +! local energy deposition sso-heat due to loss of kinetic energy +!============ + unew = u1(j,k) + pdudt(j,k)*dtp ! pdudt(j,k)*dtp + vnew = v1(j,k) + pdvdt(j,k)*dtp ! pdvdt(j,k)*dtp + eng1 = 0.5*(unew*unew + vnew*vnew) + pdtdt(j,k) = max(eng0-eng1,0.)*rcpdt + pdtdt(j,k) + enddo + enddo +! dusfc w/o tofd sign as in the era-i, merra and cfsr +!23456 + do i = 1,npt + j = ipt(i) + dusfc(j) = -rgrav * dusfc(j) + dvsfc(j) = -rgrav * dvsfc(j) + du_ogwcol(j) = -rgrav *du_ogwcol (j) + dv_ogwcol(j) = -rgrav *dv_ogwcol (j) + du_oblcol(j) = -rgrav *du_oblcol (j) + dv_oblcol(j) = -rgrav *dv_oblcol (j) + du_ofdcol(j) = -rgrav * du_ofdcol(j) + dv_ofdcol(j) = -rgrav * du_ofdcol(j) + enddo + + return + + +!============ print/debug after the RETURN statenemt -------------------------------- + if (kdt <= 2 .and. me == 0) then + print *, 'vgw-oro done gwdps_v0 in ugwp-v0 step-proc ', kdt, me +! + print *, maxval(pdudt)*86400., minval(pdudt)*86400, 'vgw_axoro' + print *, maxval(pdvdt)*86400., minval(pdvdt)*86400, 'vgw_ayoro' +! print *, maxval(kdis), minval(kdis), 'vgw_kdispro m2/sec' + print *, maxval(pdtdt)*86400., minval(pdtdt)*86400,'vgw_epsoro' +! print *, maxval(zobl), ' z_mtb ', maxval(tau_mtb), ' tau_mtb ' + print *, maxval(zogw), ' z_ogw ', maxval(tau_ogw), ' tau_ogw ' +! print *, maxval(tau_tofd), ' tau_tofd ' +! print *, maxval(axtms)*86400., minval(axtms)*86400, 'vgw_axtms' +! print *,maxval(dudt_mtb)*86400.,minval(dudt_mtb)*86400,'vgw_axmtb' + if (maxval(abs(pdudt))*86400. > 100.) then + + print *, maxval(u1), minval(u1), ' u1 gwdps-v1 ' + print *, maxval(v1), minval(v1), ' v1 gwdps-v1 ' + print *, maxval(t1), minval(t1), ' t1 gwdps-v1 ' + print *, maxval(q1), minval(q1), ' q1 gwdps-v1 ' + print *, maxval(del), minval(del), ' del gwdps-v1 ' + print *, maxval(zmet),minval(zmet), 'zmet' + print *, maxval(zmeti),minval(zmeti), 'zmeti' + print *, maxval(prsi), minval(prsi), ' prsi ' + print *, maxval(prsl), minval(prsl), ' prsl ' + print *, maxval(ro), minval(ro), ' ro-dens ' + print *, maxval(bnv2(1:npt,:)), minval(bnv2(1:npt,:)),' bnv2 ' + print *, maxval(kpbl), minval(kpbl), ' kpbl ' + print *, maxval(sgh30), maxval(hprime), maxval(elvmax),'oro-d' + print * + do i =1, npt + j= ipt(i) + print *,zogw(j)/hprime(j), zobl(j)/hprime(j), & + zmet(j,1)*1.e-3, nint(hprime(j)/sigma(j)) +! + enddo + print * + stop + endif + endif + + return + end subroutine orogw_v1 +! +! + subroutine ugwp_tofd1d(levs, con_cp, dtp, sigflt, zsurf, zpbl, u, v, & + zmid, utofd, vtofd, epstofd, krf_tofd) + + use machine , only : kind_phys + use ugwp_oro_init, only : n_tofd, const_tofd, ze_tofd, a12_tofd, ztop_tofd +! +! adding the implicit tendency estimate +! + implicit none + integer, intent(in) :: levs + real(kind_phys), intent(in) :: con_cp + real(kind_phys), intent(in) :: dtp + + real(kind_phys), intent(in), dimension(levs) :: u, v, zmid + real(kind_phys), intent(in) :: sigflt, zpbl, zsurf + + real(kind_phys), intent(out), dimension(levs) :: utofd, vtofd, epstofd, krf_tofd +! +! locals +! + integer :: i, k + real(kind=kind_phys) :: rcpd2, tofd_mag, tofd_zdep + real(kind_phys) :: unew, vnew, eknew + + real(kind=kind_phys), parameter :: sghmax = 5. ! dz(1)/5= 25/5 m dz-of the first layer + real(kind=kind_phys), parameter :: tend_imp = 1. + + + real(kind=kind_phys) :: sgh2, ekin, zdec, rzdec, umag, zmet, zarg, ztexp, krf +! + utofd =0.0 ; vtofd = 0.0 ; epstofd =0.0 ; krf_tofd =0.0 + rcpd2 = 0.5/con_cp +! + zdec = max(n_tofd*sigflt, zpbl) ! ntimes*sgh_turb or Zpbl + zdec = min(ze_tofd, zdec) ! cannot exceed ~1.5 km +! H_efold = max(2*varss, hpbl) +! H_efold = min(H_efold,1500.) + rzdec = 1.0/zdec + + sgh2 = max(sigflt*sigflt, sghmax*sghmax) ! dz ~25m of the first layer in FV3GFS-127L + tofd_mag = const_tofd * a12_tofd * sgh2 ! * scale_res + +! GSL-darg scheme: varmax_fd, beta_fd ,250. +! var_temp = MIN(varss,varmax_fd) + MAX(0., 0.1*(varss-varmax_fd)) +! var_temp = MIN(var_temp, 250.) +! var_temp = var_temp * var_temp +! +! a12=a1* 0.005363 * 0.0759 * 0.00026615161 +! +! rzdec 1./H_efold +! do k=1,levs +! zmet = zmid(k)-zsurf +! wsp=SQRT(u(k)*u(k) + v(k)*v(k)) ! abs(V) +! zarg = zmet*rzdec +! var_temp = var_temp * a12 * exp(-zarg*sqrt(zarg))*zmet**(-1.2) ! this > 0 +! krf = var_temp * wsp /(1. + var_temp*dtp*wsp) +! utofd(k) = -u(k) *krf +! vtofd(k) = -v(k)/(1. + var_temp*krf +! enddo + + do k=1, levs + zmet = zmid(k)-zsurf + if (zmet > ztop_tofd) cycle + + ekin = u(k)*u(k) + v(k)*v(k) + + umag = sqrt(ekin) + zarg = zmet*rzdec + ztexp = exp(-zarg * sqrt(zarg)) + + tofd_zdep = zmet ** (-1.2) *ztexp + krf = umag * tofd_mag * tofd_zdep + + if (tend_imp == 1.) then + krf = krf/(1.+krf*dtp) + endif + + utofd(k) = -krf*u(k) + vtofd(k) = -krf*v(k) + if (tend_imp == 1.) then + unew =u(k)+ utofd(k)*dtp ; vnew =v(k)+ vtofd(k)*dtp + eknew =unew*unew + vnew*vnew + epstofd(k) = rcpd2*(ekin-eknew) + else + epstofd(k) = rcpd2*krf*ekin + endif + ! more accurate heat/mom form using "implicit tend-solver" + ! to update momentum and temp-re; epstofd(k) can be skipped + krf_tofd(k) = krf ! can be used as addition to the mesoscale blocking + enddo +! + end subroutine ugwp_tofd1d + +end module cires_ugwpv1_oro diff --git a/physics/cires_ugwpv1_solv2.F90 b/physics/cires_ugwpv1_solv2.F90 new file mode 100644 index 000000000..afd94ff5c --- /dev/null +++ b/physics/cires_ugwpv1_solv2.F90 @@ -0,0 +1,1036 @@ +module cires_ugwpv1_solv2 + + +contains + + +!--------------------------------------------------- +! Broad spectrum FVS-1993, mkz^nSlope with nSlope = 0, 1,2 +! dissipative solver with NonHyd/ROT-effects +! reflected GWs treated as waves with "negligible" flux, +! they are out of given column +!--------------------------------------------------- + + subroutine cires_ugwpv1_ngw_solv2(mpi_id, master, im, levs, kdt, dtp, & + tau_ngw, tm , um, vm, qm, prsl, prsi, zmet, zmeti, prslk, & + xlatd, sinlat, coslat, & + pdudt, pdvdt, pdtdt, dked, zngw) +! +!-------------------------------------------------------------------------------- +! nov 2015 alternative gw-solver for nggps-wam +! nov 2017 nh/rotational gw-modes for nh-fv3gfs +! oct 2019 adding empirical satellite-based +! source function and *F90 CIRES-style of the code +! oct 2020 Diagnostics of "tauabs, wrms, trms" is taken out +! -------------------------------------------------------------------------------- +! + use machine, only : kind_phys + + use cires_ugwpv1_module,only : krad, kvg, kion, ktg, iPr_ktgw, Pr_kdis, Pr_kvkt + + use cires_ugwpv1_module,only : knob_ugwp_doheat, knob_ugwp_dokdis, idebug_gwrms + + use cires_ugwpv1_module,only : psrc => knob_ugwp_palaunch + + use cires_ugwpv1_module,only : maxdudt, maxdtdt, max_eps, dked_min, dked_max + + use ugwp_common , only : rgrav, grav, cpd, rd, rv, rcpdl, grav2cpd, & + omega2, rcpd, rcpd2, pi, pi2, fv, & + rad_to_deg, deg_to_rad, & + rdi, gor, grcp, gocp, & + bnv2min, bnv2max, dw2min, velmin, gr2, & + hpscale, rhp, rh4, grav2, rgrav2, mkzmin, mkz2min +! + use ugwp_wmsdis_init, only : v_kxw, rv_kxw, v_kxw2, tamp_mpa, tau_min, ucrit, & + gw_eff, & + nslope, ilaunch, zms, & + zci, zdci, zci4, zci3, zci2, & + zaz_fct, zcosang, zsinang, nwav, nazd, & + zcimin, zcimax, rimin, sc2, sc2u, ric +! + implicit none +! + real(kind=kind_phys), parameter :: zsp_gw = 106.5e3 ! sponge for GWs above the model top + real(kind=kind_phys), parameter :: linsat2 = 1.0, dturb_max = 100.0 + integer, parameter :: ener_norm =0 + integer, parameter :: ener_lsat=0 + integer, parameter :: nstdif = 1 + integer, parameter :: wave_sponge = 1 + + integer, intent(in) :: levs ! vertical level + integer, intent(in) :: im ! horiz tiles + integer, intent(in) :: mpi_id, master, kdt + + real(kind=kind_phys) ,intent(in) :: dtp ! model time step + real(kind=kind_phys) ,intent(in) :: tau_ngw(im) + + real(kind=kind_phys) ,intent(in) :: vm(im,levs) ! meridional wind + real(kind=kind_phys) ,intent(in) :: um(im,levs) ! zonal wind + real(kind=kind_phys) ,intent(in) :: qm(im,levs) ! spec. humidity + real(kind=kind_phys) ,intent(in) :: tm(im,levs) ! kinetic temperature + + real(kind=kind_phys) ,intent(in) :: prsl(im,levs) ! mid-layer pressure + real(kind=kind_phys) ,intent(in) :: prslk(im,levs) ! mid-layer exner function + real(kind=kind_phys) ,intent(in) :: zmet(im,levs) ! meters now !!!!! phil =philg/grav + real(kind=kind_phys) ,intent(in) :: prsi(im,levs+1) ! interface pressure + real(kind=kind_phys) ,intent(in) :: zmeti(im,levs+1) ! interface geopi/meters + real(kind=kind_phys) ,intent(in) :: xlatd(im) ! xlat_d in degrees + real(kind=kind_phys) ,intent(in) :: sinlat(im) + real(kind=kind_phys) ,intent(in) :: coslat(im) +! +! out-gw effects +! + real(kind=kind_phys) ,intent(out) :: pdudt(im,levs) ! zonal momentum tendency + real(kind=kind_phys) ,intent(out) :: pdvdt(im,levs) ! meridional momentum tendency + real(kind=kind_phys) ,intent(out) :: pdtdt(im,levs) ! gw-heating (u*ax+v*ay)/cp and cooling + real(kind=kind_phys) ,intent(out) :: dked(im,levs) ! gw-eddy diffusion + real(kind=kind_phys) ,intent(out) :: zngw(im) ! launch height +! +! +! +! local =========================================================================================== + + real(kind=kind_phys) :: tauabs(im,levs) ! + real(kind=kind_phys) :: wrms(im,levs) ! + real(kind=kind_phys) :: trms(im,levs) ! + + real(kind=kind_phys) :: zwrms(nwav,nazd), wrk1(levs), wrk2(levs) + real(kind=kind_phys) :: atrms(nazd, levs),awrms(nazd, levs), akzw(nwav,nazd, levs+1) +! +! local =========================================================================================== + real(kind=kind_phys) :: taux(levs+1) ! EW component of vertical momentum flux (pa) + real(kind=kind_phys) :: tauy(levs+1) ! NS component of vertical momentum flux (pa) + real(kind=kind_phys) :: fpu(nazd, levs+1) ! az-momentum flux + real(kind=kind_phys) :: ui(nazd, levs+1) ! azimuthal wind + + real(kind=kind_phys) :: fden_bn(levs+1) ! density/brent + real(kind=kind_phys) :: flux (nwav, nazd) , flux_m (nwav, nazd) +! + real(kind=kind_phys) :: bn(levs+1) ! interface BV-frequency + real(kind=kind_phys) :: bn2(levs+1) ! interface BV*BV-frequency + real(kind=kind_phys) :: rhoint(levs+1) ! interface density + real(kind=kind_phys) :: uint(levs+1) ! interface zonal wind + real(kind=kind_phys) :: vint(levs+1) ! meridional wind + real(kind=kind_phys) :: tint(levs+1) ! temp-re + + real(kind=kind_phys) :: irhodz_mid(levs) + real(kind=kind_phys) :: suprf(levs+1) ! RF-super linear dissipation + real(kind=kind_phys) :: cstar(levs+1) ,cstar2(levs+1) + real(kind=kind_phys) :: v_zmet(levs+1) + real(kind=kind_phys) :: vueff(levs+1) + real(kind=kind_phys) :: dfdz_v(nazd, levs), dfdz_heat(nazd, levs) ! axj = -df*rho/dz directional Ax + + real(kind=kind_phys), dimension(levs) :: atm , aum, avm, aqm, aprsl, azmet, dz_met + real(kind=kind_phys), dimension(levs+1) :: aprsi, azmeti, dz_meti + + real(kind=kind_phys), dimension(levs) :: wrk3 + real(kind=kind_phys), dimension(levs) :: uold, vold, told, unew, vnew, tnew + real(kind=kind_phys), dimension(levs) :: rho, rhomid, adif, cdif, acdif + real(kind=kind_phys), dimension(levs) :: Qmid, AKT + real(kind=kind_phys), dimension(levs+1) :: dktur, Ktint, Kvint + real(kind=kind_phys), dimension(levs+1) :: fden_lsat, fden_bnen + + integer, dimension(levs) :: Anstab + + real(kind=kind_phys) :: sig_u2az(nazd), sig_u2az_m(nazd) + real(kind=kind_phys) :: wave_dis(nwav, nazd), wave_disaz(nazd) + real(kind=kind_phys) :: rdci(nwav), rci(nwav) + real(kind=kind_phys) :: wave_act(nwav, nazd) ! active waves at given vert-level + real(kind=kind_phys) :: ul(nazd) ! velocity in azimuthal direction at launch level +! +! scalars +! + real(kind=kind_phys) :: bvi, bvi2, bvi3, bvi4, rcms ! BV at launch level + real(kind=kind_phys) :: c2f2, cf1, wave_distot + + + real(kind=kind_phys) :: flux_norm ! norm-factor + real(kind=kind_phys) :: taub_src, rho_src, zcool, vmdiff +! + real(kind=kind_phys) :: zthm, dtau, cgz, ucrit_maxdc + real(kind=kind_phys) :: vm_zflx_mode, vc_zflx_mode + real(kind=kind_phys) :: kzw2, kzw3, kdsat, cdf2, cdf1, wdop2,v_cdp2 + real(kind=kind_phys) :: ucrit_max + real(kind=kind_phys) :: pwrms, ptrms + real(kind=kind_phys) :: zu, zcin, zcin2, zcin3, zcin4, zcinc + real(kind=kind_phys) :: zatmp, fluxs, zdep, ze1, ze2 + +! + real(kind=kind_phys) :: zdelp, zdelm, taud_min + real(kind=kind_phys) :: tvc, tvm, ptc, ptm + real(kind=kind_phys) :: umfp, umfm, umfc, ucrit3 + real(kind=kind_phys) :: fmode, expdis, fdis + real(kind=kind_phys) :: v_kzi, v_kzw, v_cdp, v_wdp, tx1, fcorsat, dzcrit + real(kind=kind_phys) :: v_wdi, v_wdpc + real(kind=kind_phys) :: ugw, vgw, ek1, ek2, rdtp, rdtp2, rhp_wam + + integer :: j, jj, k, kk, inc, jk, jkp, jl, iaz + integer :: ksrc, km2, km1, kp1, ktop +! +! Kturb-part +! + real(kind=kind_phys) :: uz, vz, shr2 , ritur, ktur + + real(kind=kind_phys) :: kamp, zmetk, zgrow + real(kind=kind_phys) :: stab, stab_dt, dtstab + real(kind=kind_phys) :: nslope3 +! + integer :: nstab, ist + real(kind=kind_phys) :: w1, w2, w3, dtdif + + real(kind=kind_phys) :: dzmetm, dzmetp, dzmetf, bdif, bt_dif, apc, kturp + real(kind=kind_phys) :: rstar, rstar2 + + real(kind=kind_phys) :: snorm_ener, sigu2, flux_2_sig, ekin_norm + real(kind=kind_phys) :: taub_ch, sigu2_ch + real(kind=kind_phys) :: Pr_kdis_eff, mf_diss_heat, iPr_max + real(kind=kind_phys) :: exp_sponge, mi_sponge, gipr + +!-------------------------------------------------------------------------- +! + nslope3 = nslope + 3.0 + Pr_kdis_eff = gw_eff*pr_kdis + iPr_max = max(1.0, iPr_ktgw) + gipr = grav* Ipr_ktgw +! +! test for input fields +! if (mpi_id == master .and. kdt < -2) then +! print *, im, levs, dtp, kdt, ' vay-solv2-v1' +! print *, minval(tm), maxval(tm), ' min-max-tm ' +! print *, minval(vm), maxval(vm), ' min-max-vm ' +! print *, minval(um), maxval(um), ' min-max-um ' +! print *, minval(qm), maxval(qm), ' min-max-qm ' +! print *, minval(prsl), maxval(prsl), ' min-max-Pmid ' +! print *, minval(prsi), maxval(prsi), ' min-max-Pint ' +! print *, minval(zmet), maxval(zmet), ' min-max-Zmid ' +! print *, minval(zmeti), maxval(zmeti), ' min-max-Zint ' +! print *, minval(prslk), maxval(prslk), ' min-max-Exner ' +! print *, minval(tau_ngw), maxval(tau_ngw), ' min-max-taungw ' +! print *, tau_min, ' tau_min ', tamp_mpa, ' tamp_mpa ' +! +! endif + + if (idebug_gwrms == 1) then + tauabs=0.0; wrms =0.0 ; trms =0.0 + endif + + rci(:) = 1./zci(:) + rdci(:) = 1./zdci(:) + + rdtp = 1./dtp + rdtp2 = 0.5*rdtp + + ksrc= max(ilaunch, 3) + km2 = ksrc - 2 + km1 = ksrc - 1 + kp1 = ksrc + 1 + ktop= levs+1 + + suprf(ktop) = kion(levs) + + do k=1,levs + suprf(k) = kion(k) ! approximate 1-st order damping with Fast super-RF of FV3 + pdvdt(:,k) = 0.0 + pdudt(:,k) = 0.0 + pdtdt(:,k) = 0.0 + dked(: ,k) = 0.0 + enddo + +!----------------------------------------------------------- +! column-based j=1,im pjysics with 1D-arrays +!----------------------------------------------------------- + DO j=1, im + jl =j + tx1 = omega2 * sinlat(j) *rv_kxw + cf1 = abs(tx1) + c2f2 = tx1 * tx1 + ucrit_max = max(ucrit, cf1) + ucrit3 = ucrit_max*ucrit_max*ucrit_max +! +! ngw-fluxes at all gridpoints (with tau_min at least) +! + aprsl(1:levs) = prsl(jl,1:levs) +! +! ksrc-define "aprsi(1:levs+1) redefine "ilaunch" +! + do k=1, levs + if (aprsl(k) .lt. psrc ) exit + enddo + ilaunch = max(k-1, 3) + ksrc= max(ilaunch, 3) + + zngw(j) = zmet(j, ksrc) + + km2 = ksrc - 2 + km1 = ksrc - 1 + kp1 = ksrc + 1 + +!=====ksrc + + aum(1:levs) = um(jl,1:levs) + avm(1:levs) = vm(jl,1:levs) + atm(1:levs) = tm(jl,1:levs) + aqm(1:levs) = qm(jl,1:levs) + azmet(1:levs) = zmet(jl,1:levs) + aprsi(1:levs+1) = prsi(jl,1:levs+1) + azmeti(1:levs+1) = zmeti(jl,1:levs+1) + + rho_src = aprsl(ksrc)*rdi/atm(ksrc) + taub_ch = max(tau_ngw(jl), tau_min) + taub_src = taub_ch + + + sigu2 = taub_src/rho_src/v_kxw * zms + sig_u2az(1:nazd) = sigu2 +! +! compute diffusion-based arrays km2:levs +! + do jk = km2, levs + dz_meti(jk) = azmeti(jk+1)-azmeti(jk) + dz_met(jk) = azmet(jk)-azmeti(jk-1) + enddo +! --------------------------------------------- +! interface mean flow parameters launch -> levs+1 +! --------------------------------------------- + do jk= km1,levs + tvc = atm(jk)*(1. +fv*aqm(jk)) + tvm = atm(jk-1)*(1. +fv*aqm(jk-1)) + ptc = tvc/ prslk(jl, jk) + ptm = tvm/prslk(jl,jk-1) +! + zthm = 2.0/(tvc+tvm) + rhp_wam = zthm*gor +!interface + uint(jk) = 0.5*(aum(jk-1)+aum(jk)) + vint(jk) = 0.5*(avm(jk-1)+avm(jk)) + tint(jk) = 0.5*(tvc+tvm) + rhomid(jk) = aprsl(jk)*rdi/atm(jk) + rhoint(jk) = aprsi(jk)*rdi*zthm ! rho = p/(RTv) + zdelp = dz_meti(jk) ! >0 ...... dz-meters + v_zmet(jk) = 2.*zdelp ! 2*kzi*[Z_int(k+1)-Z_int(k)] + zdelm = 1./dz_met(jk) ! 1/dz ...... 1/meters +! +! bvf2 = grav2*zdelm*(ptc-ptm)/(ptc + ptm) ! N2=[g/PT]*(dPT/dz) +! + bn2(jk) = grav2cpd*zthm*(1.0+rcpdl*(tvc-tvm)*zdelm) + bn2(jk) = max(min(bn2(jk), bnv2max), bnv2min) + bn(jk) = sqrt(bn2(jk)) + + + wrk3(jk)= 1./zdelp/rhomid(jk) ! 1/rho_mid(k)/[Z_int(k+1)-Z_int(k)] + irhodz_mid(jk) = rdtp*zdelp*rhomid(jk)/rho_src +! +! +! diagnostics -Kzz above PBL +! + uz = aum(jk) - aum(jk-1) + vz = avm(jk) - avm(jk-1) + shr2 = (max(uz*uz+vz*vz, dw2min)) * zdelm *zdelm + + zmetk = azmet(jk)* rh4 ! mid-layer height k_int => k_int+1 + zgrow = exp(zmetk) + ritur = bn2(jk)/shr2 + kamp = sqrt(shr2)*sc2 *zgrow + w1 = 1./(1. + 5*ritur) + ktur= min(max(kamp * w1 * w1, dked_min), dked_max) + zmetk = azmet(jk)* rhp + vueff(jk) = ktur + kvg(jk) + + akt(jk) = gipr/tvc + enddo + + if (idebug_gwrms == 1) then + do jk= km1,levs + wrk1(jk) = rv_kxw/rhoint(jk) + wrk2(jk)= rgrav2*zthm*zthm*bn2(jk) ! dimension [K*K]*(c2/m2) + enddo + endif + +! +! extrapolating values for ktop = levs+1 (lev-interface for prsi(levs+1) =/= 0) +! + jk = levs + + rhoint(ktop) = 0.5*aprsi(levs)*rdi/atm(jk) + tint(ktop) = atm(jk)*(1. +fv*aqm(jk)) + uint(ktop) = aum(jk) + vint(ktop) = avm(jk) + + v_zmet(ktop) = v_zmet(jk) + vueff(ktop) = vueff(jk) + bn2(ktop) = bn2(jk) + bn(ktop) = bn(jk) +! +! akt_mid *KT = -g*(1/H + 1/T*dT/dz)*KT ... grav/tvc for eddy heat conductivity +! + do jk=km1, levs + akt(jk) = -akt(jk)*(gor + (tint(jk+1)-tint(jk))/dz_meti(jk) ) + enddo + + + bvi = bn(ksrc); bvi2 = bvi * bvi; + bvi3 = bvi2*bvi; bvi4 = bvi2 * bvi2; rcms = zms/bvi +! +! project winds at ksrc +! + do iaz=1, nazd + ul(iaz) = zcosang(iaz) *uint(ksrc) + zsinang(iaz) *vint(ksrc) + enddo +! + + do jk=ksrc, ktop + cstar(jk) = bn(jk)/zms + cstar2(jk) = cstar(jk)*cstar(jk) + + fden_lsat(jk) = rhoint(jk)/bn(jk)*v_kxw*Linsat2 + + do iaz=1, nazd + zu = zcosang(iaz)*uint(jk) + zsinang(iaz)*vint(jk) + ui(iaz, jk) = zu !- ul(iaz)*0. + enddo + enddo + + rstar = 1./cstar(ksrc) + rstar2 = rstar*rstar +! ----------------------------------------- +! set launch momentum flux spectral density +! ----------------------------------------- + + fpu(1:nazd, km2:ktop) =0. + + do inc=1,nwav + + zcin = zci(inc)*rstar + +! +! integrate (flux(cin) x dcin ) old tau-flux and normalization +! + flux(inc,1) = rstar*(zcin*zcin)/(1.+ zcin**nslope3) +! +! fsat = rstar*(zcin*zcin) * taub_src / SN * [rho/rho_src *N_src/N] +! + fpu(1,ksrc) = fpu(1,ksrc) + flux(inc,1)*zdci(inc) ! dc/cstar = dim-less + + do iaz=1,nazd + akzw(inc, iaz, ksrc) = bvi*rci(inc) + enddo + + enddo +! +! adjust rho/bn vertical factors for saturated fluxes (E(m) ~m^-3) + + flux_norm = taub_src / fpu(1, ksrc) ! [Pa * dc/cstar *dim_less] + ze1 = flux_norm * bvi/rhoint(ksrc) *rstar *rstar2 + do jk=ksrc, ktop + fden_bn(jk) = ze1* rhoint(jk) / bn(jk) ! [Pa]/[m/s] * rstar2 + enddo +! + do inc=1, nwav + flux(inc,1) = flux_norm*flux(inc,1) + enddo + + + if (ener_norm == 1) then + snorm_ener = 0. + do inc=1,nwav + zcin = zci(inc)*rstar + + ze2 = zcin /(1.+ zcin**nslope3) + + snorm_ener = snorm_ener + ze2*zdci(inc)*rstar !dim-less + flux(inc,1) = ze2 * zcin + enddo + + ekin_norm = 1./snorm_ener + +! taub_src = sigu2 * rho_src * [v_kxw / zms ] +! sigu2 = taub_src*zms/(rho_src/v_kxw) +! ze1 = sigu2*ks*dens/Ns = taub*zms/Ns + + ze1 = taub_src*zms/bvi * ekin_norm + taub_src = 0. + + do inc=1,nwav + flux(inc,1) = ze1* flux(inc,1) + taub_src = taub_src + flux(inc,1)*zdci(inc) + enddo + ze1 = ekin_norm * v_kxw * rstar2 + do jk=ksrc, ktop + fden_bnen(jk) = rhoint(jk) / bn(jk) *ze1 ! mult on => sigu2(z)*cdf2 => flux_sat + enddo + + endif +! + do iaz=1,nazd + fpu(iaz, ksrc) = taub_src + fpu(iaz, km1) = taub_src + enddo + +! copy flux-1 into other azimuths +! -------------------------------- + + + do iaz=2, nazd + do inc=1,nwav + flux(inc,iaz) = flux(inc,1) + enddo + enddo + +! if (mpi_id == master .and. ener_norm == 1) then +! print * +! print *, 'vay_norm: ', taub_src, taub_ch, sigu2, flux_norm, ekin_norm +! print * +! endif + + if (idebug_gwrms == 1) then + pwrms =0. + ptrms =0. + tx1 = real(nazd)/rhoint(ksrc)*rv_kxw + ze2 = wrk2(ksrc) ! (bvi*atm(ksrc)*rgrav)**2 + do inc=1, nwav + v_kzw = bvi*rci(inc) + ze1 = flux(inc,1)*zdci(inc)*tx1*v_kzw + pwrms = pwrms + ze1 + ptrms = ptrms + ze1 * ze2 + enddo + wrms(jl, ksrc) = pwrms + trms(jl, ksrc) = ptrms + endif + +! -------------------------------- + wave_act(:,:) = 1.0 +! vertical do-loop + do jk=ksrc, levs + + jkp = jk+1 +! azimuth do-loop + do iaz=1, nazd + + sig_u2az_m(iaz) = sig_u2az(iaz) + + umfp = ui(iaz, jkp) + umfm = ui(iaz, jk) + umfc = .5*(umfm + umfp) +! wave-cin loop + dfdz_v(iaz, jk) = 0.0 + dfdz_heat(iaz, jk) = 0.0 + fpu(iaz, jkp) = 0.0 + sig_u2az(iaz) =0.0 +! +! wave_dis(iaz, :) = vueff(jk) + do inc=1, nwav + flux_m(inc, iaz) = flux(inc, iaz) + + zcin = zci(inc) ! zcin =/0 by definition + zcinc = rci(inc) + + if(wave_act(inc,iaz) == 1.0) then +!======================================================================= +! discrete mode +! saturated limit wfit = kzw*kzw*kt; wfdt = wfit/(kxw*cx)*betat +! & dissipative kzi = 2.*kzw*(wfdm+wfdt)*dzpi(k) +!======================================================================= + + v_cdp = zcin - umfp + v_cdp2=v_cdp*v_cdp + cdf2 = v_cdp2 - c2f2 + if (v_cdp .le. ucrit_max .or. cdf2 .le. 0.0) then +! +! between layer [k-1,k or jk-jkp] (Chi - Uk) -> ucrit_max, wave's absorption +! + wave_act(inc,iaz) =0. + akzw(inc, iaz, jkp) = pi/dz_meti(jk) ! pi2/dzmet + fluxs = 0.0 !max(0., rhobnk(jkp)*ucrit3)*rdci(inc) + flux(inc,iaz) = fluxs + + else + + v_wdp = v_kxw*v_cdp + wdop2 = v_wdp* v_wdp + +! +! rotational cut-off +! + kzw2 = (bn2(jkp)-wdop2)/Cdf2 +! +!cires_ugwp_initialize.F90: real, parameter :: mkzmin = pi2/80.0e3 +! + if ( kzw2 > mkz2min ) then + v_kzw = sqrt(kzw2) + akzw(inc, iaz, jkp) = v_kzw +! +!linsatdis: kzw2, kzw3, kdsat, c2f2, cdf2, cdf1 +! +!kzw2 = (bn2(k)-wdop2)/Cdf2 - rhp4 - v_kx2w ! full lin DS-NGW (N2-wd2)*k2=(m2+k2+[1/2H]^2)*(wd2-f2) +! Kds_sat = kxw*Cdf1*rhp2/kzw3 +!krad, kvg, kion, ktg + v_cdp = sqrt( cdf2 ) + v_wdp = v_kxw * v_cdp + v_wdi = kzw2*vueff(jk) + kion(jk) ! supRF-diss due for "all" vars + v_wdpc = sqrt(v_wdp*v_wdp +v_wdi*v_wdi) + v_kzi = v_kzw*v_wdi/v_wdpc + +! + ze1 = v_kzi*v_zmet(jk) + + if (ze1 .ge. 1.e-2) then + expdis = max(exp(-ze1), 0.01) + else + expdis = 1./(1.+ ze1) + endif + +! + wave_act(inc,iaz) = 1.0 + fmode = flux(inc,iaz) + + flux_2_sig = v_kzw/v_kxw/rhoint(jkp) + w1 = v_wdpc/kzw2/v_kzw/v_zmet(jk) + else ! kzw2 <= mkz2min large "Lz"-reflection + + expdis = 1.0 + v_kzw = mkzmin + + v_cdp = 0. ! no effects of reflected waves + wave_act(inc,iaz) = 0.0 + akzw(inc, iaz, jkp) = v_kzw + fmode = 0. + w1 =0. + endif +! expdis =1.0 + + fdis = fmode*expdis*wave_act(inc,iaz) +!============================================================================== +! +! Saturated Fluxes and Energy: Spectral and Dicrete Modes +! +! S2003 fluxs= fden_bn(jk)*(zcin-ui(jk,iaz))**2/zcin +! WM2001 fluxs= fden_bn(jk)*(zcin-ui(jk,iaz)) +! saturated flux + wave dissipation - Keddy_gwsat in UGWP-V1 +! linsatdis = 1.0 , here: u'^2 ~ linsatdis* [v_cdp*v_cdp] +! +! old-sat fluxs= fden_bn(jkp)*cdf2*zcinc*wave_act(inc,iaz) +! fluxs= fden_bn(jkp)*cdf2*zcinc*wave_act(inc,iaz) +! new sat fluxs= fden_bn(jkp)*sqrt(cdf2)*wave_act(inc,iaz) +! +! fluxs= fden_bn(jkp)*sqrt(cdf2)*wave_act(inc,iaz) + +! +! +! old spectral sat-limit with "mapping to source-level" sp_tau(cd) = fden_bn(jkp)*sqrt(cdf2) +! new spectral sat-limit with "mapping to source-level" sp_tau(cd) = fden_bn(jkp)*cdf2*rstar2 +! [fden_bn(jkp)] = Pa/dc +! fsat = rstar*(zcin*zcin) * [taub_src / SN * [ rstar3*rho/rho_src *N_src/N] = fden_bn ] + + if (ener_norm == 0) fluxs= fden_bn(jkp)*cdf2*wave_act(inc,iaz) ! dim-n: Pa/[m/s] +! +! single mode saturation limit: [rho(z)/bn(z)*kx *linsat2* cd^3] /dc +! + if (ener_lsat == 1) fluxs= fden_Lsat(jkp)*cdf2*sqrt(cdf2)*rdci(inc)*wave_act(inc,iaz) + + if (ener_norm == 1) then + +! spectral saturation limit + + if (ener_lsat == 0) fluxs= fden_bnen(jk)*cdf2*wave_act(inc,iaz)*sig_u2az_m(iaz) + +! single mode saturation limit: [rho(z)/bn(z)*kx *linsat2* cd^3] /dc + + if (ener_lsat == 1) fluxs= fden_Lsat(jkp)*cdf2*sqrt(cdf2)*rdci(inc)*wave_act(inc,iaz) +! + endif +!---------------------------------------------------------------------------- +! dicrete mode saturation fden_sat(jkp) = rhoint(jkp)/bn(jkp)*v_kxw +! fluxs = fden_sat(jkp)*cdf2*sqrt(cdf2)/zdci(inc)*L2sat +! fluxs_src = fden_sat(ksrc)*cdf2*sqrt(cdf2)/zdci(inc)*L2sat +!---------------------------------------------------------------------------- + zdep = fdis-fluxs ! dimension [Pa/dc] *dc = Pa + if(zdep > 0.0 ) then +! subs on sat-limit + ze1 = flux(inc,iaz) + flux(inc,iaz) = fluxs + ze2 = log(ze1/fluxs)*w1 ! Kdsat-compute damping of mode =>df = f-fluxs + ! here we can add extra-dissip for the next layer + else +! assign dis-ve flux + flux(inc,iaz) = fdis + endif + + dtau = flux_m(inc,iaz)-flux(inc,iaz) + if (dtau .lt. 0) then + flux(inc,iaz) = flux_m(inc,iaz) + endif +! +! GW-sponge domain: saturate all "GW"-modes above "zsp_gw" +! + if ( azmeti(jkp) .ge. zsp_gw) then + mi_sponge = .5/dz_meti(jk) + ze2 = v_wdp /v_kzw * mi_sponge ! Ksat*v_kzw2 = [mi_sat*wdp/kzw] + v_wdi = ze2 + v_wdi*0.25 ! diss-sat GW-sponge + v_wdpc = sqrt(v_wdp*v_wdp +v_wdi*v_wdi) + v_kzi = v_kzw*v_wdi/v_wdpc +! + ze1 = v_kzi*v_zmet(jk) + exp_sponge = exp(-ze1) +! +! additional sponge +! + flux(inc,iaz) = flux(inc,iaz) *exp_sponge + endif + + endif ! coriolis or CL condition-checkif => (v_cdp .le. ucrit_max) then + endif ! only for waves w/o CL-absorption wave_act=1 +! +! sum for given (jk, iaz) all active "wave" contributions +! + if (wave_act(inc,iaz) == 1) then + + zcinc =zdci(inc) + vc_zflx_mode = flux(inc,iaz) + vmdiff = max(0., flux_m(inc,iaz)-vc_zflx_mode) + if (vmdiff <= 0. ) vc_zflx_mode = flux_m(inc,iaz) + ze1 = vc_zflx_mode*zcinc + fpu(iaz, jkp) = fpu(iaz,jkp) + ze1 ! flux (pa) at + sig_u2az(iaz) = sig_u2az(iaz) + ze1*flux_2_sig ! ekin(m2/s2) at z+dz + +!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +! (heat deposition integration over spectral mode for each azimuth +! later sum over selected azimuths as "non-negative" scalars) +! cdf1 = sqrt( (zci(inc)-umfc)**2-c2f2) +!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +! zdelp = wrk3(jk)*cdf1 *zcinc + + zdelp = wrk3(jk)* v_cdp *zcinc * vmdiff + + +! zcool = 1. ! COOL=(-3.5 + Pr)/Pr +! zcool = [Kv/Pr]*N2*(Pr-Cp/R)/cp +! edis = (c-u)*ax/cp = Kv_dis*N2/cp +! cool = -Kt*N2/R +! add heat-conduction "bulk" impact: 1/Pr*(g*g*rho)* d [rho*Kv(dT/dp- R/Cp *T/p)] +! + dfdz_v(iaz, jk) = dfdz_v(iaz,jk) + zdelp ! +cool !heating & simple cooling < 0 + dfdz_heat(iaz, jk) = dfdz_heat(iaz,jk) + zdelp ! heating -only > 0 + endif !wave_act(inc,iaz) == 1) +! + enddo ! wave-inc-loop + + ze1 =fpu(iaz, jk) + if (fpu(iaz, jkp) > ze1 ) fpu(iaz, jkp) = ze1 +! +! compute wind and temp-re rms +! + if (idebug_gwrms == 1) then + pwrms =0. + ptrms =0. + do inc=1, nwav + if (wave_act(inc,iaz) > 0.) then + v_kzw =akzw(inc, iaz, jk) + ze1 = flux(inc,iaz)*v_kzw*zdci(inc)*wrk1(jk) + pwrms = pwrms + ze1 + ptrms = ptrms + ze1*wrk2(jk) + endif + enddo + Awrms(iaz, jk) = pwrms + Atrms(iaz, jk) = ptrms + endif + +! -------------- + enddo ! end Azimuth do-loop + +! +! eddy wave dissipation to limit GW-rms +! + tx1 = sum(abs(dfdz_heat(1:nazd, jk)))/bn2(jk) + ze1=max(dked_min, tx1) + ze2=min(dked_max, ze1) + vueff(jkp) = ze2 + vueff(jkp) +! + enddo ! end Vertical do-loop +! +! top-layers constant interface-fluxes and zero-heat +! we allow non-zero momentum fluxes and thermal effects +! fpu(1:nazd,levs+1) = fpu(1:nazd, levs) +! dfdz_v(1:nazd, levs) = 0.0 + +! --------------------------------------------------------------------- +! sum contribution for total zonal and meridional fluxes + +! energy dissipation +! --------------------------------------------------- +! +!======================================================================== +! at the source level and below taux = 0 (taux_E=-taux_W by assumption) +!======================================================================== + + do jk=ksrc, levs + taux(jk) = 0.0 + tauy(jk) = 0.0 + do iaz=1,nazd + taux(jk) = taux(jk) + fpu(iaz,jk)*zcosang(iaz) + tauy(jk) = tauy(jk) + fpu(iaz,jk)*zsinang(iaz) + pdtdt(jl,jk) = pdtdt(jl,jk) + dfdz_v(iaz,jk) + dked(jl,jk) = dked(jl,jk) + dfdz_heat(iaz,jk) + enddo + enddo + jk = ktop; taux(jk)=0.; tauy(jk)=0. + do iaz=1,nazd + taux(jk) = taux(jk) + fpu(iaz,jk)*zcosang(iaz) + tauy(jk) = tauy(jk) + fpu(iaz,jk)*zsinang(iaz) + enddo + + if (idebug_gwrms == 1) then + do jk=kp1, levs + do iaz=1,nazd + wrms(jl,jk) =wrms(jl,jk) + Awrms(iaz,jk) + trms(jl,jk) =trms(jl,jk) + Atrms(iaz,jk) + tauabs(jl,jk)=tauabs(jl,jk) + fpu(iaz,jk) + enddo + enddo + endif +! + + do jk=ksrc+1,levs + jkp = jk + 1 + zdelp = wrk3(jk)*gw_eff + ze1 = (taux(jkp)-taux(jk))* zdelp + ze2 = (tauy(jkp)-tauy(jk))* zdelp + + if (abs(ze1) >= maxdudt ) then + ze1 = sign(maxdudt, ze1) + endif + if (abs(ze2) >= maxdudt ) then + ze2 = sign(maxdudt, ze2) + endif + + pdudt(jl,jk) = -ze1 + pdvdt(jl,jk) = -ze2 +! +! Cx =0 based Cx=/= 0. above +! +! + if (knob_ugwp_doheat == 1) then +! +!maxdtdt= dked_max * bnfix2 +! + pdtdt(jl,jk) = pdtdt(jl,jk)*gw_eff + ze2 = pdtdt(jl,jk) + if (abs(ze2) >= max_eps ) pdtdt(jl,jk) = sign(max_eps, ze2) + + dked(jl,jk) = dked(jl,jk)/bn2(jk) + ze1 = max(dked_min, dked(jl,jk)) + dked(jl,jk) = min(dked_max, ze1) + qmid(jk) = pdtdt(j,jk) + endif + enddo +!---------------------------------------------------------------------------------- +! Update heat = ek_diss/cp and aply 1-2-1 smoother for "dked" => dktur +! here with "u_new = u +dtp*dudt ; vnew = v + v +dtp*dvdt +! can check "stability" in the column and "add" ktur-estimation +! to suppress instability as needed so dked = dked_gw + ktur_ric +!---------------------------------------------------------------------------------- + + dktur(1:levs) = dked(jl,1:levs) +! + do ist= 1, nstdif + do jk=ksrc,levs-1 + adif(jk) =.25*(dktur(jk-1)+ dktur(jk+1)) + .5*dktur(jk) + enddo + dktur(ksrc:levs-1) = adif(ksrc:levs-1) + enddo + dktur(levs) = .5*( dked(jl,levs)+ dked(jl,levs-1)) + dktur(levs+1) = dktur(levs) + + do jk=ksrc,levs+1 + ze1 = .5*( dktur(jk) +dktur(jk-1) ) + kvint(jk) = ze1 + ktint(jk) = ze1*iPr_ktgw + enddo + +! +! Thermal budget qmid = qheat + qcool +! + do jk=ksrc+1,levs + ze2 = qmid(jk) + dktur(jk)*Akt(jk) + grav*(ktint(jk+1)-ktint(jk))/dz_meti(jk) + qmid(jk) = ze2 + if (abs(ze2) >= max_eps ) qmid(jk) = sign(max_eps, ze2) + pdtdt(jl,jk) = qmid(jk)*rcpd + dked(jl, jk) = dktur(jk) + enddo +! +! perform explicit eddy "diffusive" 3-point smoothing of "u-v-t" +! from the surface/launch-gw to the "top" +! +! +! update by source function X(t+dt) = X(t) + dtp * dXdt +! + uold(km2:levs) = aum(km2:levs)+pdudt(jl,km2:levs)*dtp + vold(km2:levs) = avm(km2:levs)+pdvdt(jl,km2:levs)*dtp + told(km2:levs) = atm(km2:levs)+pdtdt(jl,km2:levs)*dtp +! +! diagnose turb-profile using "stability-check" relying on the free-atm diffusion +! sc2 = 30m x 30m +! + dktur(km2:levs) = dked_min + + do jk=km1,levs + uz = uold(jk) - uold(jk-1) + vz = vold(jk) - vold(jk-1) + ze1 = dz_met(jk) + zdelm = 1./ze1 + + tvc = told(jk) * (1. +fv*aqm(jk)) + tvm = told(jk-1) * (1. +fv*aqm(jk-1)) + zthm = 2.0 / (tvc+tvm) + shr2 = (max(uz*uz+vz*vz, dw2min)) * zdelm *zdelm + + bn2(jk) = grav2cpd*zthm * (1.0+rcpdl*(tvc-tvm)*zdelm) + + bn2(jk) = max(min(bn2(jk), bnv2max), bnv2min) + zmetk = azmet(jk)* rh4 ! mid-layer height k_int => k_int+1 + zgrow = exp(zmetk) + ritur = bn2(jk)/shr2 + w1 = 1./(1. + 5*ritur) + ze2 = min( sc2 *zgrow, 4.*ze1*ze1) +! +! Smag-type of eddy diffusion K_smag = Sqrt(Deformation - N2/Pr)* L2 *const +! + kamp = sqrt(shr2)* ze2 * w1 * w1 + ktur= min(max(kamp, dked_min), dked_max) + dktur(jk) = ktur +! +! update of dked = dked_gw + k_turb_mf +! + dked(jl, jk) = dked(jl, jk) +ktur + + enddo + +! +! apply eddy effects due to GWs: explicit scheme Kzz*dt/dz2 < 0.5 stability +! + if (knob_ugwp_dokdis == 2) then + + do jk=ksrc,levs + ze1 = min(.5*(dktur(jk) +dktur(jk-1)), dturb_max) + kvint(jk) = kvint(jk) + ze1 +! ktint(jk) = ktint(jk) + ze1*iPr_ktgw + enddo + kvint(km1) = kvint(ksrc) + kvint(ktop) = kvint(levs) + + dzmetm = 1./dz_met(km1) + Adif(km1:levs) = 0. + Cdif(km1:levs) = 0. + do jk=km1,levs-1 + + dzmetp = 1./dz_met(jk+1) + dzmetf = 1./(dz_meti(jk)*rhomid(jk)) + + + ktur = kvint(jk) *rhoint(jk) * dzmetf + kturp =Kvint(jk+1)*rhoint(jk+1) * dzmetf + + Adif(jk) = ktur * dzmetm + Cdif(jk) = kturp * dzmetp + ApC = adif(jk)+cdif(jk) + ACdif(jk) = ApC + + w1 = ApC*iPr_max + if (rdtp < w1 ) then + Anstab(jk) = floor(w1*dtp) + 1 + else + Anstab(jk) = 1 + endif + dzmetm = dzmetp + enddo + + nstab = maxval( Anstab(ksrc:levs-1)) + +! if (nstab .ge. 3) print *, 'nstab ', nstab +! +! k instead Jk +! + dtdif = dtp/real(nstab) + ze1 = 1./dtdif + + do ist= 1, nstab + do k=ksrc,levs-1 + Bdif = ze1 - ACdif(k) + Bt_dif = ze1 - ACdif(k)* iPr_ktgw ! ipr_Ktgw = 1./Pr <1 + unew(k) = uold(k)*Bdif + uold(k-1)*Adif(k) + uold(k+1)*Cdif(k) + vnew(k) = vold(k)*Bdif + vold(k-1)*Adif(k) + vold(k+1)*Cdif(k) + tnew(k) = told(k)*Bt_dif+(told(k-1)*Adif(k) + told(k+1)*Cdif(k))*iPr_ktgw + enddo + + uold(ksrc:levs-1) = unew(ksrc:levs-1)*dtdif ! value du/dtp *dtp = du + vold(ksrc:levs-1) = vnew(ksrc:levs-1)*dtdif + told(ksrc:levs-1) = tnew(ksrc:levs-1)*dtdif +! +! smoothing the boundary points: "k-1" = ksrc-1 and "k+1" = levs +! + uold(levs) = uold(levs-1) + vold(levs) = vold(levs-1) + told(levs) = told(levs-1) + enddo +! +! compute "smoothed" tendencies by molecular + GW-eddy diffusions +! + do k=ksrc,levs-1 +! +! final updates of tendencies and diffusion +! + ze2 = rdtp*(uold(k) - aum(k)) + ze1 = rdtp*(vold(k) - avm(k)) + pdtdt(jl,k)= rdtp*( told(k) - atm(k) ) + + if (abs(pdtdt(jl,k)) >= maxdtdt ) pdtdt(jl,k) = sign(maxdtdt,pdtdt(jl,k) ) + if (abs(ze1) >= maxdudt ) then + ze1 = sign(maxdudt, ze1) + endif + if (abs(ze2) >= maxdudt ) then + ze2 = sign(maxdudt, ze2) + endif + + pdudt(jl, k) = ze2 + pdvdt(jl, k) = ze1 + uz = uold(k+1) - uold(k-1) + vz = vold(k+1) - vold(k-1) + ze2 = 1./(dz_met(k+1)+dz_met(k) ) + mf_diss_heat = rcpd*kvint(k)*(uz*uz +vz*vz)*ze2*ze2 ! vert grad heat + pdtdt(jl,k)= pdtdt(jl,k) + mf_diss_heat ! extra heat due to eddy viscosity + + enddo + + + ENDIF ! dissipative IF-loop for vertical eddy difusion u-v-t + + enddo ! J-loop +! + RETURN + +!================================= diag print after "return" ====================== + if (kdt ==1 .and. mpi_id == master) then +! + print *, ' ugwpv1: nazd-nw-ilaunch=', nazd, nwav,ilaunch, maxval(kvg), ' kvg ' + print *, 'ugwpv1: zdci(inc)=' , maxval(zdci), minval(zdci) + print *, 'ugwpv1: zcimax=' , maxval(zci) ,' zcimin=' , minval(zci) +! print *, 'ugwpv1: tau_ngw=' , maxval(taub_src)*1.e3, minval(taub_src)*1.e3, tau_min + + print * + + endif + + if (kdt == 1 .and. mpi_id == master) then + print *, 'vgw done nstab ', nstab +! + print *, maxval(pdudt)*86400., minval(pdudt)*86400, 'vgw ax ugwp' + print *, maxval(pdvdt)*86400., minval(pdvdt)*86400, 'vgw ay ugwp' + print *, maxval(dked)*1., minval(dked)*1, 'vgw keddy m2/sec ugwp' + print *, maxval(pdtdt)*86400., minval(pdtdt)*86400,'vgw eps ugwp' +! +! print *, ' ugwp -heating rates ' + endif +!================================= + return + end subroutine cires_ugwpv1_ngw_solv2 + + +end module cires_ugwpv1_solv2 diff --git a/physics/cires_orowam2017.F90 b/physics/cires_ugwpv1_sporo.F90 similarity index 68% rename from physics/cires_orowam2017.F90 rename to physics/cires_ugwpv1_sporo.F90 index d5fda5cc0..c840b49d8 100644 --- a/physics/cires_orowam2017.F90 +++ b/physics/cires_ugwpv1_sporo.F90 @@ -1,56 +1,50 @@ -module cires_orowam2017 - -contains - - - subroutine oro_wam_2017(im, levs,npt,ipt, kref,kdt,me,master, & - & dtp,dxres, taub, u1, v1, t1, xn, yn, bn2, rho, prsi, prsL, & - & grav, omega, con_rd, del, sigma, hprime, gamma, theta, & - & sinlat, xlatd, taup, taud, pkdis) + subroutine oro_spectral_solver(im, levs,npt,ipt, kref,kdt,me,master, & + dtp,dxres, taub, u1, v1, t1, xn, yn, bn2, rho, prsi, prsL, & + del, sigma, hprime, gamma, theta, & + sinlat, xlatd, taup, taud, pkdis) ! - USE MACHINE , ONLY : kind_phys + use machine , only : kind_phys + use ugwp_common, only : grav, omega2, rd ! implicit none - integer :: im, levs - integer :: npt - integer :: kdt, me, master - integer :: kref(im), ipt(im) + integer, intent(in) :: im, levs + integer, intent(in) :: npt + integer, intent(in) :: kdt, me, master + integer, intent(in) :: kref(im), ipt(im) + real(kind=kind_phys), intent(in) :: dtp, dxres real(kind=kind_phys), intent(in) :: taub(im) real(kind=kind_phys), intent(in) :: sinlat(im), xlatd(im) real(kind=kind_phys), intent(in), dimension(im) :: sigma, & - & hprime, gamma, theta + hprime, gamma, theta real(kind=kind_phys), intent(in), dimension(im) :: xn, yn real(kind=kind_phys), intent(in), dimension(im, levs) :: & - & u1, v1, t1, bn2, rho, prsl, del - real(kind=kind_phys), intent(in) :: grav, omega, con_rd + u1, v1, t1, bn2, rho, prsl, del real(kind=kind_phys), intent(in), dimension(im, levs+1) :: prsi ! ! out : taup, taud, pkdis ! real(kind=kind_phys), intent(inout), dimension(im, levs+1) :: taup - real(kind=kind_phys), intent(inout), dimension(im, levs) :: taud - real(kind=kind_phys), intent(inout), dimension(im, levs) :: pkdis - real(kind=kind_phys) :: belps, aelps, nhills, selps + real(kind=kind_phys), intent(inout), dimension(im, levs) :: taud + real(kind=kind_phys), intent(inout), dimension(im, levs) :: pkdis ! ! multiwave oro-spectra ! locals ! - integer :: i, j, k, isp, iw - + integer, parameter :: nworo = 30 real(kind=kind_phys), parameter :: fc_flag = 0.0 real(kind=kind_phys), parameter :: mkzmin = 6.28e-3/50.0 real(kind=kind_phys), parameter :: mkz2min = mkzmin* mkzmin real(kind=kind_phys), parameter :: kedmin = 1.e-3 real(kind=kind_phys), parameter :: kedmax = 350.,axmax=250.e-5 - real(kind=kind_phys), parameter :: rtau = 0.01 ! nonlin-OGW scale 1/10sec + real(kind=kind_phys), parameter :: rtau = 0.01 ! nonlin-OGW scale 1/10sec real(kind=kind_phys), parameter :: Linsat2 =0.5 real(kind=kind_phys), parameter :: kxmin = 6.28e-3/100. real(kind=kind_phys), parameter :: kxmax = 6.28e-3/5.0 @@ -59,37 +53,41 @@ subroutine oro_wam_2017(im, levs,npt,ipt, kref,kdt,me,master, & real(kind=kind_phys), parameter :: hps =7000., rhp2 = .5/hps real(kind=kind_phys), parameter :: cxmin=0.5, cxmin2=cxmin*cxmin - real :: akx(nworo), cxoro(nworo), akx2(nworo) - real :: aspkx(nworo), c2f2(nworo) , cdf2(nworo) - real :: tau_sp(nworo,levs+1), wkdis(nworo, levs+1) - real :: tau_kx(nworo),taub_kx(nworo) - real, dimension(nworo, levs+1) :: wrms, akzw + real(kind=kind_phys) :: akx(nworo), cxoro(nworo), akx2(nworo) + real(kind=kind_phys) :: aspkx(nworo), c2f2(nworo), cdf2(nworo) + real(kind=kind_phys) :: tau_sp(nworo,levs+1), wkdis(nworo, levs+1) + real(kind=kind_phys) :: tau_kx(nworo),taub_kx(nworo) + + real(kind=kind_phys), dimension(nworo, levs+1) :: wrms, akzw - real :: tauz(levs+1), rms_wind(levs+1) - real :: wave_act(nworo,levs+1) + real(kind=kind_phys) :: tauz(levs+1), rms_wind(levs+1) + real(kind=kind_phys) :: wave_act(nworo,levs+1) - real :: kxw, kzw, kzw2, kzw3, kzi, dzmet, rhoint - real :: rayf, kturb - real :: uz, bv, bv2,kxsp, fcor2, cf2 + real(kind=kind_phys) :: kxw, kzw, kzw2, kzw3, kzi, dzmet, rhoint + real(kind=kind_phys) :: rayf, kturb + real(kind=kind_phys) :: uz, bv, bv2,kxsp, fcor2, cf2 - real :: fdis - real :: wfdm, wfdt, wfim, wfit - real :: betadis, betam, betat, kds, cx, rhofac - real :: etwk, etws, tauk, cx2sat - real :: cdf1, tau_norm + real(kind=kind_phys) :: fdis + real(kind=kind_phys) :: wfdm, wfdt, wfim, wfit + real(kind=kind_phys) :: betadis, betam, betat, kds, cx, rhofac + real(kind=kind_phys) :: etwk, etws, tauk, cx2sat + real(kind=kind_phys) :: cdf1, tau_norm ! ! mean flow ! - real, dimension(levs+1) :: uzi,rhoi,ktur, kalp, dzi - + real(kind=kind_phys), dimension(levs+1) :: uzi,rhoi,ktur, kalp, dzi + real(kind=kind_phys) :: belps, aelps, nhills, selps + integer :: i, j, k, isp, iw integer :: nw, nzi, ksrc - taud (:, :) = 0.0 ; pkdis(:,:) = 0.0 ; taup (:,:) = 0.0 + + + taud (:, :) = 0.0 ; pkdis(:,:) = 0.0 ; taup (:,:) = 0.0 tau_sp (:,:) = 0.0 ; wrms(:,:) = 0.0 nw = nworo nzi = levs+1 do iw = 1, nw -! !kxw = 0.25/(dxres)*iw +! !kxw = 0.25/(dxres)*iw kxw = kxmin+(iw-1)*dkx akx(iw) = kxw akx2(iw) = kxw*kxw @@ -101,11 +99,9 @@ subroutine oro_wam_2017(im, levs,npt,ipt, kref,kdt,me,master, & tau_kx(:) = tau_kx(:)/tau_norm if (kdt == 1) then -771 format( 'vay-oro19 ', 3(2x,F8.3)) - write(6,771) & - & maxval(tau_kx)*maxval(taub)*1.e3, & - & minval(tau_kx), maxval(tau_kx) + write(6,771) maxval(tau_kx)*maxval(taub)*1.e3, minval(tau_kx), maxval(tau_kx) endif +771 format( ' oro_spectral_solver ', 3(2x,F8.3)) ! ! main loop over oro-points ! @@ -128,12 +124,12 @@ subroutine oro_wam_2017(im, levs,npt,ipt, kref,kdt,me,master, & wkdis(:,:) = kedmin call oro_meanflow(levs, nzi, u1(j,:), v1(j,:), t1(j,:), & - & prsi(j,:), prsL(j,:), grav, con_rd, & + & prsi(j,:), prsL(j,:), & & del(j,:), rho(i,:), & & bn2(i,:), uzi, rhoi,ktur, kalp,dzi, & & xn(i), yn(i)) - fcor2 = (2*omega*sinlat(j))*(2*omega*sinlat(j))*fc_flag + fcor2 = omega2*sinlat(j)*omega2*sinlat(j)*fc_flag k = ksrc @@ -156,11 +152,11 @@ subroutine oro_wam_2017(im, levs,npt,ipt, kref,kdt,me,master, & ! ! if (cxoro(iw) > cxmin) then - wave_act(iw,k:levs+1) = 0. ! crit-level + wave_act(iw,k:levs+1) = 0. ! crit-level else cdf2(iw) = cxoro(iw)*cxoro(iw) -c2f2(iw) if ( cdf2(iw) < cxmin2) then - wave_act(iw,k:levs+1) = 0. ! coriolis cut-off + wave_act(iw,k:levs+1) = 0. ! coriolis cut-off else kzw2 = max(Bv2/Cdf2(iw) - akx2(iw), mkz2min) kzw = sqrt(kzw2) @@ -203,7 +199,7 @@ subroutine oro_wam_2017(im, levs,npt,ipt, kref,kdt,me,master, & wave_act(iw,k:levs+1) = 0.0 else ! -! upward propagation w/o reflection +! upward propagation w/o reflection effects ! kxw = akx(iw) kzw = sqrt(kzw2) @@ -243,8 +239,8 @@ subroutine oro_wam_2017(im, levs,npt,ipt, kref,kdt,me,master, & wrms(iw,k) = etwk tauk = etwk*kxw/kzw tau_sp(iw,k) = tauk *rhoint - if ( tau_sp(iw,k) > tau_sp(iw,k-1)) & - & tau_sp(iw,k) = tau_sp(iw,k-1) + if ( tau_sp(iw,k) > tau_sp(iw,k-1)) & + tau_sp(iw,k) = tau_sp(iw,k-1) ENDIF ! upward ENDDO ! spectral @@ -268,59 +264,61 @@ subroutine oro_wam_2017(im, levs,npt,ipt, kref,kdt,me,master, & rms_wind(k) = sum(wrms(:,k)*wave_act(:,k)) tauz(levs+1) = tauz(levs) taup(i, 1:levs+1) = tauz(1:levs+1) + do k=ksrc, levs taud(i,k) = ( tauz(k+1) - tauz(k))*grav/del(j,k) +! +! limiters can be applied to avoid "large" wave accelerations +! ! if (taud(i,k) .gt. 0)taud(i,k)=taud(i,k)*.01 ! if (abs(taud(i,k)).ge.axmax)taud(i,k)=sign(taud(i,k),axmax) enddo endif ! taub > 0 enddo ! oro-points (i, j, ipt) -!23456 - end subroutine oro_wam_2017 +! + end subroutine oro_spectral_solver !------------------------------------------------------------- ! ! define mean flow and dissipation for OGW-kx spectrum ! !------------------------------------------------------------- subroutine oro_meanflow(nz, nzi, u1, v1, t1, pint, pmid, & - & grav, con_rd, & - & delp, rho, bn2, uzi, rhoi, ktur, kalp, dzi, xn, yn) - - use ugwp_common_v1 , only : velmin, dw2min + & delp, rho, bn2, uzi, rhoi, ktur, kalp, dzi, xn, yn) + use machine , only : kind_phys + use ugwp_common , only : velmin, dw2min, rdi, grav, rgrav, hpscale, rhp, rh4 implicit none - + integer :: nz, nzi - real, dimension(nz ) :: u1, v1, t1, delp, rho, pmid - real, dimension(nz ) :: bn2 ! define at the interfaces - real, dimension(nz+1) :: pint - real :: xn, yn - real,intent(in) :: grav, con_rd + real(kind=kind_phys), dimension(nz ) :: u1, v1, t1, delp, rho, pmid + real(kind=kind_phys), dimension(nz ) :: bn2 ! define at the interfaces + real(kind=kind_phys), dimension(nz+1) :: pint + real(kind=kind_phys) :: xn, yn + ! output - real, dimension(nz+1) :: dzi, uzi, rhoi, ktur, kalp + real(kind=kind_phys), dimension(nz+1) :: dzi, uzi, rhoi, ktur, kalp ! locals integer :: i, j, k - real :: ui, vi, ti, uz, vz, shr2, rdz, kamp - real :: zgrow, zmet, rdpm, ritur, kmol, w1 - real :: rgrav, rdi + real(kind=kind_phys) :: ui, vi, ti, uz, vz, shr2, rdz, kamp + real(kind=kind_phys) :: zgrow, zmet, rdpm, ritur, kmol, w1 + ! paremeters - real, parameter :: hps = 7000., rpspa = 1.e-5 - real, parameter :: rhps=1.0/hps - real, parameter :: h4= 0.25/hps - real, parameter :: rimin = 1.0/8.0, kedmin = 0.01 - real, parameter :: lturb = 30. , uturb = 150.0 - real, parameter :: lsc2 = lturb*lturb,usc2 = uturb*uturb - kalp(1:nzi) = 2.e-7 ! radiative damping - - rgrav = 1.0/grav - rdi = 1.0/con_rd +! real(kind=kind_phys), parameter :: hps = 7000., rpspa = 1.e-5 +! real(kind=kind_phys), parameter :: rhps=1.0/hps +! real(kind=kind_phys), parameter :: h4= 0.25/hps + + real(kind=kind_phys), parameter :: rimin = 0.125, kedmin = 0.01 + real(kind=kind_phys), parameter :: lturb = 30. , uturb = 150.0 + real(kind=kind_phys), parameter :: lsc2 = lturb*lturb,usc2 = uturb*uturb + + kalp(1:nzi) = 2.e-7 ! radiative damping scale do k=2, nz rdpm = grav/(pmid(k-1)-pmid(k)) ui = .5*(u1(k-1)+u1(k)) vi = .5*(v1(k-1)+v1(k)) - uzi(k) = Ui*xn + Vi*yn + uzi(k) = ui*xn + vi*yn ti = .5*(t1(k-1)+t1(k)) rhoi(k) = rdi*pint(k)/ti rdz = rdpm *rhoi(k) @@ -328,13 +326,13 @@ subroutine oro_meanflow(nz, nzi, u1, v1, t1, pint, pmid, & uz = u1(k)-u1(k-1) vz = v1(k)-v1(k-1) shr2 = rdz*rdz*(max(uz*uz+vz*vz, dw2min)) - zmet = -hps*alog(pint(k)*rpspa) - zgrow = exp(zmet*h4) - kmol = 2.e-5*exp(zmet*rhps)+kedmin + zmet = -hpscale*alog(pint(k)*1.e-5) + zgrow = exp(zmet*rh4) + kmol = 2.e-5*exp(zmet*rhp) + kedmin ritur = max(bn2(k)/shr2, rimin) kamp = sqrt(shr2)*lsc2 *zgrow w1 = 1./(1. + 5*ritur) - ktur(k) = kamp * w1 * w1 +kmol + ktur(k) = kamp * w1 * w1 + kmol enddo k = 1 @@ -351,4 +349,3 @@ subroutine oro_meanflow(nz, nzi, u1, v1, t1, pint, pmid, & end subroutine oro_meanflow -end module cires_orowam2017 diff --git a/physics/cires_ugwpv1_triggers.F90 b/physics/cires_ugwpv1_triggers.F90 new file mode 100644 index 000000000..838ead1ee --- /dev/null +++ b/physics/cires_ugwpv1_triggers.F90 @@ -0,0 +1,330 @@ +module cires_ugwpv1_triggers + + use machine, only: kind_phys + +contains + +! +! +! +!>\ingroup cires_ugwp_run +!> @{ +!! +!! + subroutine slat_geos5_tamp_v1(im, tau_amp, xlatdeg, tau_gw) +!================= +! V1: GEOS-5 & MERRA-2 lat-dependent GW-source function tau(z=Zlaunch) =rho* +!================= + implicit none + integer :: im + real(kind=kind_phys) :: tau_amp, xlatdeg(im), tau_gw(im) + real(kind=kind_phys) :: latdeg, flat_gw, tem + integer :: i + +! +! if-lat +! + do i=1, im + latdeg = abs(xlatdeg(i)) + if (latdeg < 15.3) then + tem = (latdeg-3.0) / 8.0 + flat_gw = 0.75 * exp(-tem * tem) + if (flat_gw < 1.2 .and. latdeg <= 3.0) flat_gw = 0.75 + elseif (latdeg < 31.0 .and. latdeg >= 15.3) then + flat_gw = 0.10 + elseif (latdeg < 60.0 .and. latdeg >= 31.0) then + tem = (latdeg-60.0) / 23.0 + flat_gw = 0.50 * exp(- tem * tem) + elseif (latdeg >= 60.0) then + tem = (latdeg-60.0) / 70.0 + flat_gw = 0.50 * exp(- tem * tem) + endif + tau_gw(i) = tau_amp*flat_gw + enddo +! + end subroutine slat_geos5_tamp_v1 +! + subroutine slat_geos5_2020(im, tau_amp, xlatdeg, tau_gw) +!================================================================= +! modified for FV3GFS-127L/C96 QBO-experiments +! GEOS-5 & MERRA-2 lat-dependent GW-source function tau(z=Zlaunch) +!================================================================ + implicit none + integer :: im + real(kind=kind_phys) :: tau_amp, xlatdeg(im), tau_gw(im) + real(kind=kind_phys) :: latdeg, flat_gw, tem + real(kind=kind_phys), parameter :: fampqbo = 1.25 ! 1.5 + real(kind=kind_phys), parameter :: famp60S = 1.0 ! 1.5 + real(kind=kind_phys), parameter :: famp60N = 1.0 ! 1.0 + real(kind=kind_phys), parameter :: famp30 = 0.25 ! 0.4 + + real(kind=kind_phys), parameter :: swid15 = 12.5 + real(kind=kind_phys), parameter :: swid60S = 30.0 ! 40 + real(kind=kind_phys), parameter :: swid60N = 25.0 ! 30 + integer :: i +! +! +! + do i=1, im + + latdeg = abs(xlatdeg(i)) + if (latdeg < 15.3) then + tem = (latdeg-3.0) / swid15 + flat_gw = fampqbo * exp(-tem * tem) + if (latdeg <= 3.0) flat_gw = fampqbo + elseif (latdeg < 31.0 .and. latdeg >= 15.3) then + flat_gw = famp30 + elseif (latdeg < 60.0 .and. latdeg >= 31.0) then + tem = (latdeg-60.0) / 23.0 + flat_gw = famp60N* exp(- tem * tem) + elseif (latdeg >= 60.0) then + tem = (latdeg-60.0) /swid60N + flat_gw = famp60N * exp(- tem * tem) + endif + + if (xlatdeg(i) <= -31.0) then +! + if (latdeg < 60.0 .and. latdeg >= 31.0) then + tem = (latdeg-60.0) / 23.0 + flat_gw = famp60S * exp(- tem * tem) + endif + if (latdeg >= 60.0) then + tem = (latdeg-60.0) /swid60S + flat_gw = famp60S * exp(- tem * tem) + endif + + endif + tau_gw(i) = tau_amp*flat_gw + enddo +! + end subroutine slat_geos5_2020 + + + subroutine slat_geos5(im, xlatdeg, tau_gw) + +!================= +! +! WAM: GEOS-5 & MERRA-2 lat-dependent GW-source function tau(z=Zlaunch) =rho* +! +!================= + implicit none + integer :: im + real(kind=kind_phys) :: xlatdeg(im) + real(kind=kind_phys) :: tau_gw(im) + real(kind=kind_phys) :: latdeg + real(kind=kind_phys), parameter :: tau_amp = 3.5e-3 ! 3.5 mPa + real(kind=kind_phys) :: trop_gw, flat_gw + integer :: i +! +! if-lat +! + trop_gw = 0.75 + do i=1, im + latdeg = xlatdeg(i) + if (-15.3 < latdeg .and. latdeg < 15.3) then + flat_gw = trop_gw*exp(-( (abs(latdeg)-3.)/8.0)**2) + if (flat_gw < 1.2 .and. abs(latdeg) <= 3.) flat_gw = trop_gw + else if (latdeg > -31. .and. latdeg <= -15.3) then + flat_gw = 0.10 + else if (latdeg < 31. .and. latdeg >= 15.3) then + flat_gw = 0.10 + else if (latdeg > -60. .and. latdeg <= -31.) then + flat_gw = 0.50*exp(-((abs(latdeg)-60.)/23.)**2) + else if (latdeg < 60. .and. latdeg >= 31.) then + flat_gw = 0.50*exp(-((abs(latdeg)-60.)/23.)**2) + else if (latdeg <= -60.) then + flat_gw = 0.50*exp(-((abs(latdeg)-60.)/70.)**2) + else if (latdeg >= 60.) then + flat_gw = 0.50*exp(-((abs(latdeg)-60.)/70.)**2) + end if + tau_gw(i) = tau_amp*flat_gw + enddo +! + end subroutine slat_geos5 + +!=============================================== +! +! Spontaneous GW triggers by dynamical inbalances (OKW, fronts/jets, and convection) +! not activated due to "limited" set of GFS-physics +! statein-type ( needs horizontal gradients of winds and temperature, humodity) +! +!=============================================== + subroutine get_spectra_tau_convgw & + (nw, im, levs, dcheat, scheat, precip, icld, xlatd, sinlat, coslat,taub, klev, if_src, nf_src) +! +! temporarily can put GEOS-5/MERRA-2 GW-lat dependent function +! + integer :: nw, im, levs + integer,dimension(im,3) :: icld + real(kind=kind_phys), dimension(im, levs) :: dcheat, scheat + real(kind=kind_phys), dimension(im) :: precip, xlatd, sinlat, coslat + real(kind=kind_phys), dimension(im) :: taub + integer, dimension(im) :: klev, if_src + integer :: nf_src +! +! locals + real(kind=kind_phys), parameter :: precip_max = 100. ! mm/day + real(kind=kind_phys), parameter :: tau_amp = 3.5e-3 ! 3.5 mPa + + integer :: i, k, klow, ktop, kmid + real(kind=kind_phys) :: dtot, dmax, daver +! + nf_src = 0 + if_src(1:im) = 0 + taub(1:im) = 0.0 + do i=1, im + klow = icld(i,1) + ktop = icld(i,2) + kmid= icld(i,3) + if (klow == -99 .and. ktop == -99) then + cycle + else + klev(i) = ktop + k = klow + klev(i) = k + dmax = abs(dcheat(i,k) + scheat(i,k)) + do k=klow+1, ktop + dtot =abs(dcheat(i,k) + scheat(i,k)) + if ( dtot > dmax) then + klev(i) = k + dmax = dtot + endif + enddo +! +! klev as max( dcheat(i,k) + scheat) +! vertical width of conv-heating +! +! counts/triiger=1 & taub(i) +! + nf_src = nf_src +1 + if_src(i) = 1 + taub(i) = tau_amp* precip(i)/precip_max*coslat(i) + endif + + enddo +! +! +! + call Slat_geos5(im, xlatd, taub) + nf_src =im + do i=1, im + if_src(i) = 1 + klev(i) = 127-45 + enddo + +! with info on precip/clouds/dc_heat create Bulk +! taub(im), klev(im) +! +! print *, ' get_spectra_tau_convgw ' + end subroutine get_spectra_tau_convgw +! + subroutine get_spectra_tau_nstgw(nw, im, levs, trig_fgf, xlatd, sinlat, coslat, taub, klev, if_src, nf_src) + integer :: nw, im, levs + real(kind=kind_phys), dimension(im, levs) :: trig_fgf +! real(kind=kind_phys), dimension(im, levs+1) :: pint + real(kind=kind_phys), dimension(im) :: xlatd, sinlat, coslat + real(kind=kind_phys), dimension(im) :: taub + integer, dimension(im) :: klev, if_src + integer :: nf_src +! locals + real(kind=kind_phys), parameter :: tlim_fgf = 100. ! trig_fgf > tlim_fgf, launch waves should scale-dependent + real(kind=kind_phys), parameter :: tau_amp = 3.5e-3 ! 3.5 mPa + real(kind=kind_phys), parameter :: pmax = 750.e2, pmin = 100.e2 + integer, parameter :: klow =127-92, ktop=127-45 + integer, parameter :: kwidth = ktop-klow+1 + integer :: i, k, kex + real(kind=kind_phys) :: dtot, dmax, daver + real(kind=kind_phys) :: fnorm, tau_min + nf_src = 0 + if_src(1:im) = 0 + taub(1:im) = 0.0 + fnorm = 1.0 / float(kwidth) + tau_min = tau_amp*fnorm + do i=1, im +! +! only trop-c fjets so find max(trig_fgf) => klev +! use abs-values to scale tau_amp +! + + k = klow + klev(i) = k + dmax = abs(trig_fgf(i,k)) + kex = 0 + if (dmax >= tlim_fgf) kex = kex+1 + do k=klow+1, ktop + dtot = abs(trig_fgf(i,k)) + if (dtot >= tlim_fgf) kex = kex+1 + if ( dtot > dmax) then + klev(i) = k + dmax = dtot + endif + enddo + + if (dmax .ge. tlim_fgf) then + nf_src = nf_src +1 + if_src(i) = 1 + taub(i) = tau_min*float(kex) !* precip(i)/precip_max*coslat(i) + endif + + enddo +! +! print *, ' get_spectra_tau_nstgw ' + call Slat_geos5(im, xlatd, taub) + nf_src =im + do i=1, im + if_src(i) = 1 + klev(i) = 127-45 ! FV3-127L + enddo +! + end subroutine get_spectra_tau_nstgw +! + subroutine get_spectra_tau_okw(nw, im, levs, trig_okw, xlatd, sinlat, coslat, taub, klev, if_src, nf_src) + integer :: nw, im, levs + real(kind=kind_phys), dimension(im, levs) :: trig_okw +! real(kind=kind_phys), dimension(im, levs+1) :: pint + real(kind=kind_phys), dimension(im) :: xlatd, sinlat, coslat + real(kind=kind_phys), dimension(im) :: taub + integer, dimension(im) :: klev, if_src + integer :: nf_src +! locals + real(kind=kind_phys), parameter :: tlim_okw = 100. ! trig_fgf > tlim_fgf, launch GWs should scale-dependent + real(kind=kind_phys), parameter :: tau_amp = 35.e-3 ! 35 mPa + real(kind=kind_phys), parameter :: pmax = 750.e2, pmin = 100.e2 + integer, parameter :: klow =127-92, ktop=127-45 ! for FV3-127L + integer, parameter :: kwidth = ktop-klow+1 + integer :: i, k, kex + real(kind=kind_phys) :: dtot, dmax, daver + real(kind=kind_phys) :: fnorm, tau_min + + nf_src = 0 + if_src(1:im) = 0 + taub(1:im) = 0.0 + fnorm = 1./float(kwidth) + tau_min = tau_amp*fnorm + print *, ' get_spectra_tau_okwgw ' + do i=1, im + k = klow + klev(i) = k + dmax = abs(trig_okw(i,k)) + kex = 0 + if (dmax >= tlim_okw) kex = kex+1 + do k=klow+1, ktop + dtot = abs(trig_okw(i,k)) + if (dtot >= tlim_fgf ) kex = kex+1 + if ( dtot > dmax) then + klev(i) = k + dmax = dtot + endif + enddo +! + if (dmax >= tlim_okw) then + nf_src = nf_src + 1 + if_src(i) = 1 + taub(i) = tau_min*float(kex) !* precip(i)/precip_max*coslat(i) + endif + + enddo + print *, ' get_spectra_tau_okwgw ' + end subroutine get_spectra_tau_okw + +end module cires_ugwpv1_triggers diff --git a/physics/cires_vert_lsatdis.F90 b/physics/cires_vert_lsatdis.F90 deleted file mode 100644 index 362bed8ef..000000000 --- a/physics/cires_vert_lsatdis.F90 +++ /dev/null @@ -1,524 +0,0 @@ - subroutine ugwp_lsatdis_naz(levs, ksrc, nw, naz, kxw, taub_spect, ch, xaz, yaz, & - fcor, c2f2, dp, zmid, zint, pmid, pint, rho, ui, vi, ti, & - kvg, ktg, krad, kion, bn2i, bvi, rhoi, ax, ay, eps, ked, tau1) -! -! call ugwp_lsatdis_naz(levs, ksrc, nw, naz, kxw, taub_spect, ch, xaz, yaz, & -! fcor(j), c2f2(j), dp, zmid, zint, pmid, pint, rho, ui, vi, ti, & -! kvg, ktg, krad, kion, bn2i, bvi, rhoi, ax1, ay1, eps1, ked1) - use ugwp_common, only : rcpd, grav, rgrav - implicit none -! - integer :: levs, nw, naz, ksrc - real :: kxw - real, dimension(nw) :: taub_spect, ch - real, dimension(naz) :: xaz, yaz - real, dimension(levs+1) :: ui, vi, ti, bn2i, bvi, rhoi, zint, pint - real, dimension(levs ) :: dp, rho, pmid, zmid - real :: fcor, c2f2 - real, dimension(levs+1) :: kvg, ktg, kion, krad, kmol - -! output/locals - real, dimension(levs ) :: ax, ay, eps - real, dimension(levs+1) :: ked , tau1 - - real, dimension(levs+1 ) :: uaz - real, dimension(levs, naz ) :: epsd - real, dimension(levs+1, naz ) :: atau, kedd - real, dimension(levs+1 ) :: taux, tauy - real, dimension(levs ) :: dzirho , dzpi - real :: usrc -! - integer :: iaz, k -! - atau=0.0 ; epsd=0.0 ; kedd=0.0 - - do k=1,levs - dzpi(k) = -(pint(k+1)-pint(k))/rho(k)*rgrav - dzirho(k) = 1./rho(k)/dzpi(k) ! grav/abs(dp(k)) still hydrostatic "UGWP" - enddo - - LOOP_IAZ: do iaz =1, naz - usrc = ui(ksrc)*xaz(iaz) +vi(ksrc)*yaz(iaz) - do k=1,levs+1 - uaz(k) =ui(k)*xaz(iaz) +vi(k)*yaz(iaz) -usrc - enddo -! -! if (nw .le. 4) call stochastic ..ugwp_lsatdis_az1 only 4-waves ch_ngw1, fuw_ngw1, eff_ngw1=1 -! -! multi-wave scheme -! - if (nw .gt. 4) then - call ugwp_lsatdis_az1(levs, ksrc, nw, kxw, ch, taub_spect, & - fcor, c2f2, zmid, zint, rho, uaz, ti, bn2i, bvi, rhoi, dzirho, dzpi, & - kvg, ktg, krad, kion, kmol, epsd(:, iaz), kedd(:,iaz), atau(:, iaz) ) - - endif -! - ENDDO LOOP_IAZ ! Azimuth of GW propagation directions -! -! sum over azimuth and project aTau(z, iza) =>(taux and tauy) -! for scalars for "wave-drag vector" -! - eps =0. ; ked =0. - do k=ksrc, levs - eps(k) = sum(epsd(k,:))*rcpd - enddo - - do k=ksrc, levs+1 - taux(k) = sum( atau(k,:)*xaz(:)) - tauy(k) = sum( atau(k,:)*yaz(:)) - ked(k) = sum(kedd(k,:)) - enddo - - tau1(ksrc:levs) = taux(ksrc:levs) - tau1(1:ksrc-1) = tau1(ksrc) -! -! end solver: gw_azimuth_solver_LS81 -! sign Ax in rho*dU/dt = -d(rho*tau)/dz -! [(k) - (k+1)] - ax =0. ; ay = 0. - do k=ksrc, levs - ax(k) = dzirho(k)*(taux(k)-taux(k+1)) - ay(k) = dzirho(k)*(tauy(k)-tauy(k+1)) - enddo - call ugwp_limit_1d(ax, ay, eps, ked, levs) - return - -! - print * - print *, ' Ax: ', maxval(Ax(ksrc:levs))*86400., minval(Ax(ksrc:levs))*86400. - print *, ' Ay: ', maxval(Ay(ksrc:levs))*86400., minval(Ay(ksrc:levs))*86400. - print *, 'Eps: ', maxval(Eps(ksrc:levs))*86400., minval(Eps(ksrc:levs))*86400. - print *, 'Ked: ', maxval(Ked(ksrc:levs))*1., minval(Ked(ksrc:levs))*1. -! print *, 'Atau ', maxval(atau(ksrc:levs, 1:Naz))*1.e3, minval(atau(ksrc:levs, 1:Naz))*1.e3 -! print *, 'taux_gw: ', maxval(taux( ksrc:levs))*1.e3, minval(taux( ksrc:levs))*1.e3 - print * -!----------------------------------------------------------------------- -! Here we can apply "ad-hoc" or/and "stability-based" limiters on -! (axy_gw, ked_gw and eps_gw) and check vert-inegrated conservation laws: -! energy and momentum and after that => final update gw-phys tendencies -!----------------------------------------------------------------------- - - end subroutine ugwp_lsatdis_naz -! - subroutine ugwp_lsatdis_az1(levs, ksrc, nw, kxw, ch, taub_sp, & - fcor, c2f2, zm, zi, rho, um, tm, bn2, bn, rhoi, & - dzirho, dzpi, kvg, ktg, krad, kion, kmol, eps, ked, tau ) - -! call ugwp_lsatdis_az1(levs, ksrc, nw, kxw, ch, taub_spect, & -! fcor, c2f2, zmid, zint, rho, uaz, ti, bn2i, bvi, rhoi, dzirho, dzpi, & -! kvg, ktg, krad, kion, kmol, epsd(:, iaz), kedd(:,iaz), atau(:, iaz) ) - - use cires_ugwp_module, only : F_coriol, F_nonhyd, F_kds, linsat, linsat2 - use cires_ugwp_module, only : iPr_ktgw, iPr_spgw, iPr_turb, iPr_mol - use cires_ugwp_module, only : rhp4, rhp2, rhp1, khp, cd_ulim -! - implicit NONE -! - integer, intent(in) :: nw ! number of GW modes in given direction - integer, intent(in) :: levs ! vertical layers - integer, intent(in) :: ksrc ! level of GW-launch layer - - real , intent(in) :: kxw ! horizontal wavelength - real , intent(in) :: ch(nw) ! horizontal phase velocities - real , intent(in) :: taub_sp(nw) ! spectral distribution of the mom-flux -! - real, intent(in) :: fcor, c2f2 ! Corilois factors - - real , intent(in) :: um(levs+1) - real , intent(in) :: tm(levs+1) -!in - real, intent(in), dimension(levs) :: rho, zm - real, intent(in), dimension(levs+1) :: rhoi, zi - real, intent(in), dimension(levs+1) :: bn2, bn - real, intent(in), dimension(levs) :: dzpi, dzirho - real, intent(in), dimension(levs+1) :: kvg, ktg, krad, kion, kmol -!======================================================================== -!out - real, dimension(levs+1) :: tau, ked - real, dimension(levs) :: eps - -!========================================================================= -!local - real :: Fd1, Fd2 - real, dimension(levs) :: a_mkz - real, dimension(levs+1,nw) :: sp_tau, sp_ked, sp_kth - real, dimension(levs,nw) :: sp_eps - - real, dimension(levs,nw) :: sp_mkz, sp_etot - real, dimension(levs,nw) :: sp_ek, sp_ep - - - real, dimension(levs) :: swg_ep, swg_ek, swg_et, swg_kz - - real, dimension(nw) :: rtaus ! spectral distribution at ksrc - real :: sum_rtaus ! total flux in iaz-azimuth - real :: Chnorm, Cx, Cs, Cxs, Cx2sat - real :: Fdis, Fdisat - real :: Cdf2, Cdf1 ! (Cd*cd-f*f) and sqrt -! -! two-level => upward integration for wave-filtering (dissip + breaking) -! - real :: taus, tauk, tau_lin - real :: etws, etwk, etw_lin - real :: epss, epsk - real :: kds, kdk - real :: kzw, kzw2, kzw3, kzi, kzs - real :: wfd, wfi ! -! -! for GW dissipation on the rotational sphere -! - real :: Betadis ! Ep/Ek ratio - real :: BetaM, BetaT ! 0.5 or 1./1+b and 1-1/(1+b) - real :: wfdM, wfdT, wfiM, wfiT, wdop2 - - real :: dzi, keff, keff_m, keff_t, keffs - - real :: sf2k2, cf2 - real :: Lzkm, Lzsat - - integer :: i, k, igw - integer :: ksat1, ksat2 - - real :: zsat1, zsat2 - real :: kx2_nh - - real :: rab1, rab2, rab3, rab4, cd_ulim2 - - integer :: Ind_out(nw, levs+1) - -! - logical, parameter :: dbg_print = .false. -! -!=================================================================== -! Nullify arrays -! tau, eps, ked -!==================================================================== - - tau = 0.0 - eps = 0.0 - ked = 0.0 - Ind_out(1:nw,:) = 0 -! -! GW-spectral arrays ..... sp_etot ....sp_tau -! - sp_tau = 0. - sp_eps = 0. - sp_ked = 0. - sp_mkz = -99. - sp_etot = 0. - sp_ek = 0. - sp_ep = 0. - sp_kth = 0. -! - swg_et = 0. - swg_ep = 0. - swg_ek = 0. - swg_kz = 0. - cd_ulim2 = cd_ulim*cd_ulim - cf2 = F_coriol*c2f2 - kx2_nh = F_nonhyd*kxw*kxw - - if (dbg_print) then - write(6,*) linsat , ' eff-linsat & kx ', kxw - write(6,*) maxval(ch), minval(ch), ' ch ' - write(6,*) - write(6,*) maxval(rhoi), minval(rhoi), 'rhoi ' - write(6,*) zi(ksrc) , ' zi(ksrc) ' - write(6,*) cd_ulim, ' crit-level cd_ulim ' - write(6,*) F_coriol, ' F_coriol' - write(6,*) F_nonhyd, ' F_nonhyd ' - write(6,*) maxval(Bn), minval(BN), ' BN-BV ' - write(6,*) Um(ksrc), ' Um-ksrc ', cd_ulim2 , 'cd_ulim2 ', c2f2, ' c2f2 ' - !pause - endif - -!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -! Loop_GW: over GW-spectra -! of individual non-interactive modes -!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -! - Loop_GW: do i=1, nw -! - Kds = 0.0 -! -! src-level -! - Cx = ch(i) - Um(ksrc) - Cdf2 = Cx*Cx - cf2 - taus = taub_sp(i) ! momentum flux for i-mode w/o rhoi(ksrc) - kzw = Bn(ksrc) / Ch(i) ! ch(i) > 0. Cx(i) < 0. critica - etws = taus*kzw / kxw - rtaus(i) = taus*rhoi(ksrc) -! - IF( Cx <= cd_ulim .or. Cdf2 <= cd_ulim2) THEN - Ind_out(i, ksrc) =-1 ! -1 - diagnostic index for critical levels - cycle Loop_GW ! got to the next mode of GW-spectra - ELSE -! - kzw2 = Bn2(ksrc)/Cdf2 - rhp4 - kx2_nh -! - if (kzw2 <= 0.) then - Ind_out(i, ksrc) =-2 ! -2 - diagnostic index for reflected waves - cycle Loop_GW ! no wave reflection in GW-LSD scheme - endif - - kzw = sqrt(kzw2) - kzw3 = kzw2*kzw - etws = taus*kzw/kxw -! -! Here Linsat == Fr_critical -! - Cx2sat = Linsat2*Cdf2 - if (etws >= cx2sat) then - Kds = kxw*Cx*rhp2/kzw3 - etws = cx2sat - taus = etws*kxw/kzw - Ind_out(i, ksrc) =-3 ! -3 - dignostic index for saturated waves - endif -! - betadis = cdf2/(Cx*Cx+cf2) - betaM = 1.0 /(1.0+betadis) - betaT = 1.0 - BetaM -! - Cxs = Cx - kzs = kzw -! keffs = (kvg(ksrc)+kds)*iPr_turb*.5*khp -! sp_kth(ksrc, i) = rhoi(ksrc)*keffs*(Tm(ksrc)+Tm(ksrc-1)) - rtaus(i) = taus*rhoi(ksrc) - sp_tau(ksrc, i) = rtaus(i) - sp_etot(ksrc, i) = etws - sp_mkz(ksrc, i) = kzw - sp_ek(ksrc, i) = etws*betam - sp_ep(ksrc, i) = etws*betaT ! can be transferred to (T'**2) T-rms - -! - ENDIF ! vertical propagation of i-mode to the next upper layer = (ksrc+1) -! -! Loop_Zint .................................. VERTICAL "INTERFACE" LOOP from ksrc => ktop_GW -! - Loop_Zi: do k=ksrc+1, levs -! - Cx = ch(i)-Um(k) ! Um(k) is defined at the interface pressure levels - Cdf2 = Cx*Cx -cf2 - if( Cx <= cd_ulim .or. Cdf2 <= 0.) then - Ind_out(i, k) =-1 ! 1 - diagnostic index for critical levels - ! print*,'crit level C-U ',int(Cx),int(sqrt(cf2)),' Um ',Um(k) - cycle Loop_GW - endif - - cdf1 =sqrt(Cdf2) - wdop2 = (kxw*Cx)* (kxw*Cx) - kzw2 = (Bn2(k)-wdop2)/Cdf2 - rhp4 - kx2_nh ! full lin DS-NIGW (N2-wd2)*k2=(m2+k2+[1/2H]^2)*(wd2-f2) - - if (kzw2 < 0.) then - Ind_out(i, k) =-2 ! 2 - diagnostic index for reflected waves - cycle Loop_GW - endif - kzw = sqrt(kzw2) - kzw3 =kzw2*kzw -! - keff_m = kvg(k)*kzw2 + kion(k) -! keff_t = kturb(k)*iPr_turb + kmol(k)*iPr_mol - keff_t = ktg(k)*kzw2 + krad(k) -! -! - betadis = cdf2 / (Cx*Cx+cf2) - betaM = 1.0 / (1.0+betadis) - betaT = 1.0 - BetaM - -! -!imaginary frequencies of momentum and heat with "kds at (k-1) level" -! - wfiM = kds*kzw2*F_kds + keff_m - wfiT = kds*iPr_ktgw*F_kds * kzw2 + keff_t -! - wfdM = wfiM/(kxw*Cdf1)*BetaM - wfdT = wfiT/(kxw*Cx)*BetaT -! exp-l: "kzi*dz" - kzi = 2.*kzw*(wfdM+wfdT)*dzpi(k) ! 2-factor energy-momentum (U')^2 -!------------------------------------------------------- -! dissipative factor: Fdis -! we can replace WKB-solver by Numerical integration of -! tau_gw == etot_gw/kzw*kxw -! d(rho*tau_gw) = -kdis*rho*tau_gw -! |tau_gw| <= |tau_gwsat| -! linear limit for single mode -! generalization for the "broad" spectra -! or treating single mode breaking -! over finite "vertical"-depth with "efficiency" -! Now: time-step + hor-l scale -!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Fdis = exp(-kzi) -! -! -! dissipative "wave rms" by WKB -! - etwk = etws*rhoi(k-1)/rhoi(k)*Fdis*kzw/kzs -! - Cx2sat = Linsat2*Cdf2 -! -! Linear saturation -! - if (etwk.ge.cx2sat) then - - Ind_out(i, k) =-3 ! 3 - dignostic index for saturated waves -! ! saturate energy and "trigger" keddy - etw_lin = etwk - etwk = cx2sat - Kds = kxw*Cdf1*rhp2/kzw3 - tauk = etwk*kxw/kzw - -!=================================================================================== -! WAM/case with high Kds tau_lin = (etw_lin-etwk)*kxw/kzw !tau_loss by sat theory -! Lzsat = 6,28/kzw Zsat1 = Zi(k)-.5*Lzsat -! Zsat2 = Zi(k)+.5*Lzsat -! in WAM triggering from "kds = 0 m2/s" => "200 m2/s" for Lzw ~ 10 km -! -! call sat_domain(zi, Zsat1, Zsat2, pver, ksat1, ksat2) -! -! to avoid it do the new diss-n factor with eddy "kds" added to the -! background keff_m and keff_t -! -! can be taken out for the strato-mesosphere in GFS -! wfiM = kds*kzw2 + keff_m -! wfiT = kds*iPr_ktgw * kzw2 +keff_t -! wfdM = wfiM/(kxw*Cdf1)*BetaM -! wfdT = wfiT/(kxw*Cx)*BetaT -! kzi = 2.*kzw*(wfdM+wfdT)*dzpi(k) -! Fdisat = exp(-kzi) -! etwk = etws*rhoi(k-1)/rhoi(k)*Fdis*(kzw/Kzs) -! updated breaking in the Lzsat-domain: zsat1 < zi < zsat2 -! ================================================================================= - else - kds = 0.0 - tauk = etwk*kxw/kzw ! = Ekin*kx/kz - ENDIF -!-------------------------------------- -! -! Fill in spectral arrays(levs, nw) -! -!-------------------------------------- - sp_ked(k,i) = kds ! defined at interfaces - sp_tau(k, i) = tauk*rhoi(k) ! defined at interfaces - -! keff = (kds + kvg(k))*iPr_turb*0.5*KHP -! sp_kth(k, i) = rhoi(k)*keff*(Tm(k)+Tm(k-1)) ! defined at mid-layers - - sp_etot(k, i) = etwk ! defined at interfaces - sp_mkz(k, i) = kzw ! defined at interfaces - sp_ek(k, i) = etwk*betam ! defined at interfaces - sp_ep(k, i) = etwk*betaT ! can be transferred to (T'**2) -! -! - if (sp_tau(k,i) > sp_tau(k-1,i)) then - sp_tau(k,i) = sp_tau(k-1,i) ! prevent "possible" numerical "noise" - endif -! -! updates for "eps and keff" from -! - rab1 =.5*(cx+cxs)*dzirho(k) -! heating -! due to wave dissipation -! - sp_eps(k,i) = rab1*(sp_tau(k-1,i)- sp_tau(k,i)) ! defined at mid-layers -! -! cooling term due to eddy heat conduction =0 if Keff_cond =>0, -! usually updated by 1D-heat implict tridiagonal solver -! explicit local solver ---->sp_kth(k,i) = Kt*(dT/dz+ R/Cp*T/Hp~>g/cp) -! -! sp_eps(k,i)=sp_eps(k,i)+dzirho(k)*(sp_kth(k,i)- sp_kth(k-1,i)) -! - kzs = kzw - cxs = cX - taus = tauk - etws = etwk -! keffs = keff - - enddo Loop_Zi ! ++++++++++++++ vertical layer -! -! ................................! stop ' in solver single-mode' -! - enddo Loop_GW ! i-mode of GW-spectra -! - sum_rtaus =sum(rtaus) ! total momentum flux at k=ksrc - -! print *, sum_rtaus, ' tau-src ', nint(zi(ksrc)*1.e-3) -! print *, maxval(ch), minval(ch), ' Ch ', ngwv, ' N-modes ' -! -!============================================================================== -! Perform spectral integartion (sum) & apply "efficiency/inremittency" factors -! -! eff_factor: ~ 1./[number of modes in 1-direction of model columns] -! -!============================================================================== - do k=ksrc, levs - - ked(k) =0. - Eps(k) = 0. - Tau(k) = 0. - swg_et(k) =0. - swg_ep(k) =0. - swg_ek(k) =0. - - do i=1,nw - Ked(k) = Ked(k)+sp_ked(k,i) - Eps(k) = Eps(k)+sp_eps(k,i) - Tau(k) = Tau(k)+sp_tau(k,i) -!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -! GW-energy + GW-en flux ~ Cgz*E, diagnostics-only -!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - swg_et(k) = swg_et(k)+sp_etot(k,i) !*eff_fact - swg_ep(k) = swg_ep(k)+sp_ep(k,i) !*eff_fact - swg_ek(k) = swg_ek(k)+sp_ek(k,i) !*eff_fact - enddo - - enddo -! fill in below the "source" level ..... [1:ksrc-1] -! - do k=1, ksrc-1 -! no loss of the total momentum flux - ked(k) =0. - eps(k) = 0. - tau(k) = tau(ksrc) -! lin-theory diagnostics-only - swg_et(k) =swg_et(ksrc)*rhoi(ksrc)/rhoi(k) - swg_ep(k) =swg_ep(ksrc)*rhoi(ksrc)/rhoi(k) - swg_ek(k) =swg_ek(ksrc)*rhoi(ksrc)/rhoi(k) - enddo -! - RETURN -! -! diagnostics below -! -345 FORMAT(2x, F8.2, 4(2x, F10.3), 2x, F8.2) - if (dbg_print) then - print * - print *, ' Zkm EK m2/s2 Ked m2/s Eps m2/s3 tau-Mpa ' - do k=ksrc, levs -! Fd1 = maxval(Fdis_modes(1:nw,k)) -! Fd2 = minval(Fdis_modes(1:nw,k)) - write(6, 345) Zi(k)*1.e-3, sqrt(swg_ek(k)), Ked(k), Eps(k), Tau(k)*1.e3, Um(k) !, Fd1, Fd2 - enddo - print * - write(6,*) nw , ' nwaves-linsat ' - write(6,*) maxval(sp_ked), minval(sp_ked), 'ked ' - write(6,*) maxval(sp_tau), minval(sp_tau), 'sp_tau ' - !pause - endif - -! - end subroutine ugwp_lsatdis_az1 -! - subroutine ugwp_limit_1d(ax, ay,eps, ked, levs) - use cires_ugwp_module, only : max_kdis, max_eps, max_axyz - implicit none - integer :: levs - real, dimension(levs) :: ax, ay,eps - real, dimension(levs+1) :: ked - real, parameter :: xtiny = 1.e-30 - where (abs(ax) > max_axyz ) ax = ax/abs(ax+xtiny)*max_axyz - where (abs(ay) > max_axyz ) ay = ay/abs(ay+xtiny)*max_axyz - where (abs(eps) > max_eps ) eps = eps/abs(eps+xtiny)*max_eps - where (ked > max_kdis ) ked = max_kdis - end subroutine ugwp_limit_1d diff --git a/physics/cires_vert_orodis.F90 b/physics/cires_vert_orodis.F90 deleted file mode 100644 index 0d3cce194..000000000 --- a/physics/cires_vert_orodis.F90 +++ /dev/null @@ -1,1018 +0,0 @@ -! subroutine ugwp_drag_mtb -! subroutine ugwp_taub_oro -! subroutine ugwp_oro_lsatdis -! - subroutine ugwp_drag_mtb( iemax, nz, & - elvpd, elvp, hprime , sigma, theta, oc, oa4, clx4, gam, zpbl, & - up, vp, tp, qp, dp, zpm, zpi, pmid, pint, idxzb, drmtb,taumtb) - - use ugwp_common, only : bnv2min, grav, grcp, fv, rad_to_deg, dw2min, velmin, rdi - use ugwp_oro_init,only : nridge, cdmb, fcrit_mtb, frmax, frmin, strver - - implicit none -!======================== -! several versions for drmtb => high froude mountain blocking -! version 1 => vay_2018 ; -! version 2 => kdn_2005 ; Kim & Doyle in NRL-2005 -! version 3 => ncep/gfs-2017 -gfs_2017 with lm1997 -!======================== - -! character(len=8) :: strver = 'vay_2018' -! real, parameter :: Fcrit_mtb = 0.7 - - integer, intent(in) :: nz - integer, intent(in) :: iemax ! standard ktop z=elvpd + 4 * hprime - real , intent(out) :: taumtb - - integer , intent(out) :: idxzb - real, dimension(nz), intent(out) :: drmtb - - real, intent(in) :: elvp, elvpd !elvp = min (elvpd + sigfac * hprime(j), hncrit=10000meters) - real, intent(in) :: hprime , sigma, theta, oc, oa4(4), clx4(4), gam - real, intent(in) :: zpbl - - real, dimension(nz), intent(in) :: up, vp, tp, qp, dp, zpm, pmid - real, dimension(nz+1), intent(in) :: zpi, pint -! - real, dimension(nz+1) :: zpi_zero - real, dimension(nz) :: zpm_zero - real :: vtj, rhok, bnv2, rdz, vtkp, vtk, dzp - - real, dimension(nz) :: bn2, uds, umf, cosang, sinang - - integer :: k, klow, ktop, kpbl - real :: uhm, vhm, bn2hm, rhohm, & - mtb_fix, umag, bnmag, frd_src, & - zblk, who_iz_normal, rlm97, & - phiang, ang, pe, ek, & - cang, sang, ss2, cs2, zlen, dbtmp, & - hamp, bgamm, cgamm - -!================================================== -! -! elvp + hprime <=>elvp + nridge*hprime, ns =2 -! ns = sigfac -! tau_parel & tau_normal along major "axes" -! -! options to block the "flow", choices for [klow, ktop] -! -! 1-directional (normal) & 2-directional "blocking" -! -!================================================== -! no - blocking: drmtb(1:nz) = 0.0 -!================= - idxzb = -1 - drmtb(1:nz) = 0.0 - taumtb = 0.0 - klow = 2 - - ktop = iemax - hamp = nridge*hprime - -! reminder: cdmb = 4.0 * 192.0/float(imx)*cdmbgwd(1) Lellipse= a/2=sigma/hprime - - mtb_fix = cdmb*sigma/hamp !hamp ~ 2*hprime and 1/sigfac = 0.25 is inside 1/hamp - - if (mtb_fix == 0.) then - print *, cdmb, sigma, hamp - print *, ' MTB == 0' - stop - endif - - if (strver == 'vay_2018') then - - zpm_zero = zpm - zpi(1) - zpi_zero = zpi - zpi(1) - - do k=1, nz-1 - if (hamp .le. zpi_zero(k+1) .and. (hamp .gt. zpi_zero(k) ) ) then - ktop = k+1 !......simply k+1 next interface level - exit - endif - enddo -! print *, klow, ktop, ' klow-ktop ' - call um_flow(nz, klow, ktop, up, vp, tp, qp, dp, zpm, zpi, pmid, pint, & - bn2, uhm, vhm, bn2hm, rhohm) - - umag = max(sqrt(uhm*uhm + vhm*vhm), velmin) !velmin=dw2min =1.0 m/s - if (bn2hm .le. 0.0) then - print *, ' unstable MF for MTB -RETURN ' - RETURN ! unstable PBL - endif - bnmag =sqrt(bn2hm) - - frd_src = min(hamp*bnmag/umag, frmax) ! frmax =10. - -! print *, frd_src, Fcrit_mtb/frd_src, ' no-Blocking > 1 ' -! - if ( frd_src .le. Fcrit_mtb) RETURN ! no-blocking, although on small ridges with weak winds can be blocking -! -! zblk > 0 -! Fcrit_mtb > Fcrit_ogw h_clip = Fr_mtb*U/N ! h_hill minus h_clip = zblk -! - zblk = hamp*(1. - Fcrit_mtb/frd_src) - idxzb =1 - do k = 2, ktop - - if ( zblk < zpm_zero(k) .and. zblk >= zpm_zero(k-1)) then - idxzb = k - exit - endif - enddo -! - if (idxzb == 1) RETURN ! first surface level block is not "important" - - if (idxzb > 1) then ! let start with idxzb = 2....and up with LM1997 -! -! several options to compute MTB-drag: a) IFS_1997 ; b) WRF_KD05 ; c) SJM_2000 -! - bgamm = 1.0 - 0.18*gam -0.04*gam*gam - cgamm = 0.48*gam +0.3*gam*gam - - do k = 1, idxzb-1 - zlen = sqrt( (zblk - zpm_zero(k) ) / ( zpm_zero(k) +hprime )) - - umag = max(sqrt(up(k)*up(k) + vp(k)*vp(k)), velmin) - - phiang = atan(vp(k)/umag) -! theta -90/90 - ang = theta - phiang - cang = cos(ang) ; sang = sin(ang) - - who_iz_normal = max(cang, gam*sang ) !gfs-2018 - - cs2 = cang* cang ; ss2 = 1.-cs2 - - rlm97 =(gam * cs2 + ss2)/ (cs2 + gam * ss2) ! ... (cs2 + gam * ss2) / (gam * cs2 + ss2) ! check it -! - if (rlm97 > 2.0 ) rlm97 = 2.0 ! zero mtb-friction at this level -! - - who_iz_normal = bgamm*cs2 + cgamm*ss2 ! LM1997/IFS - - dbtmp = mtb_fix* max(0., 2.- rlm97)*zlen*who_iz_normal - if (dbtmp < 0) dbtmp = 0.0 -! -! several approximation can be made to implement MTB-drag -! as a "nonlinear level dependent"-drag or "constant"-drag -! uds(k) == umag = const between the 1-layer and idxzb -! - - drmtb(k) = dbtmp * abs(umag) ! full mtb-drag = -drmtb(k) * uds = -kr*u - taumtb = taumtb - drmtb(k)*umag *rdi * pmid(k)/tp(k)*(zpi(k+1)-zpi(k)) -! -! 2-wave appr for anisotropic drmtb_Bellipse(k) and drmtb_Aell(k) can be used -! with Umag-projections on A & B ellipse axes -! mtb_fix =0.25*cdmb*sigma/hprime, -! in SM-2000 mtb_fix~ 1/8*[cdmb_A, cdmb_B]*sigma/hprimesum ( A+B) = 1/4. -! -!333 format(i4, 7(2x, F10.3)) -! write(6,333) , k, zpm_zero(k), zblk, hamp*Fcrit_mtb/frd_src, taumtb*1.e3, drmtb(k) , -drmtb(k)*up(k)*1.e5 - enddo -! - endif - endif ! strver=='vay_2018' -! -! -! - if (strver == 'kdn_2005' .or. strver == 'wrf_2018' ) then - - print *, ' kdn_2005 with # of hills ' -! -! compute flow-blocking stress based on WRF 'gwdo2d' -! - endif -! -! - if (strver == 'gfs_2018') then - - ktop = iemax; klow = 2 - - call um_flow(nz, klow, ktop, up, vp, tp, qp, dp, zpm, zpi, pmid, pint, & - bn2, uhm, vhm, bn2hm, rhohm) - if (bn2hm <= 0.0) RETURN ! unstable PBL -!--------------------------------------------- -! -!'gfs_2018' .... does not rely on Fr_crit -! and Fr-regimes -!----gfs17 for mtn ignores "averaging of the flow" -! for MTB-part it is only works with "angles" -! no projections on [uhm, vhm] -direction -! kpbl can be used for getting high values of iemax-hill -!----------------------------------------------------------- - zpm_zero = zpm - zpi(1) - zpi_zero = zpi - zpi(1) - do k=1, nz-1 - if (zpbl .le. zpm_zero(k+1) .and. (zpbl .ge. zpm_zero(k) ) ) then - kpbl = k+1 - exit - endif - enddo - - do k = iemax, 1, -1 - - uds(k) = max(sqrt(up(k)*up(k) + vp(k)*vp(k)), velmin) - phiang = atan(vp(k)/uds(k)) - ang = theta - phiang - cosang(k) = cos(ang) - sinang(k) = sin(ang) - - if (idxzb == 0) then - pe = pe + bn2(k) * (elvp - zpm(k)) *(zpi(k+1) - zpi(k)) - umf(k) = uds(k) * cosang(k) ! normal to main axis - ek = 0.5 * umf(k) * umf(k) -! -! --- dividing stream lime is found when pe =>exceeds ek first from the "top" -! - if (pe >= ek) idxzb = k - exit - endif - enddo - -! idxzb = min(kpbl, idxzb) -! -! -! -! last: mtb-drag -! - if (idxzb > 1) then - zblk = zpm(idxzb) - print *, zpm(idxzb)*1.e-3, ' mtb-gfs18 block-lev km ', idxzb, iemax, int(elvp) - do k = idxzb-1, 1, -1 -! - zlen = sqrt( (zblk - zpm_zero(k) ) / ( zpm_zero(k) +hprime )) - cs2 = cosang(k)* cosang(k) - ss2 = 1.-cs2 - rlm97 =(gam * cs2 + ss2)/ (cs2 + gam * ss2) ! (cs2 + gam * ss2) / (gam * cs2 + ss2) ! check it - - who_iz_normal = max(cosang(k), gam*sinang(k)) -! -! high res-n higher mtb 0.125 => 3.5 ; (negative of db -- see sign at tendency) -! - dbtmp = mtb_fix* max(0., 2.- rlm97)*zlen*who_iz_normal - - drmtb(k) = dbtmp * abs(uds(k)) ! full mtb-drag = -drmtb(k) * uds = -kr*u -! - taumtb = taumtb - drmtb(k) * uds(k) *rdi * pmid(k)/tp(k)*(zpi(k+1)-zpi(k)) -! - enddo - endif - endif ! strver=='gfs17' -! -! - end subroutine ugwp_drag_mtb -! -! -! ugwp_taub_oro - Computes [taulin, taufrb, drlee(levs) ] -! -! - subroutine ugwp_taub_oro(levs, izb, kxw, tau_izb, fcor, & - hprime , sigma, theta, oc, oa4, clx4, gamm, & - elvp, up, vp, tp, qp, dp, zpm, zpi, pmid, pint, xn, yn, umag, & - tautot, tauogw, taulee, drlee, tau_src, kxridge, kdswj, krefj, kotr) -! - use ugwp_common, only : bnv2min, grav, pi, pi2, dw2min, velmin - use cires_ugwp_module, only : frcrit, ricrit, linsat - use ugwp_oro_init, only : hpmax, cleff, frmax - use ugwp_oro_init, only : nwdir, mdir, fdir - use ugwp_oro_init, only : efmin, efmax , gmax, cg, ceofrc - use ugwp_oro_init, only : fcrit_sm, fcrit_gfs, frmin, frmax - use ugwp_oro_init, only : coro, nridge, odmin, odmax - use ugwp_oro_init, only : strver -! - use ugwp_oro_init, only : mkz2min, lzmax, zbr_pi -! --- -! -! define oro-GW fluxes: taulin, taufrb amd if kdswj > 0 (LWB-lee wave breaking) -! approximate for drlee-momentum tendency -! --- - implicit none -! - integer, intent(in) :: levs, izb - real , intent(in) :: tau_izb ! integrated (1:izb) drag -Kr_mtb*U, or Zero - integer, intent(out) :: kdswj, krefj, kotr - integer :: klwb - real, intent(in) :: kxw, fcor - real, intent(in) :: hprime, sigma, theta, oc, gamm, elvp - -! - real, intent(in) :: oa4(4), clx4(4) - - real, dimension(levs), intent(in) :: up, vp, tp, qp, dp - real, dimension(levs+1), intent(in) :: zpi, pint - real, dimension(levs ), intent(in) :: zpm, pmid -! - real,dimension(levs), intent(out) :: drlee - real,dimension(levs+1), intent(out) :: tau_src -! - real, intent(out) :: tauogw, tautot, taulee - real :: taulin, tauhcr, taumtb - real, intent(out) :: xn, yn, umag, kxridge -! -! -! locals -! four possible versions to compute "taubase as a function of Fr-number" -! character :: strver='smc_2000' ! 'kd_2005', 'gfs_2017', 'vay_2018' -! - real, dimension(levs+1) :: zpi_zero - - real :: oa, clx, odir, cl4p(4), clxp - - real :: uhm, vhm, bn2hm, rhohm, bnv - - real :: elvpMTB, wdir - real :: tem, efact, coefm, kxlinv, gfobnv - - real :: fr, frlin, frlin2, frlin3, frlocal, dfr - real :: betamax, betaf, frlwb, frmtb - integer :: klow, ktop, kph - - integer :: i, j, k, nwd, ind4, idir - - real :: sg_ridge, kx2, umd2 - real :: mkz, mkz2, zbr_mkz, mkzi - - real :: hamp ! clipped hprime*elvmax/elv_clip > hprime - real :: hogw ! hprime or hamp for free-prop OGWs z > z(krefj) - real :: hdsw ! empirical like DNS amplitudes for Lee-dsw trapped waves - real :: hcrit - real :: hblk ! blocking div-stream height - - real :: coef_h2, frnorm - - - real, dimension(levs) :: bn2 - real :: rho(levs) - real, dimension(levs+1) :: ui, vi, ti, bn2i, bvi, rhoi - real, dimension(levs+1) :: umd, phmkz - real :: c2f2, umag2, dzwidth, udir - real :: hogwi, hdswi, hogwz, hdswz ! height*height wave-amp - real :: uogwi, udswi, uogwz, udswz ! wind2 wave-rms - real, dimension(levs+1) :: dtrans, deff - real :: pdtrans - logical :: do_klwb_phase = .false. ! phase-crireria for LLWB of SM00 - logical :: do_dtrans = .true. ! dissipative saturation to deposit momentum - ! between ZMTB => ZHILL -!----------------------------------------------------------------------------- -! -! downslope/lee/GW wave regimes kdswj: between ZMTB and ZOGW(krefj) -! ZMTB < ZOGW = ns*HPRIME < ELVP -! define krefj as a level for OGWs above ZMTB and "2-3-4*hprime" + ZMTB -! we rely on the concept of the "CLIPPED-SG" mountain above ZMTB & new -! inverse Froude number for the "mean flow" averaged from ZMTB to ZOGW -! here we can use "elvp" as only for hprime adjustment ...elvp/elvp_MTB -! -!"empirical" specification of tauwave = taulee+tauogw in [ZMTB : ns*HPRIME] -! can be based on numerical runs like WRF-model -! for Frc < Fr< [Frc : 2.5-3 Frc] -! see suggestions proposed in SM-2000 and Eckermann et al. (2010) -!----------------------------------------------------------------------------- - tautot = 0. ; taulin = 0. ; taulee = 0. ; drlee(1:levs) = 0. ; tau_src = 0.0 - krefj = 1 ; kotr = levs+1; kdswj = 1 - xn = 1.0 ; yn = 0. ; umag = velmin; kxridge = kxw - - dtrans = 0. ; deff =0. - klow = 2 - elvpMTB = elvp -! -! clipped mountain H-zmtb for estimating wave-regimes new Fr and MF above ZMTB -! - if (izb > 0 ) then - klow = izb - elvpMTB = max(elvp - zpi(izb), 0.0) - endif - if (elvpMTB <=0 ) print *, ' blocked flow ' - if (elvpMTB <=0 ) return ! "blocked flow" from the surface to elvMAX - - zpi_zero(:) = zpi(:) - zpi(1) - hblk = zpi_zero(klow) - - sg_ridge = max( nridge*hprime * (elvp/elvpMTB), hblk+hprime*0.333) - -! -! enhance sg_ridge by elvp/elvpMTB >1 and H_clip = H-hiilnew - zblk later for hamp -! - sg_ridge = min(sg_ridge, hpmax) - -! print *, 'sg_ridge ', sg_ridge - - do k=1, levs - if (sg_ridge .gt. zpi_zero(k) .and. ( sg_ridge .le. zpi_zero(k+1) ) ) then - ktop = k+1 - exit - endif - enddo - - krefj = ktop ! the mountain top index for sg_ridge = ns*hprime - -! if ( izb > 0 .and. krefj .le. izb) then -! print *, izb, krefj, sg_ridge, zpi_zero(izb), ' izb >ktop ' -! endif - -! -! here ktop displays sg_ridge-position not elvP !!!! klow =2 to avoid for 127-126L -! instability due to extreme "thin" layer...128L-model needs cruder vertical resolution -! - call um_flow(levs, klow, ktop, up, vp, tp, qp, dp, zpm, zpi, pmid, pint, & - bn2, uhm, vhm, bn2hm, rhohm) - - call get_unit_vector(uhm, vhm, xn, yn, umag) - - if (bn2hm <= 0.0) RETURN ! "unstable/neutral" hill need different treatment - bnv = sqrt(bn2hm) - hamp = sg_ridge-zpi_zero(klow) ! hamp >= nridge*hprime due higher SG-elevations - zblk or first layer - hogw = hamp - hdsw = hamp - - - fr = bnv * hamp /umag - fr = min(fr, frmax) - kxridge = max(sigma/hamp, kxw) ! to get rid from "SSO-errors" kxw-provides max-value for kx - kx2 = kxridge*kxridge - umag = max( umag, velmin) - c2f2 = fcor*fcor/kx2 - umag2 = umag*umag - c2f2 - - if (umag2 <= 0.0) RETURN ! Coriolis cut-off at high-mid latitudes for low kx - - mkz2 = bn2hm/umag2 - kx2 ! we add Coriolis corrections for crude model resolutions "low-kx" - ! and non-stationary waves coro, fcor for small umag - ! bn2hm/[(coro-umag)^2 -fc2/kx2] - kx2, cf = fc/kx => 2 m/s to 11 m/s for 60deg - IF (mkz2 < mkz2min .or. krefj <= 2 ) THEN -! -! case then no effects of wave-orography -! - krefj = 1 ; kdswj = 1; kotr = levs ; klwb = 1 - tautot = 0. - tauogw = 0. - taulee = 0. - drlee = 0. ; tau_src(1:levs+1) = 0. - return - ENDIF -!========================================================================= -! find orographic asymmetry and convexity :'oa/clx' for clipped SG-hill -! nwd 1 2 3 4 5 6 7 8 -! wd w s sw nw e n ne se -! make sure that SM_00 and KD_05 oro-characteristics can match each other -! OD-KDO5 = Gamma=a/b [0:2] ; hsg = 2.*hprime -! OC-KD05 mount sharpness sigma^4 "height to half-width"[0:1] -! alph-SM00 fraction of h2d contributed to hprime [0:1] -! -! OA-KDO5 OA > dwstream OA=0 sym OA < 0 upstram [-1. 0. 1] -! delt-SM00 dw/up asymmetry -1 < delta < 1 -! Gamma-LM97 anisotropy of the orography g2 =(dh/dx)^2/(dh/dy)^2 -!.. -!A parametrization of low-level wave breaking which includes a dependence on -!the degree of 2-dimensionality of SG; it is active over a finite range of Fr -!========================================================================= - wdir = atan2(uhm,vhm) + pi - idir = mod( int(fdir*wdir),mdir) + 1 - - nwd = nwdir(idir) - ind4 = mod(nwd-1,4) + 1 - if (ind4 < 1 ) ind4 = 1 - if (ind4 > 4 ) ind4 = 4 - - oa = ( 1-2*int( (nwd-1)/4 )) * oa4(ind4) - clx = clx4(ind4) - cl4p(1) = clx4(2) - cl4p(2) = clx4(1) - cl4p(3) = clx4(4) - cl4p(4) = clx4(3) - clxp = cl4p(ind4) - - odir = clxp/max(clx, 1.e-5) ! WRF-based definition for "odir" - - odir = min(odmax, odir) - odir = max(odmin, odir) - - - if (strver == 'smc_2000' .or. strver == 'vay_2018') then -!========================================================================= -! -! thrree-piece def-n for tautot(Fr): 0-Fr_lin - Fr_lee -Fr_mtb -! taulin/tauogw taulee taumtb -! here tau_src(levs+1): approximate wave flux from surface to LLWB -! Following attempts of Scinocca +McFarlane, 2000 & Eckermann etal.(2010) -!========================================================================= -! -! if (mkz2 < 0)... mkzi = sqrt(-mkz2) trapped wave regime don't a case in UGWP-V1 -! wave flux ~ rho_src*kx_src/mkz_src*wind_rms -! bn2, uhm, vhm, bn2hm, rhohm -! -! IF (mkz2.ge. mkz2min .and. krefj > 2 ) THEN -! -! wave regimes -! - mkz = sqrt(mkz2) - frlwb = fcrit_sm ! should be higher than LOGW to get zblk < zlwb - frlin = fcrit_sm - frlin2 = 1.5*fcrit_sm - frlin3 = 3.0*fcrit_sm - - hcrit = fcrit_sm*umag/bnv - hogw = min(hamp, hcrit) - hdsw = min(hamp, frlwb*umag/bnv) ! no trapped-wave solution - - coef_h2 = kxridge * rhohm * bnv * umag - - taulin = coef_h2 * hamp*hamp - tauhcr = coef_h2 * hcrit*hcrit - - IF (fr < frlin ) then - tauogw = taulin - taulee = 0.0 - taumtb = 0.0 - else if (fr .ge. frlin ) then - tauogw = tauhcr - taulin = coef_h2 * hamp*hamp - taumtb = tau_izb ! integrated form MTB -! -! SM-2000 approach for taulee, shall we put limits on BetaMax_max ~ 20 or Betaf ?? -! - frnorm = fr/fcrit_sm ! frnorm below [1.0 to 3.0] - BetaMax = 1.0 + 2.0*OC ! alpha of SM00 or OC-mountain sharphess KD05 OC=[10, 0] - - if ( fr <= frlin2 ) then - Betaf= 2.*BetaMax*(frNorm-1.0) - taulee = (1. + Betaf )*taulin - tauhcr - else if ( (fr > frlin2).and.(fr <= frlin3))then - Betaf=-1.+ 1./frnorm/frnorm + & - (BetaMax + 0.555556)*(2.0 - 0.666*frnorm)* (2.0 - 0.666*frnorm) - taulee = (1. + Betaf )*taulin - tauhcr -!============== -! Eck-2010 WRF-alternatve through Dp_surf = P'*grad(h(x,y)) -! 1 < Fr < 2.5 tauwave = taulee+tauogw = tau_dp*(fr)**(-0.9) -! Fr > 2.5 tauwave = tau_dp*(2.5)**(-0.9) -! to apply it need tabulated Dp(fr, Dlin) Dp=function(Dlin, U, N, h) -! -!============== - else - taulee = 0.0 - hdsw = 0.0 - endif - ENDIF - - tautot = tauogw + taulee + taumtb*0. - - IF (taulee > 0.0 ) THEN - - hdsw = sqrt(tautot/coef_h2) ! averaged value for hdsw - mixture of lee+ogw with mkz/kxridge -! -! compute vertical profile "drlee" with the low-level wave breaking & "locally" trapped waves -! make "empirical" height above elvp that may represent DSW-wave breaking & trapping -! here we will assign tau_sso(z) profile between: zblk(zsurf) - zlwb - ztop_sso = ns*sridge -! - call mflow_tauz(levs, up, vp, tp, qp, dp, zpm, zpi, & - pmid, pint, rho, ui, vi, ti, bn2i, bvi, rhoi) - - kph = max(izb, 2) ! kph marks the low-level of wave solutions - klwb = kph ! klwb above blocking marks wave-breaking - kotr = levs+1 ! kotr marks mkz2(z) <= 0., reflection level - - if (do_dtrans) pdtrans = log(tautot/tauogw)/(zpi(krefj) - zpi(kph)) - - udir = max(ui(krefj)*xn +vi(krefj)*yn, velmin) - hogwi = hogw*hogw* rhohm/rhoi(krefj) * umag/udir * bnv/bvi(krefj) - umd(krefj) = udir - - udir = max(ui(kph)*xn +vi(kph)*yn, velmin) - hdswi = hdsw*hdsw* rhohm/rhoi(kph) * umag/udir * bnv/bvi(kph) - umd(kph) = udir - ! what we can put between k =[kph:krefj] - phmkz(:) = 0.0 ! - phmkz(kph-1) = fr ! initial Phase of the low-level wave -! -! now transfer tau_layer => tau_level assuming tau_layer = tau_level -! kx*rho_layer*bn_layer*u_layer* HL*HL = kx*rho_top*bn_top*u_top * HT*HT -! apply it for both hdsw & hogw with linear saturation-solver for Cx =0 -! - loop_lwb_otr: do k=kph+1, krefj ! levs - - umd(k) = max(ui(k)*xn +vi(k)*yn, velmin) - umd2 =(coro- umd(k))*(coro- umd(k)) - umd2 = max(umd2, dw2min) -c2f2 - - - if (umd2 <= 0.0) then -! -! critical layer -! - klwb = k - kotr = k - exit loop_lwb_otr - endif - - mkz2 = bn2i(k)/umd2 - kx2 - - if ( mkz2 >= mkz2min ) then -! -! find klwb having some "kinematic" phase "break-down" crireria SM00 or LM97 -! at finest vertical resolution we can meet "abrupt" mkz -! mkzmax = 6.28/(2*dz), mkzmin = 6.28/ztrop=18km -! to regularize SG-solution mkz = max(mkzmax, min(mkz,in, mkz)) -! - mkz = sqrt(mkz2) - hdswz = hdswi* rhoi(k-1)/rhoi(k) * umd(k-1)/umd(k) * bvi(k-1)/bvi(k) - udswz = hdswz *bn2i(k) -!=========================================================================================== -!linsat wave ampl.: mkz*sqrt(hdswz) <= 1.0 or udswz <= linsat2*umd2 -! -! tautot = tausat = rhoi(k) *udswz_sat * kxridge/mkz -! by k = krefj tautot = tauogw(krefj) -!=========================================================================================== - if (do_klwb_phase) then - phmkz(k) = phmkz(k-1) + mkz*(zpm(k)-zpm(k-1)) - if( ( phmkz(k) .ge. zbr_pi).and.(klwb == kph)) then - klwb = min(k, krefj) - exit loop_lwb_otr - endif - endif - else ! mkz2 < mkz2min - kotr = k ! trapped/reflected waves / - exit loop_lwb_otr - endif - enddo loop_lwb_otr -! -! define tau_src(1:zblk:klwb) = sum(tau_oro+tau_dsw+tau_ogw) and define drlee -! tau_trapped ??? -! - if (do_klwb_phase) then - do k=kph, kotr-1 - - if (klwb > kph .and. k < klwb) then - drlee(k) = (tautot -tauogw)/(zpi(kph) - zpi(klwb)) ! negative Ax*rho - tau_src(k) = tautot + (zpi(k) - zpi(klwb))*drlee(k) - drlee(k) = drlee(k)/rho(k) - else if ( k >= klwb .and. k < kotr) then - tau_src(k) = tauogw - drlee(k) = 0.0 - endif - enddo - kdswj = klwb ! assign to the "low-level" wave breaking - endif -! -! simplest exponential transmittance d(tau)/dz = - pdtrans *tau(z) -! more complicated is dissipative saturation pdtrans =/= constant -! - if (do_dtrans) then - do k=kph, krefj - tau_src(k)= tautot*exp(-pdtrans*(zpi(k)-zpi(kph))) - drlee(k) = -tau_src(k)/rho(k) * pdtrans - enddo - endif - - - ENDIF !taulee > 0.0 - - - endif !strver -! - -!========================================================================= - if (strver == 'gfs_2018' .or. strver == 'kd_2005') then -!========================================================================= -! -! orowaves: OGW+DSW/Lee -! - efact = (oa + 2.0) ** (ceofrc*fr) - efact = min( max(efact,efmin), efmax ) - coefm = (1. + clx) ** (oa+1.) - - kxlinv = min (kxw, coefm * cleff) ! does not exceed 42km ~4*dx - kxlinv = coefm * cleff - tem = fr * fr * oc - gfobnv = gmax * tem / ((tem + cg)*bnv) ! g/n0 -!========================================================================= -! source fluxes: taulin, taufrb -!========================================================================= - tautot = kxlinv * rhohm * umag * umag *umag* gfobnv * efact - - coef_h2 = kxlinv *rhohm * bnv*umag - taulin = coef_h2 *hamp*hamp - hcrit = fcrit_gfs*umag/bnv - tauhcr = coef_h2 *hcrit*hcrit - - IF (fr <= fcrit_gfs) then - tauogw = taulin - tautot = taulin - taulee = 0. - drlee(:) = 0. - ELSE !fr > fcrit_gfs - tauogw = tauhcr - taulee = max(tautot - tauogw, 0.0) - if (taulee > 0.0 ) hdsw = sqrt(taulee/coef_h2) -! approximate drlee(k) between [izb, klwb] -! find klwb and decrease taulee(izb) => taulee(klwb) = 0. -! above izb tau - if (mkz2 > mkz2min.and. krefj > 2 .and. taulee > 0.0) then - - mkz = sqrt(mkz2) - call mflow_tauz(levs, up, vp, tp, qp, dp, zpm, zpi, & - pmid, pint, rho, ui, vi, ti, bn2i, bvi, rhoi) - - kph = max(izb, 2) - phmkz(:) = 0.0 - klwb = max(izb, 1) - kotr = levs+1 - phmkz(kph-1) = fr ! initial Phase of the Lee-OGW - - loop_lwb_gfs18: do k=kph, levs - - umd(k) = max(ui(k)*xn +vi(k)*yn, velmin) - umd2 =(coro- umd(k))*(coro- umd(k)) - umd2 = max(umd2, velmin*velmin) - mkz2 = bn2i(k)/umd2 - kx2 - if ( mkz2 > mkz2min ) then - mkz = sqrt(mkz2) - frlocal = max(hdsw*bvi(k)/umd(k), frlwb) - phmkz(k) = phmkz(k-1) + mkz*(zpm(k)-zpm(k-1)) - if( ( phmkz(k) >= zbr_pi ) .and. (frlocal > frlin)) klwb = k - else - kotr = k - exit loop_lwb_gfs18 - endif - enddo loop_lwb_gfs18 -! -! - do k=kph, kotr-1 - - if (klwb > kph .and. k < klwb) then - drlee(k) = -(tautot -tauogw)/(zpi(kph) - zpi(klwb)) - tau_src(k) = tautot + (zpi(k) - zpi(klwb))*drlee(k) - drlee(k) = drlee(k)/rho(k) - else if ( k >= klwb .and. k < kotr) then - tau_src(k) = tauogw - drlee(k) = 0.0 - endif - enddo - kdswj = klwb ! assign to the "low-level" wave breaking - endif ! mkz2 > mkz2min.and. krefj > 2 .and. taulee > 0.0 - ENDIF !fr > fcrit_gfs - - - ENDIF !strbase='gfs2017' .or. strbase='kd_2005' - - -! output : taulin, taufrb, taulee, xn, yn, umag, kxw/kxridge -! print *, krefj, levs, tauogw, tautot , ' ugwp_taub_oro ' -! - end subroutine ugwp_taub_oro -! -!-------------------------------------- -! -! call ugwp_oro_lsatdis( krefj, levs, tauogw(j), tautot(j), tau_src, kxw, & -! fcor(j), c2f2(j), up, vp, tp, qp, dp, zpm, zpi, pmid1, pint1, & -! xn, yn, umag, drtau, kdis_oro) - - subroutine ugwp_oro_lsatdis( krefj, levs, tauogw, tautot, tau_src, & - kxw, fcor, kxridge, up, vp, tp, qp, dp, zpm, zpi, pmid, pint, & - xn, yn, umag, drtau, kdis) - - use ugwp_common, only : bnv2min, grav, pi, pi2, dw2min, velmin, rgrav - use cires_ugwp_module, only : frcrit, ricrit, linsat, hps, rhp1, rhp2 - use cires_ugwp_module, only : kvg, ktg, krad, kion - use ugwp_oro_init, only : coro , fcrit_sm , fcrit_sm2 - implicit none -! - integer, intent(in) :: krefj, levs - real , intent(in) :: tauogw, tautot, kxw - real , intent(in) :: fcor - - real , dimension(levs+1) :: tau_src - - real, dimension(levs) , intent(in) :: up, vp, tp, qp, dp, zpm - real, dimension(levs+1), intent(in) :: zpi, pmid, pint - real , intent(in) :: xn, yn, umag - real , intent(in) :: kxridge - - - real, dimension(levs), intent(out) :: drtau, kdis -! -! locals -! - real :: uref, udir, uf2, ufd, uf2p - real, dimension(levs+1) :: tauz - real, dimension(levs) :: rho - real, dimension(levs+1) :: ui, vi, ti, bn2i, bvi, rhoi - - integer :: i, j, k, kcrit, kref - real :: kx2, kx2w, kxs - real :: mkzm, mkz, dkz, mkz2, ch, kzw3 - real :: wfdM, wfdT, wfiM, wfiT - real :: fdis, mkzi, keff_m, keff_t - real :: betadis, betam, betat, cdfm, cdft - real :: fsat, hsat, hsat2, kds , c2f2 - - drtau(1:levs) = 0.0 - kdis (1:levs) = 0.0 - - ch = coro - - kx2w = kxw*kxw - kx2 = kxridge*kxridge - if( kx2 < kx2w ) kx2 = kx2w - kxs = sqrt(kx2) - c2f2 = fcor*fcor/kx2 -! -! non-hydrostatic LinSatDis for Ch = 0 (with set of horizontal wavenumber kxw) -! -! print *, krefj, levs, tauogw, tautot , ' orolsatdis ' - call mflow_tauz(levs, up, vp, tp, qp, dp, zpm, zpi, & - pmid, pint, rho, ui, vi, ti, bn2i, bvi, rhoi) -!=============================================================================== -! for stationary oro-GWs only "single"-azimuth cd = 0 -(-Udir) = Udir > 0 -! rotational/non-hyrostatic effects are important only for high-res runs -! Udir = 0, Udir < 0 are not -! future"revisions" shear effects for d mkz /dt = -kxw*dU/dz -! horizontal wavelength spectra mkz2 = l2 -kxw(n)*kxw(n) -! stochastic "tauogw'-setup+ sigma_tau ; -! 3D-wave effects 1+ (k/l)^2 and NS vs EW orowaves -! target is to get "multiple"-saturation levels for OGWs -!=============================================================================== - tauz(1:krefj) = tauogw ! constant flux for OGW-packet or single mode - ! sign of tauz > 0...and its attenuate with Z - k = krefj - uref = ui(k)*xn +vi(k)*yn - ch ! stationary waves - uf2 = uref*uref - c2f2 - if (uf2 > 0) then - mkz2 = bn2i(k)/uf2 -kx2 - if (mkz2.gt.0) then - mkzm = sqrt(mkz2) - else - return ! wave reflection mkz2 <=0. - endif - else - return ! wave absorption uf2 <= 0. - endif -! -! upward solver for single "mode" with tauz(levs+1) =0. at the top -! - kds = 0.1* kvg(krefj) ! eddy wave diffusion from the previous layer - kcrit = levs - do k= krefj+1, levs -! -! 2D-wave propagation along reference-wind direction -! udir = 0 critical wind for coro =0 -! cdop = -uref .... upwind waves travel against MF -! - udir = ui(k)*xn +vi(k)*yn - uf2 = udir*udir - c2f2 - - - if (uf2 < dw2min .or. udir <= 0.0) then - kcrit =K - tauz(kcrit:levs) = 0. - exit ! vert-level loop - endif -! -! wave-based solution -! - mkz2 = bn2i(k)/uf2 -kx2 - if (mkz2 > 0) then - mkzm = sqrt(mkz2) -! -! do dissipative flux vs saturation: kvg, ktg, krad, kion -! - kzw3 = mkzm*mkz2 -! - keff_m = kvg(k)*mkz2 + kion(k) -! keff_t = kturb(k)*iPr_turb + kmol(k)*iPr_mol - keff_t = ktg(k)*mkz2 + krad(k) -! -! - uf2p = uf2 + 2.0*c2f2 - betadis = uf2/uf2p - betaM = 1.0 / (1.0+betadis) ! if c2f2 = 0. betaM = betaT =0.5 ekw = epw - betaT = 1.0- BetaM - -! -!imaginary frequencies of momentum and heat with "kds at (k-1) level" -! - wfiM = kds*mkz2 + keff_m - wfiT = kds*mkz2 + keff_t -! - cdfm = sqrt(uf2)*kxs - cdft = abs(udir)*kxs - wfdM = wfiM/cdfm *BetaM - wfdT = wfiT/Cdft *BetaT - mkzi = 2.0*mkzm*(wfdM+wfdT) - - fdis = tauz(k-1)*exp(-mkzi*(zpi(k)-zpi(k-1)) ) - tauz(k) = fdis - hsat2 = fcrit_sm2 * uf2 *bn2i(k) - fsat = rhoi(k)* hsat2 * sqrt(uf2) * bvi(k) - if (fdis > fsat) then - tauz(k) = min(fsat, tauz(k-1)) -!================================================================= -! two definitions for eddy mixing of MF: -! a) wave damping-Lindzen : Ked ~ kx/(2H)*(u-c)^4/N^3 -! b) heat-based turbulence: 4/3 Richardson Ked ~eps^1/3 *Lt^4/3 -!================================================================= - kds = rhp2*kxs*uf2*uf2/bn2i(k)/bvi(k) - kdis(k) = kds - endif - else - tauz(k:levs) = 0. ! wave is reflected above - kds = 0. - endif - enddo - - do k=krefj+1, kcrit - drtau(k) = rgrav*(tauz(k+1)-tauz(k))/dp(k) - enddo -! -! - end subroutine ugwp_oro_lsatdis -! -! - subroutine ugwp_tofd(im, levs, sigflt, elvmax, zpbl, u, v, zmid, & - utofd, vtofd, epstofd, krf_tofd) - use machine , only : kind_phys - use ugwp_common , only : rcpd2 - use ugwp_oro_init, only : n_tofd, const_tofd, ze_tofd, a12_tofd, ztop_tofd -! - implicit none -! - integer :: im, levs - real(kind_phys), dimension(im, levs) :: u, v, zmid - real(kind_phys), dimension(im) :: sigflt, elvmax, zpbl - real(kind_phys), dimension(im, levs) :: utofd, vtofd, epstofd, krf_tofd -! -! locals -! - integer :: i, k - real :: sgh = 30. - real :: sgh2, ekin, zdec, rzdec, umag, zmet, zarg, zexp, krf -! - utofd =0.0 ; vtofd = 0.0 ; epstofd =0.0 ; krf_tofd =0.0 -! - - do i=1, im - - zdec = max(n_tofd*sigflt(i), zpbl(i)) - zdec = min(ze_tofd, zdec) - rzdec = 1.0/zdec - sgh2 = max(sigflt(i)*sigflt(i), sgh*sgh) - - do k=1, levs - zmet = zmid(i,k) - if (zmet > ztop_tofd) cycle - ekin = u(i,k)*u(i,k) + v(i,k)*v(i,k) - umag = sqrt(ekin) - zarg = zmet*rzdec - zexp = exp(-zarg*sqrt(zarg)) - krf = const_tofd* a12_tofd *sgh2* zmet ** (-1.2) *zexp - utofd(i,k) = -krf*u(i,k) - vtofd(i,k) = -krf*v(i,k) - epstofd(i,k)= rcpd2*krf*ekin ! more accurate heat/mom form using "implicit tend-solver" - ! to update momentum and temp-re - krf_tofd(i,k) = krf - enddo - enddo -! - end subroutine ugwp_tofd -! -! - subroutine ugwp_tofd1d(levs, sigflt, elvmax, zsurf, zpbl, u, v, & - zmid, utofd, vtofd, epstofd, krf_tofd) - use machine , only : kind_phys - use ugwp_common , only : rcpd2 - use ugwp_oro_init, only : n_tofd, const_tofd, ze_tofd, a12_tofd, ztop_tofd -! - implicit none - integer :: levs - real(kind_phys), dimension(levs) :: u, v, zmid - real(kind_phys) :: sigflt, elvmax, zpbl, zsurf - real(kind_phys), dimension(levs) :: utofd, vtofd, epstofd, krf_tofd -! -! locals -! - integer :: i, k - real :: sghmax = 5. - real :: sgh2, ekin, zdec, rzdec, umag, zmet, zarg, ztexp, krf -! - utofd =0.0 ; vtofd = 0.0 ; epstofd =0.0 ; krf_tofd =0.0 -! - zdec = max(n_tofd*sigflt, zpbl) ! ntimes*sgh_turb or Zpbl - zdec = min(ze_tofd, zdec) ! cannot exceed 18 km - rzdec = 1.0/zdec - sgh2 = max(sigflt*sigflt, sghmax*sghmax) ! 25 meters dz-of the first layer - - do k=1, levs - zmet = zmid(k)-zsurf - if (zmet > ztop_tofd) cycle - ekin = u(k)*u(k) + v(k)*v(k) - umag = sqrt(ekin) - zarg = zmet*rzdec - ztexp = exp(-zarg*sqrt(zarg)) - krf = const_tofd* a12_tofd *sgh2* zmet ** (-1.2) *ztexp - - utofd(k) = -krf*u(k) - vtofd(k) = -krf*v(k) - epstofd(k) = rcpd2*krf*ekin ! more accurate heat/mom form using "implicit tend-solver" - ! to update momentum and temp-re; epstofd(k) can be skipped - krf_tofd(k) = krf - enddo -! - end subroutine ugwp_tofd1d diff --git a/physics/cires_vert_orodis_v1.F90 b/physics/cires_vert_orodis_v1.F90 deleted file mode 100644 index 852c114b0..000000000 --- a/physics/cires_vert_orodis_v1.F90 +++ /dev/null @@ -1,1047 +0,0 @@ -module cires_vert_orodis_v1 - - -contains - - -! subroutine ugwp_drag_mtb -! subroutine ugwp_taub_oro -! subroutine ugwp_oro_lsatdis -! - subroutine ugwp_drag_mtb( iemax, nz, & - elvpd, elvp, hprime , sigma, theta, oc, oa4, clx4, gam, zpbl, & - up, vp, tp, qp, dp, zpm, zpi, pmid, pint, idxzb, drmtb,taumtb) - - use ugwp_common_v1, only : bnv2min, grav, grcp, fv, rad_to_deg, dw2min, velmin, rdi - use ugwp_oro_init_v1, only : nridge, cdmb, fcrit_mtb, frmax, frmin, strver - - implicit none -!======================== -! several versions for drmtb => high froude mountain blocking -! version 1 => vay_2018 ; -! version 2 => kdn_2005 ; Kim & Doyle in NRL-2005 -! version 3 => ncep/gfs-2017 -gfs_2017 with lm1997 -!======================== -! real, parameter :: Fcrit_mtb = 0.7 - - integer, intent(in) :: nz - integer, intent(in) :: iemax ! standard ktop z=elvpd + 4 * hprime - real , intent(out) :: taumtb - - integer , intent(out) :: idxzb - real, dimension(nz), intent(out) :: drmtb - - real, intent(in) :: elvp, elvpd !elvp = min (elvpd + sigfac * hprime(j), hncrit=10000meters) - real, intent(in) :: hprime , sigma, theta, oc, oa4(4), clx4(4), gam - real, intent(in) :: zpbl - - real, dimension(nz), intent(in) :: up, vp, tp, qp, dp, zpm, pmid - real, dimension(nz+1), intent(in) :: zpi, pint - - ! character(len=*), intent(out) :: errmsg - ! integer, intent(out) :: errflg -! - real, dimension(nz+1) :: zpi_zero - real, dimension(nz) :: zpm_zero - real :: vtj, rhok, bnv2, rdz, vtkp, vtk, dzp - - real, dimension(nz) :: bn2, uds, umf, cosang, sinang - - integer :: k, klow, ktop, kpbl - real :: uhm, vhm, bn2hm, rhohm, & - mtb_fix, umag, bnmag, frd_src, & - zblk, who_iz_normal, rlm97, & - phiang, ang, pe, ek, & - cang, sang, ss2, cs2, zlen, dbtmp, & - hamp, bgamm, cgamm - - - ! Initialize CCPP error handling variables - ! errmsg = '' - ! errflg = 0 - -!================================================== -! -! elvp + hprime <=>elvp + nridge*hprime, ns =2 -! ns = sigfac -! tau_parel & tau_normal along major "axes" -! -! options to block the "flow", choices for [klow, ktop] -! -! 1-directional (normal) & 2-directional "blocking" -! -!================================================== -! no - blocking: drmtb(1:nz) = 0.0 -!================= - idxzb = -1 - drmtb(1:nz) = 0.0 - taumtb = 0.0 - klow = 2 - - ktop = iemax - hamp = nridge*hprime - -! reminder: cdmb = 4.0 * 192.0/float(imx)*cdmbgwd(1) Lellipse= a/2=sigma/hprime - - mtb_fix = cdmb*sigma/hamp !hamp ~ 2*hprime and 1/sigfac = 0.25 is inside 1/hamp - - ! if (mtb_fix == 0.) then - ! write(errmsg,'(*(a))') cdmb, sigma, hamp, ' MTB == 0' - ! errflg = 1 - ! return - ! endif - - if (strver == 'vay_2018') then - - zpm_zero = zpm - zpi(1) - zpi_zero = zpi - zpi(1) - - do k=1, nz-1 - if (hamp .le. zpi_zero(k+1) .and. (hamp .gt. zpi_zero(k) ) ) then - ktop = k+1 !......simply k+1 next interface level - exit - endif - enddo -! print *, klow, ktop, ' klow-ktop ' - call um_flow(nz, klow, ktop, up, vp, tp, qp, dp, zpm, zpi, pmid, pint, & - bn2, uhm, vhm, bn2hm, rhohm) - - umag = max(sqrt(uhm*uhm + vhm*vhm), velmin) !velmin=dw2min =1.0 m/s - ! if (bn2hm .le. 0.0) then - ! write(errmsg,'(*(a))') 'unstable MF for MTB - RETURN ' - ! errflg = 1 - ! return ! unstable PBL - ! end if - - bnmag =sqrt(bn2hm) - - frd_src = min(hamp*bnmag/umag, frmax) ! frmax =10. - -! print *, frd_src, Fcrit_mtb/frd_src, ' no-Blocking > 1 ' -! - if ( frd_src .le. Fcrit_mtb) RETURN ! no-blocking, although on small ridges with weak winds can be blocking -! -! zblk > 0 -! Fcrit_mtb > Fcrit_ogw h_clip = Fr_mtb*U/N ! h_hill minus h_clip = zblk -! - zblk = hamp*(1. - Fcrit_mtb/frd_src) - idxzb =1 - do k = 2, ktop - - if ( zblk < zpm_zero(k) .and. zblk >= zpm_zero(k-1)) then - idxzb = k - exit - endif - enddo -! - if (idxzb == 1) RETURN ! first surface level block is not "important" - - if (idxzb > 1) then ! let start with idxzb = 2....and up with LM1997 -! -! several options to compute MTB-drag: a) IFS_1997 ; b) WRF_KD05 ; c) SJM_2000 -! - bgamm = 1.0 - 0.18*gam -0.04*gam*gam - cgamm = 0.48*gam +0.3*gam*gam - - do k = 1, idxzb-1 - zlen = sqrt( (zblk - zpm_zero(k) ) / ( zpm_zero(k) +hprime )) - - umag = max(sqrt(up(k)*up(k) + vp(k)*vp(k)), velmin) - - phiang = atan(vp(k)/umag) -! theta -90/90 - ang = theta - phiang - cang = cos(ang) ; sang = sin(ang) - - who_iz_normal = max(cang, gam*sang ) !gfs-2018 - - cs2 = cang* cang ; ss2 = 1.-cs2 - - rlm97 =(gam * cs2 + ss2)/ (cs2 + gam * ss2) ! ... (cs2 + gam * ss2) / (gam * cs2 + ss2) ! check it -! - if (rlm97 > 2.0 ) rlm97 = 2.0 ! zero mtb-friction at this level -! - - who_iz_normal = bgamm*cs2 + cgamm*ss2 ! LM1997/IFS - - dbtmp = mtb_fix* max(0., 2.- rlm97)*zlen*who_iz_normal - if (dbtmp < 0) dbtmp = 0.0 -! -! several approximation can be made to implement MTB-drag -! as a "nonlinear level dependent"-drag or "constant"-drag -! uds(k) == umag = const between the 1-layer and idxzb -! - - drmtb(k) = dbtmp * abs(umag) ! full mtb-drag = -drmtb(k) * uds = -kr*u - taumtb = taumtb - drmtb(k)*umag *rdi * pmid(k)/tp(k)*(zpi(k+1)-zpi(k)) -! -! 2-wave appr for anisotropic drmtb_Bellipse(k) and drmtb_Aell(k) can be used -! with Umag-projections on A & B ellipse axes -! mtb_fix =0.25*cdmb*sigma/hprime, -! in SM-2000 mtb_fix~ 1/8*[cdmb_A, cdmb_B]*sigma/hprimesum ( A+B) = 1/4. -! -!333 format(i4, 7(2x, F10.3)) -! write(6,333) , k, zpm_zero(k), zblk, hamp*Fcrit_mtb/frd_src, taumtb*1.e3, drmtb(k) , -drmtb(k)*up(k)*1.e5 - enddo -! - endif - endif ! strver=='vay_2018' -! -! -! - if (strver == 'kdn_2005' .or. strver == 'wrf_2018' ) then - - print *, ' kdn_2005 with # of hills ' -! -! compute flow-blocking stress based on WRF 'gwdo2d' -! - endif -! -! - if (strver == 'gfs_2018') then - - ktop = iemax; klow = 2 - - call um_flow(nz, klow, ktop, up, vp, tp, qp, dp, zpm, zpi, pmid, pint, & - bn2, uhm, vhm, bn2hm, rhohm) - if (bn2hm <= 0.0) RETURN ! unstable PBL -!--------------------------------------------- -! -!'gfs_2018' .... does not rely on Fr_crit -! and Fr-regimes -!----gfs17 for mtn ignores "averaging of the flow" -! for MTB-part it is only works with "angles" -! no projections on [uhm, vhm] -direction -! kpbl can be used for getting high values of iemax-hill -!----------------------------------------------------------- - zpm_zero = zpm - zpi(1) - zpi_zero = zpi - zpi(1) - do k=1, nz-1 - if (zpbl .le. zpm_zero(k+1) .and. (zpbl .ge. zpm_zero(k) ) ) then - kpbl = k+1 - exit - endif - enddo - - do k = iemax, 1, -1 - - uds(k) = max(sqrt(up(k)*up(k) + vp(k)*vp(k)), velmin) - phiang = atan(vp(k)/uds(k)) - ang = theta - phiang - cosang(k) = cos(ang) - sinang(k) = sin(ang) - - if (idxzb == 0) then - pe = pe + bn2(k) * (elvp - zpm(k)) *(zpi(k+1) - zpi(k)) - umf(k) = uds(k) * cosang(k) ! normal to main axis - ek = 0.5 * umf(k) * umf(k) -! -! --- dividing stream lime is found when pe =>exceeds ek first from the "top" -! - if (pe >= ek) idxzb = k - exit - endif - enddo - -! idxzb = min(kpbl, idxzb) -! -! -! -! last: mtb-drag -! - if (idxzb > 1) then - zblk = zpm(idxzb) - print *, zpm(idxzb)*1.e-3, ' mtb-gfs18 block-lev km ', idxzb, iemax, int(elvp) - do k = idxzb-1, 1, -1 -! - zlen = sqrt( (zblk - zpm_zero(k) ) / ( zpm_zero(k) +hprime )) - cs2 = cosang(k)* cosang(k) - ss2 = 1.-cs2 - rlm97 =(gam * cs2 + ss2)/ (cs2 + gam * ss2) ! (cs2 + gam * ss2) / (gam * cs2 + ss2) ! check it - - who_iz_normal = max(cosang(k), gam*sinang(k)) -! -! high res-n higher mtb 0.125 => 3.5 ; (negative of db -- see sign at tendency) -! - dbtmp = mtb_fix* max(0., 2.- rlm97)*zlen*who_iz_normal - - drmtb(k) = dbtmp * abs(uds(k)) ! full mtb-drag = -drmtb(k) * uds = -kr*u -! - taumtb = taumtb - drmtb(k) * uds(k) *rdi * pmid(k)/tp(k)*(zpi(k+1)-zpi(k)) -! - enddo - endif - endif ! strver=='gfs17' -! -! - end subroutine ugwp_drag_mtb -! -! -! ugwp_taub_oro - Computes [taulin, taufrb, drlee(levs) ] -! -! - subroutine ugwp_taub_oro(levs, izb, kxw, tau_izb, fcor, & - hprime , sigma, theta, oc, oa4, clx4, gamm, & - elvp, up, vp, tp, qp, dp, zpm, zpi, pmid, pint, xn, yn, umag, & - tautot, tauogw, taulee, drlee, tau_src, kxridge, kdswj, krefj, kotr) -! - use ugwp_common_v1, only : bnv2min, grav, pi, pi2, dw2min, velmin - use ugwp_common_v1, only : mkz2min, mkzmin - use cires_ugwp_module_v1, only : frcrit, ricrit, linsat - use ugwp_oro_init_v1, only : hpmax, cleff, frmax - use ugwp_oro_init_v1, only : nwdir, mdir, fdir - use ugwp_oro_init_v1, only : efmin, efmax , gmax, cg, ceofrc - use ugwp_oro_init_v1, only : fcrit_sm, fcrit_gfs, frmin, frmax - use ugwp_oro_init_v1, only : coro, nridge, odmin, odmax - use ugwp_oro_init_v1, only : strver -! - use ugwp_oro_init_v1, only : zbr_pi -! --- -! -! define oro-GW fluxes: taulin, taufrb amd if kdswj > 0 (LWB-lee wave breaking) -! approximate for drlee-momentum tendency -! --- - implicit none -! - integer, intent(in) :: levs, izb - real , intent(in) :: tau_izb ! integrated (1:izb) drag -Kr_mtb*U, or Zero - integer, intent(out) :: kdswj, krefj, kotr - integer :: klwb - real, intent(in) :: kxw, fcor - real, intent(in) :: hprime, sigma, theta, oc, gamm, elvp - -! - real, intent(in) :: oa4(4), clx4(4) - - real, dimension(levs), intent(in) :: up, vp, tp, qp, dp - real, dimension(levs+1), intent(in) :: zpi, pint - real, dimension(levs ), intent(in) :: zpm, pmid -! - real,dimension(levs), intent(out) :: drlee - real,dimension(levs+1), intent(out) :: tau_src -! - real, intent(out) :: tauogw, tautot, taulee - real :: taulin, tauhcr, taumtb - real, intent(out) :: xn, yn, umag, kxridge -! -! -! locals -! four possible versions to compute "taubase as a function of Fr-number" -! character :: strver='smc_2000' ! 'kd_2005', 'gfs_2017', 'vay_2018' -! - real, dimension(levs+1) :: zpi_zero - - real :: oa, clx, odir, cl4p(4), clxp - - real :: uhm, vhm, bn2hm, rhohm, bnv - - real :: elvpMTB, wdir - real :: tem, efact, coefm, kxlinv, gfobnv - - real :: fr, frlin, frlin2, frlin3, frlocal, dfr - real :: betamax, betaf, frlwb, frmtb - integer :: klow, ktop, kph - - integer :: i, j, k, nwd, ind4, idir - - real :: sg_ridge, kx2, umd2 - real :: mkz, mkz2, zbr_mkz, mkzi - - real :: hamp ! clipped hprime*elvmax/elv_clip > hprime - real :: hogw ! hprime or hamp for free-prop OGWs z > z(krefj) - real :: hdsw ! empirical like DNS amplitudes for Lee-dsw trapped waves - real :: hcrit - real :: hblk ! blocking div-stream height - - real :: coef_h2, frnorm - - - real, dimension(levs) :: bn2 - real :: rho(levs) - real, dimension(levs+1) :: ui, vi, ti, bn2i, bvi, rhoi - real, dimension(levs+1) :: umd, phmkz - real :: c2f2, umag2, dzwidth, udir - real :: hogwi, hdswi, hogwz, hdswz ! height*height wave-amp - real :: uogwi, udswi, uogwz, udswz ! wind2 wave-rms - real, dimension(levs+1) :: dtrans, deff - real :: pdtrans - logical :: do_klwb_phase = .false. ! phase-crireria for LLWB of SM00 - logical :: do_dtrans = .true. ! dissipative saturation to deposit momentum - ! between ZMTB => ZHILL -!----------------------------------------------------------------------------- -! -! downslope/lee/GW wave regimes kdswj: between ZMTB and ZOGW(krefj) -! ZMTB < ZOGW = ns*HPRIME < ELVP -! define krefj as a level for OGWs above ZMTB and "2-3-4*hprime" + ZMTB -! we rely on the concept of the "CLIPPED-SG" mountain above ZMTB & new -! inverse Froude number for the "mean flow" averaged from ZMTB to ZOGW -! here we can use "elvp" as only for hprime adjustment ...elvp/elvp_MTB -! -!"empirical" specification of tauwave = taulee+tauogw in [ZMTB : ns*HPRIME] -! can be based on numerical runs like WRF-model -! for Frc < Fr< [Frc : 2.5-3 Frc] -! see suggestions proposed in SM-2000 and Eckermann et al. (2010) -!----------------------------------------------------------------------------- - tautot = 0. ; taulin = 0. ; taulee = 0. ; drlee(1:levs) = 0. ; tau_src = 0.0 - krefj = 1 ; kotr = levs+1; kdswj = 1 - xn = 1.0 ; yn = 0. ; umag = velmin; kxridge = kxw - - dtrans = 0. ; deff =0. - klow = 2 - elvpMTB = elvp -! -! clipped mountain H-zmtb for estimating wave-regimes new Fr and MF above ZMTB -! - if (izb > 0 ) then - klow = izb - elvpMTB = max(elvp - zpi(izb), 0.0) - endif - if (elvpMTB <=0 ) print *, ' blocked flow ' - if (elvpMTB <=0 ) return ! "blocked flow" from the surface to elvMAX - - zpi_zero(:) = zpi(:) - zpi(1) - hblk = zpi_zero(klow) - - sg_ridge = max( nridge*hprime * (elvp/elvpMTB), hblk+hprime*0.333) - -! -! enhance sg_ridge by elvp/elvpMTB >1 and H_clip = H-hiilnew - zblk later for hamp -! - sg_ridge = min(sg_ridge, hpmax) - -! print *, 'sg_ridge ', sg_ridge - - do k=1, levs - if (sg_ridge .gt. zpi_zero(k) .and. ( sg_ridge .le. zpi_zero(k+1) ) ) then - ktop = k+1 - exit - endif - enddo - - krefj = ktop ! the mountain top index for sg_ridge = ns*hprime - -! if ( izb > 0 .and. krefj .le. izb) then -! print *, izb, krefj, sg_ridge, zpi_zero(izb), ' izb >ktop ' -! endif - -! -! here ktop displays sg_ridge-position not elvP !!!! klow =2 to avoid for 127-126L -! instability due to extreme "thin" layer...128L-model needs cruder vertical resolution -! - call um_flow(levs, klow, ktop, up, vp, tp, qp, dp, zpm, zpi, pmid, pint, & - bn2, uhm, vhm, bn2hm, rhohm) - - call get_unit_vector(uhm, vhm, xn, yn, umag) - - if (bn2hm <= 0.0) RETURN ! "unstable/neutral" hill need different treatment - bnv = sqrt(bn2hm) - hamp = sg_ridge-zpi_zero(klow) ! hamp >= nridge*hprime due higher SG-elevations - zblk or first layer - hogw = hamp - hdsw = hamp - - - fr = bnv * hamp /umag - fr = min(fr, frmax) - kxridge = max(sigma/hamp, kxw) ! to get rid from "SSO-errors" kxw-provides max-value for kx - kx2 = kxridge*kxridge - umag = max( umag, velmin) - c2f2 = fcor*fcor/kx2 - umag2 = umag*umag - c2f2 - - if (umag2 <= 0.0) RETURN ! Coriolis cut-off at high-mid latitudes for low kx - - mkz2 = bn2hm/umag2 - kx2 ! we add Coriolis corrections for crude model resolutions "low-kx" - ! and non-stationary waves coro, fcor for small umag - ! bn2hm/[(coro-umag)^2 -fc2/kx2] - kx2, cf = fc/kx => 2 m/s to 11 m/s for 60deg - IF (mkz2 < mkz2min .or. krefj <= 2 ) THEN -! -! case then no effects of wave-orography -! - krefj = 1 ; kdswj = 1; kotr = levs ; klwb = 1 - tautot = 0. - tauogw = 0. - taulee = 0. - drlee = 0. ; tau_src(1:levs+1) = 0. - return - ENDIF -!========================================================================= -! find orographic asymmetry and convexity :'oa/clx' for clipped SG-hill -! nwd 1 2 3 4 5 6 7 8 -! wd w s sw nw e n ne se -! make sure that SM_00 and KD_05 oro-characteristics can match each other -! OD-KDO5 = Gamma=a/b [0:2] ; hsg = 2.*hprime -! OC-KD05 mount sharpness sigma^4 "height to half-width"[0:1] -! alph-SM00 fraction of h2d contributed to hprime [0:1] -! -! OA-KDO5 OA > dwstream OA=0 sym OA < 0 upstram [-1. 0. 1] -! delt-SM00 dw/up asymmetry -1 < delta < 1 -! Gamma-LM97 anisotropy of the orography g2 =(dh/dx)^2/(dh/dy)^2 -!.. -!A parametrization of low-level wave breaking which includes a dependence on -!the degree of 2-dimensionality of SG; it is active over a finite range of Fr -!========================================================================= - wdir = atan2(uhm,vhm) + pi - idir = mod( int(fdir*wdir),mdir) + 1 - - nwd = nwdir(idir) - ind4 = mod(nwd-1,4) + 1 - if (ind4 < 1 ) ind4 = 1 - if (ind4 > 4 ) ind4 = 4 - - oa = ( 1-2*int( (nwd-1)/4 )) * oa4(ind4) - clx = clx4(ind4) - cl4p(1) = clx4(2) - cl4p(2) = clx4(1) - cl4p(3) = clx4(4) - cl4p(4) = clx4(3) - clxp = cl4p(ind4) - - odir = clxp/max(clx, 1.e-5) ! WRF-based definition for "odir" - - odir = min(odmax, odir) - odir = max(odmin, odir) - - - if (strver == 'smc_2000' .or. strver == 'vay_2018') then -!========================================================================= -! -! thrree-piece def-n for tautot(Fr): 0-Fr_lin - Fr_lee -Fr_mtb -! taulin/tauogw taulee taumtb -! here tau_src(levs+1): approximate wave flux from surface to LLWB -! Following attempts of Scinocca +McFarlane, 2000 & Eckermann etal.(2010) -!========================================================================= -! -! if (mkz2 < 0)... mkzi = sqrt(-mkz2) trapped wave regime don't a case in UGWP-V1 -! wave flux ~ rho_src*kx_src/mkz_src*wind_rms -! bn2, uhm, vhm, bn2hm, rhohm -! -! IF (mkz2.ge. mkz2min .and. krefj > 2 ) THEN -! -! wave regimes -! - mkz = sqrt(mkz2) - frlwb = fcrit_sm ! should be higher than LOGW to get zblk < zlwb - frlin = fcrit_sm - frlin2 = 1.5*fcrit_sm - frlin3 = 3.0*fcrit_sm - - hcrit = fcrit_sm*umag/bnv - hogw = min(hamp, hcrit) - hdsw = min(hamp, frlwb*umag/bnv) ! no trapped-wave solution - - coef_h2 = kxridge * rhohm * bnv * umag - - taulin = coef_h2 * hamp*hamp - tauhcr = coef_h2 * hcrit*hcrit - - IF (fr < frlin ) then - tauogw = taulin - taulee = 0.0 - taumtb = 0.0 - else if (fr .ge. frlin ) then - tauogw = tauhcr - taulin = coef_h2 * hamp*hamp - taumtb = tau_izb ! integrated form MTB -! -! SM-2000 approach for taulee, shall we put limits on BetaMax_max ~ 20 or Betaf ?? -! - frnorm = fr/fcrit_sm ! frnorm below [1.0 to 3.0] - BetaMax = 1.0 + 2.0*OC ! alpha of SM00 or OC-mountain sharphess KD05 OC=[10, 0] - - if ( fr <= frlin2 ) then - Betaf= 2.*BetaMax*(frNorm-1.0) - taulee = (1. + Betaf )*taulin - tauhcr - else if ( (fr > frlin2).and.(fr <= frlin3))then - Betaf=-1.+ 1./frnorm/frnorm + & - (BetaMax + 0.555556)*(2.0 - 0.666*frnorm)* (2.0 - 0.666*frnorm) - taulee = (1. + Betaf )*taulin - tauhcr -!============== -! Eck-2010 WRF-alternatve through Dp_surf = P'*grad(h(x,y)) -! 1 < Fr < 2.5 tauwave = taulee+tauogw = tau_dp*(fr)**(-0.9) -! Fr > 2.5 tauwave = tau_dp*(2.5)**(-0.9) -! to apply it need tabulated Dp(fr, Dlin) Dp=function(Dlin, U, N, h) -! -!============== - else - taulee = 0.0 - hdsw = 0.0 - endif - ENDIF - - tautot = tauogw + taulee + taumtb*0. - - IF (taulee > 0.0 ) THEN - - hdsw = sqrt(tautot/coef_h2) ! averaged value for hdsw - mixture of lee+ogw with mkz/kxridge -! -! compute vertical profile "drlee" with the low-level wave breaking & "locally" trapped waves -! make "empirical" height above elvp that may represent DSW-wave breaking & trapping -! here we will assign tau_sso(z) profile between: zblk(zsurf) - zlwb - ztop_sso = ns*sridge -! - call mflow_tauz(levs, up, vp, tp, qp, dp, zpm, zpi, & - pmid, pint, rho, ui, vi, ti, bn2i, bvi, rhoi) - - kph = max(izb, 2) ! kph marks the low-level of wave solutions - klwb = kph ! klwb above blocking marks wave-breaking - kotr = levs+1 ! kotr marks mkz2(z) <= 0., reflection level - - if (do_dtrans) pdtrans = log(tautot/tauogw)/(zpi(krefj) - zpi(kph)) - - udir = max(ui(krefj)*xn +vi(krefj)*yn, velmin) - hogwi = hogw*hogw* rhohm/rhoi(krefj) * umag/udir * bnv/bvi(krefj) - umd(krefj) = udir - - udir = max(ui(kph)*xn +vi(kph)*yn, velmin) - hdswi = hdsw*hdsw* rhohm/rhoi(kph) * umag/udir * bnv/bvi(kph) - umd(kph) = udir - ! what we can put between k =[kph:krefj] - phmkz(:) = 0.0 ! - phmkz(kph-1) = fr ! initial Phase of the low-level wave -! -! now transfer tau_layer => tau_level assuming tau_layer = tau_level -! kx*rho_layer*bn_layer*u_layer* HL*HL = kx*rho_top*bn_top*u_top * HT*HT -! apply it for both hdsw & hogw with linear saturation-solver for Cx =0 -! - loop_lwb_otr: do k=kph+1, krefj ! levs - - umd(k) = max(ui(k)*xn +vi(k)*yn, velmin) - umd2 =(coro- umd(k))*(coro- umd(k)) - umd2 = max(umd2, dw2min) -c2f2 - - - if (umd2 <= 0.0) then -! -! critical layer -! - klwb = k - kotr = k - exit loop_lwb_otr - endif - - mkz2 = bn2i(k)/umd2 - kx2 - - if ( mkz2 >= mkz2min ) then -! -! find klwb having some "kinematic" phase "break-down" crireria SM00 or LM97 -! at finest vertical resolution we can meet "abrupt" mkz -! mkzmax = 6.28/(2*dz), mkzmin = 6.28/ztrop=18km -! to regularize SG-solution mkz = max(mkzmax, min(mkz,in, mkz)) -! - mkz = sqrt(mkz2) - hdswz = hdswi* rhoi(k-1)/rhoi(k) * umd(k-1)/umd(k) * bvi(k-1)/bvi(k) - udswz = hdswz *bn2i(k) -!=========================================================================================== -!linsat wave ampl.: mkz*sqrt(hdswz) <= 1.0 or udswz <= linsat2*umd2 -! -! tautot = tausat = rhoi(k) *udswz_sat * kxridge/mkz -! by k = krefj tautot = tauogw(krefj) -!=========================================================================================== - if (do_klwb_phase) then - phmkz(k) = phmkz(k-1) + mkz*(zpm(k)-zpm(k-1)) - if( ( phmkz(k) .ge. zbr_pi).and.(klwb == kph)) then - klwb = min(k, krefj) - exit loop_lwb_otr - endif - endif - else ! mkz2 < mkz2min - kotr = k ! trapped/reflected waves / - exit loop_lwb_otr - endif - enddo loop_lwb_otr -! -! define tau_src(1:zblk:klwb) = sum(tau_oro+tau_dsw+tau_ogw) and define drlee -! tau_trapped ??? -! - if (do_klwb_phase) then - do k=kph, kotr-1 - - if (klwb > kph .and. k < klwb) then - drlee(k) = (tautot -tauogw)/(zpi(kph) - zpi(klwb)) ! negative Ax*rho - tau_src(k) = tautot + (zpi(k) - zpi(klwb))*drlee(k) - drlee(k) = drlee(k)/rho(k) - else if ( k >= klwb .and. k < kotr) then - tau_src(k) = tauogw - drlee(k) = 0.0 - endif - enddo - kdswj = klwb ! assign to the "low-level" wave breaking - endif -! -! simplest exponential transmittance d(tau)/dz = - pdtrans *tau(z) -! more complicated is dissipative saturation pdtrans =/= constant -! - if (do_dtrans) then - do k=kph, krefj - tau_src(k)= tautot*exp(-pdtrans*(zpi(k)-zpi(kph))) - drlee(k) = -tau_src(k)/rho(k) * pdtrans - enddo - endif - - - ENDIF !taulee > 0.0 - - - endif !strver -! - -!========================================================================= - if (strver == 'gfs_2018' .or. strver == 'kd_2005') then -!========================================================================= -! -! orowaves: OGW+DSW/Lee -! - efact = (oa + 2.0) ** (ceofrc*fr) - efact = min( max(efact,efmin), efmax ) - coefm = (1. + clx) ** (oa+1.) - - kxlinv = min (kxw, coefm * cleff) ! does not exceed 42km ~4*dx - kxlinv = coefm * cleff - tem = fr * fr * oc - gfobnv = gmax * tem / ((tem + cg)*bnv) ! g/n0 -!========================================================================= -! source fluxes: taulin, taufrb -!========================================================================= - tautot = kxlinv * rhohm * umag * umag *umag* gfobnv * efact - - coef_h2 = kxlinv *rhohm * bnv*umag - taulin = coef_h2 *hamp*hamp - hcrit = fcrit_gfs*umag/bnv - tauhcr = coef_h2 *hcrit*hcrit - - IF (fr <= fcrit_gfs) then - tauogw = taulin - tautot = taulin - taulee = 0. - drlee(:) = 0. - ELSE !fr > fcrit_gfs - tauogw = tauhcr - taulee = max(tautot - tauogw, 0.0) - if (taulee > 0.0 ) hdsw = sqrt(taulee/coef_h2) -! approximate drlee(k) between [izb, klwb] -! find klwb and decrease taulee(izb) => taulee(klwb) = 0. -! above izb tau - if (mkz2 > mkz2min.and. krefj > 2 .and. taulee > 0.0) then - - mkz = sqrt(mkz2) - call mflow_tauz(levs, up, vp, tp, qp, dp, zpm, zpi, & - pmid, pint, rho, ui, vi, ti, bn2i, bvi, rhoi) - - kph = max(izb, 2) - phmkz(:) = 0.0 - klwb = max(izb, 1) - kotr = levs+1 - phmkz(kph-1) = fr ! initial Phase of the Lee-OGW - - loop_lwb_gfs18: do k=kph, levs - - umd(k) = max(ui(k)*xn +vi(k)*yn, velmin) - umd2 =(coro- umd(k))*(coro- umd(k)) - umd2 = max(umd2, velmin*velmin) - mkz2 = bn2i(k)/umd2 - kx2 - if ( mkz2 > mkz2min ) then - mkz = sqrt(mkz2) - frlocal = max(hdsw*bvi(k)/umd(k), frlwb) - phmkz(k) = phmkz(k-1) + mkz*(zpm(k)-zpm(k-1)) - if( ( phmkz(k) >= zbr_pi ) .and. (frlocal > frlin)) klwb = k - else - kotr = k - exit loop_lwb_gfs18 - endif - enddo loop_lwb_gfs18 -! -! - do k=kph, kotr-1 - - if (klwb > kph .and. k < klwb) then - drlee(k) = -(tautot -tauogw)/(zpi(kph) - zpi(klwb)) - tau_src(k) = tautot + (zpi(k) - zpi(klwb))*drlee(k) - drlee(k) = drlee(k)/rho(k) - else if ( k >= klwb .and. k < kotr) then - tau_src(k) = tauogw - drlee(k) = 0.0 - endif - enddo - kdswj = klwb ! assign to the "low-level" wave breaking - endif ! mkz2 > mkz2min.and. krefj > 2 .and. taulee > 0.0 - ENDIF !fr > fcrit_gfs - - - ENDIF !strbase='gfs2017' .or. strbase='kd_2005' - - -! output : taulin, taufrb, taulee, xn, yn, umag, kxw/kxridge -! print *, krefj, levs, tauogw, tautot , ' ugwp_taub_oro ' -! - end subroutine ugwp_taub_oro -! -!-------------------------------------- -! -! call ugwp_oro_lsatdis( krefj, levs, tauogw(j), tautot(j), tau_src, & -! con_pi, con_g, kxw, fcor(j), c2f2(j), up, vp, tp, qp, dp, zpm, zpi, & -! pmid1, pint1, xn, yn, umag, drtau, kdis_oro) - - subroutine ugwp_oro_lsatdis( krefj, levs, tauogw, tautot, tau_src, & - pi, grav, kxw, fcor, kxridge, up, vp, tp, qp, dp, zpm, zpi, & - pmid, pint, xn, yn, umag, drtau, kdis) - - use ugwp_common_v1, only : dw2min, velmin - use cires_ugwp_module_v1, only : frcrit, ricrit, linsat, hps, rhp1, rhp2 - use cires_ugwp_module_v1, only : kvg, ktg, krad, kion - use ugwp_oro_init_v1, only : coro , fcrit_sm , fcrit_sm2 - implicit none -! - integer, intent(in) :: krefj, levs - real , intent(in) :: tauogw, tautot, kxw - real , intent(in) :: fcor - - real , dimension(levs+1) :: tau_src - - real, intent(in) :: pi, grav - - real, dimension(levs) , intent(in) :: up, vp, tp, qp, dp, zpm - real, dimension(levs+1), intent(in) :: zpi, pmid, pint - real , intent(in) :: xn, yn, umag - real , intent(in) :: kxridge - - - real, dimension(levs), intent(out) :: drtau, kdis -! -! locals -! - real :: bnv2min, pi2, rgrav - real :: uref, udir, uf2, ufd, uf2p - real, dimension(levs+1) :: tauz - real, dimension(levs) :: rho - real, dimension(levs+1) :: ui, vi, ti, bn2i, bvi, rhoi - - integer :: i, j, k, kcrit, kref - real :: kx2, kx2w, kxs - real :: mkzm, mkz, dkz, mkz2, ch, kzw3 - real :: wfdM, wfdT, wfiM, wfiT - real :: fdis, mkzi, keff_m, keff_t - real :: betadis, betam, betat, cdfm, cdft - real :: fsat, hsat, hsat2, kds , c2f2 - - pi2 = 2.0*pi - bnv2min = (pi2/1800.)*(pi2/1800.) - rgrav = 1.0/grav - - drtau(1:levs) = 0.0 - kdis (1:levs) = 0.0 - - ch = coro - - kx2w = kxw*kxw - kx2 = kxridge*kxridge - if( kx2 < kx2w ) kx2 = kx2w - kxs = sqrt(kx2) - c2f2 = fcor*fcor/kx2 -! -! non-hydrostatic LinSatDis for Ch = 0 (with set of horizontal wavenumber kxw) -! -! print *, krefj, levs, tauogw, tautot , ' orolsatdis ' - call mflow_tauz(levs, up, vp, tp, qp, dp, zpm, zpi, & - pmid, pint, rho, ui, vi, ti, bn2i, bvi, rhoi) -!=============================================================================== -! for stationary oro-GWs only "single"-azimuth cd = 0 -(-Udir) = Udir > 0 -! rotational/non-hyrostatic effects are important only for high-res runs -! Udir = 0, Udir < 0 are not -! future"revisions" shear effects for d mkz /dt = -kxw*dU/dz -! horizontal wavelength spectra mkz2 = l2 -kxw(n)*kxw(n) -! stochastic "tauogw'-setup+ sigma_tau ; -! 3D-wave effects 1+ (k/l)^2 and NS vs EW orowaves -! target is to get "multiple"-saturation levels for OGWs -!=============================================================================== - tauz(1:krefj) = tauogw ! constant flux for OGW-packet or single mode - ! sign of tauz > 0...and its attenuate with Z - k = krefj - uref = ui(k)*xn +vi(k)*yn - ch ! stationary waves - uf2 = uref*uref - c2f2 - if (uf2 > 0) then - mkz2 = bn2i(k)/uf2 -kx2 - if (mkz2.gt.0) then - mkzm = sqrt(mkz2) - else - return ! wave reflection mkz2 <=0. - endif - else - return ! wave absorption uf2 <= 0. - endif -! -! upward solver for single "mode" with tauz(levs+1) =0. at the top -! - kds = 0.1* kvg(krefj) ! eddy wave diffusion from the previous layer - kcrit = levs - do k= krefj+1, levs -! -! 2D-wave propagation along reference-wind direction -! udir = 0 critical wind for coro =0 -! cdop = -uref .... upwind waves travel against MF -! - udir = ui(k)*xn +vi(k)*yn - uf2 = udir*udir - c2f2 - - - if (uf2 < dw2min .or. udir <= 0.0) then - kcrit =K - tauz(kcrit:levs) = 0. - exit ! vert-level loop - endif -! -! wave-based solution -! - mkz2 = bn2i(k)/uf2 -kx2 - if (mkz2 > 0) then - mkzm = sqrt(mkz2) -! -! do dissipative flux vs saturation: kvg, ktg, krad, kion -! - kzw3 = mkzm*mkz2 -! - keff_m = kvg(k)*mkz2 + kion(k) -! keff_t = kturb(k)*iPr_turb + kmol(k)*iPr_mol - keff_t = ktg(k)*mkz2 + krad(k) -! -! - uf2p = uf2 + 2.0*c2f2 - betadis = uf2/uf2p - betaM = 1.0 / (1.0+betadis) ! if c2f2 = 0. betaM = betaT =0.5 ekw = epw - betaT = 1.0- BetaM - -! -!imaginary frequencies of momentum and heat with "kds at (k-1) level" -! - wfiM = kds*mkz2 + keff_m - wfiT = kds*mkz2 + keff_t -! - cdfm = sqrt(uf2)*kxs - cdft = abs(udir)*kxs - wfdM = wfiM/cdfm *BetaM - wfdT = wfiT/Cdft *BetaT - mkzi = 2.0*mkzm*(wfdM+wfdT) - - fdis = tauz(k-1)*exp(-mkzi*(zpi(k)-zpi(k-1)) ) - tauz(k) = fdis - hsat2 = fcrit_sm2 * uf2 *bn2i(k) - fsat = rhoi(k)* hsat2 * sqrt(uf2) * bvi(k) - if (fdis > fsat) then - tauz(k) = min(fsat, tauz(k-1)) -!================================================================= -! two definitions for eddy mixing of MF: -! a) wave damping-Lindzen : Ked ~ kx/(2H)*(u-c)^4/N^3 -! b) heat-based turbulence: 4/3 Richardson Ked ~eps^1/3 *Lt^4/3 -!================================================================= - kds = rhp2*kxs*uf2*uf2/bn2i(k)/bvi(k) - kdis(k) = kds - endif - else - tauz(k:levs) = 0. ! wave is reflected above - kds = 0. - endif - enddo - - do k=krefj+1, kcrit - drtau(k) = rgrav*(tauz(k+1)-tauz(k))/dp(k) - enddo -! -! - end subroutine ugwp_oro_lsatdis -! -! - subroutine ugwp_tofd(im, levs, con_cp, sigflt, elvmax, zpbl, u, v, zmid, & - utofd, vtofd, epstofd, krf_tofd) - use machine , only : kind_phys - use ugwp_oro_init_v1, only : n_tofd, const_tofd, ze_tofd, a12_tofd, ztop_tofd -! - implicit none -! - integer :: im, levs - real(kind_phys) :: con_cp - real(kind_phys), dimension(im, levs) :: u, v, zmid - real(kind_phys), dimension(im) :: sigflt, elvmax, zpbl - real(kind_phys), dimension(im, levs) :: utofd, vtofd, epstofd, krf_tofd -! -! locals -! - integer :: i, k - real :: rcpd2 - real :: sgh = 30. - real :: sgh2, ekin, zdec, rzdec, umag, zmet, zarg, zexp, krf -! - utofd =0.0 ; vtofd = 0.0 ; epstofd =0.0 ; krf_tofd =0.0 - rcpd2 = 0.5/con_cp -! - - do i=1, im - - zdec = max(n_tofd*sigflt(i), zpbl(i)) - zdec = min(ze_tofd, zdec) - rzdec = 1.0/zdec - sgh2 = max(sigflt(i)*sigflt(i), sgh*sgh) - - do k=1, levs - zmet = zmid(i,k) - if (zmet > ztop_tofd) cycle - ekin = u(i,k)*u(i,k) + v(i,k)*v(i,k) - umag = sqrt(ekin) - zarg = zmet*rzdec - zexp = exp(-zarg*sqrt(zarg)) - krf = const_tofd* a12_tofd *sgh2* zmet ** (-1.2) *zexp - utofd(i,k) = -krf*u(i,k) - vtofd(i,k) = -krf*v(i,k) - epstofd(i,k)= rcpd2*krf*ekin ! more accurate heat/mom form using "implicit tend-solver" - ! to update momentum and temp-re - krf_tofd(i,k) = krf - enddo - enddo -! - end subroutine ugwp_tofd -! -! - subroutine ugwp_tofd1d(levs, con_cp, sigflt, elvmax, zsurf, zpbl, u, v, & - zmid, utofd, vtofd, epstofd, krf_tofd) - use machine , only : kind_phys - use ugwp_oro_init_v1, only : n_tofd, const_tofd, ze_tofd, a12_tofd, ztop_tofd -! - implicit none - integer :: levs - real(kind_phys) :: con_cp - real(kind_phys), dimension(levs) :: u, v, zmid - real(kind_phys) :: sigflt, elvmax, zpbl, zsurf - real(kind_phys), dimension(levs) :: utofd, vtofd, epstofd, krf_tofd -! -! locals -! - integer :: i, k - real :: rcpd2 - real :: sghmax = 5. - real :: sgh2, ekin, zdec, rzdec, umag, zmet, zarg, ztexp, krf -! - utofd =0.0 ; vtofd = 0.0 ; epstofd =0.0 ; krf_tofd =0.0 - rcpd2 = 0.5/con_cp -! - zdec = max(n_tofd*sigflt, zpbl) ! ntimes*sgh_turb or Zpbl - zdec = min(ze_tofd, zdec) ! cannot exceed 18 km - rzdec = 1.0/zdec - sgh2 = max(sigflt*sigflt, sghmax*sghmax) ! 25 meters dz-of the first layer - - do k=1, levs - zmet = zmid(k)-zsurf - if (zmet > ztop_tofd) cycle - ekin = u(k)*u(k) + v(k)*v(k) - umag = sqrt(ekin) - zarg = zmet*rzdec - ztexp = exp(-zarg*sqrt(zarg)) - krf = const_tofd* a12_tofd *sgh2* zmet ** (-1.2) *ztexp - - utofd(k) = -krf*u(k) - vtofd(k) = -krf*v(k) - epstofd(k) = rcpd2*krf*ekin ! more accurate heat/mom form using "implicit tend-solver" - ! to update momentum and temp-re; epstofd(k) can be skipped - krf_tofd(k) = krf - enddo -! - end subroutine ugwp_tofd1d - - -end module cires_vert_orodis_v1 diff --git a/physics/cires_vert_wmsdis.F90 b/physics/cires_vert_wmsdis.F90 deleted file mode 100644 index 9e0bbf37c..000000000 --- a/physics/cires_vert_wmsdis.F90 +++ /dev/null @@ -1,425 +0,0 @@ - subroutine ugwp_wmsdis_naz(levs, ksrc, nw, naz, kxw, taub_lat, ch, xaz, yaz, & - fcor, c2f2, dp, zmid, zint, pmid, pint, rho, ui, vi, ti, & - kvg, ktg, krad, kion, bn2i, bvi, rhoi, ax, ay, eps, ked, tau1) -! -! -! use para_taub, only : tau_ex - use ugwp_common, only : rcpd, grav, rgrav - implicit none -! - integer :: levs - integer :: nw, naz ! # - waves for each azimuth (naz) - integer :: ksrc ! source level - real :: kxw ! horizontal wn - real :: taub_lat ! lat-dep tau_bulk N/m2 -! - real, dimension(nw) :: ch, dch, taub_spect - real, dimension(naz) :: xaz, yaz - real, dimension(levs+1) :: ui, vi, ti, bn2i, bvi, rhoi, zint, pint - real, dimension(levs ) :: dp, rho, pmid, zmid - real :: fcor, c2f2 - real, dimension(levs+1) :: kvg, ktg, kion, krad, kmol - -! output/locals - real, dimension(levs ) :: ax, ay, eps - real, dimension(levs+1) :: ked , tau1 - real, dimension(levs+1 ) :: uaz - - real, dimension(levs, naz ) :: epsd - real, dimension(levs+1, naz ) :: atau, kedd - - real, dimension(levs+1 ) :: taux, tauy, bnrho - real, dimension(levs ) :: dzirho , dzpi - -! - integer :: iaz, k , inc - real, parameter :: gcstar=1.0 - integer , parameter :: nslope=1 - real :: spnorm ! source level normalization factor for the Broad Spectra - real :: bnrhos ! sum(taub_spect*dc) = spnorm taub_sect_norm = taub_spect/spnorm -! - atau=0.0 ; epsd=0.0 ; kedd=0.0 - bnrhos = bvi(ksrc)/rhoi(ksrc) - do k=1,levs - dzpi(k) = zint(k+1)-zint(k) - dzirho(k) = 1.0 / (rho(k)*dzpi(k)) ! grav/abs(dp(k)) still hydrostatic "ugwp" - bnrho(k) = (rhoi(k)/bvi(k)) !*bnrhos * gcstar ! gcstar=1.0 and bnrho(k=ksrc) =1. - enddo - k = levs+1 - bnrho(k) = (rhoi(k)/bvi(k))*bnrhos -! -! re-define ch, dch, taub_spect, this portion can be moved to "ugwp_init" -! -! -! - call FVS93_ugwps(nw, ch, dch, taub_spect, spnorm, nslope, bn2i(ksrc), bvi(ksrc), bnrho(ksrc)) - - -! print *, ' after FVS93_ugwp ', nw, maxval(ch), minval(ch) -! -! do normaalization for the spectral element of the saturated flux -! - bnrho = bnrho *spnorm - -! print * -! do inc=1, nw -! write(6,221) inc, ch(INC),taub_lat*taub_spect(inc), spnorm, dch(inc) -!221 FORMAT( i6, 2x, F8.2, 3(2x, E10.3)) -! enddo -! pause - - loop_iaz: do iaz =1, naz - - do k=1,levs+1 - uaz(k) =ui(k)*xaz(iaz) +vi(k)*yaz(iaz) - enddo -! -! -! multi-wave broad spectrum of FVS-93 with ~scheme of WMS-IFS 2010 -! -! print *, ' iaz before ugwp_wmsdis_az1 ', iaz -! - - call ugwp_wmsdis_az1(levs, ksrc, nw, kxw, ch, dch, taub_spect, taub_lat, & - spnorm, fcor, c2f2, zmid, zint, rho, uaz, ti, bn2i, bvi, rhoi, bnrho, dzirho, dzpi, & - kvg, ktg, krad, kion, kmol, epsd(:, iaz), kedd(:,iaz), atau(:, iaz) ) - -! print *, ' iaz after ugwp_wmsdis_az1 ', iaz - -! - enddo loop_iaz ! azimuth of gw propagation directions -! -! sum over azimuth and project atau(z, iza) =>(taux and tauy) -! for scalars for "wave-drag vector" -! - eps =0. ; ked =0. - do k=ksrc, levs - eps(k) = sum(epsd(k,:))*rcpd - enddo - - do k=ksrc, levs+1 - taux(k) = sum( atau(k,:)*xaz(:)) - tauy(k) = sum( atau(k,:)*yaz(:)) - ked(k) = sum( kedd(k,:)) - enddo -! - tau1(ksrc:levs) = taux(ksrc:levs) - tau1(1:ksrc-1) = tau1(ksrc) - -! end solver: gw_azimuth_solver_ls81 -! sign ax in rho*du/dt = -d(rho*tau)/dz -! [(k) - (k+1)] -! du/dt = ax = -1/rho*d( tau) /dz -! - ax =0. ; ay = 0. - - do k=ksrc, levs - ax(k) = dzirho(k)*(taux(k)-taux(k+1)) - ay(k) = dzirho(k)*(tauy(k)-tauy(k+1)) - enddo - call ugwp_limit_1d(ax, ay, eps, ked, levs) - - return - end subroutine ugwp_wmsdis_naz - - -! ======================================================================= - subroutine ugwp_wmsdis_az1(levs, ksrc, nw, kxw, ch, dch, taub_sp, tau_bulk, & - spnorm, fcor, c2f2, zm, zi, rho, um, tm, bn2, bn, rhoi, bnrho, & - dzirho, dzpi, kvg, ktg, krad, kion, kmol, eps, ked, tau ) -! -! use para_taub, only : tau_ex, xlatdeg !for exchange src-tau -! - use cires_ugwp_module, only : f_coriol, f_nonhyd, f_kds, linsat - use cires_ugwp_module, only : ipr_ktgw, ipr_spgw, ipr_turb, ipr_mol - use cires_ugwp_module, only : rhp4, rhp2, rhp1, khp, cd_ulim -! ======================================================================= - integer :: levs, ksrc, nw - real :: fcor, c2f2, kxw -! - real, dimension(nw) :: taub_sp, ch, dch - real :: tau_bulk, spnorm - real, dimension(levs) :: zm, rho, dzirho, dzpi - real, dimension(levs+1) :: zi, um, tm, bn2, bn, rhoi, bnrho - real, dimension(levs+1) :: kvg, ktg, krad, kion, kmol - real, dimension(levs+1) :: ked, tau - real, dimension(levs ) :: eps -! -!locals - integer :: k, inc - real, dimension(levs+1) :: umi - real :: zcin, zci_min, ztmp, zcinc - real :: zcimin=0.5 ! crit-level precision, 0.5 and start of Ch_MIN - real, parameter :: Keff = 0.2 - - real, dimension(nw) :: zflux ! - real, dimension(nw) :: wzact, zacc ! =1 ..crit level change it - - real, dimension(levs) :: zcrt ! - real, dimension(nw, levs) :: zflux_z, zact - - real :: zdelp, kxw2 - real :: vu_eff, vu_lin, v_kzw, v_cdp, v_wdp, v_kzi - real :: dfsat, fdis, fsat, fmode, expdis - real :: vc_zflx_mode, vm_zflx_mode - real :: tau_g5 -! ======================================================================= -!eps, ked, tau - - eps (:) =0; ked = 0.0 ; - kxw2 = kxw*kxw -! - zcrt(1:levs) = 0.0 - umi(1:levs+1) = um -! umi(1:levs+1) = um(1:levs+1) -um(ksrc) - - zci_min = zcimin - -! CALL slat_geos5(1, xlatdeg(1), tau_g5) -! tau_bulk = tau_g5 !tau_bulk*0.75 !3.75e-2 -! - zflux(:) = taub_sp(:)*tau_bulk ! includes tau_bulk(x,y) and spectral normalization - - zflux_z(1:nw,ksrc)=zflux(:) - - tau(1:levs+1) = tau_bulk ! constant flux for all layers k0.0 ) then -! ztmp = sum( ch(:)*zacc(:)*zflux(:)*dch(:) ) -! zcrt(k)=ztmp/tau(k) -! else -! zcrt( k )=zcrt(k-1) -! endif -! --------------------------------------------------------- -! do saturation (eq. (26) and (27) of scinocca 2003) -! + add molecular/eddy dissipation od gw-spectra vay-2015 -! for each mode & direction -! x by exp(-mi*zdelp) x introduce ....... mi(nw) -! -! mode-loop + add molecular/eddy dissipation od gw-spectra vay-2015 -! - do inc=1,nw - if (zact(inc,k) == 0.0) then - zflux(inc) = 0.0 - zflux_z(inc,k) = zflux(inc) - else - vu_eff = kvg(k) ! + ktg (k) !* ipr_ktgw - vu_lin = kion(k) ! + krad(k) !* ipr_ktgw - vu_eff = 2.e-5*exp(zi(k)/7000.)+.01 - zcin= ch(inc) - -!======================================================================= -! saturated limit wfit = kzw*kzw*kt; wfdt = wfit/(kxw*cx)*betat -! & dissipative kzi = 2.*kzw*(wfdm+wfdt)*dzpi(k) -! define kxw = -!======================================================================= - v_cdp = zcin-umi(k) - v_wdp = kxw*v_cdp - if (v_wdp.gt.0) then - v_kzw = bn(k)/v_cdp !can be non-hydrostatic - v_kzi = abs(( v_kzw*v_kzw*vu_eff + vu_lin) /v_wdp*v_kzw) - expdis = exp(-2.*v_kzi*dzpi(k) ) - else - v_kzi = 0. - expdis = 1.0 - endif - fmode = zflux(inc) - fdis = fmode*expdis ! only dissipation/crit_lev degrades it -!------------------------ -! includes rho/bn /(rhos/bns) *spnorm -!------------------------ - fsat = bnrho(k)* v_cdp*v_cdp /zcin ! expression for saturated flux - ! zfluxs=gcstar*zfct( k)*(zcin-zui( k ))**2/zcin -! flux_tot - sat.flux -! - dfsat= fdis-fsat - if( dfsat > 0.0 ) then -! put sat-n limit - zflux(inc) = fsat - else -! assign dis-ve flux - zflux(inc) =fdis - endif - zflux_z(inc,k)=zflux(inc) - - if (zflux_z(inc,k) > zflux_z(inc,k-1) ) zflux_z(inc,k) = zflux_z(inc,k-1) - - endif - - enddo -! -! integrate over spectral modes zpu(y, z, azimuth) zact( inc, )*zflux( inc, )*[d("zcinc")] -! - tau(k) = sum( zflux_z(:,k)*dch(:)) -!------------------------------------------------------------------------------ -! define expressions for eps-heat + Ked, needs more work for the broad spectra -! formulation especially for Ked -! after defining Ked .....GW-eddy cooling needs to be added -! for now "only" heating here -!============================================================================== - eps(k) =0. - do inc=1, nw - if (zact(inc,k) == 0.0) cycle ! dc-integration + dtau/dz - vc_zflx_mode = zflux(inc) - - zdelp= abs(ch(inc)-umi(k)) * dch(inc) /dzpi(k) - vm_zflx_mode=zflux_z(inc,k-1) - eps(k) =eps( k ) + (vm_zflx_mode-vc_zflx_mode)*zdelp ! heating >0 - - - enddo !inc=1, nw - ked(k) = Keff*eps(k)/bn2(k) -! -! -------------- -! - enddo ! end k do-loop vertical loop do k=ksrc+1, levs - -!top lid - k =levs+1 - ked(k) = ked(k-1) -! eps(k) = eps(k-1) - tau(k) =tau(k-1)*0.933 - -! from surface to ksrc-1 -! tau(1:ksrc) = tau(ksrc) - ked(1:ksrc) = 0. - eps( 1:ksrc) = 0. - -! -! output: eps, ked, tau for given azimuth -! - end subroutine ugwp_wmsdis_az1 -! -! - subroutine FVS93_ugwps(nw, ch, dch, taub_sp, spnorm, nslope, bn2, bn, bnrhos) - implicit none - integer :: nw, nslope - real :: bn2, bn, bnrhos -!! real :: taub_lat ! bulk - lat-dep momentum flux - real, dimension (nw) :: ch, dch, taub_sp -! locals - integer :: i, inc - real, parameter :: zcimin = 0.5, zcimax = 95.0, zgam =1./4. - real, parameter :: zms = 6.28e-3/2. ! mstar Lz ~ 2km - real :: zxran, zxmax, zxmin, zx1, zx2, zdx, ztx, rch - real :: bn3, bn4, zcin, tn4, tn3, tn2, cstar - real :: spnorm ! needs to be passed for saturation flux norm-n - real :: tau_bulk -!-------------------------------------------------------------------- -! -! transforms ch -uniform => 1/ch and back to non-uniform ch, dch -! -!------------------------------------------------------------------- -! note that this is expresed in terms of the intrinsic ch or vertical wn=N/cd -! at launch cd=ch-um(ksrc), the transformation is identical for all -! levels, azimuths and horizontal pixels -! see eq. 28-30 of scinocca 2003. x = 1/c stretching transform -! - zxmax=1.0 /zcimin - zxmin=1.0 /zcimax - zxran=zxmax-zxmin - zdx=zxran/float(nw-1) ! d_kz or d_mi -! -! - zx1=zxran/(exp(zxran/zgam)-1.0 ) !zgam =1./4. - zx2=zxmin-zx1 -! -! add idl computations for zci =1/zx -! x = 1/c stretching transform to look at final ch(i), dch(i) -! - - do i=1, nw - ztx=float(i-1)*zdx+zxmin - rch=zx1*exp((ztx-zxmin)/zgam)+zx2 !eq. 29 of scinocca 2003 - ch(i)=1.0 /rch !eq. 28 of scinocca 2003 - dch(i)=ch(i)*ch(i)*(zx1/zgam)*exp((ztx-zxmin)/zgam)*zdx !eq. 30 of scinocca 2003 - enddo -! -! nslope-dependent flux taub_spect(nw) momentum flux spectral density -! need to check math....expressions -! eq. (25) of scinocca 2003 with u-uo=0 it is identical to all azimuths -! -! - cstar=bn/zms - bn4=bn2*bn2 ! four times - bn3=bn2*bn - if(nslope==1) then -! s=1 case - do inc=1, nw - zcin=ch(inc) - tn4=(zms*zcin)**4 - taub_sp(inc) =bnrhos * zcin*bn4/(bn4+tn4) - enddo -! - elseif(nslope==2) then -! s=2 case - do inc=1, nw - zcin=ch(inc) - tn4=(zms*zcin)**4 - taub_sp(inc)= bnrhos*zcin*bn4/(bn4+tn4*zcin/cstar) - enddo -! - elseif(nslope==-1) then -! s=-1 case - do inc=1, nw - zcin=ch(inc) - tn2=(zms*zcin)**2 - taub_sp(inc)=bnrhos*zcin*bn2/(bn2+tn2) - enddo -! s=0 case - elseif(nslope==0) then - - do inc=1, nw - zcin=ch(inc) - tn3=(zms*zcin)**3 - taub_sp(inc)=bnrhos*zcin*bn3/(bn3+tn3) - enddo - endif ! for n-slopes -!============================================= -! normalize launch momentum flux -! ------------------------------------ -! (rho x f^h = rho_o x f_p^total) integrate (zflux x dx) - - tau_bulk= sum(taub_sp(:)*dch(:)) - spnorm= 1./tau_bulk - - do inc=1, nw - taub_sp(inc)=spnorm*taub_sp(inc) - enddo - - end subroutine FVS93_ugwps - diff --git a/physics/cnvc90.f b/physics/cnvc90.f index fe3601ce2..bbdf0aafe 100644 --- a/physics/cnvc90.f +++ b/physics/cnvc90.f @@ -27,16 +27,16 @@ SUBROUTINE cnvc90_run(CLSTP,IM,RN,KBOT,KTOP,KM,PRSI, & ! Interface variables real(kind=kind_phys), intent(in) :: clstp integer, intent(in) :: im, km - real(kind=kind_phys), intent(in) :: RN(IM) - integer, intent(in) :: KBOT(IM) - integer, intent(in) :: KTOP(IM) - real(kind=kind_phys), intent(in) :: prsi(IM,km+1) - real(kind=kind_phys), intent(inout) :: ACV(IM) - real(kind=kind_phys), intent(inout) :: ACVB(IM) - real(kind=kind_phys), intent(inout) :: ACVT(IM) - real(kind=kind_phys), intent(inout) :: CV(IM) - real(kind=kind_phys), intent(inout) :: CVB(IM) - real(kind=kind_phys), intent(inout) :: CVT(IM) + real(kind=kind_phys), intent(in) :: RN(:) + integer, intent(in) :: KBOT(:) + integer, intent(in) :: KTOP(:) + real(kind=kind_phys), intent(in) :: prsi(:,:) + real(kind=kind_phys), intent(inout) :: ACV(:) + real(kind=kind_phys), intent(inout) :: ACVB(:) + real(kind=kind_phys), intent(inout) :: ACVT(:) + real(kind=kind_phys), intent(inout) :: CV(:) + real(kind=kind_phys), intent(inout) :: CVB(:) + real(kind=kind_phys), intent(inout) :: CVT(:) character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -130,5 +130,6 @@ END SUBROUTINE cnvc90_run subroutine cnvc90_finalize() end subroutine cnvc90_finalize + end module cnvc90 diff --git a/physics/cnvc90.meta b/physics/cnvc90.meta index 169f6b221..1e5a7c132 100644 --- a/physics/cnvc90.meta +++ b/physics/cnvc90.meta @@ -8,7 +8,7 @@ name = cnvc90_run type = scheme [clstp] - standard_name = convective_cloud_switch + standard_name = control_for_convective_cloud_diagnostics long_name = switch for saving convective clouds units = none dimensions = () @@ -50,7 +50,7 @@ intent = in optional = F [km] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical layers units = count dimensions = () @@ -61,13 +61,13 @@ standard_name = air_pressure_at_interface long_name = interface pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in optional = F [acv] - standard_name = accumulated_lwe_thickness_of_convective_precipitation_amount_cnvc90 + standard_name = cumulative_lwe_thickness_of_convective_precipitation_amount_between_sw_radiation_calls long_name = accumulated convective rainfall amount for cnvc90 only units = m dimensions = (horizontal_loop_extent) @@ -76,7 +76,7 @@ intent = inout optional = F [acvb] - standard_name = smallest_cloud_base_vertical_index_encountered_thus_far + standard_name = cumulative_min_vertical_index_at_cloud_base_between_sw_radiation_calls long_name = smallest cloud base vertical index encountered thus far units = index dimensions = (horizontal_loop_extent) @@ -85,7 +85,7 @@ intent = inout optional = F [acvt] - standard_name = largest_cloud_top_vertical_index_encountered_thus_far + standard_name = cumulative_max_vertical_index_at_cloud_base_between_sw_radiation_calls long_name = largest cloud top vertical index encountered thus far units = index dimensions = (horizontal_loop_extent) @@ -94,7 +94,7 @@ intent = inout optional = F [cv] - standard_name = fraction_of_convective_cloud + standard_name = convective_cloud_area_fraction_between_sw_radiation_calls_from_cnvc90 long_name = fraction of convective cloud units = frac dimensions = (horizontal_loop_extent) @@ -103,7 +103,7 @@ intent = inout optional = F [cvb] - standard_name = pressure_at_bottom_of_convective_cloud + standard_name = pressure_at_convective_cloud_base_between_sw_radiation_calls_from_cnvc90 long_name = pressure at bottom of convective cloud units = Pa dimensions = (horizontal_loop_extent) @@ -112,7 +112,7 @@ intent = inout optional = F [cvt] - standard_name = pressure_at_top_of_convective_cloud + standard_name = pressure_at_convective_cloud_top_between_sw_radiation_calls_from_cnvc90 long_name = pressure at top of convective cloud units = Pa dimensions = (horizontal_loop_extent) diff --git a/physics/cs_conv.F90 b/physics/cs_conv.F90 index a7b03d387..8ed33f0d3 100644 --- a/physics/cs_conv.F90 +++ b/physics/cs_conv.F90 @@ -13,29 +13,29 @@ end subroutine cs_conv_pre_finalize !! \section arg_table_cs_conv_pre_run Argument Table !! \htmlinclude cs_conv_pre_run.html !! - subroutine cs_conv_pre_run(im, levs, ntrac, ncld, q, clw1, clw2, & + subroutine cs_conv_pre_run(im, levs, ntrac, q, clw1, clw2, & & work1, work2, cs_parm1, cs_parm2, wcbmax, & & fswtr, fscav, save_q1, save_q2, save_q3, & & errmsg, errflg) - use machine , only : r8 => kind_phys + use machine , only : kind_phys implicit none ! --- inputs - integer, intent(in) :: im, levs, ntrac, ncld - real(r8), dimension(im,levs), intent(in) :: q - real(r8), dimension(im,levs), intent(in) :: clw1,clw2 - real(r8), dimension(im), intent(in) :: work1, work2 - real(r8), intent(in) :: cs_parm1, cs_parm2 + integer, intent(in) :: im, levs, ntrac + real(kind_phys), dimension(:,:), intent(in) :: q + real(kind_phys), dimension(:,:), intent(in) :: clw1,clw2 + real(kind_phys), dimension(:), intent(in) :: work1, work2 + real(kind_phys), intent(in) :: cs_parm1, cs_parm2 ! --- input/output - real(r8), dimension(ntrac-ncld+2), intent(out) :: fswtr, fscav - real(r8), dimension(im), intent(out) :: wcbmax - real(r8), dimension(im,levs), intent(out) :: save_q1,save_q2 + real(kind_phys), dimension(:), intent(out) :: fswtr, fscav + real(kind_phys), dimension(:), intent(out) :: wcbmax + real(kind_phys), dimension(:,:), intent(out) :: save_q1,save_q2 ! save_q3 is not allocated for Zhao-Carr MP - real(r8), dimension(:,:), intent(out) :: save_q3 + real(kind_phys), dimension(:,:), intent(out) :: save_q3 character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -78,23 +78,22 @@ end subroutine cs_conv_post_init subroutine cs_conv_post_finalize() end subroutine cs_conv_post_finalize -!! -!! \section arg_table_cs_conv_post_run Argument Table +!> \section arg_table_cs_conv_post_run Argument Table !! \htmlinclude cs_conv_post_run.html !! subroutine cs_conv_post_run(im, kmax, do_aw, sigmatot, sigmafrac, errmsg, errflg) - use machine , only : r8 => kind_phys + use machine , only : kind_phys implicit none ! --- inputs integer, intent(in) :: im, kmax logical, intent(in) :: do_aw - real(r8), dimension(im,kmax), intent(in) :: sigmatot + real(kind_phys), dimension(:,:), intent(in) :: sigmatot ! --- input/output - real(r8), dimension(im,kmax), intent(out) :: sigmafrac + real(kind_phys), dimension(:,:), intent(out) :: sigmafrac character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -132,7 +131,7 @@ module cs_conv !! Author: Minoru Chikira !--------------------------------------------------------------------------------- ! - use machine , only : r8 => kind_phys + use machine , only : kind_phys use physcons, only : cp => con_cp, grav => con_g, & & rair => con_rd, rvap => con_rv, & & cliq => con_cliq, cvap => con_cvap, & @@ -146,20 +145,20 @@ module cs_conv private ! Make default type private to the module - real(r8), parameter :: zero=0.0d0, one=1.0d0, half=0.5d0 - real(r8), parameter :: cpoel=cp/el, cpoesub=cp/(el+emelt), esubocp=1.0/cpoesub, & + real(kind_phys), parameter :: zero=0.0d0, one=1.0d0, half=0.5d0 + real(kind_phys), parameter :: cpoel=cp/el, cpoesub=cp/(el+emelt), esubocp=1.0/cpoesub, & elocp=el/cp, oneocp=one/cp, gocp=grav/cp, gravi=one/grav,& - emeltocp=emelt/cp, cpoemelt=cp/emelt, epsln=1.e-10_r8 + emeltocp=emelt/cp, cpoemelt=cp/emelt, epsln=1.e-10_kind_phys - real(r8), parameter :: fact1=(cvap-cliq)/rvap, fact2=el/rvap-fact1*t0c !< to calculate d(qs)/dT + real(kind_phys), parameter :: fact1=(cvap-cliq)/rvap, fact2=el/rvap-fact1*t0c !< to calculate d(qs)/dT logical, parameter :: adjustp=.true. ! logical, parameter :: adjustp=.false. ! Tuning parameters set from namelist ! -! real(r8), parameter, public :: CLMD = 0.60, & !< entrainment efficiency (now thru argument) - real(r8), parameter, public :: & +! real(kind_phys), parameter, public :: CLMD = 0.60, & !< entrainment efficiency (now thru argument) + real(kind_phys), parameter, public :: & PA=0.15, & !< factor for buoyancy to affect updraft velocity CPRES = 0.55, & !< pressure factor for momentum transport ALP0 = 5.0e7, & !< alpha parameter in prognostic closure @@ -178,11 +177,11 @@ module cs_conv !DD precz0 and preczh control partitioning of water between detrainment !DD and precipitation. Decrease for more precip - real(r8), public :: precz0, preczh, clmd, clmp, clmdpa + real(kind_phys), public :: precz0, preczh, clmd, clmp, clmdpa ! ! Private data ! - real(r8), parameter :: unset_r8 = -999._r8 ! missing value + real(kind_phys), parameter :: unset_kind_phys = -999._kind_phys ! missing value ! integer :: iulog !< unit to write debugging and diagnostic output !DD Note - see if I can find corresponding variable in a GFS module @@ -295,102 +294,103 @@ subroutine cs_conv_run( IJSDIM , KMAX , ntracp1 , NN, & ! input arguments ! INTEGER, INTENT(IN) :: IJSDIM, KMAX, ntracp1, nn, NTR, mype, nctp, mp_phys, kdt, lat !! DD, for GFS, pass in - logical, intent(in) :: otspt(1:ntracp1,1:2)! otspt(:,1) - on/off switch for tracer transport by updraft and + logical, intent(in) :: otspt(:,:) ! otspt(:,1) - on/off switch for tracer transport by updraft and ! downdraft. should not include subgrid PDF and turbulence ! otspt(:,2) - on/off switch for tracer transport by subsidence ! should include subgrid PDF and turbulence - real(r8), intent(inout) :: t(IJSDIM,KMAX) ! temperature at mid-layer (K) - real(r8), intent(inout) :: q(IJSDIM,KMAX) ! water vapor array including moisture (kg/kg) - real(r8), intent(inout) :: clw(IJSDIM,KMAX,nn) ! tracer array including cloud condensate (kg/kg) - real(r8), intent(in) :: pap(IJSDIM,KMAX) ! pressure at mid-layer (Pa) - real(r8), intent(in) :: paph(IJSDIM,KMAX+1) ! pressure at boundaries (Pa) - real(r8), intent(in) :: zm(IJSDIM,KMAX) ! geopotential at mid-layer (m) - real(r8), intent(in) :: zi(IJSDIM,KMAX+1) ! geopotential at boundaries (m) - real(r8), intent(in) :: fscav(ntr), fswtr(ntr), wcbmaxm(ijsdim) - real(r8), intent(in) :: precz0in, preczhin, clmdin + real(kind_phys), intent(inout) :: t(:,:) ! temperature at mid-layer (K) + real(kind_phys), intent(inout) :: q(:,:) ! water vapor array including moisture (kg/kg) + real(kind_phys), intent(inout) :: clw(:,:,:) ! tracer array including cloud condensate (kg/kg) + real(kind_phys), intent(in) :: pap(:,:) ! pressure at mid-layer (Pa) + real(kind_phys), intent(in) :: paph(:,:) ! pressure at boundaries (Pa) + real(kind_phys), intent(in) :: zm(:,:) ! geopotential at mid-layer (m) + real(kind_phys), intent(in) :: zi(:,:) ! geopotential at boundaries (m) + real(kind_phys), intent(in) :: fscav(:), fswtr(:), wcbmaxm(:) + real(kind_phys), intent(in) :: precz0in, preczhin, clmdin ! added for cs_convr - real(r8), intent(inout) :: u(IJSDIM,KMAX) ! zonal wind at mid-layer (m/s) - real(r8), intent(inout) :: v(IJSDIM,KMAX) ! meridional wind at mid-layer (m/s) + real(kind_phys), intent(inout) :: u(:,:) ! zonal wind at mid-layer (m/s) + real(kind_phys), intent(inout) :: v(:,:) ! meridional wind at mid-layer (m/s) - real(r8), intent(in) :: DELTA ! physics time step - real(r8), intent(in) :: DELTI ! dynamics time step (model time increment in seconds) + real(kind_phys), intent(in) :: DELTA ! physics time step + real(kind_phys), intent(in) :: DELTI ! dynamics time step (model time increment in seconds) logical, intent(in) :: do_aw, do_awdd, flx_form ! ! modified arguments ! - real(r8), intent(inout) :: CBMFX(IJSDIM,nctp) ! cloud base mass flux (kg/m2/s) + real(kind_phys), intent(inout) :: CBMFX(:,:) ! cloud base mass flux (kg/m2/s) ! ! output arguments ! ! updraft, downdraft, and detrainment mass flux (kg/m2/s) - real(r8), intent(inout), dimension(IJSDIM,KMAX) :: ud_mf, dd_mf, dt_mf + real(kind_phys), intent(inout), dimension(:,:) :: ud_mf, dd_mf, dt_mf - real(r8), intent(out) :: rain1(IJSDIM) ! lwe thickness of deep convective precipitation amount (m) + real(kind_phys), intent(out) :: rain1(:) ! lwe thickness of deep convective precipitation amount (m) ! GJF* These variables are conditionally allocated depending on whether the ! Morrison-Gettelman microphysics is used, so they must be declared ! using assumed shape. - real(r8), intent(out), dimension(:,:) :: qlcn, qicn, w_upi,cnv_mfd, & - cnv_dqldt, clcn, cnv_fice, & - cnv_ndrop, cnv_nice, cf_upi + real(kind_phys), intent(out), dimension(:,:) :: qlcn, qicn, w_upi,cnv_mfd, & + cnv_dqldt, clcn, cnv_fice, & + cnv_ndrop, cnv_nice, cf_upi ! *GJF - integer, intent(inout) :: kcnv(ijsdim) ! zero if no deep convection and 1 otherwise + logical, intent(in) :: lprnt + integer, intent(in) :: ipr + integer, intent(inout) :: kcnv(:) ! zero if no deep convection and 1 otherwise character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg !DDsigma - output added for AW sigma diagnostics ! interface sigma and vertical velocity by cloud type (1=sfc) -! real(r8), intent(out), dimension(IJSDIM,KMAX,nctp) :: sigmai, vverti - real(r8), intent(out), dimension(IJSDIM,KMAX) :: sigma ! sigma sigma totaled over cloud type - on interfaces (1=sfc) +! real(kind_phys), intent(out), dimension(:,:,:) :: sigmai, vverti + real(kind_phys), intent(out), dimension(:,:) :: sigma ! sigma sigma totaled over cloud type - on interfaces (1=sfc) ! sigma terms in eq 91 and 92 -! real(r8), dimension(IJSDIM,KMAX) :: sfluxterm, qvfluxterm, condterm +! real(kind_phys), dimension(IJSDIM,KMAX) :: sfluxterm, qvfluxterm, condterm !DDsigma ! ! output arguments of CS_CUMLUS ! - real(r8), dimension(IJSDIM,KMAX,nctp) :: vverti + real(kind_phys), dimension(IJSDIM,KMAX,nctp) :: vverti - real(r8) GTT(IJSDIM,KMAX) !< temperature tendency [K/s] - real(r8) GTQ(IJSDIM,KMAX,NTR) !< tracer tendency [kg/kg/s] - real(r8) GTU(IJSDIM,KMAX) !< zonal velocity tendency [m/s2] - real(r8) GTV(IJSDIM,KMAX) !< meridional velocity tendency [m/s2] - real(r8) GTPRP(IJSDIM,KMAX) !< precipitation (including snowfall) flux at interfaces [kg/m2/s] - real(r8) GSNWP(IJSDIM,KMAX) !< snowfall flux at interfaces [kg/m2/s] + real(kind_phys) GTT(IJSDIM,KMAX) !< temperature tendency [K/s] + real(kind_phys) GTQ(IJSDIM,KMAX,NTR) !< tracer tendency [kg/kg/s] + real(kind_phys) GTU(IJSDIM,KMAX) !< zonal velocity tendency [m/s2] + real(kind_phys) GTV(IJSDIM,KMAX) !< meridional velocity tendency [m/s2] + real(kind_phys) GTPRP(IJSDIM,KMAX) !< precipitation (including snowfall) flux at interfaces [kg/m2/s] + real(kind_phys) GSNWP(IJSDIM,KMAX) !< snowfall flux at interfaces [kg/m2/s] integer KT(IJSDIM,nctp) !< cloud top index for each cloud type - real(r8) :: cape(IJSDIM) !< convective available potential energy (J/kg) - real(r8) :: prec(IJSDIM) !< precipitation at surface (including snowfall) (kg/m2/s) - real(r8) :: snow(IJSDIM) !< snowfall at surface (kg/m2/s) + real(kind_phys) :: cape(IJSDIM) !< convective available potential energy (J/kg) + real(kind_phys) :: prec(IJSDIM) !< precipitation at surface (including snowfall) (kg/m2/s) + real(kind_phys) :: snow(IJSDIM) !< snowfall at surface (kg/m2/s) ! ! input arguments of CS_CUMLUS ! - real(r8) GDT(IJSDIM,KMAX) !< temperature [K] - real(r8) GDQ(IJSDIM,KMAX,NTR) !< tracers including moisture [kg/kg] !DDsigmadiag - real(r8) GDU(IJSDIM,KMAX) !< zonal wind [m/s] - real(r8) GDV(IJSDIM,KMAX) !< meridional wind [m/s] - real(r8) GDTM(IJSDIM,KMAX+1) !< temperature at boundaries of layers [K] - real(r8) GDP(IJSDIM,KMAX) !< pressure [Pa] - real(r8) GDPM(IJSDIM,KMAX+1) !< pressure at boundaries of layers [Pa] - real(r8) GDZ(IJSDIM,KMAX) !< altitude [m] - real(r8) GDZM(IJSDIM,KMAX+1) !< altitude at boundaries of layers [m] - real(r8) delp(IJSDIM,KMAX) !< pressure difference between layers [Pa] - real(r8) delpi(IJSDIM,KMAX) !< grav/delp + real(kind_phys) GDT(IJSDIM,KMAX) !< temperature [K] + real(kind_phys) GDQ(IJSDIM,KMAX,NTR) !< tracers including moisture [kg/kg] !DDsigmadiag + real(kind_phys) GDU(IJSDIM,KMAX) !< zonal wind [m/s] + real(kind_phys) GDV(IJSDIM,KMAX) !< meridional wind [m/s] + real(kind_phys) GDTM(IJSDIM,KMAX+1) !< temperature at boundaries of layers [K] + real(kind_phys) GDP(IJSDIM,KMAX) !< pressure [Pa] + real(kind_phys) GDPM(IJSDIM,KMAX+1) !< pressure at boundaries of layers [Pa] + real(kind_phys) GDZ(IJSDIM,KMAX) !< altitude [m] + real(kind_phys) GDZM(IJSDIM,KMAX+1) !< altitude at boundaries of layers [m] + real(kind_phys) delp(IJSDIM,KMAX) !< pressure difference between layers [Pa] + real(kind_phys) delpi(IJSDIM,KMAX) !< grav/delp ! ! local variables ! -!DD real(r8) :: zs(IJSDIM) !< surface height [m] +!DD real(kind_phys) :: zs(IJSDIM) !< surface height [m] integer KTMAX(IJSDIM) !< max of KT - real(r8) :: ftintm, wrk, wrk1, tem - integer i, k, n, ISTS, IENS, kp1, ipr + real(kind_phys) :: ftintm, wrk, wrk1, tem + integer i, k, n, ISTS, IENS, kp1 !DD borrowed from RAS to go form total condensate to ice/water separately ! parameter (tf=130.16, tcr=160.16, tcrf=1.0/(tcr-tf),tcl=2.0) ! parameter (tf=230.16, tcr=260.16, tcrf=1.0/(tcr-tf)) - real(r8), parameter :: tf=233.16, tcr=263.16, tcrf=1.0/(tcr-tf), tcl=2.0 + real(kind_phys), parameter :: tf=233.16, tcr=263.16, tcrf=1.0/(tcr-tf), tcl=2.0 logical, save :: first=.true. - logical lprnt ! Initialize CCPP error handling variables errmsg = '' @@ -724,208 +724,208 @@ SUBROUTINE CS_CUMLUS (im , IJSDIM, KMAX , NTR , & !DD dimensions logical, intent(in) :: otspt1(ntr), otspt2(ntr), lprnt ! ! [OUTPUT] - REAL(r8), INTENT(OUT) :: GTT (IJSDIM, KMAX ) ! heating rate - REAL(r8), INTENT(OUT) :: GTQ (IJSDIM, KMAX, NTR) ! change in q - REAL(r8), INTENT(OUT) :: GTU (IJSDIM, KMAX ) ! tendency of u - REAL(r8), INTENT(OUT) :: GTV (IJSDIM, KMAX ) ! tendency of v - REAL(r8), INTENT(OUT) :: CMDET (IJSDIM, KMAX ) ! detrainment mass flux + REAL(kind_phys), INTENT(OUT) :: GTT (IJSDIM, KMAX ) ! heating rate + REAL(kind_phys), INTENT(OUT) :: GTQ (IJSDIM, KMAX, NTR) ! change in q + REAL(kind_phys), INTENT(OUT) :: GTU (IJSDIM, KMAX ) ! tendency of u + REAL(kind_phys), INTENT(OUT) :: GTV (IJSDIM, KMAX ) ! tendency of v + REAL(kind_phys), INTENT(OUT) :: CMDET (IJSDIM, KMAX ) ! detrainment mass flux ! assuming there is no flux at the top of the atmospherea - Moorthi - REAL(r8), INTENT(OUT) :: GTPRP (IJSDIM, KMAX ) ! rain+snow flux - REAL(r8), INTENT(OUT) :: GSNWP (IJSDIM, KMAX ) ! snowfall flux - REAL(r8), INTENT(OUT) :: GMFX0 (IJSDIM, KMAX ) ! updraft mass flux - REAL(r8), INTENT(OUT) :: GMFX1 (IJSDIM, KMAX ) ! downdraft mass flux + REAL(kind_phys), INTENT(OUT) :: GTPRP (IJSDIM, KMAX ) ! rain+snow flux + REAL(kind_phys), INTENT(OUT) :: GSNWP (IJSDIM, KMAX ) ! snowfall flux + REAL(kind_phys), INTENT(OUT) :: GMFX0 (IJSDIM, KMAX ) ! updraft mass flux + REAL(kind_phys), INTENT(OUT) :: GMFX1 (IJSDIM, KMAX ) ! downdraft mass flux - REAL(r8), INTENT(OUT) :: CAPE (IJSDIM ) + REAL(kind_phys), INTENT(OUT) :: CAPE (IJSDIM ) INTEGER , INTENT(OUT) :: KT (IJSDIM, NCTP ) ! cloud top ! ! [MODIFIED] - REAL(r8), INTENT(INOUT) :: CBMFX (IM, NCTP) ! cloud base mass flux + REAL(kind_phys), INTENT(INOUT) :: CBMFX (IM, NCTP) ! cloud base mass flux !DDsigma - output added for AW sigma diagnostics ! sigma and vert. velocity as a function of cloud type (1==sfc) - real(r8), intent(out), dimension(IM,KMAX) :: sigma !sigma totaled over cloud type - on interfaces (1=sfc) - real(r8), intent(out), dimension(IM,KMAX,nctp) :: vverti + real(kind_phys), intent(out), dimension(IM,KMAX) :: sigma !sigma totaled over cloud type - on interfaces (1=sfc) + real(kind_phys), intent(out), dimension(IM,KMAX,nctp) :: vverti ! for computing AW flux form of tendencies ! The tendencies are summed over all cloud types -! real(r8), intent(out), dimension(IM,KMAX) :: & !DDsigmadiag - real(r8), allocatable, dimension(:,:) :: sfluxterm, qvfluxterm,& ! tendencies of DSE and water vapor due to eddy mass flux +! real(kind_phys), intent(out), dimension(IM,KMAX) :: & !DDsigmadiag + real(kind_phys), allocatable, dimension(:,:) :: sfluxterm, qvfluxterm,& ! tendencies of DSE and water vapor due to eddy mass flux qlfluxterm, qifluxterm,& ! tendencies of cloud water and cloud ice due to eddy mass flux ! The fluxes are for an individual cloud type and reused. ! condtermt, condtermq are eddy flux of temperature and water vapor condtermt, condtermq, frzterm, & prectermq, prectermfrz - real(r8), allocatable, dimension(:,:,:) :: trfluxterm ! tendencies of tracers due to eddy mass flux + real(kind_phys), allocatable, dimension(:,:,:) :: trfluxterm ! tendencies of tracers due to eddy mass flux ! ! [INPUT] - REAL(r8), INTENT(IN) :: GDT (IJSDIM, KMAX ) ! temperature T - REAL(r8), INTENT(IN) :: GDQ (IJSDIM, KMAX, NTR) ! humidity, tracer !DDsigmadiag - REAL(r8), INTENT(IN) :: GDU (IJSDIM, KMAX ) ! westerly u - REAL(r8), INTENT(IN) :: GDV (IJSDIM, KMAX ) ! southern wind v - REAL(r8), INTENT(IN) :: GDTM (IJSDIM, KMAX+1 ) ! temperature T - REAL(r8), INTENT(IN) :: GDP (IJSDIM, KMAX ) ! pressure P - REAL(r8), INTENT(IN) :: GDPM (IJSDIM, KMAX+1 ) ! pressure (half lev) - REAL(r8), INTENT(IN) :: GDZ (IJSDIM, KMAX ) ! altitude - REAL(r8), INTENT(IN) :: GDZM (IJSDIM, KMAX+1 ) ! altitude - REAL(r8), INTENT(IN) :: DELTA ! delta(t) (dynamics) - REAL(r8), INTENT(IN) :: DELTI ! delta(t) (internal variable) + REAL(kind_phys), INTENT(IN) :: GDT (IJSDIM, KMAX ) ! temperature T + REAL(kind_phys), INTENT(IN) :: GDQ (IJSDIM, KMAX, NTR) ! humidity, tracer !DDsigmadiag + REAL(kind_phys), INTENT(IN) :: GDU (IJSDIM, KMAX ) ! westerly u + REAL(kind_phys), INTENT(IN) :: GDV (IJSDIM, KMAX ) ! southern wind v + REAL(kind_phys), INTENT(IN) :: GDTM (IJSDIM, KMAX+1 ) ! temperature T + REAL(kind_phys), INTENT(IN) :: GDP (IJSDIM, KMAX ) ! pressure P + REAL(kind_phys), INTENT(IN) :: GDPM (IJSDIM, KMAX+1 ) ! pressure (half lev) + REAL(kind_phys), INTENT(IN) :: GDZ (IJSDIM, KMAX ) ! altitude + REAL(kind_phys), INTENT(IN) :: GDZM (IJSDIM, KMAX+1 ) ! altitude + REAL(kind_phys), INTENT(IN) :: DELTA ! delta(t) (dynamics) + REAL(kind_phys), INTENT(IN) :: DELTI ! delta(t) (internal variable) INTEGER, INTENT(IN) :: ISTS, IENS ! array range - real(r8), intent(in) :: fscav(ntr), fswtr(ntr), wcbmaxm(ijsdim) + real(kind_phys), intent(in) :: fscav(ntr), fswtr(ntr), wcbmaxm(ijsdim) ! ! [INTERNAL WORK] - REAL(r8), allocatable :: GPRCC (:, :) ! rainfall -! REAL(r8) GPRCC (IJSDIM, NTR) ! rainfall -! REAL(r8) GSNWC (IJSDIM) ! snowfall -! REAL(r8) CUMCLW(IJSDIM, KMAX) ! cloud water in cumulus -! REAL(r8) CUMFRC(IJSDIM) ! cumulus cloud fraction -! -! REAL(r8) GTCFRC(IJSDIM, KMAX) ! change in cloud fraction -! REAL(r8) FLIQC (IJSDIM, KMAX) ! liquid ratio in cumulus -! -! REAL(r8) GDCFRC(IJSDIM, KMAX) ! cloud fraction -! - REAL(r8) GDW (IJSDIM, KMAX) ! total water - REAL(r8) DELP (IJSDIM, KMAX) - REAL(r8) DELPI (IJSDIM, KMAX) - REAL(r8) GDQS (IJSDIM, KMAX) ! saturate moisture - REAL(r8) FDQS (IJSDIM, KMAX) - REAL(r8) GAM (IJSDIM, KMAX) - REAL(r8) GDS (IJSDIM, KMAX) ! dry static energy - REAL(r8) GDH (IJSDIM, KMAX) ! moist static energy - REAL(r8) GDHS (IJSDIM, KMAX) ! saturate MSE -! - REAL(r8) GCYM (IJSDIM, KMAX, NCTP)! norm. mass flux (half lev) - REAL(r8) GCHB (IJSDIM) ! cloud base MSE-Li*Qi - REAL(r8) GCWB (IJSDIM) ! cloud base total water - REAL(r8) GCUB (IJSDIM) ! cloud base U - REAL(r8) GCVB (IJSDIM) ! cloud base V - REAL(r8) GCIB (IJSDIM) ! cloud base ice - REAL(r8) GCtrB (IJSDIM,ntrq:ntr) ! cloud base tracer - REAL(r8) GCYT (IJSDIM, NCTP) ! norm. mass flux @top - REAL(r8) GCHT (IJSDIM, NCTP) ! cloud top MSE - REAL(r8) GCQT (IJSDIM, NCTP) ! cloud top q - REAL(r8) GCwT (IJSDIM) ! cloud top total water - REAL(r8) GCUT (IJSDIM, NCTP) ! cloud top U - REAL(r8) GCVT (IJSDIM, NCTP) ! cloud top V - REAL(r8) GCLT (IJSDIM, NCTP) ! cloud top cloud water - REAL(r8) GCIT (IJSDIM, NCTP) ! cloud top cloud ice - REAL(r8) GCtrT (IJSDIM, ntrq:ntr, NCTP) ! cloud top tracer - REAL(r8) GTPRT (IJSDIM, NCTP) ! precipitation/M - REAL(r8) GCLZ (IJSDIM, KMAX) ! cloud liquid for each CTP - REAL(r8) GCIZ (IJSDIM, KMAX) ! cloud ice for each CTP - -! REAL(r8) ACWF (IJSDIM, NCTP) ! cloud work function - REAL(r8) ACWF (IJSDIM ) ! cloud work function - REAL(r8) GPRCIZ(IJSDIM, KMAX) ! precipitation - REAL(r8) GSNWIZ(IJSDIM, KMAX) ! snowfall - REAL(r8) GTPRC0(IJSDIM) ! precip. before evap. - - REAL(r8) GMFLX (IJSDIM, KMAX) ! mass flux (updraft+downdraft) - REAL(r8) QLIQ (IJSDIM, KMAX) ! total cloud liquid - REAL(r8) QICE (IJSDIM, KMAX) ! total cloud ice - REAL(r8) GPRCI (IJSDIM, KMAX) ! rainfall generation - REAL(r8) GSNWI (IJSDIM, KMAX) ! snowfall generation - - REAL(r8) GPRCP (IJSDIM, KMAX) ! rainfall flux -! - REAL(r8) GTEVP (IJSDIM, KMAX) ! evaporation+sublimation - REAL(r8) GMDD (IJSDIM, KMAX) ! downdraft mass flux - -! REAL(r8) CUMHGT(IJSDIM, NCTP) ! cloud top height -! REAL(r8) CTOPP (IJSDIM) ! cloud top pressure - - REAL(r8) GDZTR (IJSDIM) ! tropopause height -! REAL(r8) FLIQOU(IJSDIM, KMAX) ! liquid ratio in cumulus + REAL(kind_phys), allocatable :: GPRCC (:, :) ! rainfall +! REAL(kind_phys) GPRCC (IJSDIM, NTR) ! rainfall +! REAL(kind_phys) GSNWC (IJSDIM) ! snowfall +! REAL(kind_phys) CUMCLW(IJSDIM, KMAX) ! cloud water in cumulus +! REAL(kind_phys) CUMFRC(IJSDIM) ! cumulus cloud fraction +! +! REAL(kind_phys) GTCFRC(IJSDIM, KMAX) ! change in cloud fraction +! REAL(kind_phys) FLIQC (IJSDIM, KMAX) ! liquid ratio in cumulus +! +! REAL(kind_phys) GDCFRC(IJSDIM, KMAX) ! cloud fraction +! + REAL(kind_phys) GDW (IJSDIM, KMAX) ! total water + REAL(kind_phys) DELP (IJSDIM, KMAX) + REAL(kind_phys) DELPI (IJSDIM, KMAX) + REAL(kind_phys) GDQS (IJSDIM, KMAX) ! saturate moisture + REAL(kind_phys) FDQS (IJSDIM, KMAX) + REAL(kind_phys) GAM (IJSDIM, KMAX) + REAL(kind_phys) GDS (IJSDIM, KMAX) ! dry static energy + REAL(kind_phys) GDH (IJSDIM, KMAX) ! moist static energy + REAL(kind_phys) GDHS (IJSDIM, KMAX) ! saturate MSE +! + REAL(kind_phys) GCYM (IJSDIM, KMAX, NCTP)! norm. mass flux (half lev) + REAL(kind_phys) GCHB (IJSDIM) ! cloud base MSE-Li*Qi + REAL(kind_phys) GCWB (IJSDIM) ! cloud base total water + REAL(kind_phys) GCUB (IJSDIM) ! cloud base U + REAL(kind_phys) GCVB (IJSDIM) ! cloud base V + REAL(kind_phys) GCIB (IJSDIM) ! cloud base ice + REAL(kind_phys) GCtrB (IJSDIM,ntrq:ntr) ! cloud base tracer + REAL(kind_phys) GCYT (IJSDIM, NCTP) ! norm. mass flux @top + REAL(kind_phys) GCHT (IJSDIM, NCTP) ! cloud top MSE + REAL(kind_phys) GCQT (IJSDIM, NCTP) ! cloud top q + REAL(kind_phys) GCwT (IJSDIM) ! cloud top total water + REAL(kind_phys) GCUT (IJSDIM, NCTP) ! cloud top U + REAL(kind_phys) GCVT (IJSDIM, NCTP) ! cloud top V + REAL(kind_phys) GCLT (IJSDIM, NCTP) ! cloud top cloud water + REAL(kind_phys) GCIT (IJSDIM, NCTP) ! cloud top cloud ice + REAL(kind_phys) GCtrT (IJSDIM, ntrq:ntr, NCTP) ! cloud top tracer + REAL(kind_phys) GTPRT (IJSDIM, NCTP) ! precipitation/M + REAL(kind_phys) GCLZ (IJSDIM, KMAX) ! cloud liquid for each CTP + REAL(kind_phys) GCIZ (IJSDIM, KMAX) ! cloud ice for each CTP + +! REAL(kind_phys) ACWF (IJSDIM, NCTP) ! cloud work function + REAL(kind_phys) ACWF (IJSDIM ) ! cloud work function + REAL(kind_phys) GPRCIZ(IJSDIM, KMAX) ! precipitation + REAL(kind_phys) GSNWIZ(IJSDIM, KMAX) ! snowfall + REAL(kind_phys) GTPRC0(IJSDIM) ! precip. before evap. + + REAL(kind_phys) GMFLX (IJSDIM, KMAX) ! mass flux (updraft+downdraft) + REAL(kind_phys) QLIQ (IJSDIM, KMAX) ! total cloud liquid + REAL(kind_phys) QICE (IJSDIM, KMAX) ! total cloud ice + REAL(kind_phys) GPRCI (IJSDIM, KMAX) ! rainfall generation + REAL(kind_phys) GSNWI (IJSDIM, KMAX) ! snowfall generation + + REAL(kind_phys) GPRCP (IJSDIM, KMAX) ! rainfall flux +! + REAL(kind_phys) GTEVP (IJSDIM, KMAX) ! evaporation+sublimation + REAL(kind_phys) GMDD (IJSDIM, KMAX) ! downdraft mass flux + +! REAL(kind_phys) CUMHGT(IJSDIM, NCTP) ! cloud top height +! REAL(kind_phys) CTOPP (IJSDIM) ! cloud top pressure + + REAL(kind_phys) GDZTR (IJSDIM) ! tropopause height +! REAL(kind_phys) FLIQOU(IJSDIM, KMAX) ! liquid ratio in cumulus INTEGER KB (IJSDIM) INTEGER KSTRT (IJSDIM) ! tropopause level - REAL(r8) GAMX - REAL(r8) CIN (IJSDIM) + REAL(kind_phys) GAMX + REAL(kind_phys) CIN (IJSDIM) INTEGER JBUOY (IJSDIM) - REAL(r8) DELZ, BUOY, DELWC, DELER - REAL(r8) WCBX (IJSDIM) -! REAL(r8) ERMR (NCTP) ! entrainment rate (ASMODE) + REAL(kind_phys) DELZ, BUOY, DELWC, DELER + REAL(kind_phys) WCBX (IJSDIM) +! REAL(kind_phys) ERMR (NCTP) ! entrainment rate (ASMODE) ! SAVE ERMR INTEGER KTMX (NCTP) ! max of cloud top INTEGER KTMXT ! max of cloud top -! REAL(r8) TIMED - REAL(r8) GDCLDX, GDMU2X, GDMU3X +! REAL(kind_phys) TIMED + REAL(kind_phys) GDCLDX, GDMU2X, GDMU3X ! -! REAL(r8) HBGT (IJSDIM) ! imbalance in column heat -! REAL(r8) WBGT (IJSDIM) ! imbalance in column water +! REAL(kind_phys) HBGT (IJSDIM) ! imbalance in column heat +! REAL(kind_phys) WBGT (IJSDIM) ! imbalance in column water !DDsigma begin local work variables - all on model interfaces (sfc=1) - REAL(r8) lamdai ! lamda for cloud type ctp - REAL(r8) gdqm, gdlm, gdim ! water vapor - REAL(r8) gdtrm(ntrq:ntr) ! tracer + REAL(kind_phys) lamdai ! lamda for cloud type ctp + REAL(kind_phys) gdqm, gdlm, gdim ! water vapor + REAL(kind_phys) gdtrm(ntrq:ntr) ! tracer ! the following are new arguments to cumup to get them out for AW - REAL(r8) wcv (IJSDIM, KMAX) ! in-cloud vertical velocity - REAL(r8) GCTM (IJSDIM, KMAX) ! cloud T (half lev) !DDsigmadiag make output - REAL(r8) GCQM (IJSDIM, KMAX) ! cloud q (half lev) !DDsigmadiag make output - REAL(r8) GCwM (IJSDIM, KMAX) ! cloud q (half lev) !DDsigmadiag make output - REAL(r8) GCiM (IJSDIM, KMAX) ! cloud q (half lev) !DDsigmadiag make output - REAL(r8) GClM (IJSDIM, KMAX) ! cloud q (half lev) !DDsigmadiag make output - REAL(r8) GChM (IJSDIM, KMAX) ! cloud q (half lev) !DDsigmadiag make output - REAL(r8) GCtrM (IJSDIM, KMAX, ntrq:ntr) ! cloud tracer (half lev) !DDsigmadiag make output + REAL(kind_phys) wcv (IJSDIM, KMAX) ! in-cloud vertical velocity + REAL(kind_phys) GCTM (IJSDIM, KMAX) ! cloud T (half lev) !DDsigmadiag make output + REAL(kind_phys) GCQM (IJSDIM, KMAX) ! cloud q (half lev) !DDsigmadiag make output + REAL(kind_phys) GCwM (IJSDIM, KMAX) ! cloud q (half lev) !DDsigmadiag make output + REAL(kind_phys) GCiM (IJSDIM, KMAX) ! cloud q (half lev) !DDsigmadiag make output + REAL(kind_phys) GClM (IJSDIM, KMAX) ! cloud q (half lev) !DDsigmadiag make output + REAL(kind_phys) GChM (IJSDIM, KMAX) ! cloud q (half lev) !DDsigmadiag make output + REAL(kind_phys) GCtrM (IJSDIM, KMAX, ntrq:ntr) ! cloud tracer (half lev) !DDsigmadiag make output ! eddy flux profiles for dse, water vapor, cloud water, cloud ice - REAL(r8), dimension(Kmax+1) :: sfluxtem, qvfluxtem, qlfluxtem, qifluxtem - REAL(r8), dimension(Kmax+1,ntrq:ntr) :: trfluxtem ! tracer + REAL(kind_phys), dimension(Kmax+1) :: sfluxtem, qvfluxtem, qlfluxtem, qifluxtem + REAL(kind_phys), dimension(Kmax+1,ntrq:ntr) :: trfluxtem ! tracer ! tendency profiles - condensation heating, condensation moistening, heating due to ! freezing, total precip production, frozen precip production - REAL(r8), dimension(ijsdim,Kmax) :: dtcondtem, dqcondtem, dtfrztem, dqprectem,& ! Moorthi + REAL(kind_phys), dimension(ijsdim,Kmax) :: dtcondtem, dqcondtem, dtfrztem, dqprectem,& ! Moorthi dfrzprectem, lamdaprod !< product of (1+lamda) through cloud type ctp - REAL(r8), dimension(ijsdim,Kmax) :: dtevap, dqevap, dtmelt, dtsubl + REAL(kind_phys), dimension(ijsdim,Kmax) :: dtevap, dqevap, dtmelt, dtsubl ! factor to modify precip rate to force conservation of water. With bug fixes it's ! not doing anything now. - REAL(r8), dimension(ijsdim) :: moistening_aw - real(r8), dimension(ijsdim,kmax) :: gctbl, gcqbl,gcwbl, gcqlbl, gcqibl, & !DDsigmadiag updraft profiles below cloud Base + REAL(kind_phys), dimension(ijsdim) :: moistening_aw + real(kind_phys), dimension(ijsdim,kmax) :: gctbl, gcqbl,gcwbl, gcqlbl, gcqibl, & !DDsigmadiag updraft profiles below cloud Base sigmad ! downdraft area fraction - real(r8), dimension(ijsdim,kmax,ntrq:ntr) :: gctrbl !DDsigmadiag tracer updraft profiles below cloud Base + real(kind_phys), dimension(ijsdim,kmax,ntrq:ntr) :: gctrbl !DDsigmadiag tracer updraft profiles below cloud Base ! rhs_q, rhs_h are residuals of condensed water, MSE budgets to compute condensation, ! and heating due to freezing - real(r8) :: rhs_q, rhs_h, fsigma, sigmai, delpinv -! real(r8) :: rhs_q, rhs_h, sftem, qftem, qlftem, qiftem, & + real(kind_phys) :: rhs_q, rhs_h, fsigma, sigmai, delpinv +! real(kind_phys) :: rhs_q, rhs_h, sftem, qftem, qlftem, qiftem, & ! fsigma ! factor to reduce mass flux terms (1-sigma**2) for AW !DDsigma end local work variables ! ! profiles of heating due to precip evaporation, melting and sublimation, and the ! evap, melting and sublimation rates. - REAL(r8), allocatable, dimension(:,:) :: dtdwn, & ! t tendency downdraft detrainment + REAL(kind_phys), allocatable, dimension(:,:) :: dtdwn, & ! t tendency downdraft detrainment dqvdwn, & ! qv tendency downdraft detrainment dqldwn, & ! ql tendency downdraft detrainment dqidwn ! qi tendency downdraft detrainment - REAL(r8), allocatable, dimension(:,:,:) :: dtrdwn ! tracer tendency downdraft detrainment + REAL(kind_phys), allocatable, dimension(:,:,:) :: dtrdwn ! tracer tendency downdraft detrainment !DDsigma end local work variables ! ! [INTERNAL PARM] - REAL(r8), parameter :: WCBMIN = zero ! min. of updraft velocity at cloud base + REAL(kind_phys), parameter :: WCBMIN = zero ! min. of updraft velocity at cloud base -!M REAL(r8) :: WCBMAX = 1.4_r8 ! max. of updraft velocity at cloud base +!M REAL(kind_phys) :: WCBMAX = 1.4_kind_phys ! max. of updraft velocity at cloud base !M wcbas commented by Moorthi since it is not used -!M REAL(r8) :: WCBAS = 2._r8 ! updraft velocity**2 at cloud base (ASMODE) -!M REAL(r8) :: ERAMIN = 1.e-5_r8 ! min. of entrainment rate +!M REAL(kind_phys) :: WCBAS = 2._kind_phys ! updraft velocity**2 at cloud base (ASMODE) +!M REAL(kind_phys) :: ERAMIN = 1.e-5_kind_phys ! min. of entrainment rate ! used only in OPT_ASMODE -!M REAL(r8) :: ERAMAX = 2.e-3_r8 ! max. of entrainment rate +!M REAL(kind_phys) :: ERAMAX = 2.e-3_kind_phys ! max. of entrainment rate ! used only in OPT_ASMODE LOGICAL :: OINICB = .false. ! set 0.d0 to CBMFX when .true. -! REAL(r8) :: VARMIN = 1.e-13_r8 ! minimum of PDF variance -! REAL(r8) :: VARMAX = 5.e-7_r8 ! maximum of PDF variance -! REAL(r8) :: SKWMAX = 0.566_r8 ! maximum of PDF skewness +! REAL(kind_phys) :: VARMIN = 1.e-13_kind_phys ! minimum of PDF variance +! REAL(kind_phys) :: VARMAX = 5.e-7_kind_phys ! maximum of PDF variance +! REAL(kind_phys) :: SKWMAX = 0.566_kind_phys ! maximum of PDF skewness - REAL(r8) :: PSTRMX = 400.e2_r8 ! max P of tropopause - REAL(r8) :: PSTRMN = 50.e2_r8 ! min P of tropopause - REAL(r8) :: GCRSTR = 1.e-4_r8 ! crit. dT/dz tropopause + REAL(kind_phys) :: PSTRMX = 400.e2_kind_phys ! max P of tropopause + REAL(kind_phys) :: PSTRMN = 50.e2_kind_phys ! min P of tropopause + REAL(kind_phys) :: GCRSTR = 1.e-4_kind_phys ! crit. dT/dz tropopause - real(kind=r8) :: tem, esat, mflx_e, cbmfl, tem1, tem2, tem3 + real(kind=kind_phys) :: tem, esat, mflx_e, cbmfl, tem1, tem2, tem3 INTEGER :: KBMX, I, K, CTP, ierr, n, kp1, km1, kk, kbi, l, l1 ! LOGICAL, SAVE :: OFIRST = .TRUE. ! called first time? @@ -1723,7 +1723,7 @@ SUBROUTINE CS_CUMLUS (im , IJSDIM, KMAX , NTR , & !DD dimensions ! is occuring now which is a good sign! DD if(flx_form .and. adjustp) then DO I = ISTS, IENS - if(gprcp(i,1)+gsnwp(i,1) > 1.e-12_r8) then + if(gprcp(i,1)+gsnwp(i,1) > 1.e-12_kind_phys) then moistening_aw(i) = - moistening_aw(i) / (gprcp(i,1)+gsnwp(i,1)) else moistening_aw(i) = 1.0 @@ -1792,42 +1792,42 @@ SUBROUTINE CUMBAS & ! cloud base ! ! [OUTPUT] INTEGER KB (IJSDIM) ! cloud base - REAL(r8) GCYM (IJSDIM, KMAX) ! norm. mass flux (half lev) + REAL(kind_phys) GCYM (IJSDIM, KMAX) ! norm. mass flux (half lev) INTEGER KBMX - REAL(r8) GCHB (IJSDIM) ! cloud base MSE - REAL(r8) GCWB (IJSDIM) ! cloud base total water - REAL(r8) GCUB (IJSDIM) ! cloud base U - REAL(r8) GCVB (IJSDIM) ! cloud base V - REAL(r8) GCIB (IJSDIM) ! cloud base ice - REAL(r8) GCtrB (IJSDIM,ntrq:ntr) ! cloud base tracer + REAL(kind_phys) GCHB (IJSDIM) ! cloud base MSE + REAL(kind_phys) GCWB (IJSDIM) ! cloud base total water + REAL(kind_phys) GCUB (IJSDIM) ! cloud base U + REAL(kind_phys) GCVB (IJSDIM) ! cloud base V + REAL(kind_phys) GCIB (IJSDIM) ! cloud base ice + REAL(kind_phys) GCtrB (IJSDIM,ntrq:ntr) ! cloud base tracer !DDsigma added to arglist for AW, subcloud updraft profiles: temperature, water vapor ! total water, cloud water, and cloud ice respectively - REAL(r8), dimension(ijsdim,kmax) :: gctbl, gcqbl, gcwbl, gcqlbl, gcqibl !>DDsigmadiag - REAL(r8), dimension(ijsdim,kmax,ntrq:ntr) :: gctrbl !DDsigmadiag + REAL(kind_phys), dimension(ijsdim,kmax) :: gctbl, gcqbl, gcwbl, gcqlbl, gcqibl !>DDsigmadiag + REAL(kind_phys), dimension(ijsdim,kmax,ntrq:ntr) :: gctrbl !DDsigmadiag ! ! [INPUT] - REAL(r8) GDH (IJSDIM, KMAX) ! moist static energy - REAL(r8) GDW (IJSDIM, KMAX) ! total water - REAL(r8) GDq (IJSDIM, KMAX, ntr) ! water vapor and tracer - REAL(r8) GDHS (IJSDIM, KMAX) ! saturate MSE - REAL(r8) GDQS (IJSDIM, KMAX) ! saturate humidity - REAL(r8) GDQI (IJSDIM, KMAX) ! cloud ice - REAL(r8) GDU (IJSDIM, KMAX) ! u-velocity - REAL(r8) GDV (IJSDIM, KMAX) ! v-velocity - REAL(r8) GDZM (IJSDIM, KMAX+1) ! Altitude (half lev) - REAL(r8) GDPM (IJSDIM, KMAX+1) ! pressure (half lev) - REAL(r8) FDQS (IJSDIM, KMAX) - REAL(r8) GAM (IJSDIM, KMAX) + REAL(kind_phys) GDH (IJSDIM, KMAX) ! moist static energy + REAL(kind_phys) GDW (IJSDIM, KMAX) ! total water + REAL(kind_phys) GDq (IJSDIM, KMAX, ntr) ! water vapor and tracer + REAL(kind_phys) GDHS (IJSDIM, KMAX) ! saturate MSE + REAL(kind_phys) GDQS (IJSDIM, KMAX) ! saturate humidity + REAL(kind_phys) GDQI (IJSDIM, KMAX) ! cloud ice + REAL(kind_phys) GDU (IJSDIM, KMAX) ! u-velocity + REAL(kind_phys) GDV (IJSDIM, KMAX) ! v-velocity + REAL(kind_phys) GDZM (IJSDIM, KMAX+1) ! Altitude (half lev) + REAL(kind_phys) GDPM (IJSDIM, KMAX+1) ! pressure (half lev) + REAL(kind_phys) FDQS (IJSDIM, KMAX) + REAL(kind_phys) GAM (IJSDIM, KMAX) INTEGER ISTS, IENS ! ! [INTERNAL WORK] - REAL(r8) CBASE (IJSDIM) ! one over cloud base height -! REAL(r8) CBASEP(IJSDIM) ! cloud base pressure - REAL(r8) DELZ, GAMX, wrk -! REAL(r8) DELZ, QSL, GAMX, wrk -! REAL(r8), dimension(ijsdim,kmax) :: gchbl !DDsigmadiag - real(r8), dimension(ijsdim) :: gcqb, tx1, spbl, qsl + REAL(kind_phys) CBASE (IJSDIM) ! one over cloud base height +! REAL(kind_phys) CBASEP(IJSDIM) ! cloud base pressure + REAL(kind_phys) DELZ, GAMX, wrk +! REAL(kind_phys) DELZ, QSL, GAMX, wrk +! REAL(kind_phys), dimension(ijsdim,kmax) :: gchbl !DDsigmadiag + real(kind_phys), dimension(ijsdim) :: gcqb, tx1, spbl, qsl INTEGER I, K, kp1, n ! ! [INTERNAL PARM] @@ -2031,91 +2031,91 @@ SUBROUTINE CUMUP & !! in-cloud properties logical :: lprnt ! ! [OUTPUT] - REAL(r8) ACWF (IJSDIM) ! cloud work function - REAL(r8) GCLZ (IJSDIM, KMAX) ! cloud liquid water*eta - REAL(r8) GCIZ (IJSDIM, KMAX) ! cloud ice*eta - REAL(r8) GPRCIZ(IJSDIM, KMAX) ! rain generation*eta - REAL(r8) GSNWIZ(IJSDIM, KMAX) ! snow generation*eta - REAL(r8) GCYT (IJSDIM) ! norm. mass flux @top - REAL(r8) GCHT (IJSDIM) ! cloud top MSE*eta - REAL(r8) GCQT (IJSDIM) ! cloud top moisture*eta - REAL(r8) GCLT (IJSDIM) ! cloud top liquid water*eta - REAL(r8) GCIT (IJSDIM) ! cloud top ice*eta - REAL(r8) GCtrT (IJSDIM, ntrq:ntr) ! cloud top tracer*eta - REAL(r8) GTPRT (IJSDIM) ! cloud top (rain+snow)*eta - REAL(r8) GCUT (IJSDIM) ! cloud top u*eta - REAL(r8) GCVT (IJSDIM) ! cloud top v*eta - REAL(r8) GCwT (IJSDIM) ! cloud top v*eta - INTEGER KT (IJSDIM) ! cloud top - INTEGER KTMX ! max of cloud top - REAL(r8) WCV (IJSDIM, KMAX) ! updraft velocity (half lev) !DD sigma make output + REAL(kind_phys) ACWF (IJSDIM) !< cloud work function + REAL(kind_phys) GCLZ (IJSDIM, KMAX) !< cloud liquid water*eta + REAL(kind_phys) GCIZ (IJSDIM, KMAX) !< cloud ice*eta + REAL(kind_phys) GPRCIZ(IJSDIM, KMAX) !< rain generation*eta + REAL(kind_phys) GSNWIZ(IJSDIM, KMAX) !< snow generation*eta + REAL(kind_phys) GCYT (IJSDIM) !< norm. mass flux @top + REAL(kind_phys) GCHT (IJSDIM) !< cloud top MSE*eta + REAL(kind_phys) GCQT (IJSDIM) !< cloud top moisture*eta + REAL(kind_phys) GCLT (IJSDIM) !< cloud top liquid water*eta + REAL(kind_phys) GCIT (IJSDIM) !< cloud top ice*eta + REAL(kind_phys) GCtrT (IJSDIM, ntrq:ntr) !< cloud top tracer*eta + REAL(kind_phys) GTPRT (IJSDIM) !< cloud top (rain+snow)*eta + REAL(kind_phys) GCUT (IJSDIM) !< cloud top u*eta + REAL(kind_phys) GCVT (IJSDIM) !< cloud top v*eta + REAL(kind_phys) GCwT (IJSDIM) !< cloud top v*eta + INTEGER KT (IJSDIM) !< cloud top + INTEGER KTMX !< max of cloud top + REAL(kind_phys) WCV (IJSDIM, KMAX) !< updraft velocity (half lev) !DD sigma make output ! ! [MODIFIED] - REAL(r8) GCYM (IJSDIM, KMAX) ! norm. mass flux + REAL(kind_phys) GCYM (IJSDIM, KMAX) !< norm. mass flux ! ! [INPUT] - REAL(r8) GCHB (IJSDIM) ! cloud base Moist Static Energy - REAL(r8) GCWB (IJSDIM) ! cloud base total water - REAL(r8) GCUB (IJSDIM) ! cloud base U - REAL(r8) GCVB (IJSDIM) ! cloud base V - REAL(r8) GCIB (IJSDIM) ! cloud base ice - REAL(r8) GCtrB (IJSDIM,ntrq:ntr) ! cloud base tracers - REAL(r8) GDU (IJSDIM, KMAX) ! U - REAL(r8) GDV (IJSDIM, KMAX) ! V - REAL(r8) GDH (IJSDIM, KMAX) ! moist static energy - REAL(r8) GDW (IJSDIM, KMAX) ! total water - REAL(r8) GDHS (IJSDIM, KMAX) ! saturation MSE - REAL(r8) GDQS (IJSDIM, KMAX) ! saturation q - REAL(r8) GDT (IJSDIM, KMAX) ! T - REAL(r8) GDTM (IJSDIM, KMAX+1) ! T (half lev) - REAL(r8) GDQ (IJSDIM, KMAX, NTR) ! q !!DDsigmadiag - REAL(r8) GDQI (IJSDIM, KMAX) ! cloud ice - REAL(r8) GDZ (IJSDIM, KMAX) ! z - REAL(r8) GDZM (IJSDIM, KMAX+1) ! z (half lev) - REAL(r8) GDPM (IJSDIM, KMAX+1) ! p (half lev) - REAL(r8) FDQS (IJSDIM, KMAX) - REAL(r8) GAM (IJSDIM, KMAX) - REAL(r8) GDZTR (IJSDIM) ! tropopause height - REAL(r8) CPRES ! pres. fac. for cum. fric. - REAL(r8) WCB(ijsdim) ! cloud base updraft velocity**2 -! REAL(r8) ERMR ! entrainment rate (ASMODE) + REAL(kind_phys) GCHB (IJSDIM) !< cloud base Moist Static Energy + REAL(kind_phys) GCWB (IJSDIM) !< cloud base total water + REAL(kind_phys) GCUB (IJSDIM) !< cloud base U + REAL(kind_phys) GCVB (IJSDIM) !< cloud base V + REAL(kind_phys) GCIB (IJSDIM) !< cloud base ice + REAL(kind_phys) GCtrB (IJSDIM,ntrq:ntr) !< cloud base tracers + REAL(kind_phys) GDU (IJSDIM, KMAX) !< U + REAL(kind_phys) GDV (IJSDIM, KMAX) !< V + REAL(kind_phys) GDH (IJSDIM, KMAX) !< moist static energy + REAL(kind_phys) GDW (IJSDIM, KMAX) !< total water + REAL(kind_phys) GDHS (IJSDIM, KMAX) !< saturation MSE + REAL(kind_phys) GDQS (IJSDIM, KMAX) !< saturation q + REAL(kind_phys) GDT (IJSDIM, KMAX) !< T + REAL(kind_phys) GDTM (IJSDIM, KMAX+1) !< T (half lev) + REAL(kind_phys) GDQ (IJSDIM, KMAX, NTR) !< q !!DDsigmadiag + REAL(kind_phys) GDQI (IJSDIM, KMAX) !< cloud ice + REAL(kind_phys) GDZ (IJSDIM, KMAX) !< z + REAL(kind_phys) GDZM (IJSDIM, KMAX+1) !< z (half lev) + REAL(kind_phys) GDPM (IJSDIM, KMAX+1) !< p (half lev) + REAL(kind_phys) FDQS (IJSDIM, KMAX) + REAL(kind_phys) GAM (IJSDIM, KMAX) + REAL(kind_phys) GDZTR (IJSDIM) !< tropopause height + REAL(kind_phys) CPRES !< pres. fac. for cum. fric. + REAL(kind_phys) WCB(ijsdim) !< cloud base updraft velocity**2 +! REAL(kind_phys) ERMR !< entrainment rate (ASMODE) INTEGER KB (IJSDIM) INTEGER CTP, ISTS, IENS ! ! [INTERNAL WORK] - REAL(r8) ACWFK (IJSDIM,KMAX) ! cloud work function - REAL(r8) ACWFN (IJSDIM,KMAX) ! negative part of cloud work function - REAL(r8) myGCHt ! cloud top h *eta (half lev) - REAL(r8) GCHMZ (IJSDIM, KMAX) ! cloud h *eta (half lev) - REAL(r8) GCWMZ (IJSDIM, KMAX) ! cloud Qt*eta (half lev) - REAL(r8) GCUMZ (IJSDIM, KMAX) ! cloud U *eta (half lev) - REAL(r8) GCVMZ (IJSDIM, KMAX) ! cloud V *eta (half lev) - REAL(r8) GCqMZ (IJSDIM ) ! cloud qv*eta (half lev) - REAL(r8) GCIMZ (IJSDIM, KMAX) ! cloud Qi*eta (half lev) - REAL(r8) GCtrMZ(IJSDIM, KMAX,ntrq:ntr)! cloud tracer*eta (half lev) - REAL(r8) GTPRMZ(IJSDIM, KMAX) ! rain+snow *eta (half lev) -! - REAL(r8) BUOY (IJSDIM, KMAX) ! buoyancy - REAL(r8) BUOYM (IJSDIM, KMAX) ! buoyancy (half lev) - REAL(r8) WCM (IJSDIM ) ! updraft velocity**2 (half lev) -! REAL(r8) WCM (IJSDIM, KMAX) ! updraft velocity**2 (half lev) -!DD sigma make output REAL(r8) WCV ( IJSDIM, KMAX+1 ) !! updraft velocity (half lev) - REAL(r8) GCY (IJSDIM, KMAX) ! norm. mass flux -! REAL(r8) ELAR (IJSDIM, KMAX) ! entrainment rate - REAL(r8) ELAR ! entrainment rate at mid layer -! - REAL(r8) GCHM (IJSDIM, KMAX) ! cloud MSE (half lev) - REAL(r8) GCWM (IJSDIM, KMAX) ! cloud Qt (half lev) !DDsigmadiag - REAL(r8) GCTM (IJSDIM, KMAX) ! cloud T (half lev) !DDsigmadiag make output - REAL(r8) GCQM (IJSDIM, KMAX) ! cloud q (half lev) !DDsigmadiag make output - REAL(r8) GCLM (IJSDIM, KMAX) ! cloud liquid ( half lev) - REAL(r8) GCIM (IJSDIM, KMAX) ! cloud ice (half lev) - REAL(r8) GCUM (IJSDIM, KMAX) ! cloud U (half lev) - REAL(r8) GCVM (IJSDIM, KMAX) ! cloud V (half lev) - REAL(r8) GCtrM (IJSDIM, KMAX,ntrq:ntr) ! cloud tracer (half lev) -! - REAL(r8), dimension(IJSDIM) :: WCM_, ELARM1, GDZMKB - REAL(r8) GDQSM, GDHSM, GDQM, GDSM, GDCM, FDQSM, GCCM, & + REAL(kind_phys) ACWFK (IJSDIM,KMAX) !< cloud work function + REAL(kind_phys) ACWFN (IJSDIM,KMAX) !< negative part of cloud work function + REAL(kind_phys) myGCHt !< cloud top h *eta (half lev) + REAL(kind_phys) GCHMZ (IJSDIM, KMAX) !< cloud h *eta (half lev) + REAL(kind_phys) GCWMZ (IJSDIM, KMAX) !< cloud Qt*eta (half lev) + REAL(kind_phys) GCUMZ (IJSDIM, KMAX) !< cloud U *eta (half lev) + REAL(kind_phys) GCVMZ (IJSDIM, KMAX) !< cloud V *eta (half lev) + REAL(kind_phys) GCqMZ (IJSDIM ) !< cloud qv*eta (half lev) + REAL(kind_phys) GCIMZ (IJSDIM, KMAX) !< cloud Qi*eta (half lev) + REAL(kind_phys) GCtrMZ(IJSDIM, KMAX,ntrq:ntr)!< cloud tracer*eta (half lev) + REAL(kind_phys) GTPRMZ(IJSDIM, KMAX) !< rain+snow *eta (half lev) +! + REAL(kind_phys) BUOY (IJSDIM, KMAX) !< buoyancy + REAL(kind_phys) BUOYM (IJSDIM, KMAX) !< buoyancy (half lev) + REAL(kind_phys) WCM (IJSDIM ) !< updraft velocity**2 (half lev) +! REAL(kind_phys) WCM (IJSDIM, KMAX) !< updraft velocity**2 (half lev) +!DD sigma make output REAL(kind_phys) WCV ( IJSDIM, KMAX+1 ) !! updraft velocity (half lev) + REAL(kind_phys) GCY (IJSDIM, KMAX) !< norm. mass flux +! REAL(kind_phys) ELAR (IJSDIM, KMAX) !< entrainment rate + REAL(kind_phys) ELAR !< entrainment rate at mid layer +! + REAL(kind_phys) GCHM (IJSDIM, KMAX) !< cloud MSE (half lev) + REAL(kind_phys) GCWM (IJSDIM, KMAX) !< cloud Qt (half lev) !DDsigmadiag + REAL(kind_phys) GCTM (IJSDIM, KMAX) !< cloud T (half lev) !DDsigmadiag make output + REAL(kind_phys) GCQM (IJSDIM, KMAX) !< cloud q (half lev) !DDsigmadiag make output + REAL(kind_phys) GCLM (IJSDIM, KMAX) !< cloud liquid ( half lev) + REAL(kind_phys) GCIM (IJSDIM, KMAX) !< cloud ice (half lev) + REAL(kind_phys) GCUM (IJSDIM, KMAX) !< cloud U (half lev) + REAL(kind_phys) GCVM (IJSDIM, KMAX) !< cloud V (half lev) + REAL(kind_phys) GCtrM (IJSDIM, KMAX,ntrq:ntr) !< cloud tracer (half lev) +! + REAL(kind_phys), dimension(IJSDIM) :: WCM_, ELARM1, GDZMKB + REAL(kind_phys) GDQSM, GDHSM, GDQM, GDSM, GDCM, FDQSM, GCCM, & DELZ, ELADZ, DCTM , CPGMI, DELC, FICE, ELARM2,GCCMZ, & PRECR, GTPRIZ, DELZL, GCCT, DCT, WCVX, PRCZH, wrk INTEGER K, I, kk, km1, kp1, n @@ -2123,43 +2123,43 @@ SUBROUTINE CUMUP & !! in-cloud properties ! CHARACTER CTNUM*2 ! !DD#ifdef OPT_CUMBGT -!DD REAL(r8) HBGT (IJSDIM) ! heat budget -!DD REAL(r8) WBGT (IJSDIM) ! water budget -!DD REAL(r8) PBGT (IJSDIM) ! precipitation budget -!DD REAL(r8) MBGT (IJSDIM) ! mass budget -!DD REAL(r8) GTPRX (IJSDIM) ! (rain+snow)*eta at top -!DD REAL(r8) GSNWT (IJSDIM) ! cloud top snow*eta -!DD REAL(r8) HBMX, WBMX, PBMX, MBMX +!DD REAL(kind_phys) HBGT (IJSDIM) ! heat budget +!DD REAL(kind_phys) WBGT (IJSDIM) ! water budget +!DD REAL(kind_phys) PBGT (IJSDIM) ! precipitation budget +!DD REAL(kind_phys) MBGT (IJSDIM) ! mass budget +!DD REAL(kind_phys) GTPRX (IJSDIM) ! (rain+snow)*eta at top +!DD REAL(kind_phys) GSNWT (IJSDIM) ! cloud top snow*eta +!DD REAL(kind_phys) HBMX, WBMX, PBMX, MBMX !DD SAVE HBMX, WBMX, PBMX, MBMX !DD#endif ! ! [INTERNAL PARAM] - REAL(r8), parameter :: ZTREF = 1._r8, ztrefi = one/ztref, & + REAL(kind_phys), parameter :: ZTREF = 1._kind_phys, ztrefi = one/ztref, & ELAMIN = zero, ELAMAX = 4.e-3 ! min and max entrainment rate - REAL(r8) :: PB = 1.0_r8 -!m REAL(r8) :: TAUZ = 5.0e3_r8 - REAL(r8) :: TAUZ = 1.0e4_r8 -!m REAL(r8) :: ELMD = 2.4e-3 ! for Neggers and Siebesma (2002) -!m REAL(r8) :: ELAMAX = 5.e-3 ! max. of entrainment rate -! REAL(r8) :: WCCRT = zero -!m REAL(r8) :: WCCRT = 0.01 - REAL(r8) :: WCCRT = 1.0e-6_r8, wvcrt=1.0e-3_r8 - REAL(r8) :: TSICE = 268.15_r8 ! compatible with macrop_driver - REAL(r8) :: TWICE = 238.15_r8 ! compatible with macrop_driver - -! REAL(r8) :: wfn_neg = 0.1 - REAL(r8) :: wfn_neg = 0.15 -! REAL(r8) :: wfn_neg = 0.25 -! REAL(r8) :: wfn_neg = 0.30 -! REAL(r8) :: wfn_neg = 0.35 + REAL(kind_phys) :: PB = 1.0_kind_phys +!m REAL(kind_phys) :: TAUZ = 5.0e3_kind_phys + REAL(kind_phys) :: TAUZ = 1.0e4_kind_phys +!m REAL(kind_phys) :: ELMD = 2.4e-3 ! for Neggers and Siebesma (2002) +!m REAL(kind_phys) :: ELAMAX = 5.e-3 ! max. of entrainment rate +! REAL(kind_phys) :: WCCRT = zero +!m REAL(kind_phys) :: WCCRT = 0.01 + REAL(kind_phys) :: WCCRT = 1.0e-6_kind_phys, wvcrt=1.0e-3_kind_phys + REAL(kind_phys) :: TSICE = 268.15_kind_phys ! compatible with macrop_driver + REAL(kind_phys) :: TWICE = 238.15_kind_phys ! compatible with macrop_driver + +! REAL(kind_phys) :: wfn_neg = 0.1 + REAL(kind_phys) :: wfn_neg = 0.15 +! REAL(kind_phys) :: wfn_neg = 0.25 +! REAL(kind_phys) :: wfn_neg = 0.30 +! REAL(kind_phys) :: wfn_neg = 0.35 - REAL(r8) :: esat, tem -! REAL(r8) :: esat, tem, rhs_h, rhs_q + REAL(kind_phys) :: esat, tem +! REAL(kind_phys) :: esat, tem, rhs_h, rhs_q ! - REAL(r8) Z ! altitude - REAL(r8) ZH ! scale height - REAL(r8) T ! temperature + REAL(kind_phys) Z ! altitude + REAL(kind_phys) ZH ! scale height + REAL(kind_phys) T ! temperature ! ! ! Note: iteration is not made to diagnose cloud ice for simplicity @@ -2178,8 +2178,8 @@ SUBROUTINE CUMUP & !! in-cloud properties enddo do k=1,kmax do i=ists,iens - ACWFK (I,k) = unset_r8 - ACWFN (I,k) = unset_r8 + ACWFK (I,k) = unset_kind_phys + ACWFN (I,k) = unset_kind_phys GCLZ (I,k) = zero GCIZ (I,k) = zero GPRCIZ(I,k) = zero @@ -2192,24 +2192,24 @@ SUBROUTINE CUMUP & !! in-cloud properties GCVMZ (I,k) = zero GTPRMZ(I,k) = zero ! - BUOY (I,k) = unset_r8 - BUOYM (I,k) = unset_r8 - WCV (I,k) = unset_r8 - GCY (I,k) = unset_r8 -! - GCHM (I,k) = unset_r8 - GCWM (I,k) = unset_r8 - GCTM (I,k) = unset_r8 - GCQM (I,k) = unset_r8 - GCLM (I,k) = unset_r8 - GCIM (I,k) = unset_r8 - GCUM (I,k) = unset_r8 - GCVM (I,k) = unset_r8 + BUOY (I,k) = unset_kind_phys + BUOYM (I,k) = unset_kind_phys + WCV (I,k) = unset_kind_phys + GCY (I,k) = unset_kind_phys +! + GCHM (I,k) = unset_kind_phys + GCWM (I,k) = unset_kind_phys + GCTM (I,k) = unset_kind_phys + GCQM (I,k) = unset_kind_phys + GCLM (I,k) = unset_kind_phys + GCIM (I,k) = unset_kind_phys + GCUM (I,k) = unset_kind_phys + GCVM (I,k) = unset_kind_phys enddo enddo do i=ists,iens GCqMZ(I) = zero - WCM(I) = unset_r8 + WCM(I) = unset_kind_phys WCM_(I) = zero enddo ! tracers @@ -2219,7 +2219,7 @@ SUBROUTINE CUMUP & !! in-cloud properties enddo do k=1,kmax do i=ists,iens - GCTRM(I,k,n) = unset_r8 + GCTRM(I,k,n) = unset_kind_phys enddo enddo enddo @@ -2632,16 +2632,16 @@ SUBROUTINE CUMUP & !! in-cloud properties pure function FPREC(Z,ZH) implicit none - real(r8), intent(in) :: Z - real(r8), intent(in) :: ZH - real(r8) :: FPREC + real(kind_phys), intent(in) :: Z + real(kind_phys), intent(in) :: ZH + real(kind_phys) :: FPREC FPREC = MIN(MAX(one-EXP(-(Z-PRECZ0)/ZH), zero), one) end function FPREC pure function FRICE(T) implicit none - real(r8), intent(in) :: T - real(r8) :: FRICE + real(kind_phys), intent(in) :: T + real(kind_phys) :: FRICE FRICE = MIN(MAX((TSICE-T)/(TSICE-TWICE), zero), one) end function FRICE @@ -2663,37 +2663,37 @@ SUBROUTINE CUMBMX & !! cloud base mass flux INTEGER, INTENT(IN) :: IJSDIM, KMAX ! DD, for GFS, pass in ! ! [MODIFY] - REAL(r8) CBMFX (IJSDIM) ! cloud base mass flux + REAL(kind_phys) CBMFX (IJSDIM) !< cloud base mass flux ! ! [INPUT] - REAL(r8) ACWF (IJSDIM) ! cloud work function - REAL(r8) GCYT (IJSDIM) ! norm mass flux @top - REAL(r8) GDZM (IJSDIM, KMAX+1) ! height - REAL(r8) GDW (IJSDIM, KMAX) ! total water - REAL(r8) GDQS (IJSDIM, KMAX) ! saturate humidity - REAL(r8) DELP (IJSDIM, KMAX) ! delt pressure - INTEGER KT (IJSDIM) ! cloud top - INTEGER KTMX ! max. of cloud top - INTEGER KB (IJSDIM) ! cloud base - REAL(r8) DELT ! time step + REAL(kind_phys) ACWF (IJSDIM) !< cloud work function + REAL(kind_phys) GCYT (IJSDIM) !< norm mass flux @top + REAL(kind_phys) GDZM (IJSDIM, KMAX+1) !< height + REAL(kind_phys) GDW (IJSDIM, KMAX) !< total water + REAL(kind_phys) GDQS (IJSDIM, KMAX) !< saturate humidity + REAL(kind_phys) DELP (IJSDIM, KMAX) !< delt pressure + INTEGER KT (IJSDIM) !< cloud top + INTEGER KTMX !< max. of cloud top + INTEGER KB (IJSDIM) !< cloud base + REAL(kind_phys) DELT !< time step INTEGER ISTS, IENS ! ! [INTERNAL WORK] - REAL(r8), dimension(ijsdim) :: QX, QSX, RHM + REAL(kind_phys), dimension(ijsdim) :: QX, QSX, RHM INTEGER I, K - REAL(r8) ALP, FMAX1, wrk + REAL(kind_phys) ALP, FMAX1, wrk ! ! [INTERNAL PARAM] - REAL(r8) :: FMAX = 1.5e-2_r8 ! maximum flux -! REAL(r8) :: RHMCRT = zero ! critical val. of cloud mean RH -! REAL(r8) :: RHMCRT = 0.25_r8 ! critical val. of cloud mean RH - REAL(r8) :: RHMCRT = 0.50_r8 ! critical val. of cloud mean RH - REAL(r8) :: ALP1 = zero - REAL(r8) :: TAUD = 1.e3_r8 -! REAL(r8) :: TAUD = 6.e2_r8 - REAL(r8) :: ZFMAX = 3.5e3_r8 - REAL(r8) :: ZDFMAX = 5.e2_r8 -! REAL(r8) :: FMAXP = 2._r8 + REAL(kind_phys) :: FMAX = 1.5e-2_kind_phys ! maximum flux +! REAL(kind_phys) :: RHMCRT = zero ! critical val. of cloud mean RH +! REAL(kind_phys) :: RHMCRT = 0.25_kind_phys ! critical val. of cloud mean RH + REAL(kind_phys) :: RHMCRT = 0.50_kind_phys ! critical val. of cloud mean RH + REAL(kind_phys) :: ALP1 = zero + REAL(kind_phys) :: TAUD = 1.e3_kind_phys +! REAL(kind_phys) :: TAUD = 6.e2_kind_phys + REAL(kind_phys) :: ZFMAX = 3.5e3_kind_phys + REAL(kind_phys) :: ZDFMAX = 5.e2_kind_phys +! REAL(kind_phys) :: FMAXP = 2._kind_phys ! do i=ists,iens qx(i) = zero @@ -2748,26 +2748,26 @@ SUBROUTINE CUMFLX & !! cloud mass flux INTEGER, INTENT(IN) :: IJSDIM, KMAX, IM !! DD, for GFS, pass in ! ! [OUTPUT] - REAL(r8) GMFLX (IJSDIM, KMAX) !! mass flux - REAL(r8) CMDET (IJSDIM, KMAX) !! detrainment mass flux - REAL(r8) GPRCI (IJSDIM, KMAX) !! rainfall generation - REAL(r8) GSNWI (IJSDIM, KMAX) !! snowfall generation - REAL(r8) QLIQ (IJSDIM, KMAX) !! cloud liquid - REAL(r8) QICE (IJSDIM, KMAX) !! cloud ice - REAL(r8) GTPRC0(IJSDIM) !! precip. before evap. + REAL(kind_phys) GMFLX (IJSDIM, KMAX) !< mass flux + REAL(kind_phys) CMDET (IJSDIM, KMAX) !< detrainment mass flux + REAL(kind_phys) GPRCI (IJSDIM, KMAX) !< rainfall generation + REAL(kind_phys) GSNWI (IJSDIM, KMAX) !< snowfall generation + REAL(kind_phys) QLIQ (IJSDIM, KMAX) !< cloud liquid + REAL(kind_phys) QICE (IJSDIM, KMAX) !< cloud ice + REAL(kind_phys) GTPRC0(IJSDIM) !< precip. before evap. ! ! [INPUT] - REAL(r8) CBMFX (IJSDIM) !! cloud base mass flux - REAL(r8) GCYM (IJSDIM, KMAX) !! normalized mass flux - REAL(r8) GCYT (IJSDIM) !! detraining mass flux - REAL(r8) GPRCIZ(IJSDIM, KMAX) !! precipitation/M - REAL(r8) GSNWIZ(IJSDIM, KMAX) !! snowfall/M - REAL(r8) GTPRT (IJSDIM) !! rain+snow @top - REAL(r8) GCLZ (IJSDIM, KMAX) !! cloud liquid/M - REAL(r8) GCIZ (IJSDIM, KMAX) !! cloud ice/M - INTEGER KB (IJSDIM) !! cloud base - INTEGER KT (IJSDIM) !! cloud top - INTEGER KTMX !! max of cloud top + REAL(kind_phys) CBMFX (IJSDIM) !< cloud base mass flux + REAL(kind_phys) GCYM (IJSDIM, KMAX) !< normalized mass flux + REAL(kind_phys) GCYT (IJSDIM) !< detraining mass flux + REAL(kind_phys) GPRCIZ(IJSDIM, KMAX) !< precipitation/M + REAL(kind_phys) GSNWIZ(IJSDIM, KMAX) !< snowfall/M + REAL(kind_phys) GTPRT (IJSDIM) !< rain+snow @top + REAL(kind_phys) GCLZ (IJSDIM, KMAX) !< cloud liquid/M + REAL(kind_phys) GCIZ (IJSDIM, KMAX) !< cloud ice/M + INTEGER KB (IJSDIM) !< cloud base + INTEGER KT (IJSDIM) !< cloud top + INTEGER KTMX !< max of cloud top INTEGER ISTS, IENS, I, K ! DO K=1,KTMX @@ -2810,34 +2810,34 @@ SUBROUTINE CUMDET & !! detrainment INTEGER, INTENT(IN) :: im, IJSDIM, KMAX, NTR, nctp, ntrq !! DD, for GFS, pass in ! ! [MODIFY] - REAL(r8) GTT (IJSDIM, KMAX) !! temperature tendency - REAL(r8) GTQ (IJSDIM, KMAX, NTR) !! moisture tendency -! REAL(r8) GTCFRC(IJSDIM, KMAX) !! cloud fraction tendency - REAL(r8) GTU (IJSDIM, KMAX) !! u tendency - REAL(r8) GTV (IJSDIM, KMAX) !! v tendency + REAL(kind_phys) GTT (IJSDIM, KMAX) !< temperature tendency + REAL(kind_phys) GTQ (IJSDIM, KMAX, NTR) !< moisture tendency +! REAL(kind_phys) GTCFRC(IJSDIM, KMAX) !< cloud fraction tendency + REAL(kind_phys) GTU (IJSDIM, KMAX) !< u tendency + REAL(kind_phys) GTV (IJSDIM, KMAX) !< v tendency ! ! [INPUT] - REAL(r8) GDH (IJSDIM, KMAX) !! moist static energy - REAL(r8) GDQ (IJSDIM, KMAX, NTR) !! humidity qv -! REAL(r8) GDCFRC(IJSDIM, KMAX) !! cloud fraction - REAL(r8) GDU (IJSDIM, KMAX) - REAL(r8) GDV (IJSDIM, KMAX) - REAL(r8) DELPI (IJSDIM, KMAX) - REAL(r8) CBMFX (IM, NCTP) !! cloud base mass flux - REAL(r8) GCYT (IJSDIM, NCTP) !! detraining mass flux - REAL(r8) GCHT (IJSDIM, NCTP) !! detraining MSE - REAL(r8) GCQT (IJSDIM, NCTP) !! detraining qv - REAL(r8) GCLT (IJSDIM, NCTP) !! detraining ql - REAL(r8) GCIT (IJSDIM, NCTP) !! detraining qi - REAL(r8) GCtrT (IJSDIM, ntrq:ntr, NCTP)!! detraining tracer - REAL(r8) GCUT (IJSDIM, NCTP) !! detraining u - REAL(r8) GCVT (IJSDIM, NCTP) !! detraining v - REAL(r8) GDQI (IJSDIM, KMAX) !! cloud ice - INTEGER KT (IJSDIM, NCTP) !! cloud top + REAL(kind_phys) GDH (IJSDIM, KMAX) !< moist static energy + REAL(kind_phys) GDQ (IJSDIM, KMAX, NTR) !< humidity qv +! REAL(kind_phys) GDCFRC(IJSDIM, KMAX) !< cloud fraction + REAL(kind_phys) GDU (IJSDIM, KMAX) + REAL(kind_phys) GDV (IJSDIM, KMAX) + REAL(kind_phys) DELPI (IJSDIM, KMAX) + REAL(kind_phys) CBMFX (IM, NCTP) !< cloud base mass flux + REAL(kind_phys) GCYT (IJSDIM, NCTP) !< detraining mass flux + REAL(kind_phys) GCHT (IJSDIM, NCTP) !< detraining MSE + REAL(kind_phys) GCQT (IJSDIM, NCTP) !< detraining qv + REAL(kind_phys) GCLT (IJSDIM, NCTP) !< detraining ql + REAL(kind_phys) GCIT (IJSDIM, NCTP) !< detraining qi + REAL(kind_phys) GCtrT (IJSDIM, ntrq:ntr, NCTP)!< detraining tracer + REAL(kind_phys) GCUT (IJSDIM, NCTP) !< detraining u + REAL(kind_phys) GCVT (IJSDIM, NCTP) !< detraining v + REAL(kind_phys) GDQI (IJSDIM, KMAX) !< cloud ice + INTEGER KT (IJSDIM, NCTP) !< cloud top INTEGER ISTS, IENS ! ! [INTERNAL WORK] - REAL(r8) GTHCI, GTQVCI, GTXCI + REAL(kind_phys) GTHCI, GTQVCI, GTXCI integer I, K, CTP, kk,n ! @@ -2885,33 +2885,33 @@ SUBROUTINE CUMSBH & !! adiabat. descent INTEGER, INTENT(IN) :: IJSDIM, IM, KMAX, NTR, ntrq !! DD, for GFS, pass in ! ! [MODIFY] - REAL(r8) GTT (IJSDIM, KMAX) !! Temperature tendency - REAL(r8) GTQ (IJSDIM, KMAX, NTR) !! Moisture etc tendency - REAL(r8) GTU (IJSDIM, KMAX) !! u tendency - REAL(r8) GTV (IJSDIM, KMAX) !! v tendency + REAL(kind_phys) GTT (IJSDIM, KMAX) !< Temperature tendency + REAL(kind_phys) GTQ (IJSDIM, KMAX, NTR) !< Moisture etc tendency + REAL(kind_phys) GTU (IJSDIM, KMAX) !< u tendency + REAL(kind_phys) GTV (IJSDIM, KMAX) !< v tendency ! ! [INPUT] - REAL(r8) GDH (IJSDIM, KMAX) - REAL(r8) GDQ (IJSDIM, KMAX, NTR) !! humidity etc - REAL(r8) GDQI (IJSDIM, KMAX) - REAL(r8) GDU (IJSDIM, KMAX) - REAL(r8) GDV (IJSDIM, KMAX) - REAL(r8) DELPI (IJSDIM, KMAX) - REAL(r8) GMFLX (IJSDIM, KMAX) !! mass flux (updraft+downdraft) - REAL(r8) GMFX0 (IJSDIM, KMAX) !! mass flux (updraft only) - INTEGER KB(IJSDIM) !! cloud base index - negative means no convection + REAL(kind_phys) GDH (IJSDIM, KMAX) + REAL(kind_phys) GDQ (IJSDIM, KMAX, NTR) !< humidity etc + REAL(kind_phys) GDQI (IJSDIM, KMAX) + REAL(kind_phys) GDU (IJSDIM, KMAX) + REAL(kind_phys) GDV (IJSDIM, KMAX) + REAL(kind_phys) DELPI (IJSDIM, KMAX) + REAL(kind_phys) GMFLX (IJSDIM, KMAX) !< mass flux (updraft+downdraft) + REAL(kind_phys) GMFX0 (IJSDIM, KMAX) !< mass flux (updraft only) + INTEGER KB(IJSDIM) !< cloud base index - negative means no convection INTEGER KTMX - REAL(r8) CPRES !! pressure factor for cumulus friction + REAL(kind_phys) CPRES !< pressure factor for cumulus friction INTEGER ISTS, IENS ! ! [INTERNAL WORK] - REAL(r8) SBH0, SBQ0, SBL0, SBI0, SBC0, SBS0, & + REAL(kind_phys) SBH0, SBQ0, SBL0, SBI0, SBC0, SBS0, & SBH1, SBQ1, SBL1, SBI1, SBC1, SBS1, FX1, & SBU0, SBV0, SBU1, SBV1, GTHCI, GTQVCI, & GTQLCI, GTQICI, GTM2CI, GTM3CI, wrk, wrk1 - REAL(r8) FX(ISTS:IENS) + REAL(kind_phys) FX(ISTS:IENS) - REAL(r8), dimension(IJSDIM, KMAX) :: GTLSBH, GTISBH + REAL(kind_phys), dimension(IJSDIM, KMAX) :: GTLSBH, GTISBH integer :: I, K, KM, KP, n ! ! @@ -3007,22 +3007,22 @@ SUBROUTINE CUMSBW & !! adiabat. descent INTEGER, INTENT(IN) :: IJSDIM, IM, KMAX!! DD, for GFS, pass in ! ! [MODIFY] - REAL(r8) GTU (IJSDIM, KMAX) !! u tendency - REAL(r8) GTV (IJSDIM, KMAX) !! v tendency + REAL(kind_phys) GTU (IJSDIM, KMAX) !< u tendency + REAL(kind_phys) GTV (IJSDIM, KMAX) !< v tendency ! ! [INPUT] - REAL(r8) GDU (IJSDIM, KMAX) - REAL(r8) GDV (IJSDIM, KMAX) - REAL(r8) DELPI (IJSDIM, KMAX) - REAL(r8) GMFLX (IJSDIM, KMAX) !! mass flux (updraft+downdraft) - REAL(r8) GMFX0 (IJSDIM, KMAX) !! mass flux (updraft only) - INTEGER KB(IJSDIM) !! cloud base index - negative means no convection + REAL(kind_phys) GDU (IJSDIM, KMAX) + REAL(kind_phys) GDV (IJSDIM, KMAX) + REAL(kind_phys) DELPI (IJSDIM, KMAX) + REAL(kind_phys) GMFLX (IJSDIM, KMAX) !< mass flux (updraft+downdraft) + REAL(kind_phys) GMFX0 (IJSDIM, KMAX) !< mass flux (updraft only) + INTEGER KB(IJSDIM) !< cloud base index - negative means no convection INTEGER KTMX, ISTS, IENS - REAL(r8) CPRES !! pressure factor for cumulus friction + REAL(kind_phys) CPRES !< pressure factor for cumulus friction ! ! [INTERNAL WORK] - REAL(r8) FX1, SBU0, SBV0, SBU1, SBV1, wrk, wrk1 - REAL(r8) FX(ISTS:IENS) + REAL(kind_phys) FX1, SBU0, SBV0, SBU1, SBV1, wrk, wrk1 + REAL(kind_phys) FX(ISTS:IENS) integer :: I, K, KM, KP ! @@ -3090,114 +3090,114 @@ SUBROUTINE CUMDWN & ! Freeze & Melt & Evaporation logical, intent(in) :: do_aw, do_awdd, flx_form ! ! [MODIFY] - REAL(r8) GTT (IJSDIM, KMAX) ! Temperature tendency - REAL(r8) GTQ (IJSDIM, KMAX, NTR) ! Moisture etc tendency - REAL(r8) GTU (IJSDIM, KMAX) ! u tendency - REAL(r8) GTV (IJSDIM, KMAX) ! v tendency - REAL(r8) GMFLX (IJSDIM, KMAX) ! mass flux + REAL(kind_phys) GTT (IJSDIM, KMAX) !< Temperature tendency + REAL(kind_phys) GTQ (IJSDIM, KMAX, NTR) !< Moisture etc tendency + REAL(kind_phys) GTU (IJSDIM, KMAX) !< u tendency + REAL(kind_phys) GTV (IJSDIM, KMAX) !< v tendency + REAL(kind_phys) GMFLX (IJSDIM, KMAX) !< mass flux ! ! [OUTPUT] - REAL(r8) GPRCP (IJSDIM, KMAX) ! rainfall flux - REAL(r8) GSNWP (IJSDIM, KMAX) ! snowfall flux - REAL(r8) GTEVP (IJSDIM, KMAX) ! evaporation+sublimation - REAL(r8) GMDD (IJSDIM, KMAX) ! downdraft mass flux + REAL(kind_phys) GPRCP (IJSDIM, KMAX) !< rainfall flux + REAL(kind_phys) GSNWP (IJSDIM, KMAX) !< snowfall flux + REAL(kind_phys) GTEVP (IJSDIM, KMAX) !< evaporation+sublimation + REAL(kind_phys) GMDD (IJSDIM, KMAX) !< downdraft mass flux !AW microphysical tendencies - REAL(r8) gtmelt (IJSDIM, KMAX) ! t tendency ice-liq - REAL(r8) gtevap (IJSDIM, KMAX) ! t tendency liq-vapor - REAL(r8) gtsubl (IJSDIM, KMAX) ! t tendency ice-vapor + REAL(kind_phys) gtmelt (IJSDIM, KMAX) !< t tendency ice-liq + REAL(kind_phys) gtevap (IJSDIM, KMAX) !< t tendency liq-vapor + REAL(kind_phys) gtsubl (IJSDIM, KMAX) !< t tendency ice-vapor !AW eddy flux tendencies - REAL(r8) dtdwn (IJSDIM, KMAX) ! t tendency downdraft detrainment - REAL(r8) dqvdwn (IJSDIM, KMAX) ! qv tendency downdraft detrainment - REAL(r8) dqldwn (IJSDIM, KMAX) ! ql tendency downdraft detrainment - REAL(r8) dqidwn (IJSDIM, KMAX) ! qi tendency downdraft detrainment - REAL(r8) dtrdwn (IJSDIM, KMAX, ntrq:ntr) ! tracer tendency downdraft detrainment + REAL(kind_phys) dtdwn (IJSDIM, KMAX) !< t tendency downdraft detrainment + REAL(kind_phys) dqvdwn (IJSDIM, KMAX) !< qv tendency downdraft detrainment + REAL(kind_phys) dqldwn (IJSDIM, KMAX) !< ql tendency downdraft detrainment + REAL(kind_phys) dqidwn (IJSDIM, KMAX) !< qi tendency downdraft detrainment + REAL(kind_phys) dtrdwn (IJSDIM, KMAX, ntrq:ntr) !< tracer tendency downdraft detrainment ! AW downdraft area fraction (assumed zero for now) - REAL(r8) sigmad (IJSDIM,KMAX) !DDsigma cloud downdraft area fraction + REAL(kind_phys) sigmad (IJSDIM,KMAX) !< DDsigma cloud downdraft area fraction ! [INPUT] - REAL(r8) GPRCI (IJSDIM, KMAX) ! rainfall generation - REAL(r8) GSNWI (IJSDIM, KMAX) ! snowfall generation - REAL(r8) GDH (IJSDIM, KMAX) ! moist static energy - REAL(r8) GDW (IJSDIM, KMAX) ! total water - REAL(r8) GDQ (IJSDIM, KMAX, NTR) ! humidity etc - REAL(r8) GDQI (IJSDIM, KMAX) ! cloud ice - REAL(r8) GDQS (IJSDIM, KMAX) ! saturate humidity - REAL(r8) GDS (IJSDIM, KMAX) ! dry static energy - REAL(r8) GDHS (IJSDIM, KMAX) ! saturate moist static energy - REAL(r8) GDT (IJSDIM, KMAX) ! air temperature T - REAL(r8) GDU (IJSDIM, KMAX) ! u-velocity - REAL(r8) GDV (IJSDIM, KMAX) ! v-velocity - REAL(r8) GDZ (IJSDIM, KMAX) ! altitude - REAL(r8) GDZM (IJSDIM, KMAX+1) ! altitude (half lev) - REAL(r8) FDQS (IJSDIM, KMAX) - REAL(r8) DELP (IJSDIM, KMAX) - REAL(r8) DELPI (IJSDIM, KMAX) + REAL(kind_phys) GPRCI (IJSDIM, KMAX) !< rainfall generation + REAL(kind_phys) GSNWI (IJSDIM, KMAX) !< snowfall generation + REAL(kind_phys) GDH (IJSDIM, KMAX) !< moist static energy + REAL(kind_phys) GDW (IJSDIM, KMAX) !< total water + REAL(kind_phys) GDQ (IJSDIM, KMAX, NTR) !< humidity etc + REAL(kind_phys) GDQI (IJSDIM, KMAX) !< cloud ice + REAL(kind_phys) GDQS (IJSDIM, KMAX) !< saturate humidity + REAL(kind_phys) GDS (IJSDIM, KMAX) !< dry static energy + REAL(kind_phys) GDHS (IJSDIM, KMAX) !< saturate moist static energy + REAL(kind_phys) GDT (IJSDIM, KMAX) !< air temperature T + REAL(kind_phys) GDU (IJSDIM, KMAX) !< u-velocity + REAL(kind_phys) GDV (IJSDIM, KMAX) !< v-velocity + REAL(kind_phys) GDZ (IJSDIM, KMAX) !< altitude + REAL(kind_phys) GDZM (IJSDIM, KMAX+1) !< altitude (half lev) + REAL(kind_phys) FDQS (IJSDIM, KMAX) + REAL(kind_phys) DELP (IJSDIM, KMAX) + REAL(kind_phys) DELPI (IJSDIM, KMAX) INTEGER KB (IJSDIM) INTEGER KTMX, ISTS, IENS ! ! [INTERNAL WORK] ! Note: Some variables have 3-dimensions for the purpose of budget check. - REAL(r8) EVAPD (IJSDIM, KMAX) ! evap. in downdraft - REAL(r8) SUBLD (IJSDIM, KMAX) ! subl. in downdraft - REAL(r8) EVAPE (IJSDIM, KMAX) ! evap. in environment - REAL(r8) SUBLE (IJSDIM, KMAX) ! subl. in environment - REAL(r8) EVAPX (IJSDIM, KMAX) ! evap. env. to DD - REAL(r8) SUBLX (IJSDIM, KMAX) ! subl. env. to DD - REAL(r8) GMDDE (IJSDIM, KMAX) ! downdraft entrainment - REAL(r8) SNMLT (IJSDIM, KMAX) ! melt - freeze - REAL(r8) GCHDD (IJSDIM, KMAX) ! MSE detrainment - REAL(r8) GCWDD (IJSDIM, KMAX) ! water detrainment - REAL(r8) GTTEV (IJSDIM, KMAX) ! T tendency by evaporation - REAL(r8) GTQEV (IJSDIM, KMAX) ! q tendency by evaporation - REAL(r8) GCHD (ISTS:IENS) ! downdraft MSE - REAL(r8) GCWD (ISTS:IENS) ! downdraft q + REAL(kind_phys) EVAPD (IJSDIM, KMAX) !< evap. in downdraft + REAL(kind_phys) SUBLD (IJSDIM, KMAX) !< subl. in downdraft + REAL(kind_phys) EVAPE (IJSDIM, KMAX) !< evap. in environment + REAL(kind_phys) SUBLE (IJSDIM, KMAX) !< subl. in environment + REAL(kind_phys) EVAPX (IJSDIM, KMAX) !< evap. env. to DD + REAL(kind_phys) SUBLX (IJSDIM, KMAX) !< subl. env. to DD + REAL(kind_phys) GMDDE (IJSDIM, KMAX) !< downdraft entrainment + REAL(kind_phys) SNMLT (IJSDIM, KMAX) !< melt - freeze + REAL(kind_phys) GCHDD (IJSDIM, KMAX) !< MSE detrainment + REAL(kind_phys) GCWDD (IJSDIM, KMAX) !< water detrainment + REAL(kind_phys) GTTEV (IJSDIM, KMAX) !< T tendency by evaporation + REAL(kind_phys) GTQEV (IJSDIM, KMAX) !< q tendency by evaporation + REAL(kind_phys) GCHD (ISTS:IENS) !< downdraft MSE + REAL(kind_phys) GCWD (ISTS:IENS) !< downdraft q ! profiles of downdraft variables for AW flux tendencies - REAL(r8) GCdseD(ISTS:IENS, KMAX) ! downdraft dse - REAL(r8) GCqvD (ISTS:IENS, KMAX) ! downdraft qv -! REAL(r8) GCqlD (ISTS:IENS, KMAX) ! downdraft ql -! REAL(r8) GCqiD (ISTS:IENS, KMAX) ! downdraft qi - REAL(r8) GCtrD (ISTS:IENS, ntrq:ntr) ! downdraft tracer - - REAL(r8) GCUD (ISTS:IENS) ! downdraft u - REAL(r8) GCVD (ISTS:IENS) ! downdraft v - REAL(r8) FSNOW (ISTS:IENS) - REAL(r8) GMDDD (ISTS:IENS) - - REAL(r8) GDTW, GCHX, GCTX, GCQSX, GTPRP, EVSU, GTEVE, LVIC, & + REAL(kind_phys) GCdseD(ISTS:IENS, KMAX) !< downdraft dse + REAL(kind_phys) GCqvD (ISTS:IENS, KMAX) !< downdraft qv +! REAL(kind_phys) GCqlD (ISTS:IENS, KMAX) !< downdraft ql +! REAL(kind_phys) GCqiD (ISTS:IENS, KMAX) !< downdraft qi + REAL(kind_phys) GCtrD (ISTS:IENS, ntrq:ntr) !< downdraft tracer + + REAL(kind_phys) GCUD (ISTS:IENS) !< downdraft u + REAL(kind_phys) GCVD (ISTS:IENS) !< downdraft v + REAL(kind_phys) FSNOW (ISTS:IENS) + REAL(kind_phys) GMDDD (ISTS:IENS) + + REAL(kind_phys) GDTW, GCHX, GCTX, GCQSX, GTPRP, EVSU, GTEVE, LVIC, & DQW, DTW, GDQW, DZ, GCSD, FDET, GDHI, GMDDX, & GMDDMX, GCHDX, GCWDX, GCUDD, GCVDD, GTHCI, GTQVCI, & wrk, wrk1, wrk2, wrk3, wrk4, tx1, & WMX, HMX, DDWMX, DDHMX, dp_above, dp_below, fsigma, & fmelt, fevp, wrkn, gctrdd(ntrq:ntr) -!M REAL(r8) GTHCI, GTQVCI, GTQLCI, GTQICI, GTUCI, GTVCI +!M REAL(kind_phys) GTHCI, GTQVCI, GTQLCI, GTQICI, GTUCI, GTVCI !DD#ifdef OPT_CUMBGT ! Water, energy, downdraft water and downdraft energy budgets -! REAL(r8), dimension(ISTS:IENS) :: WBGT, HBGT, DDWBGT, DDHBGT +! REAL(kind_phys), dimension(ISTS:IENS) :: WBGT, HBGT, DDWBGT, DDHBGT integer ij, i, k, kp1, n !DD#endif ! ! [INTERNAL PARM] - REAL(r8), parameter :: TWSNOW = 273.15_r8 ! wet-bulb temp. rain/snow - REAL(r8), parameter :: FTMLT = 4._r8 ! temp. factor for melt - REAL(r8), parameter :: GMFLXC = 5.e-2_r8 ! critical mass flux - REAL(r8), parameter :: VTERMS = 2._r8 ! terminal velocity of snowflake -! REAL(r8), parameter :: MELTAU = 10._r8 ! melting timescale - REAL(r8), parameter :: MELTAU = 20._r8 ! melting timescale ! Moorthi june 30, 2017 -! -! REAL(r8), parameter :: EVAPR = 0.4_r8 ! evaporation factor ! Moorthi June 28, 2017 - REAL(r8), parameter :: EVAPR = 0.3_r8 ! evaporation factor -! REAL(r8), parameter :: EVAPR = 0._r8 ! evaporation factor - REAL(r8), parameter :: REVPDD = 1._r8 ! max rate of DD to evapolation - REAL(r8), parameter :: RDDR = 5.e-4_r8 ! DD rate (T0 R0 W0)^-1 -! REAL(r8), parameter :: RDDR = 0._r8 ! DD rate (T0 R0 W0)^-1 - REAL(r8), parameter :: RDDMX = 0.5_r8 ! norm. flux of downdraft - REAL(r8), parameter :: VTERM = 5._r8 ! term. vel. of precip. -! REAL(r8), parameter :: VTERM = 4._r8 ! term. vel. of precip. ! Moorthi June 28, 2017 - REAL(r8), parameter :: EVATAU = 2._r8 ! evaporation/sublimation timescale - REAL(r8), parameter :: ZDMIN = 5.e2_r8 ! min altitude of downdraft detrainment - real(r8), parameter :: evapovtrm=EVAPR/VTERM + REAL(kind_phys), parameter :: TWSNOW = 273.15_kind_phys !< wet-bulb temp. rain/snow + REAL(kind_phys), parameter :: FTMLT = 4._kind_phys !< temp. factor for melt + REAL(kind_phys), parameter :: GMFLXC = 5.e-2_kind_phys !< critical mass flux + REAL(kind_phys), parameter :: VTERMS = 2._kind_phys !< terminal velocity of snowflake +! REAL(kind_phys), parameter :: MELTAU = 10._kind_phys !< melting timescale + REAL(kind_phys), parameter :: MELTAU = 20._kind_phys !< melting timescale ! Moorthi june 30, 2017 +! +! REAL(kind_phys), parameter :: EVAPR = 0.4_kind_phys !< evaporation factor ! Moorthi June 28, 2017 + REAL(kind_phys), parameter :: EVAPR = 0.3_kind_phys !< evaporation factor +! REAL(kind_phys), parameter :: EVAPR = 0._kind_phys !< evaporation factor + REAL(kind_phys), parameter :: REVPDD = 1._kind_phys !< max rate of DD to evapolation + REAL(kind_phys), parameter :: RDDR = 5.e-4_kind_phys !< DD rate (T0 R0 W0)^-1 +! REAL(kind_phys), parameter :: RDDR = 0._kind_phys !< DD rate (T0 R0 W0)^-1 + REAL(kind_phys), parameter :: RDDMX = 0.5_kind_phys !< norm. flux of downdraft + REAL(kind_phys), parameter :: VTERM = 5._kind_phys !< term. vel. of precip. +! REAL(kind_phys), parameter :: VTERM = 4._kind_phys !< term. vel. of precip. ! Moorthi June 28, 2017 + REAL(kind_phys), parameter :: EVATAU = 2._kind_phys !< evaporation/sublimation timescale + REAL(kind_phys), parameter :: ZDMIN = 5.e2_kind_phys !< min altitude of downdraft detrainment + real(kind_phys), parameter :: evapovtrm=EVAPR/VTERM !NOTE ! downdraft area ffraction still needs to be computed for AW, assumed zero for now, @@ -3543,29 +3543,29 @@ SUBROUTINE CUMCLD & !! cloudiness INTEGER, INTENT(IN) :: IJSDIM, KMAX ! DD, for GFS, pass in ! ! [OUTPUT] - REAL(r8) CUMFRC(IJSDIM) ! cumulus cloud fraction + REAL(kind_phys) CUMFRC(IJSDIM) !< cumulus cloud fraction ! ! [MODIFY] - REAL(r8) CUMCLW(IJSDIM, KMAX) ! cloud water in cumulus - REAL(r8) QLIQ (IJSDIM, KMAX) ! cloud liquid - REAL(r8) QICE (IJSDIM, KMAX) ! cloud ice - REAL(r8) FLIQC (IJSDIM, KMAX) ! liquid ratio in cumulus + REAL(kind_phys) CUMCLW(IJSDIM, KMAX) !< cloud water in cumulus + REAL(kind_phys) QLIQ (IJSDIM, KMAX) !< cloud liquid + REAL(kind_phys) QICE (IJSDIM, KMAX) !< cloud ice + REAL(kind_phys) FLIQC (IJSDIM, KMAX) !< liquid ratio in cumulus ! ! [INPUT] - REAL(r8) GMFLX (IJSDIM, KMAX) ! cumulus mass flux + REAL(kind_phys) GMFLX (IJSDIM, KMAX) ! cumulus mass flux INTEGER KTMX INTEGER ISTS, IENS ! ! [WORK] INTEGER I, K - REAL(r8) CUMF, QC, wrk + REAL(kind_phys) CUMF, QC, wrk ! ! [INTERNAL PARAM] - REAL(r8), parameter :: CMFMIN = 2.e-3_r8, &! Mc->cloudiness - CMFMAX = 3.e-1_r8, &! Mc->cloudiness - CLMIN = 1.e-3_r8, &! cloudiness Min. - CLMAX = 0.1_r8, &! cloudiness Max. - FACLW = 0.1_r8, &! Mc->CLW + REAL(kind_phys), parameter :: CMFMIN = 2.e-3_kind_phys, &!< Mc->cloudiness + CMFMAX = 3.e-1_kind_phys, &!< Mc->cloudiness + CLMIN = 1.e-3_kind_phys, &!< cloudiness Min. + CLMAX = 0.1_kind_phys, &!< cloudiness Max. + FACLW = 0.1_kind_phys, &!< Mc->CLW FACLF = (CLMAX-CLMIN)/LOG(CMFMAX/CMFMIN) ! CUMFRC(ISTS:IENS) = zero @@ -3615,37 +3615,37 @@ SUBROUTINE CUMUPR & !! Tracer Updraft INTEGER, INTENT(IN) :: im, IJSDIM, KMAX, NTR, nctp !! DD, for GFS, pass in ! ! [MODIFY] - REAL(r8) GTR (IJSDIM, KMAX, NTR) - REAL(r8) GPRCC (IJSDIM, NTR) + REAL(kind_phys) GTR (IJSDIM, KMAX, NTR) + REAL(kind_phys) GPRCC (IJSDIM, NTR) ! ! [INPUT] - REAL(r8) GDR (IJSDIM, KMAX, NTR) - REAL(r8) CBMFX (IM, NCTP) - REAL(r8) GCYM (IJSDIM, KMAX, nctp) - REAL(r8) GCYT (IJSDIM, NCTP) - REAL(r8) GCQT (IJSDIM, NCTP) - REAL(r8) GCLT (IJSDIM, NCTP) - REAL(r8) GCIT (IJSDIM, NCTP) - REAL(r8) GTPRT (IJSDIM, NCTP) - REAL(r8) GTEVP (IJSDIM, KMAX) - REAL(r8) GTPRC0(IJSDIM) !! precip. before evap. - real(r8) fscav(ntr), fswtr(ntr) + REAL(kind_phys) GDR (IJSDIM, KMAX, NTR) + REAL(kind_phys) CBMFX (IM, NCTP) + REAL(kind_phys) GCYM (IJSDIM, KMAX, nctp) + REAL(kind_phys) GCYT (IJSDIM, NCTP) + REAL(kind_phys) GCQT (IJSDIM, NCTP) + REAL(kind_phys) GCLT (IJSDIM, NCTP) + REAL(kind_phys) GCIT (IJSDIM, NCTP) + REAL(kind_phys) GTPRT (IJSDIM, NCTP) + REAL(kind_phys) GTEVP (IJSDIM, KMAX) + REAL(kind_phys) GTPRC0(IJSDIM) !! precip. before evap. + real(kind_phys) fscav(ntr), fswtr(ntr) INTEGER KB (IJSDIM ) INTEGER KBMX INTEGER KT (IJSDIM, NCTP) INTEGER KTMX (NCTP) INTEGER KTMXT - REAL(r8) DELPI (IJSDIM, KMAX) + REAL(kind_phys) DELPI (IJSDIM, KMAX) LOGICAL OTSPT (NTR) !! transport with this routine? INTEGER ISTS, IENS ! ! [INTERNAL WORK] INTEGER I, K, LT, TP, CTP - REAL(r8) :: GCRTD, SCAV, GCWT, GPRCR, evpf, cbmfxl - REAL(r8), dimension(ists:iens) :: GCRB, GCRT, DR, gtprc0i -! REAL(r8), dimension(ists:iens,kmax) :: DGCB, DZ, RDZM, EVPF -! REAL(r8), dimension(ists:iens,nctp) :: DZT, RGCWT, MASK1, MASK2 - REAL(r8), dimension(ists:iens,nctp) :: RGCWT, MASK1 + REAL(kind_phys) :: GCRTD, SCAV, GCWT, GPRCR, evpf, cbmfxl + REAL(kind_phys), dimension(ists:iens) :: GCRB, GCRT, DR, gtprc0i +! REAL(kind_phys), dimension(ists:iens,kmax) :: DGCB, DZ, RDZM, EVPF +! REAL(kind_phys), dimension(ists:iens,nctp) :: DZT, RGCWT, MASK1, MASK2 + REAL(kind_phys), dimension(ists:iens,nctp) :: RGCWT, MASK1 ! do i=ists,iens if (gtprc0(i) > zero) then @@ -3752,18 +3752,18 @@ SUBROUTINE CUMDNR & !! Tracer Downdraft INTEGER, INTENT(IN) :: IM, IJSDIM, KMAX, NTR !! DD, for GFS, pass in ! ! [MODIFY] - REAL(r8) GTR (IJSDIM, KMAX, NTR) ! Temperature tendency + REAL(kind_phys) GTR (IJSDIM, KMAX, NTR) ! Temperature tendency ! ! [INPUT] - REAL(r8) GDR (IJSDIM, KMAX, NTR) - REAL(r8) GMDD (IJSDIM, KMAX) ! downdraft mass flux - REAL(r8) DELPI (IJSDIM, KMAX ) + REAL(kind_phys) GDR (IJSDIM, KMAX, NTR) + REAL(kind_phys) GMDD (IJSDIM, KMAX) ! downdraft mass flux + REAL(kind_phys) DELPI (IJSDIM, KMAX ) LOGICAL OTSPT (NTR) INTEGER KTMX, ISTS, IENS ! ! [INTERNAL WORK] - REAL(r8) GCRD (ISTS:IENS) ! downdraft q - REAL(r8) GMDDE, GMDDD, GCRDD + REAL(kind_phys) GCRD (ISTS:IENS) ! downdraft q + REAL(kind_phys) GMDDE, GMDDD, GCRDD INTEGER I, K, LT, kp1 ! ! @@ -3803,20 +3803,20 @@ SUBROUTINE CUMSBR & !! Tracer Subsidence INTEGER, INTENT(IN) :: IM, IJSDIM, KMAX, NTR !! DD, for GFS, pass in ! ! [MODIFY] - REAL(r8) GTR (IJSDIM, KMAX, NTR) !! tracer tendency + REAL(kind_phys) GTR (IJSDIM, KMAX, NTR) !! tracer tendency ! ! [INPUT] - REAL(r8) GDR (IJSDIM, KMAX, NTR) !! tracer - REAL(r8) DELPI (IJSDIM, KMAX) - REAL(r8) GMFLX (IJSDIM, KMAX) !! mass flux + REAL(kind_phys) GDR (IJSDIM, KMAX, NTR) !! tracer + REAL(kind_phys) DELPI (IJSDIM, KMAX) + REAL(kind_phys) GMFLX (IJSDIM, KMAX) !! mass flux INTEGER KTMX LOGICAL OTSPT (NTR) !! tracer transport on/off INTEGER ISTS, IENS ! ! [INTERNAL WORK] INTEGER I, K, KM, KP, LT - REAL(r8) SBR0, SBR1, FX1 - REAL(r8) FX(ISTS:IENS) + REAL(kind_phys) SBR0, SBR1, FX1 + REAL(kind_phys) FX(ISTS:IENS) ! DO LT=1,NTR IF (OTSPT(LT)) THEN @@ -3857,12 +3857,12 @@ SUBROUTINE CUMFXR & ! Tracer mass fixe INTEGER, INTENT(IN) :: IM, IJSDIM, KMAX, NTR !! DD, for GFS, pass in ! ! [MODIFY] - REAL(r8) GTR (IJSDIM, KMAX, NTR) ! tracer tendency + REAL(kind_phys) GTR (IJSDIM, KMAX, NTR) ! tracer tendency ! ! [INPUT] - REAL(r8) GDR (IJSDIM, KMAX, NTR) ! tracer - REAL(r8) DELP (IJSDIM, KMAX) - REAL(r8) DELTA ! time step + REAL(kind_phys) GDR (IJSDIM, KMAX, NTR) ! tracer + REAL(kind_phys) DELP (IJSDIM, KMAX) + REAL(kind_phys) DELTA ! time step INTEGER KTMX INTEGER IMFXR (NTR) ! 0: mass fixer is not applied @@ -3877,10 +3877,10 @@ SUBROUTINE CUMFXR & ! Tracer mass fixe INTEGER ISTS, IENS ! ! [INTERNAL WORK] - REAL(r8) GDR1 - REAL(r8) GDR2 (ISTS:IENS, KMAX) - REAL(r8), dimension(ISTS:IENS) :: TOT0, TOT1, TRAT - REAL(r8) FWAT + REAL(kind_phys) GDR1 + REAL(kind_phys) GDR2 (ISTS:IENS, KMAX) + REAL(kind_phys), dimension(ISTS:IENS) :: TOT0, TOT1, TRAT + REAL(kind_phys) FWAT INTEGER I, K, LT ! ! Attention: tracers are forced to be positive unless IMFXR=0. @@ -3949,12 +3949,12 @@ SUBROUTINE CUMFXR1 & ! Tracer mass fixer INTEGER, INTENT(IN) :: IM, IJSDIM, KMAX ! DD, for GFS, pass in ! ! [MODIFY] - REAL(r8) GTR (IJSDIM, KMAX) ! tracer tendency + REAL(kind_phys) GTR (IJSDIM, KMAX) ! tracer tendency ! ! [INPUT] - REAL(r8) GDR (IJSDIM, KMAX) ! tracer - REAL(r8) DELP (IJSDIM, KMAX) - REAL(r8) DELTA ! time step + REAL(kind_phys) GDR (IJSDIM, KMAX) ! tracer + REAL(kind_phys) DELP (IJSDIM, KMAX) + REAL(kind_phys) DELTA ! time step INTEGER KTMX INTEGER IMFXR ! 0: mass fixer is not applied @@ -3967,10 +3967,10 @@ SUBROUTINE CUMFXR1 & ! Tracer mass fixer INTEGER ISTS, IENS ! ! [INTERNAL WORK] - REAL(r8) GDR1 - REAL(r8) GDR2 (ISTS:IENS, KMAX) - REAL(r8), dimension(ISTS:IENS) :: TOT0, TOT1, TRAT - REAL(r8) FWAT + REAL(kind_phys) GDR1 + REAL(kind_phys) GDR2 (ISTS:IENS, KMAX) + REAL(kind_phys), dimension(ISTS:IENS) :: TOT0, TOT1, TRAT + REAL(kind_phys) FWAT INTEGER I, K ! ! Attention: tracers are forced to be positive unless IMFXR=0. @@ -4035,17 +4035,17 @@ SUBROUTINE CUMCHK & ! check range of output va INTEGER, INTENT(IN) :: IJSDIM, KMAX, NTR ! DD, for GFS, pass in ! ! [INPUT] - REAL(r8) GTT (IJSDIM, KMAX) ! heating rate - REAL(r8) GTQ (IJSDIM, KMAX, NTR) ! change in q - REAL(r8) GTU (IJSDIM, KMAX) ! tendency of u - REAL(r8) GTV (IJSDIM, KMAX) ! tendency of v - REAL(r8) GPRCC (IJSDIM, NTR ) ! rainfall - REAL(r8) GSNWC (IJSDIM) ! snowfall - REAL(r8) CUMCLW(IJSDIM, KMAX) ! cloud water in cumulus - REAL(r8) CUMFRC(IJSDIM) ! cumulus cloud fraction - REAL(r8) GTCFRC(IJSDIM, KMAX) ! change in cloud fraction - REAL(r8) FLIQC (IJSDIM, KMAX) ! liquid ratio in cumulus - REAL(r8) GTPRP (IJSDIM, KMAX) ! rain+snow flux + REAL(kind_phys) GTT (IJSDIM, KMAX) ! heating rate + REAL(kind_phys) GTQ (IJSDIM, KMAX, NTR) ! change in q + REAL(kind_phys) GTU (IJSDIM, KMAX) ! tendency of u + REAL(kind_phys) GTV (IJSDIM, KMAX) ! tendency of v + REAL(kind_phys) GPRCC (IJSDIM, NTR ) ! rainfall + REAL(kind_phys) GSNWC (IJSDIM) ! snowfall + REAL(kind_phys) CUMCLW(IJSDIM, KMAX) ! cloud water in cumulus + REAL(kind_phys) CUMFRC(IJSDIM) ! cumulus cloud fraction + REAL(kind_phys) GTCFRC(IJSDIM, KMAX) ! change in cloud fraction + REAL(kind_phys) FLIQC (IJSDIM, KMAX) ! liquid ratio in cumulus + REAL(kind_phys) GTPRP (IJSDIM, KMAX) ! rain+snow flux ! INTEGER ISTS, IENS ! @@ -4053,19 +4053,19 @@ SUBROUTINE CUMCHK & ! check range of output va INTEGER I, K ! ! [INTERNAL PARM] - REAL(r8) :: GTTMAX = 1.e-2_r8 - REAL(r8) :: GTQVMAX = 1.e-4_r8 - REAL(r8) :: GTQLMAX = 1.e-5_r8 - REAL(r8) :: GTUMAX = 1.e-2_r8 - REAL(r8) :: GTVMAX = 1.e-2_r8 - REAL(r8) :: GTCFMAX = 1.e-3_r8 - REAL(r8) :: PRCCMAX = 1.e-2_r8 - REAL(r8) :: SNWCMAX = 1.e-2_r8 - REAL(r8) :: CLWMAX = 1.e-3_r8 - REAL(r8) :: TPRPMAX = 1.e-2_r8 - REAL(r8) :: GTQIMAX = 1.e-5_r8 - !REAL(r8) :: GTM2MAX = 1._r8 - !REAL(r8) :: GTM3MAX = 1._r8 + REAL(kind_phys) :: GTTMAX = 1.e-2_kind_phys + REAL(kind_phys) :: GTQVMAX = 1.e-4_kind_phys + REAL(kind_phys) :: GTQLMAX = 1.e-5_kind_phys + REAL(kind_phys) :: GTUMAX = 1.e-2_kind_phys + REAL(kind_phys) :: GTVMAX = 1.e-2_kind_phys + REAL(kind_phys) :: GTCFMAX = 1.e-3_kind_phys + REAL(kind_phys) :: PRCCMAX = 1.e-2_kind_phys + REAL(kind_phys) :: SNWCMAX = 1.e-2_kind_phys + REAL(kind_phys) :: CLWMAX = 1.e-3_kind_phys + REAL(kind_phys) :: TPRPMAX = 1.e-2_kind_phys + REAL(kind_phys) :: GTQIMAX = 1.e-5_kind_phys + !REAL(kind_phys) :: GTM2MAX = 1._kind_phys + !REAL(kind_phys) :: GTM3MAX = 1._kind_phys ! DO K=1,KMAX DO I=ISTS, IENS diff --git a/physics/cs_conv.meta b/physics/cs_conv.meta index 14a0d5bf2..be27f8360 100644 --- a/physics/cs_conv.meta +++ b/physics/cs_conv.meta @@ -16,7 +16,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of veritcal levels units = count dimensions = () @@ -31,19 +31,11 @@ type = integer intent = in optional = F -[ncld] - standard_name = number_of_hydrometeors - long_name = number of hydrometeors - units = count - dimensions = () - type = integer - intent = in - optional = F [q] - standard_name = water_vapor_specific_humidity_updated_by_physics + standard_name = specific_humidity_of_new_state long_name = water vapor specific humidity updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -52,7 +44,7 @@ standard_name = ice_water_mixing_ratio_convective_transport_tracer long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -61,7 +53,7 @@ standard_name = cloud_condensed_water_mixing_ratio_convective_transport_tracer long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -133,7 +125,7 @@ standard_name = water_vapor_specific_humidity_save long_name = water vapor specific humidity before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -142,7 +134,7 @@ standard_name = cloud_condensed_water_mixing_ratio_save long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -151,7 +143,7 @@ standard_name = ice_water_mixing_ratio_save long_name = cloud ice water mixing ratio before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -193,7 +185,7 @@ intent = in optional = F [kmax] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of veritcal levels units = count dimensions = () @@ -212,7 +204,7 @@ standard_name = convective_updraft_area_fraction_at_model_interfaces long_name = convective updraft area fraction at model interfaces units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -221,7 +213,7 @@ standard_name = convective_updraft_area_fraction long_name = convective updraft area fraction units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -263,7 +255,7 @@ intent = in optional = F [kmax] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of veritcal levels units = count dimensions = () @@ -319,7 +311,7 @@ intent = in optional = F [kdt] - standard_name = index_of_time_step + standard_name = index_of_timestep long_name = current forecast iteration units = index dimensions = () @@ -327,19 +319,19 @@ intent = in optional = F [t] - standard_name = air_temperature_updated_by_physics + standard_name = air_temperature_of_new_state long_name = mid-layer temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [q] - standard_name = water_vapor_specific_humidity_updated_by_physics + standard_name = specific_humidity_of_new_state long_name = mid-layer specific humidity of water vapor units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -357,7 +349,7 @@ standard_name = convective_transportable_tracers long_name = array to contain cloud water and other convective trans. tracers units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers_for_convective_transport) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers_for_convective_transport) type = real kind = kind_phys intent = inout @@ -366,7 +358,7 @@ standard_name = geopotential long_name = mid-layer geopotential units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -375,7 +367,7 @@ standard_name = geopotential_at_interface long_name = interface geopotential units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -384,7 +376,7 @@ standard_name = air_pressure long_name = mid-layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -393,13 +385,13 @@ standard_name = air_pressure_at_interface long_name = interface pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in optional = F [delta] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics time step units = s dimensions = () @@ -408,7 +400,7 @@ intent = in optional = F [delti] - standard_name = time_step_for_dynamics + standard_name = timestep_for_dynamics long_name = dynamics time step units = s dimensions = () @@ -420,7 +412,7 @@ standard_name = instantaneous_atmosphere_updraft_convective_mass_flux long_name = (updraft mass flux) * delt units = kg m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -429,7 +421,7 @@ standard_name = instantaneous_atmosphere_downdraft_convective_mass_flux long_name = (downdraft mass flux) * delt units = kg m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -438,25 +430,25 @@ standard_name = instantaneous_atmosphere_detrainment_convective_mass_flux long_name = (detrainment mass flux) * delt units = kg m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [u] - standard_name = x_wind_updated_by_physics + standard_name = x_wind_of_new_state long_name = mid-layer zonal wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [v] - standard_name = y_wind_updated_by_physics + standard_name = y_wind_of_new_state long_name = mid-layer meridional wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -480,7 +472,7 @@ intent = in optional = F [cbmfx] - standard_name = cloud_base_mass_flux + standard_name = atmosphere_updraft_convective_mass_flux_at_cloud_base_by_cloud_type long_name = cloud base mass flux units = kg m-2 s-1 dimensions = (horizontal_loop_extent,number_of_cloud_types_CS) @@ -536,7 +528,7 @@ standard_name = convective_updraft_area_fraction_at_model_interfaces long_name = convective updraft area fraction at model interfaces units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -550,7 +542,7 @@ intent = in optional = F [do_awdd] - standard_name = flag_arakawa_wu_downdraft + standard_name = flag_for_arakawa_wu_downdrafts_for_deep_convection long_name = flag to enable treating convective tendencies following Arakwaw-Wu for downdrafts (2013) units = flag dimensions = () @@ -593,7 +585,7 @@ standard_name = mass_fraction_of_convective_cloud_liquid_water long_name = mass fraction of convective cloud liquid water units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -602,7 +594,7 @@ standard_name = mass_fraction_of_convective_cloud_ice long_name = mass fraction of convective cloud ice water units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -611,7 +603,7 @@ standard_name = vertical_velocity_for_updraft long_name = vertical velocity for updraft units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -620,7 +612,7 @@ standard_name = convective_cloud_fraction_for_microphysics long_name = convective cloud fraction for microphysics units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -629,7 +621,7 @@ standard_name = detrained_mass_flux long_name = detrained mass flux units = kg m-2 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -638,7 +630,7 @@ standard_name = tendency_of_cloud_water_due_to_convective_microphysics long_name = tendency of cloud water due to convective microphysics units = kg m-2 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -647,7 +639,7 @@ standard_name = convective_cloud_volume_fraction long_name = convective cloud volume fraction units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -656,7 +648,7 @@ standard_name = ice_fraction_in_convective_tower long_name = ice fraction in convective tower units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -665,7 +657,7 @@ standard_name = number_concentration_of_cloud_liquid_water_particles_for_detrainment long_name = droplet number concentration in convective detrainment units = m-3 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -674,13 +666,13 @@ standard_name = number_concentration_of_ice_crystals_for_detrainment long_name = crystal number concentration in convective detrainment units = m-3 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [mp_phys] - standard_name = flag_for_microphysics_scheme + standard_name = control_for_microphysics_scheme long_name = flag for microphysics scheme units = flag dimensions = () diff --git a/physics/cs_conv_aw_adj.F90 b/physics/cs_conv_aw_adj.F90 index 756161d8c..4b54290bd 100644 --- a/physics/cs_conv_aw_adj.F90 +++ b/physics/cs_conv_aw_adj.F90 @@ -27,7 +27,7 @@ end subroutine cs_conv_aw_adj_finalize !! !\section gen_cs_conv_aw_adj_run CPT cs_conv_aw_adj_run General Algorithm subroutine cs_conv_aw_adj_run(im, levs, do_cscnv, do_aw, do_shoc, & - ntrac, ncld, ntcw, ntclamt, nncl, con_g, sigmafrac, & + ntrac, ntcw, ntclamt, nncl, con_g, sigmafrac, & gt0, gq0, save_t, save_q, prsi, cldfrac, subcldfrac, & prcp, imp_physics, imp_physics_mg, errmsg, errflg) @@ -38,17 +38,17 @@ subroutine cs_conv_aw_adj_run(im, levs, do_cscnv, do_aw, do_shoc, & ! --- interface variables integer, intent(in) :: im, levs logical, intent(in) :: do_cscnv, do_aw, do_shoc - integer, intent(in) :: ntrac, ncld, ntcw, ntclamt, nncl + integer, intent(in) :: ntrac, ntcw, ntclamt, nncl real(kind_phys), intent(in) :: con_g - real(kind_phys), dimension(im,levs), intent(inout) :: sigmafrac - real(kind_phys), dimension(im,levs), intent(inout) :: gt0 - real(kind_phys), dimension(im,levs,ntrac), intent(inout) :: gq0 - real(kind_phys), dimension(im,levs), intent(in) :: save_t - real(kind_phys), dimension(im,levs,ntrac), intent(in) :: save_q - real(kind_phys), dimension(im,levs+1), intent(in) :: prsi - real(kind_phys), dimension(im,levs), intent(inout) :: cldfrac - real(kind_phys), dimension(im,levs), intent(inout) :: subcldfrac - real(kind_phys), dimension(im), intent(inout) :: prcp + real(kind_phys), dimension(:,:), intent(inout) :: sigmafrac + real(kind_phys), dimension(:,:), intent(inout) :: gt0 + real(kind_phys), dimension(:,:,:), intent(inout) :: gq0 + real(kind_phys), dimension(:,:), intent(in) :: save_t + real(kind_phys), dimension(:,:,:), intent(in) :: save_q + real(kind_phys), dimension(:,:), intent(in) :: prsi + real(kind_phys), dimension(:,:), intent(inout) :: cldfrac + real(kind_phys), dimension(:,:), intent(inout) :: subcldfrac + real(kind_phys), dimension(:), intent(inout) :: prcp integer, intent(in ) :: imp_physics, imp_physics_mg character(len=*), intent( out) :: errmsg integer, intent( out) :: errflg diff --git a/physics/cs_conv_aw_adj.meta b/physics/cs_conv_aw_adj.meta index 720330c50..d1e87ecd4 100644 --- a/physics/cs_conv_aw_adj.meta +++ b/physics/cs_conv_aw_adj.meta @@ -16,7 +16,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of veritcal levels units = count dimensions = () @@ -55,16 +55,8 @@ type = integer intent = in optional = F -[ncld] - standard_name = number_of_hydrometeors - long_name = number of hydrometeors - units = count - dimensions = () - type = integer - intent = in - optional = F [ntcw] - standard_name = index_for_liquid_cloud_condensate + standard_name = index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array long_name = tracer index for cloud condensate (or liquid water) units = index dimensions = () @@ -72,7 +64,7 @@ intent = in optional = F [ntclamt] - standard_name = index_for_cloud_amount + standard_name = index_of_cloud_area_fraction_in_atmosphere_layer_in_tracer_concentration_array long_name = tracer index for cloud amount integer units = index dimensions = () @@ -80,8 +72,8 @@ intent = in optional = F [nncl] - standard_name = number_of_tracers_for_cloud_condensate - long_name = number of tracers for cloud condensate + standard_name = number_of_condensate_species + long_name = number of cloud condensate types units = count dimensions = () type = integer @@ -100,25 +92,25 @@ standard_name = convective_updraft_area_fraction long_name = convective updraft area fraction units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [gt0] - standard_name = air_temperature_updated_by_physics + standard_name = air_temperature_of_new_state long_name = temperature updated by physics units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [gq0] - standard_name = tracer_concentration_updated_by_physics + standard_name = tracer_concentration_of_new_state long_name = tracer concentration updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = inout @@ -127,7 +119,7 @@ standard_name = air_temperature_save long_name = air temperature before entering a physics scheme units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -136,7 +128,7 @@ standard_name = tracer_concentration_save long_name = tracer concentration before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = in @@ -145,7 +137,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -154,7 +146,7 @@ standard_name = cloud_fraction_for_MG long_name = cloud fraction used by Morrison-Gettelman MP units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -163,7 +155,7 @@ standard_name = subgrid_scale_cloud_fraction_from_shoc long_name = subgrid-scale cloud fraction from the SHOC scheme units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -178,7 +170,7 @@ intent = inout optional = F [imp_physics] - standard_name = flag_for_microphysics_scheme + standard_name = control_for_microphysics_scheme long_name = choice of microphysics scheme units = flag dimensions = () @@ -186,7 +178,7 @@ intent = in optional = F [imp_physics_mg] - standard_name = flag_for_morrison_gettelman_microphysics_scheme + standard_name = identifier_for_morrison_gettelman_microphysics_scheme long_name = choice of Morrison-Gettelman microphysics scheme units = flag dimensions = () diff --git a/physics/cu_gf_driver.F90 b/physics/cu_gf_driver.F90 index 3b71c761c..96c5d8eb6 100644 --- a/physics/cu_gf_driver.F90 +++ b/physics/cu_gf_driver.F90 @@ -23,10 +23,13 @@ module cu_gf_driver !! \section arg_table_cu_gf_driver_init Argument Table !! \htmlinclude cu_gf_driver_init.html !! - subroutine cu_gf_driver_init(mpirank, mpiroot, errmsg, errflg) + subroutine cu_gf_driver_init(imfshalcnv, imfshalcnv_gf, imfdeepcnv, & + imfdeepcnv_gf,mpirank, mpiroot, errmsg, errflg) implicit none - + + integer, intent(in) :: imfshalcnv, imfshalcnv_gf + integer, intent(in) :: imfdeepcnv, imfdeepcnv_gf integer, intent(in) :: mpirank integer, intent(in) :: mpiroot character(len=*), intent( out) :: errmsg @@ -44,6 +47,15 @@ subroutine cu_gf_driver_init(mpirank, mpiroot, errmsg, errflg) end if ! *DH temporary + ! Consistency checks + if (.not. (imfshalcnv == imfshalcnv_gf .or. & + & imfdeepcnv == imfdeepcnv_gf)) then + write(errmsg,'(*(a))') 'Logic error: namelist choice of', & + & ' convection is different from Grell-Freitas scheme' + errflg = 1 + return + end if + end subroutine cu_gf_driver_init subroutine cu_gf_driver_finalize() @@ -69,9 +81,9 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,cactiv,g,cp,xlv,r_v, & hbot,htop,kcnv,xland,hfx2,qfx2,cliw,clcw, & pbl,ud_mf,dd_mf,dt_mf,cnvw_moist,cnvc,imfshalcnv, & flag_for_scnv_generic_tend,flag_for_dcnv_generic_tend, & - du3dt_SCNV,dv3dt_SCNV,dt3dt_SCNV,dq3dt_SCNV, & - du3dt_DCNV,dv3dt_DCNV,dt3dt_DCNV,dq3dt_DCNV, & - ldiag3d,qdiag3d,qci_conv,errmsg,errflg) + dtend,dtidx,ntqv,ntiw,ntcw,index_of_temperature,index_of_x_wind, & + index_of_y_wind,index_of_process_scnv,index_of_process_dcnv, & + ldiag3d,qci_conv,errmsg,errflg) !------------------------------------------------------------- implicit none integer, parameter :: maxiens=1 @@ -94,47 +106,53 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,cactiv,g,cp,xlv,r_v, & integer :: its,ite, jts,jte, kts,kte integer, intent(in ) :: im,km,ntracer logical, intent(in ) :: flag_for_scnv_generic_tend,flag_for_dcnv_generic_tend - logical, intent(in ) :: ldiag3d,qdiag3d - real (kind=kind_phys), intent(in) :: g,cp,xlv,r_v - real(kind=kind_phys), dimension( im , km ), intent(in ) :: forcet,forceqv_spechum,w,phil - real(kind=kind_phys), dimension( im , km ), intent(inout ) :: t,us,vs - real(kind=kind_phys), dimension( im , km ), intent(inout ) :: qci_conv - real(kind=kind_phys), dimension( im ) :: rand_mom,rand_vmas - real(kind=kind_phys), dimension( im,4 ) :: rand_clos - real(kind=kind_phys), dimension( im , km, 11 ) :: gdc,gdc2 - real(kind=kind_phys), dimension( im , km ), intent(out ) :: cnvw_moist,cnvc - real(kind=kind_phys), dimension( im , km ), intent(inout ) :: cliw, clcw - - real(kind=kind_phys), dimension( : , : ), intent(inout ) :: & - du3dt_SCNV,dv3dt_SCNV,dt3dt_SCNV,dq3dt_SCNV, & - du3dt_DCNV,dv3dt_DCNV,dt3dt_DCNV,dq3dt_DCNV - - integer, dimension (im), intent(inout) :: hbot,htop,kcnv - integer, dimension (im), intent(in) :: xland - real(kind=kind_phys), dimension (im), intent(in) :: pbl + real (kind=kind_phys), intent(in) :: g,cp,xlv,r_v + logical, intent(in ) :: ldiag3d + + real(kind=kind_phys), intent(inout) :: dtend(:,:,:) + integer, intent(in) :: dtidx(:,:), & + index_of_x_wind, index_of_y_wind, index_of_temperature, & + index_of_process_scnv, index_of_process_dcnv, ntqv, ntcw, ntiw + + real(kind=kind_phys), dimension( : , : ), intent(in ) :: forcet,forceqv_spechum,w,phil + real(kind=kind_phys), dimension( : , : ), intent(inout ) :: t,us,vs + real(kind=kind_phys), dimension( : , : ), intent(inout ) :: qci_conv + real(kind=kind_phys), dimension( : , : ), intent(out ) :: cnvw_moist,cnvc + real(kind=kind_phys), dimension( : , : ), intent(inout ) :: cliw, clcw + + real(kind=kind_phys), allocatable :: clcw_save(:,:), cliw_save(:,:) + + integer, dimension (:), intent(out) :: hbot,htop,kcnv + integer, dimension (:), intent(in) :: xland + real(kind=kind_phys), dimension (:), intent(in) :: pbl integer, dimension (im) :: tropics ! ruc variable - real(kind=kind_phys), dimension (im) :: hfx2,qfx2,psuri - real(kind=kind_phys), dimension (im,km) :: ud_mf,dd_mf,dt_mf - real(kind=kind_phys), dimension (im), intent(inout) :: raincv,cld1d - real(kind=kind_phys), dimension (im,km) :: t2di,p2di + real(kind=kind_phys), dimension (:), intent(in) :: hfx2,qfx2,psuri + real(kind=kind_phys), dimension (:,:), intent(out) :: ud_mf,dd_mf,dt_mf + real(kind=kind_phys), dimension (:), intent(out) :: raincv,cld1d + real(kind=kind_phys), dimension (:,:), intent(in) :: t2di,p2di ! Specific humidity from FV3 - real(kind=kind_phys), dimension (im,km), intent(in) :: qv2di_spechum - real(kind=kind_phys), dimension (im,km), intent(inout) :: qv_spechum + real(kind=kind_phys), dimension (:,:), intent(in) :: qv2di_spechum + real(kind=kind_phys), dimension (:,:), intent(inout) :: qv_spechum ! Local water vapor mixing ratios and cloud water mixing ratios real(kind=kind_phys), dimension (im,km) :: qv2di, qv, forceqv, cnvw ! - real(kind=kind_phys), dimension( im ),intent(in) :: garea + real(kind=kind_phys), dimension(:),intent(in) :: garea real(kind=kind_phys), intent(in ) :: dt integer, intent(in ) :: imfshalcnv + integer, dimension(:), intent(inout) :: cactiv + character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg -! define locally for now. - integer, dimension(im),intent(inout) :: cactiv + +! local variables integer, dimension(im) :: k22_shallow,kbcon_shallow,ktop_shallow - real(kind=kind_phys), dimension(im) :: ht - real(kind=kind_phys), dimension(im) :: dx + real(kind=kind_phys), dimension (im) :: rand_mom,rand_vmas + real(kind=kind_phys), dimension (im,4) :: rand_clos + real(kind=kind_phys), dimension (im,km,11) :: gdc,gdc2 + real(kind=kind_phys), dimension (im) :: ht + real(kind=kind_phys), dimension (im) :: dx real(kind=kind_phys), dimension (im,km) :: outt,outq,outqc,phh,subm,cupclw,cupclws real(kind=kind_phys), dimension (im,km) :: dhdt,zu,zus,zd,phf,zum,zdm,outum,outvm real(kind=kind_phys), dimension (im,km) :: outts,outqs,outqcs,outu,outv,outus,outvs @@ -168,8 +186,8 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,cactiv,g,cp,xlv,r_v, & real(kind=kind_phys), dimension (im) :: umean,vmean,pmean real(kind=kind_phys), dimension (im) :: xmbs,xmbs2,xmb,xmbm,xmb_dumm,mconv - integer :: i,j,k,icldck,ipr,jpr,jpr_deep,ipr_deep - integer :: itf,jtf,ktf,iss,jss,nbegin,nend + integer :: i,j,k,icldck,ipr,jpr,jpr_deep,ipr_deep,uidx,vidx,tidx,qidx + integer :: itf,jtf,ktf,iss,jss,nbegin,nend,cliw_idx,clcw_idx integer :: high_resolution real(kind=kind_phys) :: clwtot,clwtot1,excess,tcrit,tscl_kf,dp,dq,sub_spread,subcenter real(kind=kind_phys) :: dsubclw,dsubclws,dsubclwm,dtime_max,ztm,ztq,hfm,qfm,rkbcon,rktop @@ -184,6 +202,9 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,cactiv,g,cp,xlv,r_v, & ! gf needs them in w/m2. define hfx and qfx after simple unit conversion real(kind=kind_phys), dimension (im) :: hfx,qfx real(kind=kind_phys) tem,tem1,tf,tcr,tcrf + real(kind=kind_phys) :: cliw_shal,clcw_shal,tem_shal, cliw_both, weight_sum + real(kind=kind_phys) :: cliw_deep,clcw_deep,tem_deep, clcw_both + integer :: cliw_deep_idx, clcw_deep_idx, cliw_shal_idx, clcw_shal_idx !parameter (tf=243.16, tcr=270.16, tcrf=1.0/(tcr-tf)) ! FV3 original !parameter (tf=263.16, tcr=273.16, tcrf=1.0/(tcr-tf)) @@ -192,6 +213,30 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,cactiv,g,cp,xlv,r_v, & ! initialize ccpp error handling variables errmsg = '' errflg = 0 + + if(ldiag3d) then + if(flag_for_dcnv_generic_tend) then + cliw_deep_idx=0 + clcw_deep_idx=0 + else + cliw_deep_idx=dtidx(100+ntiw,index_of_process_dcnv) + clcw_deep_idx=dtidx(100+ntcw,index_of_process_dcnv) + endif + if(flag_for_scnv_generic_tend) then + cliw_shal_idx=0 + clcw_shal_idx=0 + else + cliw_shal_idx=dtidx(100+ntiw,index_of_process_scnv) + clcw_shal_idx=dtidx(100+ntcw,index_of_process_scnv) + endif + if(cliw_deep_idx>=1 .or. clcw_deep_idx>=1 .or. & + cliw_shal_idx>=1 .or. clcw_shal_idx>=1) then + allocate(clcw_save(im,km), cliw_save(im,km)) + clcw_save=clcw + cliw_save=cliw + endif + endif + ! ! Scale specific humidity to dry mixing ratio ! @@ -861,29 +906,96 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,cactiv,g,cp,xlv,r_v, & ! if(ldiag3d) then if(ishallow_g3.eq.1 .and. .not.flag_for_scnv_generic_tend) then - do k=kts,ktf - do i=its,itf - du3dt_SCNV(i,k) = du3dt_SCNV(i,k) + cutens(i)*outus(i,k) * dt - dv3dt_SCNV(i,k) = dv3dt_SCNV(i,k) + cutens(i)*outvs(i,k) * dt - dt3dt_SCNV(i,k) = dt3dt_SCNV(i,k) + cutens(i)*outts(i,k) * dt - if(qdiag3d) then + uidx=dtidx(index_of_x_wind,index_of_process_scnv) + vidx=dtidx(index_of_y_wind,index_of_process_scnv) + tidx=dtidx(index_of_temperature,index_of_process_scnv) + qidx=dtidx(100+ntqv,index_of_process_scnv) + if(uidx>=1) then + do k=kts,ktf + dtend(:,k,uidx) = dtend(:,k,uidx) + cutens(:)*outus(:,k) * dt + enddo + endif + if(vidx>=1) then + do k=kts,ktf + dtend(:,k,vidx) = dtend(:,k,vidx) + cutens(:)*outvs(:,k) * dt + enddo + endif + if(tidx>=1) then + do k=kts,ktf + dtend(:,k,tidx) = dtend(:,k,tidx) + cutens(:)*outts(:,k) * dt + enddo + endif + if(qidx>=1) then + do k=kts,ktf + do i=its,itf tem = cutens(i)*outqs(i,k)* dt tem = tem/(1.0_kind_phys+tem) - dq3dt_SCNV(i,k) = dq3dt_SCNV(i,k) + tem - endif + dtend(i,k,qidx) = dtend(i,k,qidx) + tem + enddo enddo - enddo + endif endif if((ideep.eq.1. .or. imid_gf.eq.1) .and. .not.flag_for_dcnv_generic_tend) then - do k=kts,ktf - do i=its,itf - du3dt_DCNV(i,k) = du3dt_DCNV(i,k) + (cuten(i)*outu(i,k)+cutenm(i)*outum(i,k)) * dt - dv3dt_DCNV(i,k) = dv3dt_DCNV(i,k) + (cuten(i)*outv(i,k)+cutenm(i)*outvm(i,k)) * dt - dt3dt_DCNV(i,k) = dt3dt_DCNV(i,k) + (cuten(i)*outt(i,k)+cutenm(i)*outtm(i,k)) * dt - if(qdiag3d) then + uidx=dtidx(index_of_x_wind,index_of_process_dcnv) + vidx=dtidx(index_of_y_wind,index_of_process_dcnv) + tidx=dtidx(index_of_temperature,index_of_process_dcnv) + if(uidx>=1) then + do k=kts,ktf + dtend(:,k,uidx) = dtend(:,k,uidx) + (cuten*outu(:,k)+cutenm*outum(:,k)) * dt + enddo + endif + if(vidx>=1) then + do k=kts,ktf + dtend(:,k,vidx) = dtend(:,k,vidx) + (cuten*outv(:,k)+cutenm*outvm(:,k)) * dt + enddo + endif + if(tidx>=1) then + do k=kts,ktf + dtend(:,k,tidx) = dtend(:,k,tidx) + (cuten*outt(:,k)+cutenm*outtm(:,k)) * dt + enddo + endif + + qidx=dtidx(100+ntqv,index_of_process_dcnv) + if(qidx>=1) then + do k=kts,ktf + do i=its,itf tem = (cuten(i)*outq(i,k) + cutenm(i)*outqm(i,k))* dt tem = tem/(1.0_kind_phys+tem) - dq3dt_DCNV(i,k) = dq3dt_DCNV(i,k) + tem + dtend(i,k,qidx) = dtend(i,k,qidx) + tem + enddo + enddo + endif + endif + if(allocated(clcw_save)) then + do k=kts,ktf + do i=its,itf + tem_shal = dt*(outqcs(i,k)*cutens(i)+outqcm(i,k)*cutenm(i)) + tem_deep = dt*(outqc(i,k)*cuten(i)+clw_ten1(k)) + tem = tem_shal+tem_deep + tem1 = max(0.0, min(1.0, (tcr-t(i,k))*tcrf)) + weight_sum = abs(tem_shal)+abs(tem_deep) + if(weight_sum<1e-12) then + cycle + endif + + if (clcw_save(i,k) .gt. -999.0) then + cliw_both = max(0.,cliw_save(i,k) + tem * tem1) - cliw_save(i,k) + clcw_both = max(0.,clcw_save(i,k) + tem) - clcw_save(i,k) + else if(cliw_idx>=1) then + cliw_both = max(0.,cliw_save(i,k) + tem) - cliw_save(i,k) + clcw_both = 0 + endif + if(cliw_deep_idx>=1) then + dtend(i,k,cliw_deep_idx) = dtend(i,k,cliw_deep_idx) + abs(tem_deep)/weight_sum*cliw_both + endif + if(clcw_deep_idx>=1) then + dtend(i,k,clcw_deep_idx) = dtend(i,k,clcw_deep_idx) + abs(tem_deep)/weight_sum*clcw_both + endif + if(cliw_shal_idx>=1) then + dtend(i,k,cliw_shal_idx) = dtend(i,k,cliw_shal_idx) + abs(tem_shal)/weight_sum*cliw_both + endif + if(clcw_shal_idx>=1) then + dtend(i,k,clcw_shal_idx) = dtend(i,k,clcw_shal_idx) + abs(tem_shal)/weight_sum*clcw_both endif enddo enddo diff --git a/physics/cu_gf_driver.meta b/physics/cu_gf_driver.meta index e22bc516b..732eb9679 100644 --- a/physics/cu_gf_driver.meta +++ b/physics/cu_gf_driver.meta @@ -7,6 +7,38 @@ [ccpp-arg-table] name = cu_gf_driver_init type = scheme +[imfshalcnv] + standard_name = control_for_shallow_convection_scheme + long_name = flag for mass-flux shallow convection scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imfshalcnv_gf] + standard_name = identifier_for_grell_freitas_shallow_convection + long_name = flag for Grell-Freitas shallow convection scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imfdeepcnv] + standard_name = control_for_deep_convection_scheme + long_name = flag for mass-flux deep convection scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imfdeepcnv_gf] + standard_name = identifier_for_grell_freitas_deep_convection + long_name = flag for Grell-Freitas deep convection scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F [mpirank] standard_name = mpi_rank long_name = current MPI-rank @@ -71,7 +103,7 @@ intent = in optional = F [km] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -79,7 +111,7 @@ intent = in optional = F [dt] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics time step units = s dimensions = () @@ -88,7 +120,7 @@ intent = in optional = F [cactiv] - standard_name = conv_activity_counter + standard_name = counter_for_grell_freitas_convection long_name = convective activity memory units = none dimensions = (horizontal_loop_extent) @@ -132,19 +164,19 @@ intent = in optional = F [forcet] - standard_name = temperature_tendency_due_to_dynamics + standard_name = tendency_of_air_temperature_due_to_nonphysics long_name = temperature tendency due to dynamics only units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [forceqv_spechum] - standard_name = moisture_tendency_due_to_dynamics + standard_name = tendendy_of_specific_humidity_due_to_nonphysics long_name = moisture tendency due to dynamics only units = kg kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -153,7 +185,7 @@ standard_name = geopotential long_name = layer geopotential units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -168,19 +200,19 @@ intent = out optional = F [qv_spechum] - standard_name = water_vapor_specific_humidity_updated_by_physics + standard_name = specific_humidity_of_new_state long_name = water vapor specific humidity updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [t] - standard_name = air_temperature_updated_by_physics + standard_name = air_temperature_of_new_state long_name = updated temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -195,19 +227,19 @@ intent = out optional = F [us] - standard_name = x_wind_updated_by_physics + standard_name = x_wind_of_new_state long_name = updated x-direction wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [vs] - standard_name = y_wind_updated_by_physics + standard_name = y_wind_of_new_state long_name = updated y-direction wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -216,25 +248,25 @@ standard_name = air_temperature long_name = mid-layer temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [w] - standard_name = omega + standard_name = lagrangian_tendency_of_air_pressure long_name = layer mean vertical velocity units = Pa s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [qv2di_spechum] - standard_name = water_vapor_specific_humidity + standard_name = specific_humidity long_name = water vapor specific humidity units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -243,7 +275,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -290,8 +322,8 @@ intent = in optional = F [hfx2] - standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness - long_name = kinematic surface upward sensible heat flux reduced by surface roughness + standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness_and_vegetation + long_name = kinematic surface upward sensible heat flux reduced by surface roughness and vegetation units = K m s-1 dimensions = (horizontal_loop_extent) type = real @@ -299,8 +331,8 @@ intent = in optional = F [qfx2] - standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness - long_name = kinematic surface upward latent heat flux reduced by surface roughness + standard_name = surface_upward_specific_humidity_flux + long_name = kinematic surface upward latent heat flux units = kg kg-1 m s-1 dimensions = (horizontal_loop_extent) type = real @@ -311,7 +343,7 @@ standard_name = ice_water_mixing_ratio_convective_transport_tracer long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -320,7 +352,7 @@ standard_name = cloud_condensed_water_mixing_ratio_convective_transport_tracer long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -338,7 +370,7 @@ standard_name = instantaneous_atmosphere_updraft_convective_mass_flux long_name = (updraft mass flux) * delt units = kg m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -347,7 +379,7 @@ standard_name = instantaneous_atmosphere_downdraft_convective_mass_flux long_name = (downdraft mass flux) * delt units = kg m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -356,7 +388,7 @@ standard_name = instantaneous_atmosphere_detrainment_convective_mass_flux long_name = (detrainment mass flux) * delt units = kg m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -365,7 +397,7 @@ standard_name = convective_cloud_water_mixing_ratio long_name = moist convective cloud water mixing ratio units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -374,13 +406,13 @@ standard_name = convective_cloud_cover long_name = convective cloud cover units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [imfshalcnv] - standard_name = flag_for_mass_flux_shallow_convection_scheme + standard_name = control_for_shallow_convection_scheme long_name = flag for mass-flux shallow convection scheme units = flag dimensions = () @@ -388,7 +420,7 @@ intent = in optional = F [flag_for_scnv_generic_tend] - standard_name = flag_for_generic_shallow_convection_tendency + standard_name = flag_for_generic_tendency_due_to_shallow_convection long_name = true if GFS_SCNV_generic should calculate tendencies units = flag dimensions = () @@ -396,96 +428,97 @@ intent = in optional = F [flag_for_dcnv_generic_tend] - standard_name = flag_for_generic_deep_convection_tendency + standard_name = flag_for_generic_tendency_due_to_deep_convection long_name = true if GFS_DCNV_generic should calculate tendencies units = flag dimensions = () type = logical intent = in optional = F -[du3dt_SCNV] - standard_name = cumulative_change_in_x_wind_due_to_shallow_convection - long_name = cumulative change in x wind due to shallow convection - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) +[dtend] + standard_name = cumulative_change_of_state_variables + long_name = diagnostic tendencies for state variables + units = various + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_cumulative_change_processes) type = real kind = kind_phys intent = inout optional = F -[dv3dt_SCNV] - standard_name = cumulative_change_in_y_wind_due_to_shallow_convection - long_name = cumulative change in y wind due to shallow convection - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[dtidx] + standard_name = cumulative_change_of_state_variables_outer_index + long_name = index of state-variable and process in last dimension of diagnostic tendencies array AKA cumulative_change_index + units = index + dimensions = (number_of_tracers_plus_one_hundred,number_of_cumulative_change_processes) + type = integer + intent = in optional = F -[dt3dt_SCNV] - standard_name = cumulative_change_in_temperature_due_to_shallow_convection - long_name = cumulative change in temperature due to shallow convection - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[ntqv] + standard_name = index_of_specific_humidity_in_tracer_concentration_array + long_name = tracer index for water vapor (specific humidity) + units = index + dimensions = () + type = integer + intent = in optional = F -[dq3dt_SCNV] - standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_shallow_convection - long_name = cumulative change in water vapor specific humidity due to shallow convection - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[ntcw] + standard_name = index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for cloud condensate (or liquid water) + units = index + dimensions = () + type = integer + intent = in optional = F -[du3dt_DCNV] - standard_name = cumulative_change_in_x_wind_due_to_deep_convection - long_name = cumulative change in x wind due to deep convection - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[ntiw] + standard_name = index_of_cloud_ice_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for ice water + units = index + dimensions = () + type = integer + intent = in optional = F -[dv3dt_DCNV] - standard_name = cumulative_change_in_y_wind_due_to_deep_convection - long_name = cumulative change in y wind due to deep convection - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[index_of_temperature] + standard_name = index_of_temperature_in_cumulative_change_index + long_name = index of temperature in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in optional = F -[dt3dt_DCNV] - standard_name = cumulative_change_in_temperature_due_to_deep_convection - long_name = cumulative change in temperature due to deep convection - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[index_of_x_wind] + standard_name = index_of_x_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in optional = F -[dq3dt_DCNV] - standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_deep_convection - long_name = cumulative change in water vapor specific humidity due to deep convection - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[index_of_y_wind] + standard_name = index_of_y_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in optional = F -[ldiag3d] - standard_name = flag_diagnostics_3D - long_name = flag for 3d diagnostic fields - units = flag +[index_of_process_scnv] + standard_name = index_of_shallow_convection_process_process_in_cumulative_change_index + long_name = index of shallow convection process in second dimension of array cumulative change index + units = index dimensions = () - type = logical + type = integer intent = in optional = F -[qdiag3d] - standard_name = flag_tracer_diagnostics_3D - long_name = flag for 3d tracer diagnostic fields +[index_of_process_dcnv] + standard_name = index_of_deep_convection_process_process_in_cumulative_change_index + long_name = index of deep convection process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[ldiag3d] + standard_name = flag_for_diagnostics_3D + long_name = flag for 3d diagnostic fields units = flag dimensions = () type = logical @@ -495,7 +528,7 @@ standard_name = convective_cloud_condesate_after_rainout long_name = convective cloud condesate after rainout units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/cu_gf_driver_post.meta b/physics/cu_gf_driver_post.meta index 152409fbd..5d1f34927 100644 --- a/physics/cu_gf_driver_post.meta +++ b/physics/cu_gf_driver_post.meta @@ -16,43 +16,43 @@ intent = in optional = F [t] - standard_name = air_temperature_updated_by_physics + standard_name = air_temperature_of_new_state long_name = temperature updated by physics units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [q] - standard_name = water_vapor_specific_humidity_updated_by_physics + standard_name = specific_humidity_of_new_state long_name = water vapor specific humidity updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [prevst] - standard_name = temperature_from_previous_timestep + standard_name = air_temperature_on_previous_timestep long_name = temperature from previous time step units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [prevsq] - standard_name = moisture_from_previous_timestep + standard_name = specific_humidity_on_previous_timestep long_name = moisture from previous time step units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [cactiv] - standard_name = conv_activity_counter + standard_name = counter_for_grell_freitas_convection long_name = convective activity memory units = none dimensions = (horizontal_loop_extent) @@ -60,7 +60,7 @@ intent = in optional = F [conv_act] - standard_name = gf_memory_counter + standard_name = consecutive_calls_for_grell_freitas_convection long_name = Memory counter for GF units = none dimensions = (horizontal_loop_extent) diff --git a/physics/cu_gf_driver_pre.meta b/physics/cu_gf_driver_pre.meta index 1a7fbe4a3..394055762 100644 --- a/physics/cu_gf_driver_pre.meta +++ b/physics/cu_gf_driver_pre.meta @@ -8,7 +8,7 @@ name = cu_gf_driver_pre_run type = scheme [flag_init] - standard_name = flag_for_first_time_step + standard_name = flag_for_first_timestep long_name = flag signaling first time step for time integration loop units = flag dimensions = () @@ -24,7 +24,7 @@ intent = in optional = F [kdt] - standard_name = index_of_time_step + standard_name = index_of_timestep long_name = current forecast iteration units = index dimensions = () @@ -41,7 +41,7 @@ intent = in optional = F [dtp] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics timestep units = s dimensions = () @@ -53,58 +53,58 @@ standard_name = air_temperature long_name = model layer mean temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [q] - standard_name = water_vapor_specific_humidity + standard_name = specific_humidity long_name = water vapor specific humidity units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [prevst] - standard_name = temperature_from_previous_timestep + standard_name = air_temperature_on_previous_timestep long_name = temperature from previous time step units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [prevsq] - standard_name = moisture_from_previous_timestep + standard_name = specific_humidity_on_previous_timestep long_name = moisture from previous time step units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [forcet] - standard_name = temperature_tendency_due_to_dynamics + standard_name = tendency_of_air_temperature_due_to_nonphysics long_name = temperature tendency due to dynamics only units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [forceq] - standard_name = moisture_tendency_due_to_dynamics + standard_name = tendendy_of_specific_humidity_due_to_nonphysics long_name = moisture tendency due to dynamics only units = kg kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [cactiv] - standard_name = conv_activity_counter + standard_name = counter_for_grell_freitas_convection long_name = convective activity memory units = none dimensions = (horizontal_loop_extent) @@ -112,7 +112,7 @@ intent = out optional = F [conv_act] - standard_name = gf_memory_counter + standard_name = consecutive_calls_for_grell_freitas_convection long_name = Memory counter for GF units = none dimensions = (horizontal_loop_extent) diff --git a/physics/cu_ntiedtke.F90 b/physics/cu_ntiedtke.F90 index a39930d77..c9b95a816 100644 --- a/physics/cu_ntiedtke.F90 +++ b/physics/cu_ntiedtke.F90 @@ -106,10 +106,13 @@ module cu_ntiedtke !! \section arg_table_cu_ntiedtke_init Argument Table !! \htmlinclude cu_ntiedtke_init.html !! - subroutine cu_ntiedtke_init(mpirank, mpiroot, errmsg, errflg) + subroutine cu_ntiedtke_init(imfshalcnv, imfshalcnv_ntiedtke, imfdeepcnv, & + imfdeepcnv_ntiedtke,mpirank, mpiroot, errmsg, errflg) implicit none + integer, intent(in) :: imfshalcnv, imfshalcnv_ntiedtke + integer, intent(in) :: imfdeepcnv, imfdeepcnv_ntiedtke integer, intent(in) :: mpirank integer, intent(in) :: mpiroot character(len=*), intent( out) :: errmsg @@ -127,6 +130,21 @@ subroutine cu_ntiedtke_init(mpirank, mpiroot, errmsg, errflg) end if ! *DH temporary + ! Consistency checks + if (imfshalcnv/=imfshalcnv_ntiedtke) then + write(errmsg,'(*(a))') 'Logic error: namelist choice of', & + & ' shallow convection is different from new Tiedtke scheme' + errflg = 1 + return + end if + + if (imfdeepcnv/=imfdeepcnv_ntiedtke) then + write(errmsg,'(*(a))') 'Logic error: namelist choice of', & + & ' deep convection is different from new Tiedtke scheme' + errflg = 1 + return + end if + end subroutine cu_ntiedtke_init subroutine cu_ntiedtke_finalize() @@ -154,16 +172,16 @@ subroutine cu_ntiedtke_run(pu,pv,pt,pqv,tdi,qvdi,pqvf,ptf,clw,poz,pzz,prsl,prsi, ! in&out variables integer, intent(in) :: lq, km, ktrac real(kind=kind_phys), intent(in ) :: dt - integer, dimension( lq ), intent(in) :: lmask - real(kind=kind_phys), dimension( lq ), intent(in ) :: evap, hfx, dx - real(kind=kind_phys), dimension( lq , km ), intent(inout) :: pu, pv, pt, pqv - real(kind=kind_phys), dimension( lq , km ), intent(in ) :: tdi, qvdi, poz, prsl, pomg, pqvf, ptf - real(kind=kind_phys), dimension( lq , km+1 ), intent(in ) :: pzz, prsi - real(kind=kind_phys), dimension( lq , km, ktrac ), intent(inout ) :: clw - - integer, dimension( lq ), intent(out) :: kbot, ktop, kcnv - real(kind=kind_phys), dimension( lq ), intent(out) :: zprecc - real(kind=kind_phys), dimension (lq,km), intent(out) :: ud_mf, dd_mf, dt_mf, cnvw, cnvc + integer, dimension( : ), intent(in) :: lmask + real(kind=kind_phys), dimension( : ), intent(in ) :: evap, hfx, dx + real(kind=kind_phys), dimension( :, : ), intent(inout) :: pu, pv, pt, pqv + real(kind=kind_phys), dimension( :, :), intent(in ) :: tdi, qvdi, poz, prsl, pomg, pqvf, ptf + real(kind=kind_phys), dimension( :, : ), intent(in ) :: pzz, prsi + real(kind=kind_phys), dimension( :, :, : ), intent(inout ) :: clw + + integer, dimension( : ), intent(out) :: kbot, ktop, kcnv + real(kind=kind_phys), dimension( : ), intent(out) :: zprecc + real(kind=kind_phys), dimension (:, :), intent(out) :: ud_mf, dd_mf, dt_mf, cnvw, cnvc ! error messages character(len=*), intent(out) :: errmsg diff --git a/physics/cu_ntiedtke.meta b/physics/cu_ntiedtke.meta index 70e977eed..c7477d925 100644 --- a/physics/cu_ntiedtke.meta +++ b/physics/cu_ntiedtke.meta @@ -7,6 +7,38 @@ [ccpp-arg-table] name = cu_ntiedtke_init type = scheme +[imfshalcnv] + standard_name = control_for_shallow_convection_scheme + long_name = flag for mass-flux shallow convection scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imfshalcnv_ntiedtke] + standard_name = identifier_for_new_tiedtke_shallow_convection + long_name = flag for new Tiedtke shallow convection scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imfdeepcnv] + standard_name = control_for_deep_convection_scheme + long_name = flag for mass-flux deep convection scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imfdeepcnv_ntiedtke] + standard_name = identifier_for_new_tiedtke_deep_convection + long_name = flag for new Tiedtke deep convection scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F [mpirank] standard_name = mpi_rank long_name = current MPI-rank @@ -46,37 +78,37 @@ name = cu_ntiedtke_run type = scheme [pu] - standard_name = x_wind_updated_by_physics + standard_name = x_wind_of_new_state long_name = updated x-direction wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [pv] - standard_name = y_wind_updated_by_physics + standard_name = y_wind_of_new_state long_name = updated y-direction wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [pt] - standard_name = air_temperature_updated_by_physics + standard_name = air_temperature_of_new_state long_name = updated temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [pqv] - standard_name = water_vapor_specific_humidity_updated_by_physics + standard_name = specific_humidity_of_new_state long_name = water vapor specific humidity units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -85,34 +117,34 @@ standard_name = air_temperature long_name = mid-layer temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [qvdi] - standard_name = water_vapor_specific_humidity + standard_name = specific_humidity long_name = water vapor specific humidity units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [pqvf] - standard_name = moisture_tendency_due_to_dynamics + standard_name = tendendy_of_specific_humidity_due_to_nonphysics long_name = moisture tendency due to dynamics only units = kg kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [ptf] - standard_name = temperature_tendency_due_to_dynamics + standard_name = tendency_of_air_temperature_due_to_nonphysics long_name = temperature tendency due to dynamics only units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -121,7 +153,7 @@ standard_name = convective_transportable_tracers long_name = array to contain cloud water and other tracers units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers_for_convective_transport) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers_for_convective_transport) type = real kind = kind_phys intent = inout @@ -130,7 +162,7 @@ standard_name = geopotential long_name = geopotential at model layer centers units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -139,7 +171,7 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -148,7 +180,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -157,23 +189,23 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in optional = F [pomg] - standard_name = omega + standard_name = lagrangian_tendency_of_air_pressure long_name = layer mean vertical velocity units = Pa s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [evap] - standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness - long_name = kinematic surface upward latent heat flux reduced by surface roughness + standard_name = surface_upward_specific_humidity_flux + long_name = kinematic surface upward latent heat flux units = kg kg-1 m s-1 dimensions = (horizontal_loop_extent) type = real @@ -181,8 +213,8 @@ intent = in optional = F [hfx] - standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness - long_name = kinematic surface upward sensible heat flux reduced by surface roughness + standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness_and_vegetation + long_name = kinematic surface upward sensible heat flux reduced by surface roughness and vegetation units = K m s-1 dimensions = (horizontal_loop_extent) type = real @@ -215,7 +247,7 @@ intent = in optional = F [km] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -223,7 +255,7 @@ intent = in optional = F [dt] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics time step units = s dimensions = () @@ -232,7 +264,7 @@ intent = in optional = F [dx] - standard_name = cell_size + standard_name = characteristic_grid_lengthscale long_name = size of the grid cell units = m dimensions = (horizontal_loop_extent) @@ -276,7 +308,7 @@ standard_name = instantaneous_atmosphere_updraft_convective_mass_flux long_name = (updraft mass flux) * delt units = kg m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -285,7 +317,7 @@ standard_name = instantaneous_atmosphere_downdraft_convective_mass_flux long_name = (downdraft mass flux) * delt units = kg m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -294,7 +326,7 @@ standard_name = instantaneous_atmosphere_detrainment_convective_mass_flux long_name = (detrainment mass flux) * delt units = kg m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -303,7 +335,7 @@ standard_name = convective_cloud_water_mixing_ratio long_name = convective cloud water units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -312,7 +344,7 @@ standard_name = convective_cloud_cover long_name = convective cloud cover units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out diff --git a/physics/cu_ntiedtke_post.meta b/physics/cu_ntiedtke_post.meta index 543ebae16..65240f184 100644 --- a/physics/cu_ntiedtke_post.meta +++ b/physics/cu_ntiedtke_post.meta @@ -8,37 +8,37 @@ name = cu_ntiedtke_post_run type = scheme [t] - standard_name = air_temperature_updated_by_physics + standard_name = air_temperature_of_new_state long_name = temperature updated by physics units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [q] - standard_name = water_vapor_specific_humidity_updated_by_physics + standard_name = specific_humidity_of_new_state long_name = water vapor specific humidity updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [prevst] - standard_name = temperature_from_previous_timestep + standard_name = air_temperature_on_previous_timestep long_name = temperature from previous time step units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [prevsq] - standard_name = moisture_from_previous_timestep + standard_name = specific_humidity_on_previous_timestep long_name = moisture from previous time step units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out diff --git a/physics/cu_ntiedtke_pre.meta b/physics/cu_ntiedtke_pre.meta index c2670ee09..1d9254074 100644 --- a/physics/cu_ntiedtke_pre.meta +++ b/physics/cu_ntiedtke_pre.meta @@ -8,7 +8,7 @@ name = cu_ntiedtke_pre_run type = scheme [flag_init] - standard_name = flag_for_first_time_step + standard_name = flag_for_first_timestep long_name = flag signaling first time step for time integration loop units = flag dimensions = () @@ -24,7 +24,7 @@ intent = in optional = F [kdt] - standard_name = index_of_time_step + standard_name = index_of_timestep long_name = current forecast iteration units = index dimensions = () @@ -41,7 +41,7 @@ intent = in optional = F [dtp] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics timestep units = s dimensions = () @@ -53,52 +53,52 @@ standard_name = air_temperature long_name = model layer mean temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [q] - standard_name = water_vapor_specific_humidity + standard_name = specific_humidity long_name = water vapor specific humidity units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [prevst] - standard_name = temperature_from_previous_timestep + standard_name = air_temperature_on_previous_timestep long_name = temperature from previous time step units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [prevsq] - standard_name = moisture_from_previous_timestep + standard_name = specific_humidity_on_previous_timestep long_name = moisture from previous time step units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [forcet] - standard_name = temperature_tendency_due_to_dynamics + standard_name = tendency_of_air_temperature_due_to_nonphysics long_name = temperature tendency due to dynamics only units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [forceq] - standard_name = moisture_tendency_due_to_dynamics + standard_name = tendendy_of_specific_humidity_due_to_nonphysics long_name = moisture tendency due to dynamics only units = kg kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out diff --git a/physics/dcyc2.f b/physics/dcyc2.f index 94915ca9e..8b311dc02 100644 --- a/physics/dcyc2.f +++ b/physics/dcyc2.f @@ -48,7 +48,7 @@ end subroutine dcyc2t3_finalize ! im, levs, deltim, fhswr, ! ! dry, icy, wet ! ! input/output: ! -! dtdt,dtdtc, ! +! dtdt,dtdtnp, ! ! outputs: ! ! adjsfcdsw,adjsfcnsw,adjsfcdlw,adjsfculw, ! ! adjsfculw_lnd,adjsfculw_ice,adjsfculw_wat,xmu,xcosz, ! @@ -100,8 +100,7 @@ end subroutine dcyc2t3_finalize ! input/output: ! ! dtdt(im,levs)- real, model time step adjusted total radiation ! ! heating rates ( k/s ) ! -! dtdtc(im,levs)- real, model time step adjusted clear sky radiation! -! heating rates ( k/s ) ! +! dtdtnp(im,levs)- real, heating rate adjustment for SPPT ! ! ! ! outputs: ! ! adjsfcdsw(im)- real, time step adjusted sfc dn sw flux (w/m**2) ! @@ -172,18 +171,21 @@ end subroutine dcyc2t3_finalize !> @{ subroutine dcyc2t3_run & ! --- inputs: - & ( solhr,slag,sdec,cdec,sinlat,coslat,con_pi, con_sbc, & - & xlon,coszen,tsfc_lnd,tsfc_ice,tsfc_wat,tf,tsflw, & + & ( solhr,slag,sdec,cdec,sinlat,coslat, & + & con_g, con_cp, con_pi, con_sbc, & + & xlon,coszen,tsfc_lnd,tsfc_ice,tsfc_wat,tf,tsflw,tsfc, & & sfcemis_lnd, sfcemis_ice, sfcemis_wat, & & sfcdsw,sfcnsw,sfcdlw,swh,swhc,hlw,hlwc, & & sfcnirbmu,sfcnirdfu,sfcvisbmu,sfcvisdfu, & & sfcnirbmd,sfcnirdfd,sfcvisbmd,sfcvisdfd, & & im, levs, deltim, fhswr, & - & dry, icy, wet, & - & use_LW_jacobian, sfculw, sfculw_jac, & + & dry, icy, wet, damp_LW_fluxadj, lfnc_k, lfnc_p0, & + & minGPpres, use_LW_jacobian, sfculw, fluxlwUP_jac, & + & t_lay, t_lev, p_lay, p_lev, flux2D_lwUP, flux2D_lwDOWN, & + & pert_radtend, do_sppt,ca_global, & ! & dry, icy, wet, lprnt, ipr, & ! --- input/output: - & dtdt,dtdtc, & + & dtdt,dtdtnp,htrlw, & ! --- outputs: & adjsfcdsw,adjsfcnsw,adjsfcdlw,adjsfculw, & & adjsfculw_lnd,adjsfculw_ice,adjsfculw_wat,xmu,xcosz, & @@ -193,6 +195,7 @@ subroutine dcyc2t3_run & & ) ! use machine, only : kind_phys + use radiation_tools, only : cmp_tlev implicit none ! @@ -209,50 +212,67 @@ subroutine dcyc2t3_run & ! integer, intent(in) :: ipr ! logical lprnt - logical, dimension(im), intent(in) :: dry, icy, wet - logical, intent(in) :: use_LW_jacobian + logical, dimension(:), intent(in) :: dry, icy, wet + logical, intent(in) :: use_LW_jacobian, damp_LW_fluxadj, & + & pert_radtend + logical, intent(in) :: do_sppt,ca_global real(kind=kind_phys), intent(in) :: solhr, slag, cdec, sdec, & - & deltim, fhswr + & deltim, fhswr, minGPpres, lfnc_k, lfnc_p0 - real(kind=kind_phys), dimension(im), intent(in) :: & + real(kind=kind_phys), dimension(:), intent(in) :: & & sinlat, coslat, xlon, coszen, tf, tsflw, sfcdlw, & - & sfcdsw, sfcnsw, sfculw, sfculw_jac + & sfcdsw, sfcnsw, sfculw, tsfc - real(kind=kind_phys), dimension(im), intent(in) :: & + real(kind=kind_phys), dimension(:), intent(in) :: & & tsfc_lnd, tsfc_ice, tsfc_wat, & & sfcemis_lnd, sfcemis_ice, sfcemis_wat - real(kind=kind_phys), dimension(im), intent(in) :: & + real(kind=kind_phys), dimension(:), intent(in) :: & & sfcnirbmu, sfcnirdfu, sfcvisbmu, sfcvisdfu, & & sfcnirbmd, sfcnirdfd, sfcvisbmd, sfcvisdfd - real(kind=kind_phys), dimension(im,levs), intent(in) :: swh, hlw & - &, swhc, hlwc + real(kind=kind_phys), dimension(:,:), intent(in) :: swh, hlw, & + & swhc, hlwc, p_lay, t_lay + + real(kind=kind_phys), dimension(:,:), intent(in) :: p_lev, & + & flux2D_lwUP, flux2D_lwDOWN, fluxlwUP_jac, t_lev + + real(kind_phys), intent(in ) :: con_g, con_cp, & + & con_pi, con_sbc - real(kind_phys), intent(in ) :: con_pi, con_sbc real(kind_phys) :: pid12 ! --- input/output: - real(kind=kind_phys), dimension(im,levs), intent(inout) :: dtdt & - &, dtdtc + real(kind=kind_phys), dimension(:,:), intent(inout) :: dtdt, htrlw + real(kind=kind_phys), dimension(:,:), intent(inout) :: dtdtnp ! --- outputs: - real(kind=kind_phys), dimension(im), intent(out) :: & + real(kind=kind_phys), dimension(:), intent(out) :: & & adjsfcdsw, adjsfcnsw, adjsfcdlw, adjsfculw, xmu, xcosz, & & adjnirbmu, adjnirdfu, adjvisbmu, adjvisdfu, & & adjnirbmd, adjnirdfd, adjvisbmd, adjvisdfd - real(kind=kind_phys), dimension(im), intent(out) :: & + real(kind=kind_phys), dimension(:), intent(out) :: & & adjsfculw_lnd, adjsfculw_ice, adjsfculw_wat character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! --- locals: - integer :: i, k, nstp, nstl, it, istsun(im) + integer :: i, k, nstp, nstl, it, istsun(im),iSFC,iTOA real(kind=kind_phys) :: cns, coszn, tem1, tem2, anginc, & & rstl, solang, dT + real(kind=kind_phys), dimension(im,levs+1) :: flxlwup_adj, & + & flxlwdn_adj, t_lev2 + real(kind=kind_phys) :: fluxlwnet_adj,fluxlwnet,dT_sfc, & + &fluxlwDOWN_jac,lfnc,c1 + ! Length scale for flux-adjustment scaling + real(kind=kind_phys), parameter :: & + & L = 1. + ! Scaling factor for downwelling LW Jacobian profile. + real(kind=kind_phys), parameter :: & + & gamma = 0.2 ! !===> ... begin here ! @@ -260,6 +280,15 @@ subroutine dcyc2t3_run & errmsg = '' errflg = 0 +! Vertical ordering? + if (p_lev(1,1) .lt. p_lev(1, levs)) then + iSFC = levs + 1 + iTOA = 1 + else + iSFC = 1 + iTOA = levs + 1 + endif + tem1 = fhswr / deltim nstp = max(6, nint(tem1)) nstl = max(1, nint(nstp/tem1)) @@ -299,15 +328,15 @@ subroutine dcyc2t3_run & ! do i = 1, im - tem1 = tf(i) / tsflw(i) - tem2 = tem1 * tem1 - adjsfcdlw(i) = sfcdlw(i) * tem2 * tem2 !> - LW time-step adjustment: if (use_LW_Jacobian) then - ! F_adj = F_o + (dF/dT) * dT + ! F_adj = F_o + (dF/dT) * dT dT = tf(i) - tsflw(i) - adjsfculw(i) = sfculw(i) + sfculw_jac(i) * dT + adjsfculw(i) = sfculw(i) + fluxlwUP_jac(i,iSFC) * dT else + tem1 = tf(i) / tsflw(i) + tem2 = tem1 * tem1 + adjsfcdlw(i) = sfcdlw(i) * tem2 * tem2 !! - adjust \a sfc downward LW flux to account for t changes in the lowest model layer. !! compute 4th power of the ratio of \c tf in the lowest model layer over the mean value \c tsflw. if (dry(i)) then @@ -356,14 +385,82 @@ subroutine dcyc2t3_run & enddo !> - adjust SW heating rates with zenith angle change and -!! add with LW heating to temperature tendency. +! add with LW heating to temperature tendency. + if (use_LW_jacobian) then + ! + ! Compute temperatute at level interfaces. + ! + call cmp_tlev(im, levs, minGPpres, p_lay, t_lay, p_lev, tsfc, & + & t_lev2) + + ! Compute adjusted net LW flux foillowing Hogan and Bozzo 2015 (10.1002/2015MS000455) + ! Here we assume that the profile of the downwelling LW Jaconiam has the same shape + ! as the upwelling, but scaled and offset. + ! The scaling factor is 0.2 + ! The profile of the downwelling Jacobian (J) is offset so that + ! J_dn_sfc / J_up_sfc = scaling_factor + ! J_dn_toa / J_up_sfc = 0 + ! + ! Optionally, the flux adjustment can be damped with height using a logistic function + ! fx ~ L / (1 + exp(-k*dp)), where dp = p - p0 + ! L = 1, fix scale between 0-1. - Fixed + ! k = 1 / pressure decay length (Pa) - Controlled by namelist + ! p0 = Transition pressure (Pa) - Controlled by namelsit + do i = 1, im + c1 = fluxlwUP_jac(i,iTOA) / fluxlwUP_jac(i,iSFC) + dT_sfc = t_lev2(i,iSFC) - t_lev(i,iSFC) + do k = 1, levs + ! LW net flux + fluxlwnet = (flux2D_lwUP(i, k+1) - flux2D_lwUP(i, k) - & + & flux2D_lwDOWN(i,k+1) + flux2D_lwDOWN(i,k)) + ! Downward LW Jacobian (Eq. 9) + fluxlwDOWN_jac = gamma * & + & (fluxlwUP_jac(i,k)/fluxlwUP_jac(i,iSFC) - c1) / & + & (1 - c1) + ! Adjusted LW net flux(Eq. 10) + fluxlwnet_adj = fluxlwnet + dT_sfc* & + & (fluxlwUP_jac(i,k)/fluxlwUP_jac(i,iSFC) - & + & fluxlwDOWN_jac) + ! Adjusted LW heating rate + htrlw(i,k) = fluxlwnet_adj * con_g / & + & (con_cp * (p_lev(i,k+1) - p_lev(i,k))) + + ! Add radiative heating rates to physics heating rate. Optionally, scaled w/ height + ! using a logistic function + if (damp_LW_fluxadj) then + lfnc = L / (1+exp(-(p_lev(i,k) - lfnc_p0)/lfnc_k)) + else + lfnc = 1. + endif + dtdt(i,k) = dtdt(i,k) + swh(i,k)*xmu(i) + & + & htrlw(i,k)*lfnc + (1.-lfnc)*hlw(i,k) + enddo + enddo + else + do k = 1, levs + do i = 1, im + dtdt(i,k) = dtdt(i,k) + swh(i,k)*xmu(i) + hlw(i,k) + enddo + enddo + endif - do k = 1, levs - do i = 1, im - dtdt(i,k) = dtdt(i,k) + swh(i,k)*xmu(i) + hlw(i,k) - dtdtc(i,k) = dtdtc(i,k) + swhc(i,k)*xmu(i) + hlwc(i,k) - enddo - enddo + if (do_sppt .or. ca_global) then + if (pert_radtend) then +! clear sky + do k = 1, levs + do i = 1, im + dtdtnp(i,k) = dtdtnp(i,k) + swhc(i,k)*xmu(i) + hlwc(i,k) + enddo + enddo + else +! all sky + do k = 1, levs + do i = 1, im + dtdtnp(i,k) = dtdtnp(i,k) + swh(i,k)*xmu(i) + hlw(i,k) + enddo + enddo + endif + endif ! return !................................... diff --git a/physics/dcyc2.meta b/physics/dcyc2.meta index 9d35dfaaf..a65d5d451 100644 --- a/physics/dcyc2.meta +++ b/physics/dcyc2.meta @@ -1,14 +1,14 @@ [ccpp-table-properties] name = dcyc2t3 type = scheme - dependencies = machine.F,physcons.F90 + dependencies = machine.F,physcons.F90,radiation_tools.F90 ######################################################################## [ccpp-arg-table] name = dcyc2t3_run type = scheme [solhr] - standard_name = forecast_hour_of_the_day + standard_name = forecast_utc_hour long_name = time in hours after 00z at the current timestep units = h dimensions = () @@ -71,7 +71,7 @@ intent = in optional = F [coszen] - standard_name = cosine_of_zenith_angle + standard_name = cosine_of_solar_zenith_angle_for_daytime_points_on_radiation_timestep long_name = average of cosine of zenith angle over daytime shortwave call time interval units = none dimensions = (horizontal_loop_extent) @@ -79,6 +79,24 @@ kind = kind_phys intent = in optional = F +[con_g] + standard_name = gravitational_acceleration + long_name = gravitational acceleration + units = m s-2 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[con_cp] + standard_name = specific_heat_of_dry_air_at_constant_pressure + long_name = specific heat of dry air at constant pressure + units = J kg-1 K-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F [con_pi] standard_name = pi long_name = ratio of a circle's circumference to its diameter @@ -106,18 +124,18 @@ kind = kind_phys intent = in optional = F -[tsfc_wat] - standard_name = surface_skin_temperature_over_ocean_interstitial - long_name = surface skin temperature over ocean (temporary use as interstitial) +[tsfc_ice] + standard_name = surface_skin_temperature_over_ice_interstitial + long_name = surface skin temperature over ice (temporary use as interstitial) units = K dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in optional = F -[tsfc_ice] - standard_name = surface_skin_temperature_over_ice_interstitial - long_name = surface skin temperature over ice (temporary use as interstitial) +[tsfc_wat] + standard_name = surface_skin_temperature_over_water_interstitial + long_name = surface skin temperature over water (temporary use as interstitial) units = K dimensions = (horizontal_loop_extent) type = real @@ -125,7 +143,7 @@ intent = in optional = F [tf] - standard_name = air_temperature_at_lowest_model_layer + standard_name = air_temperature_at_surface_adjacent_layer long_name = air temperature at lowest model layer units = K dimensions = (horizontal_loop_extent) @@ -134,7 +152,7 @@ intent = in optional = F [tsflw] - standard_name = surface_midlayer_air_temperature_in_longwave_radiation + standard_name = air_temperature_at_surface_adjacent_layer_on_radiation_timestep long_name = surface (first layer) air temperature saved in longwave radiation call units = K dimensions = (horizontal_loop_extent) @@ -142,6 +160,15 @@ kind = kind_phys intent = in optional = F +[tsfc] + standard_name = surface_skin_temperature + long_name = surface skin temperature + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F [sfcemis_lnd] standard_name = surface_longwave_emissivity_over_land_interstitial long_name = surface lw emissivity in fraction over land (temporary use as interstitial) @@ -161,8 +188,8 @@ intent = in optional = F [sfcemis_wat] - standard_name = surface_longwave_emissivity_over_ocean_interstitial - long_name = surface lw emissivity in fraction over ocean (temporary use as interstitial) + standard_name = surface_longwave_emissivity_over_water_interstitial + long_name = surface lw emissivity in fraction over water (temporary use as interstitial) units = frac dimensions = (horizontal_loop_extent) type = real @@ -170,7 +197,7 @@ intent = in optional = F [sfcdsw] - standard_name = surface_downwelling_shortwave_flux_on_radiation_time_step + standard_name = surface_downwelling_shortwave_flux_on_radiation_timestep long_name = total sky surface downwelling shortwave flux on radiation time step units = W m-2 dimensions = (horizontal_loop_extent) @@ -179,7 +206,7 @@ intent = in optional = F [sfcnsw] - standard_name = surface_net_downwelling_shortwave_flux_on_radiation_time_step + standard_name = surface_net_downwelling_shortwave_flux_on_radiation_timestep long_name = total sky surface net downwelling shortwave flux on radiation time step units = W m-2 dimensions = (horizontal_loop_extent) @@ -188,7 +215,7 @@ intent = in optional = F [sfcdlw] - standard_name = surface_downwelling_longwave_flux_on_radiation_time_step + standard_name = surface_downwelling_longwave_flux_on_radiation_timestep long_name = total sky surface downwelling longwave flux on radiation time step units = W m-2 dimensions = (horizontal_loop_extent) @@ -196,53 +223,44 @@ kind = kind_phys intent = in optional = F -[sfculw] - standard_name = surface_upwelling_longwave_flux_on_radiation_time_step - long_name = total sky sfc upward lw flux - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F [swh] - standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_timestep long_name = total sky shortwave heating rate on radiation time step units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [swhc] - standard_name = tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_timestep long_name = clear sky shortwave heating rate on radiation time step units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [hlw] - standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step + standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_timestep long_name = total sky longwave heating rate on radiation time step units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [hlwc] - standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step + standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_timestep long_name = clear sky longwave heating rate on radiation time step units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [sfcnirbmu] - standard_name = surface_upwelling_direct_near_infrared_shortwave_flux_on_radiation_time_step + standard_name = surface_upwelling_direct_nir_shortwave_flux_on_radiation_timestep long_name = total sky surface upwelling beam near-infrared shortwave flux on radiation time step units = W m-2 dimensions = (horizontal_loop_extent) @@ -251,7 +269,7 @@ intent = in optional = F [sfcnirdfu] - standard_name = surface_upwelling_diffuse_near_infrared_shortwave_flux_on_radiation_time_step + standard_name = surface_upwelling_diffuse_nir_shortwave_flux_on_radiation_timestep long_name = total sky surface upwelling diffuse near-infrared shortwave flux on radiation time step units = W m-2 dimensions = (horizontal_loop_extent) @@ -260,7 +278,7 @@ intent = in optional = F [sfcvisbmu] - standard_name = surface_upwelling_direct_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step + standard_name = surface_upwelling_direct_uv_and_vis_shortwave_flux_on_radiation_timestep long_name = total sky surface upwelling beam ultraviolet plus visible shortwave flux on radiation time step units = W m-2 dimensions = (horizontal_loop_extent) @@ -269,7 +287,7 @@ intent = in optional = F [sfcvisdfu] - standard_name = surface_upwelling_diffuse_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step + standard_name = surface_upwelling_diffuse_uv_and_vis_shortwave_flux_on_radiation_timestep long_name = total sky surface upwelling diffuse ultraviolet plus visible shortwave flux on radiation time step units = W m-2 dimensions = (horizontal_loop_extent) @@ -278,7 +296,7 @@ intent = in optional = F [sfcnirbmd] - standard_name = surface_downwelling_direct_near_infrared_shortwave_flux_on_radiation_time_step + standard_name = surface_downwelling_direct_nir_shortwave_flux_on_radiation_timestep long_name = total sky surface downwelling beam near-infrared shortwave flux on radiation time step units = W m-2 dimensions = (horizontal_loop_extent) @@ -287,7 +305,7 @@ intent = in optional = F [sfcnirdfd] - standard_name = surface_downwelling_diffuse_near_infrared_shortwave_flux_on_radiation_time_step + standard_name = surface_downwelling_diffuse_nir_shortwave_flux_on_radiation_timestep long_name = total sky surface downwelling diffuse near-infrared shortwave flux on radiation time step units = W m-2 dimensions = (horizontal_loop_extent) @@ -296,7 +314,7 @@ intent = in optional = F [sfcvisbmd] - standard_name = surface_downwelling_direct_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step + standard_name = surface_downwelling_direct_uv_and_vis_shortwave_flux_on_radiation_timestep long_name = total sky surface downwelling beam ultraviolet plus visible shortwave flux on radiation time step units = W m-2 dimensions = (horizontal_loop_extent) @@ -305,7 +323,7 @@ intent = in optional = F [sfcvisdfd] - standard_name = surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step + standard_name = surface_downwelling_diffuse_uv_and_vis_shortwave_flux_on_radiation_timestep long_name = total sky surface downwelling diffuse ultraviolet plus visible shortwave flux on radiation time step units = W m-2 dimensions = (horizontal_loop_extent) @@ -322,7 +340,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical layers units = count dimensions = () @@ -330,7 +348,7 @@ intent = in optional = F [deltim] - standard_name = time_step_for_dynamics + standard_name = timestep_for_dynamics long_name = dynamics timestep units = s dimensions = () @@ -339,7 +357,7 @@ intent = in optional = F [fhswr] - standard_name = frequency_for_shortwave_radiation + standard_name = period_of_shortwave_radiation_calls long_name = frequency for shortwave radiation units = s dimensions = () @@ -371,20 +389,168 @@ type = logical intent = in optional = F +[minGPpres] + standard_name = minimum_pressure_in_RRTMGP + long_name = minimum pressure allowed in RRTMGP + units = Pa + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[use_LW_jacobian] + standard_name = flag_to_calc_RRTMGP_LW_jacobian + long_name = logical flag to control RRTMGP LW calculation + units = flag + dimensions = () + type = logical + intent = in + optional = F +[damp_LW_fluxadj] + standard_name = flag_to_damp_RRTMGP_LW_jacobian_flux_adjustment + long_name = logical flag to control RRTMGP LW calculation + units = flag + dimensions = () + type = logical + intent = in + optional = F +[lfnc_k] + standard_name = transition_pressure_length_scale_for_flux_damping + long_name = depth of transition layer in logistic function for LW flux adjustment damping + units = Pa + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[lfnc_p0] + standard_name = transition_pressure_for_flux_damping + long_name = transition pressure for LW flux adjustment damping + units = Pa + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[sfculw] + standard_name = surface_upwelling_longwave_flux_on_radiation_timestep + long_name = total sky sfc upward lw flux + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[fluxlwUP_jac] + standard_name = RRTMGP_jacobian_of_lw_flux_upward + long_name = RRTMGP Jacobian upward longwave flux profile + units = W m-2 K-1 + dimensions = (horizontal_loop_extent,vertical_interface_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[t_lay] + standard_name = air_temperature_of_new_state + long_name = model layer mean temperature updated by physics + units = K + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[t_lev] + standard_name = air_temperature_at_interface_for_RRTMGP + long_name = air temperature at vertical interface for radiation calculation + units = K + dimensions = (horizontal_loop_extent,vertical_interface_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[p_lay] + standard_name = air_pressure + long_name = mean layer pressure + units = Pa + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[p_lev] + standard_name = air_pressure_at_interface + long_name = air pressure at model layer interfaces + units = Pa + dimensions = (horizontal_loop_extent,vertical_interface_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[flux2D_lwUP] + standard_name = RRTMGP_lw_flux_profile_upward_allsky + long_name = RRTMGP upward longwave all-sky flux profile + units = W m-2 + dimensions = (horizontal_loop_extent,vertical_interface_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[flux2D_lwDOWN] + standard_name = RRTMGP_lw_flux_profile_downward_allsky + long_name = RRTMGP downward longwave all-sky flux profile + units = W m-2 + dimensions = (horizontal_loop_extent,vertical_interface_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[pert_radtend] + standard_name = flag_for_stochastic_radiative_heating_perturbations + long_name = flag for stochastic radiative heating perturbations + units = flag + dimensions = () + type = logical + intent = in + optional = F +[do_sppt] + standard_name = flag_for_stochastic_physics_perturbations + long_name = flag for stochastic physics perturbations + units = flag + dimensions = () + type = logical + intent = in + optional = F +[ca_global] + standard_name = flag_for_global_cellular_automata + long_name = switch for global ca + units = flag + dimensions = () + type = logical + intent = in + optional = F [dtdt] - standard_name = tendency_of_air_temperature_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_air_temperature long_name = total radiative heating rate at current time units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[dtdtnp] + standard_name = tendency_of_air_temperature_to_withold_from_sppt + long_name = temp. change from physics that should not be perturbed by sppt + units = K s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F -[dtdtc] - standard_name = tendency_of_air_temperature_due_to_radiative_heating_assuming_clear_sky - long_name = clear sky radiative (shortwave + longwave) heating rate at current time +[htrlw] + standard_name = updated_tendency_of_air_temperature_due_to_longwave_heating_on_physics_timestep + long_name = total sky longwave heating rate on physics time step units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -416,6 +582,15 @@ kind = kind_phys intent = out optional = F +[adjsfculw] + standard_name = surface_upwelling_longwave_flux + long_name = surface upwelling longwave flux at current time + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = out + optional = F [adjsfculw_lnd] standard_name = surface_upwelling_longwave_flux_over_land_interstitial long_name = surface upwelling longwave flux at current time over land (temporary use as interstitial) @@ -435,17 +610,8 @@ intent = out optional = F [adjsfculw_wat] - standard_name = surface_upwelling_longwave_flux_over_ocean_interstitial - long_name = surface upwelling longwave flux at current time over ocean (temporary use as interstitial) - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = out - optional = F -[adjsfculw] - standard_name = surface_upwelling_longwave_flux - long_name = surface upwelling longwave flux at current time + standard_name = surface_upwelling_longwave_flux_over_water_interstitial + long_name = surface upwelling longwave flux at current time over water (temporary use as interstitial) units = W m-2 dimensions = (horizontal_loop_extent) type = real @@ -542,23 +708,6 @@ kind = kind_phys intent = out optional = F -[use_LW_jacobian] - standard_name = flag_to_calc_RRTMGP_LW_jacobian - long_name = logical flag to control RRTMGP LW calculation - units = flag - dimensions = () - type = logical - intent = in - optional = F -[sfculw_jac] - standard_name = RRTMGP_jacobian_of_lw_flux_upward_at_surface - long_name = RRTMGP Jacobian upward longwave flux at surface - units = W m-2 K-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/docs/ccpp_dox_layout.xml b/physics/docs/ccpp_dox_layout.xml index 527034db2..38112e6d9 100644 --- a/physics/docs/ccpp_dox_layout.xml +++ b/physics/docs/ccpp_dox_layout.xml @@ -2,23 +2,9 @@ - + - - - - - - - - - - - - - - - + diff --git a/physics/docs/ccppv5_doxyfile b/physics/docs/ccppv5_doxyfile new file mode 100644 index 000000000..1c1046c8c --- /dev/null +++ b/physics/docs/ccppv5_doxyfile @@ -0,0 +1,476 @@ +# Doxyfile 1.8.11 +DOXYFILE_ENCODING = UTF-8 +PROJECT_NAME = "CCPP Scientific Documentation" +PROJECT_NUMBER = "" +PROJECT_BRIEF = "v5.0.0" +PROJECT_LOGO = img/dtc_logo.png +OUTPUT_DIRECTORY = doc +CREATE_SUBDIRS = NO +ALLOW_UNICODE_NAMES = NO +OUTPUT_LANGUAGE = English +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = NO +ABBREVIATE_BRIEF = +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = NO +STRIP_FROM_PATH = +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = NO +QT_AUTOBRIEF = NO +MULTILINE_CPP_IS_BRIEF = NO +INHERIT_DOCS = YES +SEPARATE_MEMBER_PAGES = YES +TAB_SIZE = 4 +ALIASES = +TCL_SUBST = +OPTIMIZE_OUTPUT_FOR_C = NO +OPTIMIZE_OUTPUT_JAVA = NO +OPTIMIZE_FOR_FORTRAN = YES +OPTIMIZE_OUTPUT_VHDL = NO +EXTENSION_MAPPING = .f=FortranFree \ + .F=FortranFree \ + .F90=FortranFree \ + .f90=FortranFree +MARKDOWN_SUPPORT = YES +AUTOLINK_SUPPORT = YES +BUILTIN_STL_SUPPORT = NO +CPP_CLI_SUPPORT = NO +SIP_SUPPORT = NO +IDL_PROPERTY_SUPPORT = YES +DISTRIBUTE_GROUP_DOC = YES +GROUP_NESTED_COMPOUNDS = NO +SUBGROUPING = YES +INLINE_GROUPED_CLASSES = NO +INLINE_SIMPLE_STRUCTS = NO +TYPEDEF_HIDES_STRUCT = YES +LOOKUP_CACHE_SIZE = 0 +EXTRACT_ALL = YES +EXTRACT_PRIVATE = YES +EXTRACT_PACKAGE = YES +EXTRACT_STATIC = YES +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = YES +EXTRACT_ANON_NSPACES = YES +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = YES + +CASE_SENSE_NAMES = NO + +HIDE_SCOPE_NAMES = NO + +HIDE_COMPOUND_REFERENCE= NO + +SHOW_INCLUDE_FILES = NO + +SHOW_GROUPED_MEMB_INC = NO + +FORCE_LOCAL_INCLUDES = NO + +INLINE_INFO = YES + +SORT_MEMBER_DOCS = NO + +SORT_BRIEF_DOCS = NO +SORT_MEMBERS_CTORS_1ST = NO +SORT_GROUP_NAMES = NO +SORT_BY_SCOPE_NAME = NO +STRICT_PROTO_MATCHING = NO +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = YES +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_FILES = YES +SHOW_NAMESPACES = YES +FILE_VERSION_FILTER = +LAYOUT_FILE = ccpp_dox_layout.xml +CITE_BIB_FILES = library.bib +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = NO +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = NO +WARN_AS_ERROR = NO +WARN_FORMAT = +WARN_LOGFILE = +INPUT = pdftxt/mainpage.txt \ + pdftxt/all_shemes_list.txt \ + pdftxt/GFSv15p2_suite.txt \ +### pdftxt/GFSv15p2_no_nsst_suite.txt \ +### pdftxt/suite_FV3_GFS_v15p2.xml.txt \ + pdftxt/GFSv16beta_suite.txt \ +### pdftxt/GFSv16beta_no_nsst_suite.txt \ +### pdftxt/suite_FV3_GFS_v16beta.xml.txt \ + pdftxt/GSD_adv_suite.txt \ + pdftxt/CPT_adv_suite.txt \ + pdftxt/RRFS_v1alpha_suite.txt \ + pdftxt/RRFS_SGSCLOUD.txt \ + pdftxt/GFS_RRTMG.txt \ + pdftxt/GFS_SFCLYR.txt \ +### pdftxt/MYNN_SFCLAYER.txt \ + pdftxt/GFS_NSST.txt \ + pdftxt/GFS_OCEAN.txt \ + pdftxt/GFS_NOAH.txt \ + pdftxt/GFS_SFCSICE.txt \ + pdftxt/GFS_HEDMF.txt \ + pdftxt/GFS_SATMEDMFVDIFQ.txt \ + pdftxt/GFS_NOAHMP.txt \ + pdftxt/GFS_UGWPv0.txt \ + pdftxt/GFS_GWDPS.txt \ + pdftxt/GFS_OZPHYS.txt \ + pdftxt/GFS_H2OPHYS.txt \ + pdftxt/GFS_RAYLEIGH.txt \ + pdftxt/GFS_SAMFdeep.txt \ + pdftxt/GFS_SAMFshal.txt \ + pdftxt/GFDL_cloud.txt \ +### pdftxt/GFS_CALPRECIPTYPE.txt \ +### pdftxt/rad_cld.txt \ + pdftxt/CPT_CSAW.txt \ + pdftxt/CPT_MG3.txt \ + pdftxt/MYNN_EDMF.txt \ + pdftxt/CU_GF_deep.txt \ + pdftxt/RUCLSM.txt \ + pdftxt/THOMPSON.txt \ +### pdftxt/GFSphys_namelist.txt \ +### pdftxt/GFS_STOCHY_PHYS.txt \ + pdftxt/suite_input.nml.txt \ +### in-core MP + ../gfdl_fv_sat_adj.F90 \ +### time_vary + ../GFS_time_vary_pre.fv3.F90 \ + ../GFS_rad_time_vary.fv3.F90 \ + ../GFS_phys_time_vary.fv3.F90 \ + ../ozne_def.f \ + ../ozinterp.f90 \ + ../h2o_def.f \ + ../h2ointerp.f90 \ + ../aerclm_def.F \ + ../aerinterp.F90 \ + ../iccn_def.F \ + ../iccninterp.F90 \ + ../sfcsub.F \ + ../gcycle.F90 \ +### Radiation + ../GFS_rrtmg_pre.F90 \ + ../GFS_rrtmg_post.F90 \ + ../GFS_rrtmg_setup.F90 \ + ../rrtmg_sw_pre.F90 \ + ../module_SGSCloud_RadPre.F90 \ + ../module_SGSCloud_RadPost.F90 \ + ../radsw_main.f \ + ../rrtmg_sw_post.F90 \ + ../rrtmg_lw_pre.F90 \ + ../radlw_main.f \ + ../rrtmg_lw_post.F90 \ + ../radiation_aerosols.f \ + ../radiation_astronomy.f \ + ../radiation_clouds.f \ + ../radiation_gases.f \ + ../radiation_surface.f \ + ../radlw_param.f \ + ../radlw_datatb.f \ + ../radsw_param.f \ + ../radsw_datatb.f \ + ../dcyc2.f \ +### Land Surface + ../sfc_diff.f \ +### ../module_MYNNSFC_wrapper.F90 \ +### ../module_sf_mynn.F90 \ + ../sfc_nst.f \ + ../sfc_ocean.F \ + ../module_nst_model.f90 \ + ../module_nst_parameters.f90 \ + ../module_nst_water_prop.f90 \ + ../sfc_drv.f \ + ../sflx.f \ + ../namelist_soilveg.f \ + ../set_soilveg.f \ + ../sfc_noahmp_drv.f \ + ../module_sf_noahmplsm.f90 \ + ../module_sf_noahmp_glacier.f90 \ + ../noahmp_tables.f90 \ + ../GFS_surface_generic.F90 \ +### Sea Ice Surface + ../sfc_sice.f \ +### PBL + ../moninedmf.f \ + ../mfpbl.f \ + ../tridi.f \ +### satmedmf +### ../satmedmfvdif.F \ + ../satmedmfvdifq.F \ + ../mfpbltq.f \ + ../mfscuq.f \ + ../tridi.f \ +### Orographic Gravity Wave + ../GFS_GWD_generic.F90 \ + ../cires_ugwp.F90 \ + ../gwdps.f \ + ../ugwp_driver_v0.F \ + ../cires_ugwp_triggers.F90 \ + ../cires_ugwp_module.F90 \ + ../cires_ugwp_utils.F90 \ + ../cires_ugwp_solvers.F90 \ + ../cires_ugwp_post.F90 \ +### ../cires_ugwp_initialize.F90 \ + ../cires_vert_wmsdis.F90 \ + ../cires_vert_orodis.F90 \ + ../cires_vert_lsatdis.F90 \ +### Rayleigh Dampling + ../rayleigh_damp.f \ +### Prognostic Ozone + ../ozphys_2015.f \ +### ../ozphys.f \ +### stratospheric h2o + ../h2ophys.f \ +### Deep Convection + ../samfdeepcnv.f \ +### Convective Gravity Wave +### ../gwdc.f \ +### Shallow Convection + ../samfshalcnv.f \ + ../cnvc90.f \ +### Microphysics +### ../gscond.f \ +### ../precpd.f \ + ../module_bfmicrophysics.f \ +### GFDL cloud MP + ../gfdl_cloud_microphys.F90 \ + ../module_gfdl_cloud_microphys.F90 \ + ../GFS_MP_generic.F90 \ + ../calpreciptype.f90 \ +### stochy + ../GFS_stochastics.F90 \ +### ../surface_perturbation.F90 \ +### ../../stochastic_physics/stochastic_physics.F90 \ +### CPT + ../m_micro.F90 \ + ../m_micro_interstitial.F90 \ +### ../micro_mg2_0.F90 \ + ../micro_mg3_0.F90 \ + ../micro_mg_utils.F90 \ + ../cldmacro.F \ + ../aer_cloud.F \ + ../cldwat2m_micro.F \ + ../wv_saturation.F \ + ../cs_conv_aw_adj.F90 \ + ../cs_conv.F90 \ + ../cu_gf_driver.F90 \ + ../cu_gf_driver_pre.F90 \ + ../cu_gf_deep.F90 \ + ../cu_gf_sh.F90 \ + ../module_MYNNPBL_wrapper.F90 \ + ../module_bl_mynn.F90 \ +### ../module_MYNNSFC_wrapper.F90 \ +### ../module_sf_mynn.F90 \ + ../sfc_drv_ruc.F90 \ + ../module_sf_ruclsm.F90 \ + ../namelist_soilveg_ruc.F90 \ + ../set_soilveg_ruc.F90 \ + ../module_soil_pre.F90 \ + ../mp_thompson_pre.F90 \ + ../module_mp_thompson_make_number_concentrations.F90 \ + ../mp_thompson.F90 \ + ../module_mp_thompson.F90 \ + ../module_mp_radar.F90 \ + ../mp_thompson_post.F90 \ +### utils + ../funcphys.f90 \ + ../physparam.f \ + ../physcons.F90 \ + ../radcons.f90 \ + ../mersenne_twister.f +INPUT_ENCODING = UTF-8 +FILE_PATTERNS = *.f \ + *.F \ + *.F90 \ + *.f90 \ + *.nml \ + *.txt +RECURSIVE = YES +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXCLUDE_SYMBOLS = +EXAMPLE_PATH = ./ +EXAMPLE_PATTERNS = +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = img +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +FILTER_SOURCE_PATTERNS = +USE_MDFILE_AS_MAINPAGE = +SOURCE_BROWSER = NO +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = YES +REFERENCES_RELATION = YES +REFERENCES_LINK_SOURCE = YES +SOURCE_TOOLTIPS = YES +USE_HTAGS = NO +VERBATIM_HEADERS = YES +#CLANG_ASSISTED_PARSING = NO +#CLANG_OPTIONS = +ALPHABETICAL_INDEX = NO +COLS_IN_ALPHA_INDEX = 5 +IGNORE_PREFIX = +GENERATE_HTML = YES +HTML_OUTPUT = html +HTML_FILE_EXTENSION = .html +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_EXTRA_STYLESHEET = ccpp_dox_extra_style.css +HTML_EXTRA_FILES = +HTML_COLORSTYLE_HUE = 220 +HTML_COLORSTYLE_SAT = 100 +HTML_COLORSTYLE_GAMMA = 80 +HTML_TIMESTAMP = NO +HTML_DYNAMIC_SECTIONS = NO +HTML_INDEX_NUM_ENTRIES = 100 +GENERATE_DOCSET = NO +DOCSET_FEEDNAME = "Doxygen generated docs" +DOCSET_BUNDLE_ID = org.doxygen.Project +DOCSET_PUBLISHER_ID = org.doxygen.Publisher +DOCSET_PUBLISHER_NAME = Publisher +GENERATE_HTMLHELP = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +CHM_INDEX_ENCODING = +BINARY_TOC = NO +TOC_EXPAND = NO +GENERATE_QHP = NO +QCH_FILE = +QHP_NAMESPACE = org.doxygen.Project +QHP_VIRTUAL_FOLDER = doc +QHP_CUST_FILTER_NAME = +QHP_CUST_FILTER_ATTRS = +QHP_SECT_FILTER_ATTRS = +QHG_LOCATION = +GENERATE_ECLIPSEHELP = NO +ECLIPSE_DOC_ID = org.doxygen.Project +DISABLE_INDEX = YES +GENERATE_TREEVIEW = YES +ENUM_VALUES_PER_LINE = 4 +TREEVIEW_WIDTH = 250 +EXT_LINKS_IN_WINDOW = NO +FORMULA_FONTSIZE = 10 +FORMULA_TRANSPARENT = YES +USE_MATHJAX = YES +MATHJAX_FORMAT = HTML-CSS +MATHJAX_RELPATH = https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2 +MATHJAX_EXTENSIONS = +MATHJAX_CODEFILE = +SEARCHENGINE = YES +SERVER_BASED_SEARCH = NO +EXTERNAL_SEARCH = NO +SEARCHENGINE_URL = +SEARCHDATA_FILE = searchdata.xml +EXTERNAL_SEARCH_ID = +EXTRA_SEARCH_MAPPINGS = +GENERATE_LATEX = YES +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = YES +PAPER_TYPE = a4 +EXTRA_PACKAGES = amsmath +LATEX_HEADER = +LATEX_FOOTER = +LATEX_EXTRA_STYLESHEET = +LATEX_EXTRA_FILES = +PDF_HYPERLINKS = YES +USE_PDFLATEX = YES +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = YES +LATEX_SOURCE_CODE = NO + +LATEX_BIB_STYLE = plainnat + +LATEX_TIMESTAMP = NO + +GENERATE_RTF = NO + +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +RTF_SOURCE_CODE = NO +GENERATE_MAN = NO +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_SUBDIR = +MAN_LINKS = NO +GENERATE_XML = NO +XML_OUTPUT = xml +XML_PROGRAMLISTING = YES +GENERATE_DOCBOOK = NO +DOCBOOK_OUTPUT = docbook +DOCBOOK_PROGRAMLISTING = NO +GENERATE_AUTOGEN_DEF = NO +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = +ENABLE_PREPROCESSING = NO +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = CCPP \ + MULTI_GASES \ + 0 +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES +TAGFILES = +GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +EXTERNAL_PAGES = YES +PERL_PATH = /usr/bin/perl +CLASS_DIAGRAMS = YES +MSCGEN_PATH = +DIA_PATH = +HIDE_UNDOC_RELATIONS = NO +HAVE_DOT = YES +DOT_NUM_THREADS = 0 +DOT_FONTNAME = Helvetica +DOT_FONTSIZE = 10 +DOT_FONTPATH = +CLASS_GRAPH = NO +COLLABORATION_GRAPH = NO +GROUP_GRAPHS = YES +UML_LOOK = YES +UML_LIMIT_NUM_FIELDS = 10 +TEMPLATE_RELATIONS = NO +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = NO +CALL_GRAPH = YES +CALLER_GRAPH = NO +GRAPHICAL_HIERARCHY = YES +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = svg +INTERACTIVE_SVG = NO +DOT_PATH = +DOTFILE_DIRS = +MSCFILE_DIRS = +DIAFILE_DIRS = +PLANTUML_JAR_PATH = +PLANTUML_INCLUDE_PATH = +DOT_GRAPH_MAX_NODES = 200 +MAX_DOT_GRAPH_DEPTH = 0 +DOT_TRANSPARENT = NO +DOT_MULTI_TARGETS = YES +GENERATE_LEGEND = YES +DOT_CLEANUP = YES diff --git a/physics/docs/img/MYNN-SFCLAY_call_order.png b/physics/docs/img/MYNN-SFCLAY_call_order.png new file mode 100644 index 000000000..825a4c5e3 Binary files /dev/null and b/physics/docs/img/MYNN-SFCLAY_call_order.png differ diff --git a/physics/docs/img/mesocam.png b/physics/docs/img/mesocam.png new file mode 100644 index 000000000..c0c29bfed Binary files /dev/null and b/physics/docs/img/mesocam.png differ diff --git a/physics/docs/library.bib b/physics/docs/library.bib index fc9aacabd..48ef43910 100644 --- a/physics/docs/library.bib +++ b/physics/docs/library.bib @@ -1,36 +1,127 @@ %% This BibTeX bibliography file was created using BibDesk. %% http://bibdesk.sourceforge.net/ -%% Created for Man Zhang at 2020-03-02 13:10:25 -0700 +%% Created for Man Zhang at 2021-02-03 14:24:42 -0700 %% Saved with string encoding Unicode (UTF-8) -@article{westbrook_et_al_2010, - Author = {C.D.Westbrook and R.J.Hogan and E.J.O'Connor and A.J.Illingworth}, - Date-Added = {2020-02-07 15:45:14 -0700}, - Date-Modified = {2020-02-07 15:52:41 -0700}, - Journal = {Atmos. Meas. Tech.}, - Pages = {671-681}, - Title = {Estimating drizzle drop size and precipitation rate using two-colour lidar measurements}, - Volume = {3}, +@article{buchard_et_al_2017, + Author = {V. Buchard and C. A. Randles and A. M. da Silva and et al.}, + Date-Added = {2021-02-01 21:33:58 +0000}, + Date-Modified = {2021-02-01 21:37:20 +0000}, + Journal = {J. Climate}, + Pages = {6851-6872}, + Title = {The {MERRA}-2 aerosol reanalysis, 1980 onward. {P}art {II}: Evaluation and case studies}, + Volume = {30}, + Year = {2017}} + +@article{randles_et_al_2017, + Author = {C. A. Randles and A. M. da Silva and V. Buchard and et al.}, + Date-Added = {2021-02-01 21:26:16 +0000}, + Date-Modified = {2021-02-01 21:32:25 +0000}, + Journal = {J. Climate}, + Pages = {6823-6850}, + Title = {The {MERRA}-2 aerosol reanalysis, 1980 onward. {P}art {I}: System description and data assimilation evaluation}, + Volume = {30}, + Year = {2017}} + +@article{colarco_et_al_2010, + Author = {P. Colarco and A. da Silva and M. Chin and T. Diehl}, + Date-Added = {2021-02-01 14:20:20 -0700}, + Date-Modified = {2021-02-01 14:23:22 -0700}, + Journal = {Journal of Geophysical Research}, + Number = {D14207}, + Pages = {25}, + Title = {Online simulations of global aerosol distributions in the {NASA} {GOES-4} model and comparisons to satellite and ground-based aerosol optical depth}, + Volume = {115}, Year = {2010}} -@article{aligo_et_al_2018, - Author = {E.A. Aligo and B. Ferrier and J.R. Carley}, - Date-Added = {2020-02-07 15:36:41 -0700}, - Date-Modified = {2020-02-07 15:39:32 -0700}, +@article{zhou_etal_2019, + Author = {L.-J. Zhou and S.-J. Lin and J.-H. Chen and L. M. Harris and X. Chen and S. L. Rees}, + Date-Added = {2021-02-01 21:07:24 +0000}, + Date-Modified = {2021-02-01 21:10:36 +0000}, + Journal = {Bulletin of the American Meteorological Society}, + Pages = {1225-1243}, + Title = {Toward convective-scale prediction within the next generation global prediction system}, + Year = {2019}} + +@article{miguez_et_al_2007, + Author = {G. Miguez-Macho and Y. Fan and C. P. Weaver and R. Walko and A. Robock}, + Date-Added = {2021-01-05 14:42:06 -0700}, + Date-Modified = {2021-01-05 14:50:03 -0700}, + Journal = {Journal of Geophysical Research}, + Number = {D13108}, + Title = {Incorporating water table dynamics in climate modeling: 2. Formulation, validation, and soil moisture simulation}, + Volume = {112}, + Year = {2007}} + +@article{fan_et_al_2007, + Author = {Y. Fan and G. Miguez-Macho and C. P. Weaver and R. Walko and A. Robock}, + Date-Added = {2021-01-05 14:36:44 -0700}, + Date-Modified = {2021-01-05 14:40:37 -0700}, + Journal = {Journal of Geophysical Research}, + Number = {D10125}, + Title = {Incorporating water table dynamics in climate modeling: 1. Water table observations and equilibrium water table simulations}, + Volume = {112}, + Year = {2007}} + +@article{niu_et_al_2005, + Author = {Niu, G.-Y. and Z.-L Yang and R. E. Dickinson and L. E. Gulden}, + Date-Added = {2021-01-05 14:19:03 -0700}, + Date-Modified = {2021-01-05 14:23:29 -0700}, + Journal = {Climate and Dynamics}, + Number = {D21106}, + Title = {A simple {TOPMODEL}-based runoff parameterization ({SIMTOP}) for use in global climate models}, + Volume = {110}, + Year = {2005}} + +@article{monin_and_obukhov_1954, + Author = {A.S.Monin and A.M.Obukhov}, + Date-Added = {2020-11-02 19:17:57 +0000}, + Date-Modified = {2020-11-02 19:19:45 +0000}, + Journal = {Akad. Nauk SSSR}, + Pages = {163-187}, + Title = {Basic laws of turbulent mixing in the atmosphere near the ground}, + Volume = {24}, + Year = {1954}} + +@article{beljaars_et_al_2004, + Author = {A.C.M. Beljaars and A.R.Brown and N. Wood}, + Date-Added = {2020-11-02 19:13:02 +0000}, + Date-Modified = {2020-11-02 19:15:18 +0000}, + Journal = {Quarterly Journal of the Royal Meteorological Society}, + Pages = {1327-1347}, + Title = {A new parameterization of turbulent orographic form drag}, + Volume = {130}, + Year = {2004}} + +@article{steeneveld_et_al_2008, + Author = {G.J. Steeneveld and A. A. M. Holtslag and C.J. Nappo and B.J.H. van de Wiel and L. Mahrt}, + Date-Added = {2020-11-02 19:02:29 +0000}, + Date-Modified = {2020-11-02 19:11:00 +0000}, + Journal = {Journal of Applied Meteorology}, + Pages = {2518-2530}, + Title = {Exploring the possible role of small-scale terrain drag on stable boundary layers over land}, + Volume = {47}, + Year = {2008}} + +@article{fitch_et_al_2012, + Author = {A. C. Fitch and J. B. Olson and J. K. Lundquist and J. Dudhia and A.K. Gupta and J. Michalakes and I. Barstad}, + Date-Added = {2020-11-02 11:19:27 -0700}, + Date-Modified = {2020-11-17 15:48:33 +0000}, Journal = {Monthly Weather Review}, - Pages = {4115-4153}, - Title = {Modified NAM microphysics for forecasts of deep convective storms}, - Volume = {146}, - Year = {2018}} + Number = {9}, + Pages = {3017-3038}, + Title = {Local and mesoscale impacts of wind farms as parameterized in a mesoscale {NWP} model}, + Volume = {140}, + Year = {2012}} @article{niu_and_yang_2006, Abstract = { Abstract The presence of ice in soil dramatically alters soil hydrologic and thermal properties. Despite this important role, many recent studies show that explicitly including the hydrologic effects of soil ice in land surface models degrades the simulation of runoff in cold regions. This paper addresses this dilemma by employing the Community Land Model version 2.0 (CLM2.0) developed at the National Center for Atmospheric Research (NCAR) and a simple TOPMODEL-based runoff scheme (SIMTOP). CLM2.0/SIMTOP explicitly computes soil ice content and its modifications to soil hydrologic and thermal properties. However, the frozen soil scheme has a tendency to produce a completely frozen soil (100\% ice content) whenever the soil temperature is below 0$\,^{\circ}$C. The frozen ground prevents infiltration of snowmelt or rainfall, thereby resulting in earlier- and higher-than-observed springtime runoff. This paper presents modifications to the above-mentioned frozen soil scheme that produce more accurate magnitude and seasonality of runoff and soil water storage. These modifications include 1) allowing liquid water to coexist with ice in the soil over a wide range of temperatures below 0$\,^{\circ}$C by using the freezing-point depression equation, 2) computing the vertical water fluxes by introducing the concept of a fractional permeable area, which partitions the model grid into an impermeable part (no vertical water flow) and a permeable part, and 3) using the total soil moisture (liquid water and ice) to calculate the soil matric potential and hydraulic conductivity. The performance of CLM2.0/SIMTOP with these changes has been tested using observed data in cold-region river basins of various spatial scales. Compared to the CLM2.0/SIMTOP frozen soil scheme, the modified scheme produces monthly runoff that compares more favorably with that estimated by the University of New Hampshire--Global Runoff Data Center and a terrestrial water storage change that is in closer agreement with that measured by the Gravity Recovery and Climate Experiment (GRACE) satellites. }, - Author = {Niu, Guo-Yue and Yang, Zong-Liang}, + Author = {Niu, G.-Y. and Yang, Z.-L.}, Date-Added = {2019-10-25 22:35:50 +0000}, Date-Modified = {2019-10-25 22:36:03 +0000}, Doi = {10.1175/JHM538.1}, @@ -46,7 +137,7 @@ @article{niu_and_yang_2006 @article{niu_et_al_2007, Abstract = {Groundwater interacts with soil moisture through the exchanges of water between the unsaturated soil and its underlying aquifer under gravity and capillary forces. Despite its importance, groundwater is not explicitly represented in climate models. This paper developed a simple groundwater model (SIMGM) by representing recharge and discharge processes of the water storage in an unconfined aquifer, which is added as a single integration element below the soil of a land surface model. We evaluated the model against the Gravity Recovery and Climate Experiment (GRACE) terrestrial water storage change (ΔS) data. The modeled total water storage (including unsaturated soil water and groundwater) change agrees fairly well with GRACE estimates. The anomaly of the modeled groundwater storage explains most of the GRACE ΔS anomaly in most river basins where the water storage is not affected by snow water or frozen soil. For this reason, the anomaly of the modeled water table depth agrees well with that converted from the GRACE ΔS in most of the river basins. We also investigated the impacts of groundwater dynamics on soil moisture and evapotranspiration through the comparison of SIMGM to an additional model run using gravitational free drainage (FD) as the model's lower boundary condition. SIMGM produced much wetter soil profiles globally and up to 16\% more annual evapotranspiration than FD, most obviously in arid-to-wet transition regions.}, - Author = {Niu, Guo-Yue and Yang, Zong-Liang and Dickinson, Robert E. and Gulden, Lindsey E. and Su, Hua}, + Author = {Niu, G.-Y. and Yang, Z.-L. and Dickinson, R. E. and Gulden, L. E. and Su, H.}, Date-Added = {2019-10-25 22:31:30 +0000}, Date-Modified = {2019-10-25 22:31:41 +0000}, Doi = {10.1029/2006JD007522}, @@ -63,7 +154,7 @@ @article{niu_et_al_2007 @article{niu_et_al_2011, Abstract = {This first paper of the two-part series describes the objectives of the community efforts in improving the Noah land surface model (LSM), documents, through mathematical formulations, the augmented conceptual realism in biophysical and hydrological processes, and introduces a framework for multiple options to parameterize selected processes (Noah-MP). The Noah-MP's performance is evaluated at various local sites using high temporal frequency data sets, and results show the advantages of using multiple optional schemes to interpret the differences in modeling simulations. The second paper focuses on ensemble evaluations with long-term regional (basin) and global scale data sets. The enhanced conceptual realism includes (1) the vegetation canopy energy balance, (2) the layered snowpack, (3) frozen soil and infiltration, (4) soil moisture-groundwater interaction and related runoff production, and (5) vegetation phenology. Sample local-scale validations are conducted over the First International Satellite Land Surface Climatology Project (ISLSCP) Field Experiment (FIFE) site, the W3 catchment of Sleepers River, Vermont, and a French snow observation site. Noah-MP shows apparent improvements in reproducing surface fluxes, skin temperature over dry periods, snow water equivalent (SWE), snow depth, and runoff over Noah LSM version 3.0. Noah-MP improves the SWE simulations due to more accurate simulations of the diurnal variations of the snow skin temperature, which is critical for computing available energy for melting. Noah-MP also improves the simulation of runoff peaks and timing by introducing a more permeable frozen soil and more accurate simulation of snowmelt. We also demonstrate that Noah-MP is an effective research tool by which modeling results for a given process can be interpreted through multiple optional parameterization schemes in the same model framework.}, - Author = {Niu, Guo-Yue and Yang, Zong-Liang and Mitchell, Kenneth E. and Chen, Fei and Ek, Michael B. and Barlage, Michael and Kumar, Anil and Manning, Kevin and Niyogi, Dev and Rosero, Enrique and Tewari, Mukul and Xia, Youlong}, + Author = {Niu, G.-Y. and Yang, Z.-L. and Mitchell, K. E. and et al.}, Date-Added = {2019-10-25 21:50:31 +0000}, Date-Modified = {2019-10-25 21:50:40 +0000}, Doi = {10.1029/2010JD015139}, @@ -71,7 +162,7 @@ @article{niu_et_al_2011 Journal = {Journal of Geophysical Research: Atmospheres}, Keywords = {Noah, land surface model, local scale, multiphysics, evaluation, validation}, Number = {D12}, - Title = {The community Noah land surface model with multiparameterization options (Noah-MP): 1. Model description and evaluation with local-scale measurements}, + Title = {The community Noah land surface model with multiparameterization options ({Noah-MP}): 1. Model description and evaluation with local-scale measurements}, Url = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2010JD015139}, Volume = {116}, Year = {2011}, @@ -79,7 +170,7 @@ @article{niu_et_al_2011 Bdsk-Url-2 = {https://doi.org/10.1029/2010JD015139}} @article{bechtold_et_al_2014, - Author = {P. Bechtold and N. Semane and P. Lopez and J-P Chaboureau and A. Beljaars and N. Bormann}, + Author = {P. Bechtold and N. Semane and P. Lopez and J.-P. Chaboureau and A. Beljaars and N. Bormann}, Date-Added = {2019-06-13 14:29:21 -0600}, Date-Modified = {2019-06-13 14:38:38 -0600}, Journal = {J. Atmos. Sci.}, @@ -89,12 +180,12 @@ @article{bechtold_et_al_2014 Year = {2014}} @article{freitas_et_al_2018, - Author = {S.R. Freitas and G.A. Grell and A. Molod and M. A. Thompson and W.M. Putman and C. M. Santos e Silva and E. P. Souza}, + Author = {S. R. Freitas and G. A. Grell and A. Molod and et al.}, Date-Added = {2019-06-13 13:51:50 -0600}, Date-Modified = {2019-06-13 14:07:37 -0600}, Journal = {Journal of Advances in Modeling Earth Systems}, Pages = {1266-1289}, - Title = {Assessing the Grell-Freitas convection parameterization in the NASA GEOS modeling system}, + Title = {Assessing the {G}rell-{F}reitas convection parameterization in the {NASA GEOS} modeling system}, Volume = {10}, Year = {2018}} @@ -124,7 +215,7 @@ @article{moorthi_and_suarez_1992 Date-Modified = {2019-06-06 17:56:00 +0000}, Journal = {Monthly Weather Review}, Pages = {978-1002}, - Title = {Relaxed Arakawa-Schubert. A parameterization of moist convection for general circulation models}, + Title = {Relaxed {A}rakawa-{S}chubert. A parameterization of moist convection for general circulation models}, Volume = {120}, Year = {1992}} @@ -147,7 +238,7 @@ @article{nakanishi_2000 Year = {2000}} @article{Gehne_2019, - Author = {Gehne, Maria and Hamill, Thomas M. and Bates, Gary T. and Pegion, Philip and Kolczynski, Walter}, + Author = {Gehne, M. and Hamill, T. M. and Bates, G. T. and Pegion, P. and Kolczynski, W.}, Date-Added = {2019-05-24 12:46:43 -0600}, Date-Modified = {2019-05-24 12:46:43 -0600}, Doi = {10.1175/mwr-d-18-0057.1}, @@ -182,7 +273,7 @@ @article{Gettelman_2010 Bdsk-Url-2 = {http://dx.doi.org/10.1029/2009jd013797}} @article{HOBBS_1974, - Author = {HOBBS, PETER V.}, + Author = {Hobbs, P. V.}, Date-Added = {2019-05-23 11:07:04 -0600}, Date-Modified = {2019-05-23 11:07:04 -0600}, Doi = {10.1038/251694b0}, @@ -199,7 +290,7 @@ @article{HOBBS_1974 Bdsk-Url-1 = {http://dx.doi.org/10.1038/251694b0}} @article{Pichugina_2008, - Author = {Pichugina, Yelena L. and Tucker, Sara C. and Banta, Robert M. and Brewer, W. Alan and Kelley, Neil D. and Jonkman, Bonnie J. and Newsom, Rob K.}, + Author = {Pichugina, Y. L. and Tucker, S. C. and Banta, R. M. and et al.}, Date-Added = {2019-05-22 11:25:17 -0600}, Date-Modified = {2019-06-05 15:59:49 +0000}, Journal = {Journal of Atmospheric and Oceanic Technology}, @@ -212,7 +303,7 @@ @article{Pichugina_2008 Bdsk-Url-2 = {http://dx.doi.org/10.1175/2008jtecha988.1}} @article{Nielsen_Gammon_2008, - Author = {Nielsen-Gammon, John W. and Powell, Christina L. and Mahoney, M. J. and Angevine, Wayne M. and Senff, Christoph and White, Allen and Berkowitz, Carl and Doran, Christopher and Knupp, Kevin}, + Author = {Nielsen-Gammon, J. W. and Powell, C. L. and Mahoney, M. J. and et al.}, Date-Added = {2019-05-22 11:19:45 -0600}, Date-Modified = {2019-06-05 15:31:19 +0000}, Journal = {Journal of Applied Meteorology and Climatology}, @@ -225,7 +316,7 @@ @article{Nielsen_Gammon_2008 Bdsk-Url-2 = {http://dx.doi.org/10.1175/2007jamc1503.1}} @article{Benjamin_2016b, - Author = {Benjamin, Stanley G. and Brown, John M. and Smirnova, Tatiana G.}, + Author = {Benjamin, S. G. and Brown, J. M. and Smirnova, T. G.}, Date-Added = {2019-05-20 16:32:47 -0600}, Date-Modified = {2019-05-20 16:33:32 -0600}, Doi = {10.1175/waf-d-15-0136.1}, @@ -243,7 +334,7 @@ @article{Benjamin_2016b Bdsk-Url-2 = {http://dx.doi.org/10.1175/waf-d-15-0136.1}} @article{Grell_2002, - Author = {Grell, Georg A. and D{\'e}v{\'e}nyi, Dezs{\H o}}, + Author = {Grell, G. A. and D{\'e}v{\'e}nyi, D.}, Date-Added = {2019-05-20 11:19:25 -0600}, Date-Modified = {2019-05-20 11:19:25 -0600}, Doi = {10.1029/2002gl015311}, @@ -278,7 +369,7 @@ @article{Arakawa_2011 Bdsk-Url-1 = {http://dx.doi.org/10.5194/acp-11-3731-2011}} @article{Jiang_2010, - Author = {Jiang, Hongli and Feingold, Graham and Sorooshian, Armin}, + Author = {Jiang, H-L. and Feingold, G. and Sorooshian, A.}, Date-Added = {2019-05-20 11:01:38 -0600}, Date-Modified = {2019-05-20 11:01:38 -0600}, Doi = {10.1175/2010jas3484.1}, @@ -297,7 +388,7 @@ @article{Jiang_2010 @conference{berry_1968, Address = {Albany, N.Y}, - Author = {E.X. Berry}, + Author = {E. X. Berry}, Booktitle = {1st National Conference on Weather Modification}, Date-Added = {2019-05-20 10:50:44 -0600}, Date-Modified = {2019-05-20 10:54:39 -0600}, @@ -306,7 +397,7 @@ @conference{berry_1968 Year = {1968}} @article{Wilks_2005, - Author = {Wilks, Daniel S.}, + Author = {Wilks, D. S.}, Date-Added = {2019-05-08 14:10:09 -0600}, Date-Modified = {2019-05-08 14:10:09 -0600}, Doi = {10.1256/qj.04.03}, @@ -323,16 +414,16 @@ @article{Wilks_2005 Bdsk-Url-1 = {http://dx.doi.org/10.1256/qj.04.03}} @article{Han_2019, - Author = {J. Han and C.S. Bretherton}, + Author = {J. Han and C. S. Bretherton}, Date-Added = {2019-05-06 20:43:06 -0600}, Date-Modified = {2019-05-06 20:44:39 -0600}, Journal = {Weather and Forecasting}, - Title = {TKE-based Moist Eddy-Diffusivity Mass-Flux (EDMF) Parameterization for Vertical Turbulent Mixing}, + Title = {{TKE}-based Moist Eddy-Diffusivity Mass-Flux ({EDMF}) Parameterization for Vertical Turbulent Mixing}, Volume = {accepted}, Year = {2019}} @article{Thompson_2014, - Author = {Thompson, Gregory and Eidhammer, Trude}, + Author = {Thompson, G. and Eidhammer, T.}, Date-Added = {2019-05-06 19:55:25 -0600}, Date-Modified = {2019-05-06 19:55:25 -0600}, Doi = {10.1175/jas-d-13-0305.1}, @@ -350,7 +441,7 @@ @article{Thompson_2014 Bdsk-Url-2 = {http://dx.doi.org/10.1175/jas-d-13-0305.1}} @article{Thompson_2008, - Author = {Thompson, Gregory and Field, Paul R. and Rasmussen, Roy M. and Hall, William D.}, + Author = {Thompson, G. and Field, P. R. and Rasmussen, R. M. and Hall, W. D.}, Date-Added = {2019-05-06 19:49:48 -0600}, Date-Modified = {2019-05-06 19:49:48 -0600}, Doi = {10.1175/2008mwr2387.1}, @@ -360,7 +451,7 @@ @article{Thompson_2008 Number = {12}, Pages = {5095--5115}, Publisher = {American Meteorological Society}, - Title = {Explicit Forecasts of Winter Precipitation Using an Improved Bulk Microphysics Scheme. Part II: Implementation of a New Snow Parameterization}, + Title = {Explicit Forecasts of Winter Precipitation Using an Improved Bulk Microphysics Scheme. {P}art {II}: Implementation of a New Snow Parameterization}, Url = {http://dx.doi.org/10.1175/2008MWR2387.1}, Volume = {136}, Year = {2008}, @@ -368,7 +459,7 @@ @article{Thompson_2008 Bdsk-Url-2 = {http://dx.doi.org/10.1175/2008mwr2387.1}} @article{Krinner_2018, - Author = {Krinner, Gerhard and Derksen, Chris and Essery, Richard and Flanner, Mark and Hagemann, Stefan and Clark, Martyn and Hall, Alex and Rott, Helmut and Brutel-Vuilmet, Claire and Kim, Hyungjun and et al.}, + Author = {Krinner, G. and Derksen, C. and Essery, R. and et al.}, Date-Added = {2019-05-06 14:22:35 -0600}, Date-Modified = {2019-05-06 14:22:35 -0600}, Doi = {10.5194/gmd-11-5027-2018}, @@ -378,14 +469,14 @@ @article{Krinner_2018 Number = {12}, Pages = {5027--5049}, Publisher = {Copernicus GmbH}, - Title = {ESM-SnowMIP: assessing snow models and quantifying snow-related climate feedbacks}, + Title = {{ESM-SnowMIP}: assessing snow models and quantifying snow-related climate feedbacks}, Url = {http://dx.doi.org/10.5194/gmd-11-5027-2018}, Volume = {11}, Year = {2018}, Bdsk-Url-1 = {http://dx.doi.org/10.5194/gmd-11-5027-2018}} @article{Rutter_2009, - Author = {Rutter, Nick and Essery, Richard and Pomeroy, John and Altimir, Nuria and Andreadis, Kostas and Baker, Ian and Barr, Alan and Bartlett, Paul and Boone, Aaron and Deng, Huiping and et al.}, + Author = {Rutter, N. and Essery, R. and Pomeroy, J. and et al.}, Date-Added = {2019-05-06 14:22:28 -0600}, Date-Modified = {2019-05-06 14:22:28 -0600}, Doi = {10.1029/2008jd011063}, @@ -394,7 +485,7 @@ @article{Rutter_2009 Month = {Mar}, Number = {D6}, Publisher = {American Geophysical Union (AGU)}, - Title = {Evaluation of forest snow processes models (SnowMIP2)}, + Title = {Evaluation of forest snow processes models ({SnowMIP2})}, Url = {http://dx.doi.org/10.1029/2008JD011063}, Volume = {114}, Year = {2009}, @@ -402,13 +493,13 @@ @article{Rutter_2009 Bdsk-Url-2 = {http://dx.doi.org/10.1029/2008jd011063}} @article{Essery_2009, - Author = {Essery, Richard and Rutter, Nick and Pomeroy, John and Baxter, Robert and St{\"a}hli, Manfred and Gustafsson, David and Barr, Alan and Bartlett, Paul and Elder, Kelly}, + Author = {Essery, R. and Rutter, N. and Pomeroy, J. and et al.}, Date-Added = {2019-05-06 14:20:27 -0600}, Date-Modified = {2019-06-05 16:01:14 +0000}, Journal = {Bulletin of the American Meteorological Society}, Number = {8}, Pages = {1120-1136}, - Title = {SNOWMIP2: An Evaluation of Forest Snow Process Simulations}, + Title = {{SNOWMIP2}: An Evaluation of Forest Snow Process Simulations}, Volume = {90}, Year = {2009}, Bdsk-Url-1 = {http://dx.doi.org/10.1175/2009BAMS2629.1}, @@ -426,7 +517,7 @@ @proceedings{Etchevers_2002 Year = {2002}} @article{Etchevers_2004, - Author = {Etchevers, Pierre and Martin, Eric and Brown, Ross and Fierz, Charles and Lejeune, Yves and Bazile, Eric and Boone, Aaron and Dai, Yong-Jiu and Essery, Richard and Fernandez, Alberto and et al.}, + Author = {Etchevers, P. and Martin, E. and Brown, R. and et al.}, Date-Added = {2019-05-06 14:16:12 -0600}, Date-Modified = {2019-05-06 14:16:12 -0600}, Doi = {10.3189/172756404781814825}, @@ -434,14 +525,14 @@ @article{Etchevers_2004 Journal = {Annals of Glaciology}, Pages = {150--158}, Publisher = {Cambridge University Press (CUP)}, - Title = {Validation of the energy budget of an alpine snowpack simulated by several snow models (Snow MIP project)}, + Title = {Validation of the energy budget of an alpine snowpack simulated by several snow models (Snow {MIP} project)}, Url = {http://dx.doi.org/10.3189/172756404781814825}, Volume = {38}, Year = {2004}, Bdsk-Url-1 = {http://dx.doi.org/10.3189/172756404781814825}} @article{Luo_2003, - Author = {Luo, Lifeng and Robock, Alan and Vinnikov, Konstantin Y. and Schlosser, C. Adam and Slater, Andrew G. and Boone, Aaron and Etchevers, Pierre and Habets, Florence and Noilhan, Joel and Braden, Harald and et al.}, + Author = {Luo, L-F. and Robock, A. and Vinnikov, K. Y. and et al.}, Date-Added = {2019-05-06 14:12:54 -0600}, Date-Modified = {2019-05-06 14:12:54 -0600}, Doi = {10.1175/1525-7541(2003)4<334:eofsos>2.0.co;2}, @@ -451,7 +542,7 @@ @article{Luo_2003 Number = {2}, Pages = {334--351}, Publisher = {American Meteorological Society}, - Title = {Effects of Frozen Soil on Soil Temperature, Spring Infiltration, and Runoff: Results from the PILPS 2(d) Experiment at Valdai, Russia}, + Title = {Effects of Frozen Soil on Soil Temperature, Spring Infiltration, and Runoff: Results from the {PILPS} 2(d) Experiment at {V}aldai, {R}ussia}, Url = {http://dx.doi.org/10.1175/1525-7541(2003)4<334:EOFSOS>2.0.CO;2}, Volume = {4}, Year = {2003}, @@ -459,7 +550,7 @@ @article{Luo_2003 Bdsk-Url-2 = {http://dx.doi.org/10.1175/1525-7541(2003)4%3C334:eofsos%3E2.0.co;2}} @article{Slater_2001, - Author = {Slater, A. G. and Schlosser, C. A. and Desborough, C. E. and Pitman, A. J. and Henderson-Sellers, A. and Robock, A. and Vinnikov, K. Ya and Entin, J. and Mitchell, K. and Chen, F. and et al.}, + Author = {Slater, A. G. and Schlosser, C. A. and Desborough, C. E. and et al.}, Date-Added = {2019-05-06 14:11:52 -0600}, Date-Modified = {2019-05-06 14:11:52 -0600}, Doi = {10.1175/1525-7541(2001)002<0007:trosil>2.0.co;2}, @@ -469,7 +560,7 @@ @article{Slater_2001 Number = {1}, Pages = {7--25}, Publisher = {American Meteorological Society}, - Title = {The Representation of Snow in Land Surface Schemes: Results from PILPS 2(d)}, + Title = {The Representation of Snow in Land Surface Schemes: Results from {PILPS} 2(d)}, Url = {http://dx.doi.org/10.1175/1525-7541(2001)002<0007:TROSIL>2.0.CO;2}, Volume = {2}, Year = {2001}, @@ -477,7 +568,7 @@ @article{Slater_2001 Bdsk-Url-2 = {http://dx.doi.org/10.1175/1525-7541(2001)002%3C0007:trosil%3E2.0.co;2}} @article{Schlosser_1997, - Author = {Schlosser, C. Adam and Robock, Alan and Vinnikov, Konstantin Ya and Speranskaya, Nina A. and Xue, Yongkang}, + Author = {Schlosser, C. A. and Robock, A. and Vinnikov, K. Y. and Speranskaya, N. A. and Xue, Y.-K.}, Date-Added = {2019-05-06 14:10:42 -0600}, Date-Modified = {2019-05-06 14:10:42 -0600}, Doi = {10.1175/1520-0493(1997)125<3279:ylshms>2.0.co;2}, @@ -487,7 +578,7 @@ @article{Schlosser_1997 Number = {12}, Pages = {3279--3296}, Publisher = {American Meteorological Society}, - Title = {18-Year Land-Surface Hydrology Model Simulations for a Midlatitude Grassland Catchment in Valdai, Russia}, + Title = {18-Year Land-Surface Hydrology Model Simulations for a Midlatitude Grassland Catchment in {V}aldai, {R}ussia}, Url = {http://dx.doi.org/10.1175/1520-0493(1997)125<3279:YLSHMS>2.0.CO;2}, Volume = {125}, Year = {1997}, @@ -495,7 +586,7 @@ @article{Schlosser_1997 Bdsk-Url-2 = {http://dx.doi.org/10.1175/1520-0493(1997)125%3C3279:ylshms%3E2.0.co;2}} @article{Berbery_1999, - Author = {Berbery, Ernesto Hugo and Mitchell, Kenneth E. and Benjamin, Stanley and Smirnova, Tatiana and Ritchie, Harold and Hogue, Richard and Radeva, Ekaterina}, + Author = {Berbery, E. H. and Mitchell, K. E. and Benjamin, S. and Smirnova, T. and Ritchie, H. and Hogue, R. and Radeva, E.}, Date-Added = {2019-05-06 14:08:00 -0600}, Date-Modified = {2019-05-06 14:08:00 -0600}, Doi = {10.1029/1999jd900128}, @@ -513,7 +604,7 @@ @article{Berbery_1999 Bdsk-Url-2 = {http://dx.doi.org/10.1029/1999jd900128}} @article{Benjamin_2004b, - Author = {Benjamin, Stanley G. and Grell, Georg A. and Brown, John M. and Smirnova, Tatiana G. and Bleck, Rainer}, + Author = {Benjamin, S. G. and Grell, G. A. and Brown, J. M. and Smirnova, T. G. and Bleck, R.}, Date-Added = {2019-05-06 14:05:46 -0600}, Date-Modified = {2019-05-06 14:06:43 -0600}, Doi = {10.1175/1520-0493(2004)132<0473:mwpwtr>2.0.co;2}, @@ -523,7 +614,7 @@ @article{Benjamin_2004b Number = {2}, Pages = {473--494}, Publisher = {American Meteorological Society}, - Title = {Mesoscale Weather Prediction with the RUC Hybrid Isentropic--Terrain-Following Coordinate Model}, + Title = {Mesoscale Weather Prediction with the {RUC} Hybrid Isentropic--Terrain-Following Coordinate Model}, Url = {http://dx.doi.org/10.1175/1520-0493(2004)132<0473:MWPWTR>2.0.CO;2}, Volume = {132}, Year = {2004}, @@ -531,7 +622,7 @@ @article{Benjamin_2004b Bdsk-Url-2 = {http://dx.doi.org/10.1175/1520-0493(2004)132%3C0473:mwpwtr%3E2.0.co;2}} @article{Benjamin_2004a, - Author = {Benjamin, Stanley G. and D{\'e}v{\'e}nyi, Dezs{\"o} and Weygandt, Stephen S. and Brundage, Kevin J. and Brown, John M. and Grell, Georg A. and Kim, Dongsoo and Schwartz, Barry E. and Smirnova, Tatiana G. and Smith, Tracy Lorraine and et al.}, + Author = {Benjamin, S. G. and D{\'e}v{\'e}nyi, D. and Weygandt, S. S. and Brundage, K. J. and Brown, J. M. and Grell, G. A. and Kim, D. and Schwartz, B. E. and Smirnova, T. G. and Smith, T. L. and et al.}, Date-Added = {2019-05-06 14:04:23 -0600}, Date-Modified = {2019-05-06 14:06:36 -0600}, Doi = {10.1175/1520-0493(2004)132<0495:ahactr>2.0.co;2}, @@ -541,7 +632,7 @@ @article{Benjamin_2004a Number = {2}, Pages = {495--518}, Publisher = {American Meteorological Society}, - Title = {An Hourly Assimilation--Forecast Cycle: The RUC}, + Title = {An Hourly Assimilation--Forecast Cycle: The {RUC}}, Url = {http://dx.doi.org/10.1175/1520-0493(2004)132<0495:AHACTR>2.0.CO;2}, Volume = {132}, Year = {2004}, @@ -549,18 +640,18 @@ @article{Benjamin_2004a Bdsk-Url-2 = {http://dx.doi.org/10.1175/1520-0493(2004)132%3C0495:ahactr%3E2.0.co;2}} @article{Smirnova_2000, - Author = {Smirnova, Tatiana G. and Brown, John M. and Benjamin, Stanley G. and Kim, Dongsoo}, + Author = {Smirnova, T. G. and Brown, J. M. and Benjamin, S. G. and Kim, D.}, Date-Modified = {2019-06-05 15:32:20 +0000}, Journal = {Journal of Geophysical Research: Atmospheres}, Number = {D3}, Pages = {4077--4086}, - Title = {Parameterization of cold-season processes in the MAPS land-surface scheme}, + Title = {Parameterization of cold-season processes in the {MAPS} land-surface scheme}, Volume = {105}, Year = {2000}, Bdsk-Url-1 = {http://dx.doi.org/10.1029/1999JD901047}} @article{Smirnova_2016, - Author = {Smirnova, Tatiana G. and Brown, John M. and Benjamin, Stanley G. and Kenyon, Jaymes S.}, + Author = {Smirnova, T. G. and Brown, J. M. and Benjamin, S. G. and Kenyon, J. S.}, Date-Added = {2019-05-06 13:55:32 -0600}, Date-Modified = {2019-05-06 13:55:32 -0600}, Doi = {10.1175/mwr-d-15-0198.1}, @@ -570,7 +661,7 @@ @article{Smirnova_2016 Number = {5}, Pages = {1851--1865}, Publisher = {American Meteorological Society}, - Title = {Modifications to the Rapid Update Cycle Land Surface Model (RUC LSM) Available in the Weather Research and Forecasting (WRF) Model}, + Title = {Modifications to the Rapid Update Cycle Land Surface Model ({RUC LSM}) Available in the {W}eather {R}esearch and {F}orecasting ({WRF}) Model}, Url = {http://dx.doi.org/10.1175/MWR-D-15-0198.1}, Volume = {144}, Year = {2016}, @@ -578,7 +669,7 @@ @article{Smirnova_2016 Bdsk-Url-2 = {http://dx.doi.org/10.1175/mwr-d-15-0198.1}} @article{Morrison_2008, - Author = {Morrison, Hugh and Gettelman, Andrew}, + Author = {Morrison, H. and Gettelman, A.}, Date-Added = {2019-05-03 12:49:59 -0600}, Date-Modified = {2019-05-03 12:49:59 -0600}, Doi = {10.1175/2008jcli2105.1}, @@ -588,7 +679,7 @@ @article{Morrison_2008 Number = {15}, Pages = {3642--3659}, Publisher = {American Meteorological Society}, - Title = {A New Two-Moment Bulk Stratiform Cloud Microphysics Scheme in the Community Atmosphere Model, Version 3 (CAM3). Part I: Description and Numerical Tests}, + Title = {A New Two-Moment Bulk Stratiform Cloud Microphysics Scheme in the {C}ommunity {A}tmosphere {M}odel, {V}ersion 3 ({CAM3}). {P}art {I}: Description and Numerical Tests}, Url = {http://dx.doi.org/10.1175/2008JCLI2105.1}, Volume = {21}, Year = {2008}, @@ -606,7 +697,7 @@ @article{Gettelman_2015_2 Number = {3}, Pages = {1288--1307}, Publisher = {American Meteorological Society}, - Title = {Advanced Two-Moment Bulk Microphysics for Global Models. Part II: Global Model Solutions and Aerosol--Cloud Interactions*}, + Title = {Advanced Two-Moment Bulk Microphysics for Global Models. {P}art {II}: Global Model Solutions and Aerosol--Cloud Interactions}, Url = {http://dx.doi.org/10.1175/JCLI-D-14-00103.1}, Volume = {28}, Year = {2015}, @@ -624,7 +715,7 @@ @article{Gettelman_2015_1 Number = {3}, Pages = {1268--1287}, Publisher = {American Meteorological Society}, - Title = {Advanced Two-Moment Bulk Microphysics for Global Models. Part I: Off-Line Tests and Comparison with Other Schemes}, + Title = {Advanced Two-Moment Bulk Microphysics for Global Models. {P}art {I}: Off-Line Tests and Comparison with Other Schemes}, Url = {http://dx.doi.org/10.1175/JCLI-D-14-00102.1}, Volume = {28}, Year = {2015}, @@ -632,18 +723,18 @@ @article{Gettelman_2015_1 Bdsk-Url-2 = {http://dx.doi.org/10.1175/jcli-d-14-00102.1}} @techreport{olson_et_al_2019, - Author = {J.B. Olson and J.S.Kenyon and W.A. Angevine and J.M. Brown and M. Pagowski and K. Suselj}, + Author = {J. B. Olson and J. S. Kenyon and W. A. Angevine and J. M. Brown and M. Pagowski and K. Suselj}, Date-Added = {2019-05-01 15:29:00 -0600}, Date-Modified = {2019-05-01 15:32:09 -0600}, Institution = {NOAA OAR GSD-61}, Month = {March}, - Title = {A description of the MYNN-EDMF scheme and the coupling to other components in WRF-ARW}, + Title = {A description of the {MYNN-EDMF} scheme and the coupling to other components in {WRF-ARW}}, Type = {Technical Memorandum}, Year = {2019}} @conference{olson_and_brown_2009, Address = {Omaha, Nebraska}, - Author = {J.B. Olson and J.M.Brown}, + Author = {J. B. Olson and J. M. Brown}, Booktitle = {23rd Conf. on Weather Analysis and Forecasting/19th Conf. on Numerical Weather Prediction}, Date-Added = {2019-05-01 15:13:42 -0600}, Date-Modified = {2019-05-01 15:18:06 -0600}, @@ -653,7 +744,7 @@ @conference{olson_and_brown_2009 Year = {2009}} @article{Nakanishi_2006, - Author = {Nakanishi, Mikio and Niino, Hiroshi}, + Author = {Nakanishi, M. and Niino, H.}, Date-Added = {2019-05-01 15:10:22 -0600}, Date-Modified = {2019-05-01 15:10:22 -0600}, Doi = {10.1007/s10546-005-9030-8}, @@ -663,14 +754,14 @@ @article{Nakanishi_2006 Number = {2}, Pages = {397--407}, Publisher = {Springer Nature}, - Title = {An Improved Mellor--Yamada Level-3 Model: Its Numerical Stability and Application to a Regional Prediction of Advection Fog}, + Title = {An Improved {M}ellor--{Y}amada Level-3 Model: Its Numerical Stability and Application to a Regional Prediction of Advection Fog}, Url = {http://dx.doi.org/10.1007/s10546-005-9030-8}, Volume = {119}, Year = {2006}, Bdsk-Url-1 = {http://dx.doi.org/10.1007/s10546-005-9030-8}} @article{Nakanishi_2004, - Author = {Nakanishi, Mikio and Niino, Hiroshi}, + Author = {Nakanishi, M. and Niino, H.}, Date-Added = {2019-05-01 15:06:36 -0600}, Date-Modified = {2019-05-01 15:06:36 -0600}, Doi = {10.1023/b:boun.0000020164.04146.98}, @@ -680,7 +771,7 @@ @article{Nakanishi_2004 Number = {1}, Pages = {1--31}, Publisher = {Springer Nature}, - Title = {An Improved Mellor--Yamada Level-3 Model with Condensation Physics: Its Design and Verification}, + Title = {An Improved {M}ellor--{Y}amada Level-3 Model with Condensation Physics: Its Design and Verification}, Url = {http://dx.doi.org/10.1023/B:BOUN.0000020164.04146.98}, Volume = {112}, Year = {2004}, @@ -688,7 +779,7 @@ @article{Nakanishi_2004 Bdsk-Url-2 = {http://dx.doi.org/10.1023/b:boun.0000020164.04146.98}} @article{Mellor_1982, - Author = {Mellor, George L. and Yamada, Tetsuji}, + Author = {Mellor, G. L. and Yamada, T.}, Date-Added = {2019-05-01 15:00:12 -0600}, Date-Modified = {2019-05-01 15:00:12 -0600}, Doi = {10.1029/rg020i004p00851}, @@ -705,7 +796,7 @@ @article{Mellor_1982 Bdsk-Url-2 = {http://dx.doi.org/10.1029/rg020i004p00851}} @article{Mellor_1974, - Author = {Mellor, George L. and Yamada, Tetsuji}, + Author = {Mellor, G. L. and Yamada, T.}, Date-Added = {2019-05-01 14:57:26 -0600}, Date-Modified = {2019-05-01 14:57:26 -0600}, Doi = {10.1175/1520-0469(1974)031<1791:ahotcm>2.0.co;2}, @@ -723,7 +814,7 @@ @article{Mellor_1974 Bdsk-Url-2 = {http://dx.doi.org/10.1175/1520-0469(1974)031%3C1791:ahotcm%3E2.0.co;2}} @article{Nakanish_2001, - Author = {Nakanish, Mikio}, + Author = {Nakanish, M.}, Date-Added = {2019-04-25 11:08:11 -0600}, Date-Modified = {2019-04-25 11:08:11 -0600}, Doi = {10.1023/a:1018915827400}, @@ -733,7 +824,7 @@ @article{Nakanish_2001 Number = {3}, Pages = {349--378}, Publisher = {Springer Nature}, - Title = {Improvement Of The Mellor--Yamada Turbulence Closure Model Based On Large-Eddy Simulation Data}, + Title = {Improvement Of The {M}ellor--{Y}amada Turbulence Closure Model Based On Large-Eddy Simulation Data}, Url = {http://dx.doi.org/10.1023/A:1018915827400}, Volume = {99}, Year = {2001}, @@ -751,7 +842,7 @@ @article{kennedy_and_shapiro_1980 Year = {1980}} @article{Siebesma_2007, - Author = {Siebesma, A. Pier and Soares, Pedro M. M. and Teixeira, Jo{\~a}o}, + Author = {Siebesma, A. P. and Soares, P. M. M. and Teixeira, J.}, Date-Added = {2019-04-24 12:11:29 -0600}, Date-Modified = {2019-04-24 12:11:29 -0600}, Doi = {10.1175/jas3888.1}, @@ -769,7 +860,7 @@ @article{Siebesma_2007 Bdsk-Url-2 = {http://dx.doi.org/10.1175/jas3888.1}} @article{Han_2016, - Author = {Han, Jongil and Witek, Marcin L. and Teixeira, Joao and Sun, Ruiyu and Pan, Hua-Lu and Fletcher, Jennifer K. and Bretherton, Christopher S.}, + Author = {Han, J. and Witek, M. L. and Teixeira, J. and Sun, R. and Pan, H.-L. and Fletcher, J. K. and Bretherton, C. S.}, Date-Added = {2019-04-24 12:08:21 -0600}, Date-Modified = {2019-04-24 12:08:21 -0600}, Doi = {10.1175/waf-d-15-0053.1}, @@ -779,7 +870,7 @@ @article{Han_2016 Number = {1}, Pages = {341--352}, Publisher = {American Meteorological Society}, - Title = {Implementation in the NCEP GFS of a Hybrid Eddy-Diffusivity Mass-Flux (EDMF) Boundary Layer Parameterization with Dissipative Heating and Modified Stable Boundary Layer Mixing}, + Title = {Implementation in the {NCEP} {GFS} of a Hybrid Eddy-Diffusivity Mass-Flux ({EDMF}) Boundary Layer Parameterization with Dissipative Heating and Modified Stable Boundary Layer Mixing}, Url = {http://dx.doi.org/10.1175/WAF-D-15-0053.1}, Volume = {31}, Year = {2016}, @@ -805,7 +896,7 @@ @article{Vickers_2004 Bdsk-Url-2 = {http://dx.doi.org/10.1175/jam2160.1}} @article{Bechtold_1998, - Author = {Bechtold, Peter and Siebesma, Pier}, + Author = {Bechtold, P. and Siebesma, P.}, Date-Added = {2019-04-22 11:24:42 -0600}, Date-Modified = {2019-04-22 11:24:42 -0600}, Doi = {10.1175/1520-0469(1998)055<0888:oarobl>2.0.co;2}, @@ -823,7 +914,7 @@ @article{Bechtold_1998 Bdsk-Url-2 = {http://dx.doi.org/10.1175/1520-0469(1998)055%3C0888:oarobl%3E2.0.co;2}} @article{Ito_2015, - Author = {Ito, Junshi and Niino, Hiroshi and Nakanishi, Mikio and Moeng, Chin-Hoh}, + Author = {Ito, J. and Niino, H. and Nakanishi, M. and Moeng, C-H.}, Date-Added = {2019-04-22 10:27:42 -0600}, Date-Modified = {2019-04-22 10:27:42 -0600}, Doi = {10.1007/s10546-015-0045-5}, @@ -840,7 +931,7 @@ @article{Ito_2015 Bdsk-Url-1 = {http://dx.doi.org/10.1007/s10546-015-0045-5}} @article{Tripoli_1981, - Author = {Tripoli, Gregory J. and Cotton, William R.}, + Author = {Tripoli, G. J. and Cotton, W. R.}, Date-Added = {2019-04-22 10:18:40 -0600}, Date-Modified = {2019-04-22 10:18:40 -0600}, Doi = {10.1175/1520-0493(1981)109<1094:tuollw>2.0.co;2}, @@ -858,7 +949,7 @@ @article{Tripoli_1981 Bdsk-Url-2 = {http://dx.doi.org/10.1175/1520-0493(1981)109%3C1094:tuollw%3E2.0.co;2}} @article{NAKANISHI_2009, - Author = {NAKANISHI, Mikio and NIINO, Hiroshi}, + Author = {Nakanishi, M. and Niino, H.}, Date-Added = {2019-04-22 10:00:34 -0600}, Date-Modified = {2019-04-22 10:00:34 -0600}, Doi = {10.2151/jmsj.87.895}, @@ -874,7 +965,7 @@ @article{NAKANISHI_2009 Bdsk-Url-1 = {http://dx.doi.org/10.2151/jmsj.87.895}} @article{Chaboureau_2005, - Author = {Chaboureau, Jean-Pierre}, + Author = {Chaboureau, J.-P.}, Date-Added = {2019-04-21 16:19:12 -0600}, Date-Modified = {2019-04-21 16:19:12 -0600}, Doi = {10.1029/2004jd005645}, @@ -882,7 +973,7 @@ @article{Chaboureau_2005 Journal = {Journal of Geophysical Research}, Number = {D17}, Publisher = {American Geophysical Union (AGU)}, - Title = {Statistical representation of clouds in a regional model and the impact on the diurnal cycle of convection during Tropical Convection, Cirrus and Nitrogen Oxides (TROCCINOX)}, + Title = {Statistical representation of clouds in a regional model and the impact on the diurnal cycle of convection during Tropical Convection, Cirrus and Nitrogen Oxides ({TROCCINOX})}, Url = {http://dx.doi.org/10.1029/2004JD005645}, Volume = {110}, Year = {2005}, @@ -890,7 +981,7 @@ @article{Chaboureau_2005 Bdsk-Url-2 = {http://dx.doi.org/10.1029/2004jd005645}} @article{Chaboureau_2002, - Author = {Chaboureau, Jean-Pierre and Bechtold, Peter}, + Author = {Chaboureau, J.-P. and Bechtold, P.}, Date-Added = {2019-04-21 16:17:45 -0600}, Date-Modified = {2019-04-21 16:17:45 -0600}, Doi = {10.1175/1520-0469(2002)059<2362:ascpdf>2.0.co;2}, @@ -908,7 +999,7 @@ @article{Chaboureau_2002 Bdsk-Url-2 = {http://dx.doi.org/10.1175/1520-0469(2002)059%3C2362:ascpdf%3E2.0.co;2}} @article{Kuwano_Yoshida_2010, - Author = {Kuwano-Yoshida, Akira and Enomoto, Takeshi and Ohfuchi, Wataru}, + Author = {Kuwano-Yoshida, A. and Enomoto, T. and Ohfuchi, W.}, Date-Added = {2019-04-21 16:12:47 -0600}, Date-Modified = {2019-04-21 16:12:47 -0600}, Doi = {10.1002/qj.660}, @@ -918,7 +1009,7 @@ @article{Kuwano_Yoshida_2010 Number = {651}, Pages = {1583--1597}, Publisher = {Wiley}, - Title = {An improved PDF cloud scheme for climate simulations}, + Title = {An improved {PDF} cloud scheme for climate simulations}, Url = {http://dx.doi.org/10.1002/qj.660}, Volume = {136}, Year = {2010}, @@ -943,7 +1034,7 @@ @article{Sommeria_1977 Bdsk-Url-2 = {http://dx.doi.org/10.1175/1520-0469(1977)034%3C0344:sscimo%3E2.0.co;2}} @article{Benjamin_2016, - Author = {Benjamin, Stanley G. and Weygandt, Stephen S. and Brown, John M. and Hu, Ming and Alexander, Curtis R. and Smirnova, Tatiana G. and Olson, Joseph B. and James, Eric P. and Dowell, David C. and Grell, Georg A. and et al.}, + Author = {Benjamin, S. G. and Weygandt, S. S. and Brown, J. M. and Hu, M. and Alexander, C. R. and Smirnova, T. G. and Olson, J. B. and James, E. P. and Dowell, D. C. and Grell, G. A. and et al.}, Date-Added = {2019-04-19 11:32:56 -0600}, Date-Modified = {2019-04-19 11:32:56 -0600}, Doi = {10.1175/mwr-d-15-0242.1}, @@ -961,7 +1052,7 @@ @article{Benjamin_2016 Bdsk-Url-2 = {http://dx.doi.org/10.1175/mwr-d-15-0242.1}} @article{Arakawa_2004, - Author = {Arakawa, Akio}, + Author = {Arakawa, A.}, Date-Added = {2019-02-01 17:35:16 -0700}, Date-Modified = {2019-02-01 17:35:16 -0700}, Doi = {10.1175/1520-0442(2004)017<2493:ratcpp>2.0.co;2}, @@ -979,7 +1070,7 @@ @article{Arakawa_2004 Bdsk-Url-2 = {http://dx.doi.org/10.1175/1520-0442(2004)017%3C2493:ratcpp%3E2.0.co;2}} @article{Thompson_2004, - Author = {Thompson, Gregory and Rasmussen, Roy M. and Manning, Kevin}, + Author = {Thompson, G. and Rasmussen, R. M. and Manning, K.}, Date-Added = {2019-01-22 16:11:17 -0700}, Date-Modified = {2019-01-22 16:11:17 -0700}, Doi = {10.1175/1520-0493(2004)132<0519:efowpu>2.0.co;2}, @@ -989,7 +1080,7 @@ @article{Thompson_2004 Number = {2}, Pages = {519--542}, Publisher = {American Meteorological Society}, - Title = {Explicit Forecasts of Winter Precipitation Using an Improved Bulk Microphysics Scheme. Part I: Description and Sensitivity Analysis}, + Title = {Explicit Forecasts of Winter Precipitation Using an Improved Bulk Microphysics Scheme. {P}art {I}: Description and Sensitivity Analysis}, Url = {http://dx.doi.org/10.1175/1520-0493(2004)132<0519:EFOWPU>2.0.CO;2}, Volume = {132}, Year = {2004}, @@ -997,7 +1088,7 @@ @article{Thompson_2004 Bdsk-Url-2 = {http://dx.doi.org/10.1175/1520-0493(2004)132%3C0519:efowpu%3E2.0.co;2}} @article{Abdul_Razzak_2000, - Author = {Abdul-Razzak, Hayder and Ghan, Steven J.}, + Author = {Abdul-Razzak, H. and Ghan, S. J.}, Date-Added = {2019-01-22 11:02:36 -0700}, Date-Modified = {2019-06-05 15:28:16 +0000}, Journal = {Journal of Geophysical Research: Atmospheres}, @@ -1009,7 +1100,7 @@ @article{Abdul_Razzak_2000 Bdsk-Url-1 = {http://dx.doi.org/10.1029/1999JD901161}} @article{Barahona_2014, - Author = {Barahona, D. and Molod, A. and Bacmeister, J. and Nenes, A. and Gettelman, A. and Morrison, H. and Phillips, V. and Eichmann, A.}, + Author = {Barahona, D. and Molod, A. and Bacmeister, J. and et al.}, Date-Added = {2019-01-22 10:47:07 -0700}, Date-Modified = {2019-01-22 10:47:07 -0700}, Doi = {10.5194/gmd-7-1733-2014}, @@ -1019,14 +1110,14 @@ @article{Barahona_2014 Number = {4}, Pages = {1733--1766}, Publisher = {Copernicus GmbH}, - Title = {Development of two-moment cloud microphysics for liquid and ice within the NASA Goddard Earth Observing System Model (GEOS-5)}, + Title = {Development of two-moment cloud microphysics for liquid and ice within the NASA Goddard Earth Observing System Model ({GEOS-5})}, Url = {http://dx.doi.org/10.5194/gmd-7-1733-2014}, Volume = {7}, Year = {2014}, Bdsk-Url-1 = {http://dx.doi.org/10.5194/gmd-7-1733-2014}} @article{Barahona_2008, - Author = {Barahona, Donifan and Nenes, Athanasios}, + Author = {Barahona, D. and Nenes, A.}, Date-Added = {2019-01-22 10:12:34 -0700}, Date-Modified = {2019-01-22 10:12:34 -0700}, Doi = {10.1029/2007jd009355}, @@ -1043,7 +1134,7 @@ @article{Barahona_2008 Bdsk-Url-2 = {http://dx.doi.org/10.1029/2007jd009355}} @article{Fountoukis_2005, - Author = {Fountoukis, Christos}, + Author = {Fountoukis, C.}, Date-Added = {2019-01-22 10:07:41 -0700}, Date-Modified = {2019-01-22 10:07:41 -0700}, Doi = {10.1029/2004jd005591}, @@ -1059,7 +1150,7 @@ @article{Fountoukis_2005 Bdsk-Url-2 = {http://dx.doi.org/10.1029/2004jd005591}} @article{Nenes_2003, - Author = {Nenes, Athanasios}, + Author = {Nenes, A.}, Date-Added = {2019-01-22 10:02:59 -0700}, Date-Modified = {2019-01-22 10:02:59 -0700}, Doi = {10.1029/2002jd002911}, @@ -1092,7 +1183,7 @@ @article{Barahona_2009 Bdsk-Url-1 = {http://dx.doi.org/10.5194/acp-9-369-2009}} @article{Smirnova_1997, - Author = {Smirnova, Tatiana G. and Brown, John M. and Benjamin, Stanley G.}, + Author = {Smirnova, T. G. and Brown, J. M. and Benjamin, S. G.}, Date-Added = {2019-01-14 15:20:01 -0700}, Date-Modified = {2019-01-14 15:20:01 -0700}, Doi = {10.1175/1520-0493(1997)125<1870:podsmc>2.0.co;2}, @@ -1110,7 +1201,7 @@ @article{Smirnova_1997 Bdsk-Url-2 = {http://dx.doi.org/10.1175/1520-0493(1997)125%3C1870:podsmc%3E2.0.co;2}} @article{Gregory_2001, - Author = {Gregory, David}, + Author = {Gregory, D.}, Date-Added = {2018-11-06 11:45:59 -0700}, Date-Modified = {2018-11-06 11:45:59 -0700}, Doi = {10.1002/qj.49712757104}, @@ -1127,7 +1218,7 @@ @article{Gregory_2001 Bdsk-Url-1 = {http://dx.doi.org/10.1002/qj.49712757104}} @article{Pan_1998, - Author = {Pan, Dzong-Ming and Randall, Davi D. A.}, + Author = {Pan, D.-M. and Randall, D. A.}, Date-Added = {2018-11-06 11:43:33 -0700}, Date-Modified = {2018-11-06 11:43:33 -0700}, Doi = {10.1002/qj.49712454714}, @@ -1144,7 +1235,7 @@ @article{Pan_1998 Bdsk-Url-1 = {http://dx.doi.org/10.1002/qj.49712454714}} @article{Arakawa_2013, - Author = {Arakawa, Akio and Wu, Chien-Ming}, + Author = {Arakawa, A. and Wu, C.-M.}, Date-Added = {2018-11-06 11:41:28 -0700}, Date-Modified = {2018-11-06 11:41:28 -0700}, Doi = {10.1175/jas-d-12-0330.1}, @@ -1154,7 +1245,7 @@ @article{Arakawa_2013 Number = {7}, Pages = {1977--1992}, Publisher = {American Meteorological Society}, - Title = {A Unified Representation of Deep Moist Convection in Numerical Modeling of the Atmosphere. Part I}, + Title = {A Unified Representation of Deep Moist Convection in Numerical Modeling of the Atmosphere. {P}art {I}}, Url = {http://dx.doi.org/10.1175/JAS-D-12-0330.1}, Volume = {70}, Year = {2013}, @@ -1162,7 +1253,7 @@ @article{Arakawa_2013 Bdsk-Url-2 = {http://dx.doi.org/10.1175/jas-d-12-0330.1}} @article{Chikira_2010, - Author = {Chikira, Minoru and Sugiyama, Masahiro}, + Author = {Chikira, M. and Sugiyama, M.}, Date-Added = {2018-11-06 11:35:55 -0700}, Date-Modified = {2018-11-06 11:35:55 -0700}, Doi = {10.1175/2010jas3316.1}, @@ -1172,7 +1263,7 @@ @article{Chikira_2010 Number = {7}, Pages = {2171--2193}, Publisher = {American Meteorological Society}, - Title = {A Cumulus Parameterization with State-Dependent Entrainment Rate. Part I: Description and Sensitivity to Temperature and Humidity Profiles}, + Title = {A Cumulus Parameterization with State-Dependent Entrainment Rate. {P}art {I}: Description and Sensitivity to Temperature and Humidity Profiles}, Url = {http://dx.doi.org/10.1175/2010JAS3316.1}, Volume = {67}, Year = {2010}, @@ -1180,7 +1271,7 @@ @article{Chikira_2010 Bdsk-Url-2 = {http://dx.doi.org/10.1175/2010jas3316.1}} @article{Lewis_2005, - Author = {Lewis, John M.}, + Author = {Lewis, J. M.}, Date-Added = {2018-09-21 11:27:20 -0600}, Date-Modified = {2018-09-21 11:27:20 -0600}, Doi = {10.1175/mwr2949.1}, @@ -1198,7 +1289,7 @@ @article{Lewis_2005 Bdsk-Url-2 = {http://dx.doi.org/10.1175/mwr2949.1}} @article{Zhu_2018, - Author = {Zhu, Yuejian and Zhou, Xiaqiong and Li, Wei and Hou, Dingchen and Melhauser, Christopher and Sinsky, Eric and Pe{\~n}a, Malaquias and Fu, Bing and Guan, Hong and Kolczynski, Walter and et al.}, + Author = {Zhu, Y. and Zhou, X. and Li, W. and Hou, D. and Melhauser, C. and Sinsky, E. and Pe{\~n}a, M. and Fu, B. and Guan, H. and Kolczynski, W. and et al.}, Date-Added = {2018-09-07 11:48:50 -0600}, Date-Modified = {2019-06-05 15:33:03 +0000}, Journal = {Journal of Geophysical Research: Atmospheres}, @@ -1211,7 +1302,7 @@ @article{Zhu_2018 Bdsk-Url-2 = {http://dx.doi.org/10.1029/2018jd028506}} @article{Shutts_2005, - Author = {Shutts, Glenn}, + Author = {Shutts, G.}, Date-Added = {2018-09-07 11:46:20 -0600}, Date-Modified = {2018-09-07 11:46:20 -0600}, Doi = {10.1256/qj.04.106}, @@ -1261,12 +1352,12 @@ @article{buizza_et_al_1999 Date-Modified = {2018-09-05 13:43:07 -0600}, Journal = {Quarterly Journal of the Royal Meteorological Society}, Pages = {2887-2908}, - Title = {Stochastic representation of model uncertainties in the ECMWF ensemble prediction system}, + Title = {Stochastic representation of model uncertainties in the {ECMWF} ensemble prediction system}, Volume = {125}, Year = {1999}} @article{donahue_and_caldwell_2018, - Author = {A.S. Donahue and P.M. Caldwell}, + Author = {A. S. Donahue and P. M. Caldwell}, Date-Added = {2018-08-22 11:38:12 -0600}, Date-Modified = {2018-08-22 11:42:12 -0600}, Journal = {Journal of Advances in Modeling Earth Systems}, @@ -1276,7 +1367,7 @@ @article{donahue_and_caldwell_2018 Year = {2018}} @article{tompkins_and_berner_2008, - Author = {A.M. Tompkins and J. Berner}, + Author = {A. M. Tompkins and J. Berner}, Date-Added = {2018-08-21 16:39:36 -0600}, Date-Modified = {2018-08-21 20:28:30 -0600}, Journal = {J. Geophys. Res.}, @@ -1286,7 +1377,7 @@ @article{tompkins_and_berner_2008 Year = {2008}} @techreport{palmer_et_al_2009, - Author = {T.N. Palmer and R. Buizza and F. Doblas-Reyes and T. Jung and M. Leutbecher and G.J. Shutts and M. Steinheimer and A. Weisheimer}, + Author = {T. N. Palmer and R. Buizza and F. Doblas-Reyes and T. Jung and M. Leutbecher and G. J. Shutts and M. Steinheimer and A. Weisheimer}, Date-Added = {2018-08-21 16:35:56 -0600}, Date-Modified = {2018-08-21 16:39:32 -0600}, Institution = {ECMWF}, @@ -1301,7 +1392,7 @@ @article{berner_et_al_2009 Date-Modified = {2018-08-21 16:33:44 -0600}, Journal = {J. Atmos. Sci.}, Pages = {603-626}, - Title = {A spectral stochastic kinetic energy backscatter scheme and its impact on flow-dependent predictability in the ECMWF ensemble prediction system}, + Title = {A spectral stochastic kinetic energy backscatter scheme and its impact on flow-dependent predictability in the {ECMWF} ensemble prediction system}, Volume = {66}, Year = {2009}} @@ -1311,7 +1402,7 @@ @article{schuur_et_al_2012 Date-Modified = {2018-08-21 10:40:09 -0600}, Journal = {Journal of Applied Meteorology and Climatology}, Pages = {763-779}, - Title = {Classification of precipitation types during transitional winter weather using the RUC model and polarimetric radar retrievals}, + Title = {Classification of precipitation types during transitional winter weather using the {RUC} model and polarimetric radar retrievals}, Volume = {51}, Year = {2012}} @@ -1356,7 +1447,7 @@ @conference{baldwin_et_al_1994 Date-Modified = {2018-08-21 10:01:46 -0600}, Organization = {Amer. Meteor. Soc.}, Pages = {30-31}, - Title = {Precipitation type prediction using a decision tree approach with NMC's mesoscale Eta Model}, + Title = {Precipitation type prediction using a decision tree approach with {NMC}'s mesoscale {E}ta Model}, Year = {1994}} @techreport{cullen_and_salmond_2002, @@ -1365,7 +1456,7 @@ @techreport{cullen_and_salmond_2002 Date-Modified = {2018-08-02 20:08:03 +0000}, Institution = {ECMWF}, Number = {357}, - Title = {On the use of a predictor-corrector scheme to couple the dynamics with the physical parametrizations in the ECMWF model}, + Title = {On the use of a predictor-corrector scheme to couple the dynamics with the physical parametrizations in the {ECMWF} model}, Type = {Tech. Memo}, Year = {2002}} @@ -1385,7 +1476,7 @@ @proceedings{beljaars_1991 Date-Added = {2018-07-27 22:06:59 +0000}, Date-Modified = {2018-07-27 22:30:21 +0000}, Organization = {ECMWF}, - Publisher = {the ECMWF Seminar on Numerical Methods in Atmospheric Models}, + Publisher = {the {ECMWF} Seminar on Numerical Methods in Atmospheric Models}, Title = {Numerical schemes for parameterizations}, Year = {1991}} @@ -1404,7 +1495,7 @@ @article{fritts_and_nastrom_1980 Date-Modified = {2018-07-26 22:42:09 +0000}, Journal = {J. Atmos. Sci.}, Pages = {111-127}, - Title = {Sources of mesoscale variability of gravity waves. Part II: frontal, convective, and jet stream excitation}, + Title = {Sources of mesoscale variability of gravity waves. {P}art {II}: frontal, convective, and jet stream excitation}, Volume = {49}, Year = {1980}} @@ -1414,14 +1505,14 @@ @proceedings{wmo_greenhouse_gas_bulletin_2017 Month = {October 2017}, Number = {13}, Organization = {World Meteorological Organization}, - Title = {WMO greenhouse gas bulletin}, + Title = {{WMO} greenhouse gas bulletin}, Year = {2017}} @article{soloviev_and_vershinsky_1982, - Author = {A.V. Soloviev and N.V. Vershinsky}, + Author = {A. V. Soloviev and N. V. Vershinsky}, Date-Added = {2018-07-22 01:43:03 +0000}, Date-Modified = {2018-07-22 01:47:32 +0000}, - Journal = {Deep Sea Research Part A. Oceanographic Research Papers}, + Journal = {Deep Sea Research {P}art {A}. Oceanographic Research Papers}, Number = {12}, Pages = {1437-1449}, Title = {The vertical structure of the thin surface layer of the ocean under conditions of low wind speed}, @@ -1440,17 +1531,17 @@ @article{zeng_and_beljaars_2005 Year = {2005}} @article{mccormack_et_al_2008, - Author = {J.P. McCormack and K.W. Hoppel and D.E. Siskind}, + Author = {J. P. McCormack and K. W. Hoppel and D. E. Siskind}, Date-Added = {2018-07-20 17:19:45 +0000}, Date-Modified = {2018-07-20 17:22:12 +0000}, Journal = {Atmos. Chem. Phys.}, Pages = {7519-7532}, - Title = {Parameterization of middle atmospheric water vapor photochemistry for high-altitude NWP and data assimilation}, + Title = {Parameterization of middle atmospheric water vapor photochemistry for high-altitude {NWP} and data assimilation}, Volume = {8}, Year = {2008}} @techreport{long_1986, - Author = {P.J. Long}, + Author = {P. J. Long}, Date-Added = {2018-07-18 22:00:29 +0000}, Date-Modified = {2018-07-18 22:03:03 +0000}, Institution = {U.S. Department of Commerce, National Oceanic and Atmospheric Administration, National Weather Service, National Meteorological Center}, @@ -1460,7 +1551,7 @@ @techreport{long_1986 Year = {1986}} @techreport{long_1984, - Author = {P.J. Long}, + Author = {P. J. Long}, Date-Added = {2018-07-18 21:57:22 +0000}, Date-Modified = {2018-07-18 22:00:25 +0000}, Institution = {U.S. Department of Commerce, National Oceanic and Atmospheric Administration, National Weather Service, National Meteorological Center}, @@ -1478,7 +1569,7 @@ @manual{miyakoda_and_sirutis_1986 Year = {1986}} @article{chen_and_lin_2011, - Author = {J.-H Chen and S.-J Lin}, + Author = {J.-H. Chen and S.-J. Lin}, Date-Added = {2018-07-18 19:04:23 +0000}, Date-Modified = {2018-07-18 19:10:04 +0000}, Journal = {Geophysical Research Letters}, @@ -1489,7 +1580,7 @@ @article{chen_and_lin_2011 Year = {2011}} @article{lord_et_al_1984, - Author = {S.J. Lord and H.E. Willoughby and J.M. Piotrowicz}, + Author = {S. J. Lord and H. E. Willoughby and J. M. Piotrowicz}, Date-Added = {2018-07-18 18:50:27 +0000}, Date-Modified = {2018-07-18 18:54:09 +0000}, Journal = {J. Atmos. Sci.}, @@ -1501,7 +1592,7 @@ @article{lord_et_al_1984 Year = {1984}} @article{krueger_et_al_1995, - Author = {S.K. Krueger and Q. Fu and K. N. Liou and H-N. S. Chin}, + Author = {S. K. Krueger and Q. Fu and K. N. Liou and H.-N. S. Chin}, Date-Added = {2018-07-18 18:46:23 +0000}, Date-Modified = {2018-07-18 18:49:52 +0000}, Journal = {Journal of Applied Meteorology}, @@ -1517,12 +1608,12 @@ @article{zheng_et_al_2017 Date-Modified = {2018-07-18 17:45:38 +0000}, Journal = {Monthly Weather Review}, Pages = {3969-3987}, - Title = {Improving the stable surface layer in the NCEP Global Forecast System}, + Title = {Improving the stable surface layer in the {NCEP} {G}lobal {F}orecast {S}ystem}, Volume = {145}, Year = {2017}} @article{hong_et_al_2004, - Author = {S-Y. Hong and J. Dudhia and S-H. Chen}, + Author = {S-Y. Hong and J. Dudhia and S.-H. Chen}, Date-Added = {2018-07-06 19:29:40 +0000}, Date-Modified = {2018-07-06 19:36:23 +0000}, Journal = {Monthly Weather Review}, @@ -1532,7 +1623,7 @@ @article{hong_et_al_2004 Year = {2004}} @article{heymsfield_and_donner_1990, - Author = {A. J. Heymsfield and L.J. Donner}, + Author = {A. J. Heymsfield and L. J. Donner}, Date-Added = {2018-07-06 18:58:01 +0000}, Date-Modified = {2018-07-06 19:00:50 +0000}, Journal = {J. Atmos. Sci.}, @@ -1548,7 +1639,7 @@ @article{deng_and_mace_2008 Date-Modified = {2018-07-06 19:01:59 +0000}, Journal = {Geophysical Research Letters}, Number = {L17808}, - Title = {Cirrus cloud microphysical properties and air motion statistics using cloud radar Doppler moments: water content, partical size, and sedimentation relationships}, + Title = {Cirrus cloud microphysical properties and air motion statistics using cloud radar {D}oppler moments: water content, partical size, and sedimentation relationships}, Volume = {35}, Year = {2008}} @@ -1558,23 +1649,23 @@ @article{lin_et_al_1994 Date-Modified = {2018-07-06 19:01:30 +0000}, Journal = {Monthly Weather Review}, Pages = {1575-1593}, - Title = {A class of the van Leer-type transport schemes and its application to the moisture transport in a general circulation model}, + Title = {A class of the van {L}eer-type transport schemes and its application to the moisture transport in a general circulation model}, Volume = {122}, Year = {1994}} @article{rutledge_and_hobbs_1984, - Author = {S.A. Rutledge and P.V. Hobbs}, + Author = {S. A. Rutledge and P. V. Hobbs}, Date-Added = {2018-07-05 16:45:48 +0000}, Date-Modified = {2018-07-05 16:49:04 +0000}, Journal = {J. Atmos. Sci.}, Number = {20}, Pages = {2949-2972}, - Title = {The mesoscale and microscale structure and organization of clouds and precipitation in midlatitude cyclones. XII: a diagnostic modeling study of precipitation development in narrow cold-frontal rainbands}, + Title = {The mesoscale and microscale structure and organization of clouds and precipitation in midlatitude cyclones. {XII}: a diagnostic modeling study of precipitation development in narrow cold-frontal rainbands}, Volume = {41}, Year = {1984}} @article{chen_and_lin_2013, - Author = {J-H. Chen and S-J. Lin}, + Author = {J.-H. Chen and S.-J. Lin}, Date-Added = {2018-07-03 18:13:27 +0000}, Date-Modified = {2018-07-03 18:17:40 +0000}, Journal = {J. Climate}, @@ -1591,7 +1682,7 @@ @inproceedings{untch_et_al_1999 Date-Modified = {2018-02-28 15:50:58 +0000}, Pages = {45-52}, Publisher = {Netherlands}, - Title = {Increased stratospheric resolution in the ECMWF forecasting system}, + Title = {Increased stratospheric resolution in the {ECMWF} forecasting system}, Year = {1999}} @article{dethof_and_holm_2004, @@ -1600,7 +1691,7 @@ @article{dethof_and_holm_2004 Date-Modified = {2018-02-26 22:56:19 +0000}, Journal = {Quarterly Journal of the Royal Meteorological Society}, Pages = {2851-2872}, - Title = {Ozone assimilation in the ERA-40 reanalysis project}, + Title = {Ozone assimilation in the {ERA-40} reanalysis project}, Volume = {130}, Year = {2004}} @@ -1629,7 +1720,7 @@ @article{john_and_buehler_2004 Date-Added = {2018-02-26 22:38:57 +0000}, Date-Modified = {2018-02-26 22:41:05 +0000}, Journal = {Geophysical Research Letters}, - Title = {The impact of ozone lines on AMSU-B radiances}, + Title = {The impact of ozone lines on {AMSU-B} radiances}, Volume = {31}, Year = {2004}} @@ -1639,7 +1730,7 @@ @article{derber_and_wu_1998 Date-Modified = {2018-02-26 22:37:30 +0000}, Journal = {Monthly Weather Review}, Pages = {2287-2299}, - Title = {The use of TOVS cloud-cleared radiances in the NCEP SSI analysis system}, + Title = {The use of {TOVS} cloud-cleared radiances in the {NCEP} {SSI} analysis system}, Volume = {126}, Year = {1998}} @@ -1708,12 +1799,12 @@ @book{pond_and_pickard_1983 Year = {1983}} @article{zeng_et_al_1998, - Author = {X. Zeng and M. Zhao and R.E. Dickinson}, + Author = {X. Zeng and M. Zhao and R. E. Dickinson}, Date-Added = {2018-02-13 23:09:56 +0000}, Date-Modified = {2018-02-13 23:12:08 +0000}, Journal = {J. Climate}, Pages = {2628-2644}, - Title = {Intercomparison of bulk aerodynamic algorithm for the comutation of sea surface Fluxes using TOGA COARE and TAO data}, + Title = {Intercomparison of bulk aerodynamic algorithm for the comutation of sea surface Fluxes using {TOGA} {COARE} and {TAO} data}, Volume = {11}, Year = {1998}} @@ -1723,7 +1814,7 @@ @article{dorman_and_sellers_1989 Date-Modified = {2018-02-01 00:02:39 +0000}, Journal = {Journal of Applied Meteorology}, Pages = {833-855}, - Title = {A global climatology of albedo, roughness length and stomatal resistance for atmospheric general circulation models as represented by the simple biosphere model (SiB)}, + Title = {A global climatology of albedo, roughness length and stomatal resistance for atmospheric general circulation models as represented by the simple biosphere model ({S}i{B})}, Volume = {28}, Year = {1989}} @@ -1733,7 +1824,7 @@ @misc{zobler_1999 Date-Modified = {2018-01-31 23:56:02 +0000}, Howpublished = {Available on-line [http://www.daac.ornl.gov]}, Month = {1999}, - Title = {Global soil types, 1-Degree Grid (Zobler). Dataset}} + Title = {Global soil types, 1-Degree Grid ({Z}obler). Dataset}} @techreport{zobler_1986, Address = {New York, New York, USA}, @@ -1746,13 +1837,13 @@ @techreport{zobler_1986 Year = {1986}} @article{hirsch_et_al_2015, - Author = {A. L. Hirsch and A.J. Pitman and J. Kala and R. Lorenz and M. G. Donat}, + Author = {A. L. Hirsch and A. J. Pitman and J. Kala and R. Lorenz and M. G. Donat}, Date-Added = {2018-01-31 23:30:18 +0000}, Date-Modified = {2018-01-31 23:32:47 +0000}, Journal = {Earth Interactions}, Number = {12}, Pages = {1-24}, - Title = {Modulation of land-use change impacts on temperature extremes via land-atmosphere coupling over Australia}, + Title = {Modulation of land-use change impacts on temperature extremes via land-atmosphere coupling over {A}ustralia}, Volume = {19}, Year = {2015}} @@ -1797,7 +1888,7 @@ @article{andersen_and_shepherd_2014 Year = {2014}} @article{guillod_et_al_2015, - Author = {B.P. Guillod and B. Orlowsky and D. G. Miralles and A. J. Teuling and S. I. Seneviratne}, + Author = {B. P. Guillod and B. Orlowsky and D. G. Miralles and A. J. Teuling and S. I. Seneviratne}, Date-Added = {2018-01-31 22:46:31 +0000}, Date-Modified = {2018-01-31 22:55:08 +0000}, Journal = {Nature Communications}, @@ -1812,7 +1903,7 @@ @article{milovac_et_al_2016 Date-Modified = {2018-01-31 22:43:31 +0000}, Journal = {J. Geophys. Res. Atmos.}, Pages = {624-649}, - Title = {Investigation of PBL schemes combining the WRF model simulations with scanning waver vapor differential absorption lidar measurements}, + Title = {Investigation of {PBL} schemes combining the {WRF} model simulations with scanning waver vapor differential absorption lidar measurements}, Volume = {121}, Year = {2016}} @@ -1822,7 +1913,7 @@ @article{paimazumder_and_done_2016 Date-Modified = {2018-01-31 22:33:52 +0000}, Journal = {J. Geophys. Res. Atmos.}, Pages = {12581-12592}, - Title = {Potential predictability sources of the 2012 U.S. drought in observations and a regional model ensemble}, + Title = {Potential predictability sources of the 2012 {U.S.} drought in observations and a regional model ensemble}, Volume = {121}, Year = {2016}} @@ -1847,7 +1938,7 @@ @article{ek_and_holtslag_2004 Year = {2004}} @article{ek_and_mahrt_1994, - Author = {M. Ek and L. Mahrt}, + Author = {M. B. Ek and L. Mahrt}, Date-Added = {2018-01-31 17:41:59 +0000}, Date-Modified = {2018-01-31 17:43:53 +0000}, Journal = {Monthly Weather Review}, @@ -1862,12 +1953,12 @@ @article{zheng_et_al_2012 Date-Modified = {2018-01-29 23:51:19 +0000}, Journal = {J. Geophys. Res.}, Number = {D06117}, - Title = {Improvement of daytime land surface skin temperature over arid regions in the NCEP GFS model and its impact on satellite data assimilation}, + Title = {Improvement of daytime land surface skin temperature over arid regions in the {NCEP} {GFS} model and its impact on satellite data assimilation}, Volume = {117}, Year = {2012}} @article{zeng_and_dickinson_1998, - Author = {X. Zeng and R.E. Dickinson}, + Author = {X. Zeng and R. E. Dickinson}, Date-Added = {2018-01-29 23:46:03 +0000}, Date-Modified = {2018-01-29 23:47:43 +0000}, Journal = {J. Climate}, @@ -1879,12 +1970,12 @@ @article{zeng_and_dickinson_1998 @conference{zheng_et_al_2009, Address = {Omaha, Nebraska}, Author = {W. Zheng and H. Wei and J. Meng and M. Ek and K. Mitchell and J. Derber and X. Zeng and Z. Wang}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBWLi4vLi4vLi4vLi4vLi4vRGVza3RvcC9OT0FIX0xTTS9JbXByb3ZlbWVudF9vZl9MYW5kX1N1cmZhY2VfU2tpbl9UZW1wZXJhdHVyZV9pbl9OQy5wZGZPEQIgAAAAAAIgAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADT4djXSCsAAANl5rUfSW1wcm92ZW1lbnRfb2ZfTGFuZCMzNjVGRjBGLnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA2X/D9aQ780AAAAAAAAAAAAFAAMAAAkgAAAAAAAAAAAAAAAAAAAACE5PQUhfTFNNABAACAAA0+ItNwAAABEACAAA1pFSPQAAAAEAEANl5rUAD8YgAA/GDwAGL94AAgBRTWFjaW50b3NoIEhEOlVzZXJzOgBtYW4uemhhbmc6AERlc2t0b3A6AE5PQUhfTFNNOgBJbXByb3ZlbWVudF9vZl9MYW5kIzM2NUZGMEYucGRmAAAOAG4ANgBJAG0AcAByAG8AdgBlAG0AZQBuAHQAXwBvAGYAXwBMAGEAbgBkAF8AUwB1AHIAZgBhAGMAZQBfAFMAawBpAG4AXwBUAGUAbQBwAGUAcgBhAHQAdQByAGUAXwBpAG4AXwBOAEMALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAFdVc2Vycy9tYW4uemhhbmcvRGVza3RvcC9OT0FIX0xTTS9JbXByb3ZlbWVudF9vZl9MYW5kX1N1cmZhY2VfU2tpbl9UZW1wZXJhdHVyZV9pbl9OQy5wZGYAABMAAS8AABUAAgAQ//8AAAAIAA0AGgAkAH0AAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACoQ==}, Date-Added = {2018-01-26 22:19:06 +0000}, Date-Modified = {2018-01-29 23:51:37 +0000}, - Organization = {The 23rd Conference on Weather Analysis and Forecasting (WAF)/19th Conference on Numerical Weather Prediction(NWP)}, - Title = {Improvement of land surface skin temperature in NCEP Operational NWP models and its impact on satellite Data Assimilation}, - Year = {2009}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBWLi4vLi4vLi4vLi4vLi4vRGVza3RvcC9OT0FIX0xTTS9JbXByb3ZlbWVudF9vZl9MYW5kX1N1cmZhY2VfU2tpbl9UZW1wZXJhdHVyZV9pbl9OQy5wZGZPEQIgAAAAAAIgAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADT4djXSCsAAANl5rUfSW1wcm92ZW1lbnRfb2ZfTGFuZCMzNjVGRjBGLnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA2X/D9aQ780AAAAAAAAAAAAFAAMAAAkgAAAAAAAAAAAAAAAAAAAACE5PQUhfTFNNABAACAAA0+ItNwAAABEACAAA1pFSPQAAAAEAEANl5rUAD8YgAA/GDwAGL94AAgBRTWFjaW50b3NoIEhEOlVzZXJzOgBtYW4uemhhbmc6AERlc2t0b3A6AE5PQUhfTFNNOgBJbXByb3ZlbWVudF9vZl9MYW5kIzM2NUZGMEYucGRmAAAOAG4ANgBJAG0AcAByAG8AdgBlAG0AZQBuAHQAXwBvAGYAXwBMAGEAbgBkAF8AUwB1AHIAZgBhAGMAZQBfAFMAawBpAG4AXwBUAGUAbQBwAGUAcgBhAHQAdQByAGUAXwBpAG4AXwBOAEMALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAFdVc2Vycy9tYW4uemhhbmcvRGVza3RvcC9OT0FIX0xTTS9JbXByb3ZlbWVudF9vZl9MYW5kX1N1cmZhY2VfU2tpbl9UZW1wZXJhdHVyZV9pbl9OQy5wZGYAABMAAS8AABUAAgAQ//8AAAAIAA0AGgAkAH0AAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACoQ==}} + Organization = {The 23rd Conference on Weather Analysis and Forecasting ({WAF})/19th Conference on Numerical Weather Prediction({NWP})}, + Title = {Improvement of land surface skin temperature in {NCEP} Operational {NWP} models and its impact on satellite Data Assimilation}, + Year = {2009}} @article{chen_et_al_1997, Author = {F. Chen and Z. Janjic and K. Mitchell}, @@ -1893,7 +1984,7 @@ @article{chen_et_al_1997 Journal = {Boundary-Layer Meteorology}, Number = {3}, Pages = {391-421}, - Title = {Impact of atmospheric surface-layer parameterizations in the new land-surface scheme of the NCEP mesoscale Eta model}, + Title = {Impact of atmospheric surface-layer parameterizations in the new land-surface scheme of the {NCEP} mesoscale {E}ta model}, Volume = {85}, Year = {1997}} @@ -1922,7 +2013,7 @@ @article{arakawa_and_wu_2013 Date-Modified = {2018-01-24 18:57:10 +0000}, Journal = {J. Atmos. Sci.}, Pages = {1977-1992}, - Title = {A unified representation of deep moist convection in numerical modeling of the atmosphere. Part I}, + Title = {A unified representation of deep moist convection in numerical modeling of the atmosphere. {P}art {I}}, Volume = {70}, Year = {2013}} @@ -1932,12 +2023,12 @@ @article{han_et_al_2017 Date-Modified = {2018-01-24 18:53:21 +0000}, Journal = {Weather and Forecasting}, Pages = {2005-2017}, - Title = {Updates in the NCEP GFS cumulus convective schemes with scale and aerosol awareness}, + Title = {Updates in the {NCEP} {GFS} cumulus convective schemes with scale and aerosol awareness}, Volume = {32}, Year = {2017}} @article{grell_and_freitas_2014, - Author = {G.A. Grell and S.R. Freitas}, + Author = {G. A. Grell and S. R. Freitas}, Date-Added = {2018-01-24 18:44:56 +0000}, Date-Modified = {2018-01-24 18:47:21 +0000}, Journal = {Atmos. Chem. Phys.}, @@ -1953,7 +2044,7 @@ @article{Koren_et_al_1999 Journal = {J. Geophys. Res.}, Number = {D16}, Pages = {19569-19585}, - Title = {A parameterization of snowpack and frozen ground intended for NCEP weather and climate models}, + Title = {A parameterization of snowpack and frozen ground intended for {NCEP} weather and climate models}, Volume = {104}, Year = {1999}} @@ -1964,7 +2055,7 @@ @article{ek_et_al_2003 Journal = {J. Geophys. Res.}, Number = {D22}, Pages = {8851}, - Title = {Implementation of Noah land-surface model advances in the NCEP operational mesoscale Eta model}, + Title = {Implementation of {N}oah land-surface model advances in the {NCEP} operational mesoscale {E}ta model}, Volume = {108}, Year = {2003}} @@ -1985,7 +2076,7 @@ @article{raisanen_and_barker_2004 Date-Modified = {2016-10-11 20:53:35 +0000}, Journal = {Quarterly Journal of the Royal Meteorological Society}, Pages = {2069-2085}, - Title = {Evaluation and optimization of sampling errors for the Monte Carlo Independent Column Approximation}, + Title = {Evaluation and optimization of sampling errors for the {M}onte {C}arlo {I}ndependent {C}olumn {A}pproximation}, Volume = {130}, Year = {2004}} @@ -2016,7 +2107,7 @@ @article{raisanen_2002 Date-Modified = {2016-10-11 20:41:23 +0000}, Journal = {Quarterly Journal of the Royal Meteorological Society}, Pages = {2397-2416}, - Title = {Two-stream approximations revisited: A new improvement and tests with GCM data}, + Title = {Two-stream approximations revisited: A new improvement and tests with {GCM} data}, Volume = {128}, Year = {2002}} @@ -2031,13 +2122,13 @@ @article{king_and_harshvardhan_1986 Year = {1986}} @url{Li_2015, - Author = {Xu Li}, + Author = {X. Li}, Title = {The development of the NSST within the NCEP GFS/CFS}, Url = {http://cpo.noaa.gov/sites/cpo/MAPP/workshops/rtf_technical_ws/presentations/21_Xu_Li.pdf}, Bdsk-Url-1 = {http://cpo.noaa.gov/sites/cpo/MAPP/workshops/rtf_technical_ws/presentations/21_Xu_Li.pdf}} @webpage{li_and_derber_2009, - Author = {Xu Li and John Derber}, + Author = {X. Li and J. Derber}, Date-Modified = {2020-02-24 17:06:35 +0000}, Title = {Near Sea Surface Temperatures (NSST) Analysis in NCEP GFS}, Url = {http://data.jcsda.org/Workshops/6th-workshop-onDA/Session-4/JCSDA_2008_Li.pdf}, @@ -2086,7 +2177,7 @@ @article{liou_1973 Date-Modified = {2016-06-21 17:22:03 +0000}, Journal = {Journal of the Atmospheric Sciences}, Pages = {1303-1326}, - Title = {A numerical experiment on Chandrasekhar's discrete-ordinate method for radiative transfer: Applications to cloudy and hazy atmospheres}, + Title = {A numerical experiment on {C}handrasekhar's discrete-ordinate method for radiative transfer: Applications to cloudy and hazy atmospheres}, Volume = {30}, Year = {1973}} @@ -2106,23 +2197,24 @@ @article{joseph_et_al_1976 Date-Modified = {2016-06-21 16:50:31 +0000}, Journal = {Journal of the Atmospheric Sciences}, Pages = {2452-2459}, - Title = {The Delta-Eddington approximation for radiative flux transfer}, + Title = {The {D}elta-{E}ddington approximation for radiative flux transfer}, Volume = {33}, Year = {1976}} @article{iacono_et_al_2008, Annote = {doi:10.1029/2008JD009944}, - Author = {M.J. Iacono and J.S. Delamere and E.J. Mlawer and M. W. Shephard and S. A. Clough and W.D. Collins}, + Author = {M. J. Iacono and J. S. Delamere and E. J. Mlawer and M. W. Shephard and S. A. Clough and W. D. Collins}, Date-Added = {2016-06-19 23:25:28 +0000}, Date-Modified = {2016-06-19 23:32:46 +0000}, Journal = {J. Geophys. Res.}, - Title = {Radiative forcing by long-lived greenhouse gases: Calculations with the AER radiative transfer models}, + Title = {Radiative forcing by long-lived greenhouse gases: Calculations with the {AER} radiative transfer models}, Volume = {113}, Year = {2008}} @article{grant_2001, Abstract = {A closure for the fluxes of mass, heat, and moisture at cloud base in the cumulus-capped boundary layer is developed. The cloud-base mass flux is obtained from a simplifed turbulence kinetic energy (TKE) budget for the sub-cloud layer, in which cumulus convection is assumed to be associated with a transport of TKE from the sub-cloud layer to the cloud layer.The heat and moisture fluxes are obtained from a jump model based on the virtual-potential-temperature equation. A key part of this parametrization is the parametrization of the virtual-temperature flux at the top of the transition zone between the sub-cloud and cloud layers.It is argued that pressure fluctuations must be responsible for the transport of TKE from the cloud layer to the sub-cloud layer.}, Author = {A. L. M. Grant}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBBLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvR3JhbnQvMjAwMS5wZGZPEQHEAAAAAAHEAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAoiV4IMjAwMS5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARgJuNOHLk4AAAAAAAAAAAACAAUAAAkgAAAAAAAAAAAAAAAAAAAABUdyYW50AAAQAAgAANHneLIAAAARAAgAANOHgq4AAAABABgAKIleAChslgAobIsAKGd7ABteBwACmFwAAgBbTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AEdyYW50OgAyMDAxLnBkZgAADgASAAgAMgAwADAAMQAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASFVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9HcmFudC8yMDAxLnBkZgATAAEvAAAVAAIADf//AAAACAANABoAJABoAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAjA=}, Date-Added = {2016-06-15 22:11:22 +0000}, Date-Modified = {2018-07-06 19:02:34 +0000}, Doi = {10.1002/qj.49712757209}, @@ -2136,13 +2228,13 @@ @article{grant_2001 Url = {http://dx.doi.org/10.1002/qj.49712757209}, Volume = {127}, Year = {2001}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBBLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvR3JhbnQvMjAwMS5wZGZPEQHEAAAAAAHEAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAoiV4IMjAwMS5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARgJuNOHLk4AAAAAAAAAAAACAAUAAAkgAAAAAAAAAAAAAAAAAAAABUdyYW50AAAQAAgAANHneLIAAAARAAgAANOHgq4AAAABABgAKIleAChslgAobIsAKGd7ABteBwACmFwAAgBbTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AEdyYW50OgAyMDAxLnBkZgAADgASAAgAMgAwADAAMQAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASFVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9HcmFudC8yMDAxLnBkZgATAAEvAAAVAAIADf//AAAACAANABoAJABoAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAjA=}, Bdsk-Url-1 = {http://dx.doi.org/10.1002/qj.49712757209}} @article{zhang_and_wu_2003, Abstract = {Abstract This study uses a 2D cloud-resolving model to investigate the vertical transport of horizontal momentum and to understand the role of a convection-generated perturbation pressure field in the momentum transport by convective systems during part of the Tropical Ocean and Global Atmosphere Coupled Ocean?Atmosphere Response Experiment (TOGA COARE) Intensive Observation Period. It shows that convective updrafts transport a significant amount of momentum vertically. This transport is downgradient in the easterly wind regime, but upgradient during a westerly wind burst. The differences in convective momentum transport between easterly and westerly wind regimes are examined. The perturbation pressure gradient accounts for an important part of the apparent momentum source. In general it is opposite in sign to the product of cloud mass flux and the vertical wind shear, with smaller magnitude. Examination of the dynamic forcing to the pressure field demonstrates that the linear forcing representing the interaction between the convective updrafts and the large-scale wind shear is the dominant term, while the nonlinear forcing is of secondary importance. Thus, parameterization schemes taking into account the linear interaction between the convective updrafts and the large-scale wind shear can capture the essential features of the perturbation pressure field. The parameterization scheme for momentum transport by Zhang and Cho is evaluated using the model simulation data. The parameterized pressure gradient force using the scheme is in excellent agreement with the simulated one. The parameterized apparent momentum source is also in good agreement with the model simulation. Other parameterization methods for the pressure gradient are also discussed.}, Annote = {doi: 10.1175/1520-0469(2003)060<1120:CMTAPP>2.0.CO;2}, - Author = {Zhang, Guang J. and Wu, Xiaoqing}, + Author = {Zhang, G. J. and Wu, X. Q.}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBBLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvWmhhbmcvMjAwMy5wZGZPEQHEAAAAAAHEAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAqjuYIMjAwMy5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFrUP9K0L8MAAAAAAAAAAAACAAUAAAkgAAAAAAAAAAAAAAAAAAAABVpoYW5nAAAQAAgAANHneLIAAAARAAgAANK0kjMAAAABABgAKo7mAChslgAobIsAKGd7ABteBwACmFwAAgBbTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AFpoYW5nOgAyMDAzLnBkZgAADgASAAgAMgAwADAAMwAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASFVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9aaGFuZy8yMDAzLnBkZgATAAEvAAAVAAIADf//AAAACAANABoAJABoAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAjA=}, Booktitle = {Journal of the Atmospheric Sciences}, Da = {2003/05/01}, Date-Added = {2016-06-14 23:39:50 +0000}, @@ -2161,13 +2253,13 @@ @article{zhang_and_wu_2003 Url = {http://dx.doi.org/10.1175/1520-0469(2003)060<1120:CMTAPP>2.0.CO;2}, Volume = {60}, Year = {2003}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBBLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvWmhhbmcvMjAwMy5wZGZPEQHEAAAAAAHEAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAqjuYIMjAwMy5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFrUP9K0L8MAAAAAAAAAAAACAAUAAAkgAAAAAAAAAAAAAAAAAAAABVpoYW5nAAAQAAgAANHneLIAAAARAAgAANK0kjMAAAABABgAKo7mAChslgAobIsAKGd7ABteBwACmFwAAgBbTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AFpoYW5nOgAyMDAzLnBkZgAADgASAAgAMgAwADAAMwAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASFVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9aaGFuZy8yMDAzLnBkZgATAAEvAAAVAAIADf//AAAACAANABoAJABoAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAjA=}, Bdsk-Url-1 = {http://dx.doi.org/10.1175/1520-0469(2003)060%3C1120:CMTAPP%3E2.0.CO;2}} @article{fritsch_and_chappell_1980, Abstract = {Abstract A parameterization formulation for incorporating the effects of midlatitude deep convection into mesoscale-numerical models is presented. The formulation is based on the hypothesis that the buoyant energy available to a parcel, in combination with a prescribed period of time for the convection to remove that energy, can be used to regulate the amount of convection in a mesoscale numerical model grid element. Individual clouds are represented as entraining moist updraft and downdraft plumes. The fraction of updraft condensate evaporated in moist downdrafts is determined from an empirical relationship between the vertical shear of the horizontal wind and precipitation efficiency. Vertical transports of horizontal momentum and warming by compensating subsidence are included in the parameterization. Since updraft and downdraft areas are sometimes a substantial fraction of mesoscale model grid-element areas, grid-point temperatures (adjusted for convection) are an area-weighted mean of updraft, downdraft and environmental temperatures.}, Annote = {doi: 10.1175/1520-0469(1980)037<1722:NPOCDM>2.0.CO;2}, Author = {Fritsch, J. M. and Chappell, C. F.}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBDLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvRnJpdHNjaC8xOTgwLnBkZk8RAcoAAAAAAcoAAgAADE1hY2ludG9zaCBIRAAAAAAAAAAAAAAAAAAAANHnJFJIKwAAARCuMwgxOTgwLnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEKs103xvpgAAAAAAAAAAAAIABQAACSAAAAAAAAAAAAAAAAAAAAAHRnJpdHNjaAAAEAAIAADR53iyAAAAEQAIAADTfMQGAAAAAQAYARCuMwAobJYAKGyLAChnewAbXgcAAphcAAIAXU1hY2ludG9zaCBIRDpVc2VyczoAZ3JhbnRmOgBDbG91ZFN0YXRpb246AGZpcmxfbGlicmFyeToAZmlybF9saWJyYXJ5X2ZpbGVzOgBGcml0c2NoOgAxOTgwLnBkZgAADgASAAgAMQA5ADgAMAAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASlVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9Gcml0c2NoLzE5ODAucGRmABMAAS8AABUAAgAN//8AAAAIAA0AGgAkAGoAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACOA==}, Booktitle = {Journal of the Atmospheric Sciences}, Da = {1980/08/01}, Date = {1980/08/01}, @@ -2182,18 +2274,18 @@ @article{fritsch_and_chappell_1980 Number = {8}, Pages = {1722--1733}, Publisher = {American Meteorological Society}, - Title = {Numerical Prediction of Convectively Driven Mesoscale Pressure Systems. Part I: Convective Parameterization}, + Title = {Numerical Prediction of Convectively Driven Mesoscale Pressure Systems. {P}art {I}: Convective Parameterization}, Ty = {JOUR}, Url = {http://dx.doi.org/10.1175/1520-0469(1980)037<1722:NPOCDM>2.0.CO;2}, Volume = {37}, Year = {1980}, Year1 = {1980}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBDLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvRnJpdHNjaC8xOTgwLnBkZk8RAcoAAAAAAcoAAgAADE1hY2ludG9zaCBIRAAAAAAAAAAAAAAAAAAAANHnJFJIKwAAARCuMwgxOTgwLnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEKs103xvpgAAAAAAAAAAAAIABQAACSAAAAAAAAAAAAAAAAAAAAAHRnJpdHNjaAAAEAAIAADR53iyAAAAEQAIAADTfMQGAAAAAQAYARCuMwAobJYAKGyLAChnewAbXgcAAphcAAIAXU1hY2ludG9zaCBIRDpVc2VyczoAZ3JhbnRmOgBDbG91ZFN0YXRpb246AGZpcmxfbGlicmFyeToAZmlybF9saWJyYXJ5X2ZpbGVzOgBGcml0c2NoOgAxOTgwLnBkZgAADgASAAgAMQA5ADgAMAAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASlVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9Gcml0c2NoLzE5ODAucGRmABMAAS8AABUAAgAN//8AAAAIAA0AGgAkAGoAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACOA==}, Bdsk-Url-1 = {http://dx.doi.org/10.1175/1520-0469(1980)037%3C1722:NPOCDM%3E2.0.CO;2}} @article{bechtold_et_al_2008, - Abstract = {Advances in simulating atmospheric variability with the ECMWF model are presented that stem from revisions of the convection and diffusion parametrizations. The revisions concern in particular the introduction of a variable convective adjustment time-scale, a convective entrainment rate proportional to the environmental relative humidity, as well as free tropospheric diffusion coefficients for heat and momentum based on Monin--Obukhov functional dependencies.The forecasting system is evaluated against analyses and observations using high-resolution medium-range deterministic and ensemble forecasts, monthly and seasonal integrations, and decadal integrations with coupled atmosphere-ocean models. The results show a significantly higher and more realistic level of model activity in terms of the amplitude of tropical and extratropical mesoscale, synoptic and planetary perturbations. Importantly, with the higher variability and reduced bias not only the probabilistic scores are improved, but also the midlatitude deterministic scores in the short and medium ranges. Furthermore, for the first time the model is able to represent a realistic spectrum of convectively coupled equatorial Kelvin and Rossby waves, and maintains a realistic amplitude of the Madden--Julian oscillation (MJO) during monthly forecasts. However, the propagation speed of the MJO is slower than observed. The higher tropical tropospheric wave activity also results in better stratospheric temperatures and winds through the deposition of momentum.The partitioning between convective and resolved precipitation is unaffected by the model changes with roughly 62% of the total global precipitation being of the convective type. Finally, the changes in convection and diffusion parametrizations resulted in a larger spread of the ensemble forecasts, which allowed the amplitude of the initial perturbations in the ensemble prediction system to decrease by 30%. Copyright {\copyright} 2008 Royal Meteorological Society}, - Author = {Bechtold, Peter and K{\"o}hler, Martin and Jung, Thomas and Doblas-Reyes, Francisco and Leutbecher, Martin and Rodwell, Mark J. and Vitart, Frederic and Balsamo, Gianpaolo}, + Abstract = {Advances in simulating atmospheric variability with the {ECMWF} model are presented that stem from revisions of the convection and diffusion parametrizations. The revisions concern in particular the introduction of a variable convective adjustment time-scale, a convective entrainment rate proportional to the environmental relative humidity, as well as free tropospheric diffusion coefficients for heat and momentum based on Monin--Obukhov functional dependencies.The forecasting system is evaluated against analyses and observations using high-resolution medium-range deterministic and ensemble forecasts, monthly and seasonal integrations, and decadal integrations with coupled atmosphere-ocean models. The results show a significantly higher and more realistic level of model activity in terms of the amplitude of tropical and extratropical mesoscale, synoptic and planetary perturbations. Importantly, with the higher variability and reduced bias not only the probabilistic scores are improved, but also the midlatitude deterministic scores in the short and medium ranges. Furthermore, for the first time the model is able to represent a realistic spectrum of convectively coupled equatorial Kelvin and Rossby waves, and maintains a realistic amplitude of the Madden--Julian oscillation (MJO) during monthly forecasts. However, the propagation speed of the MJO is slower than observed. The higher tropical tropospheric wave activity also results in better stratospheric temperatures and winds through the deposition of momentum.The partitioning between convective and resolved precipitation is unaffected by the model changes with roughly 62% of the total global precipitation being of the convective type. Finally, the changes in convection and diffusion parametrizations resulted in a larger spread of the ensemble forecasts, which allowed the amplitude of the initial perturbations in the ensemble prediction system to decrease by 30%. Copyright {\copyright} 2008 Royal Meteorological Society}, + Author = {Bechtold, P. and K{\"o}hler, M. and Jung, T. and Doblas-Reyes, F. and Leutbecher, M. and Rodwell, M. J. and Vitart, F. and Balsamo, G.}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBELi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvQmVjaHRvbGQvMjAwOC5wZGZPEQHMAAAAAAHMAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAobfkIMjAwOC5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARZce9OEjEwAAAAAAAAAAAACAAUAAAkgAAAAAAAAAAAAAAAAAAAACEJlY2h0b2xkABAACAAA0ed4sgAAABEACAAA04TgrAAAAAEAGAAobfkAKGyWAChsiwAoZ3sAG14HAAKYXAACAF5NYWNpbnRvc2ggSEQ6VXNlcnM6AGdyYW50ZjoAQ2xvdWRTdGF0aW9uOgBmaXJsX2xpYnJhcnk6AGZpcmxfbGlicmFyeV9maWxlczoAQmVjaHRvbGQ6ADIwMDgucGRmAA4AEgAIADIAMAAwADgALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAEtVc2Vycy9ncmFudGYvQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvQmVjaHRvbGQvMjAwOC5wZGYAABMAAS8AABUAAgAN//8AAAAIAA0AGgAkAGsAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACOw==}, Date-Added = {2016-06-14 23:11:58 +0000}, Date-Modified = {2016-06-14 23:11:58 +0000}, Doi = {10.1002/qj.289}, @@ -2203,16 +2295,16 @@ @article{bechtold_et_al_2008 Number = {634}, Pages = {1337--1351}, Publisher = {John Wiley & Sons, Ltd.}, - Title = {Advances in simulating atmospheric variability with the ECMWF model: From synoptic to decadal time-scales}, + Title = {Advances in simulating atmospheric variability with the {ECMWF} model: From synoptic to decadal time-scales}, Url = {http://dx.doi.org/10.1002/qj.289}, Volume = {134}, Year = {2008}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBELi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvQmVjaHRvbGQvMjAwOC5wZGZPEQHMAAAAAAHMAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAobfkIMjAwOC5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARZce9OEjEwAAAAAAAAAAAACAAUAAAkgAAAAAAAAAAAAAAAAAAAACEJlY2h0b2xkABAACAAA0ed4sgAAABEACAAA04TgrAAAAAEAGAAobfkAKGyWAChsiwAoZ3sAG14HAAKYXAACAF5NYWNpbnRvc2ggSEQ6VXNlcnM6AGdyYW50ZjoAQ2xvdWRTdGF0aW9uOgBmaXJsX2xpYnJhcnk6AGZpcmxfbGlicmFyeV9maWxlczoAQmVjaHRvbGQ6ADIwMDgucGRmAA4AEgAIADIAMAAwADgALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAEtVc2Vycy9ncmFudGYvQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvQmVjaHRvbGQvMjAwOC5wZGYAABMAAS8AABUAAgAN//8AAAAIAA0AGgAkAGsAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACOw==}, Bdsk-Url-1 = {http://dx.doi.org/10.1002/qj.289}} @article{han_and_pan_2011, Annote = {doi: 10.1175/WAF-D-10-05038.1}, - Author = {Han, Jongil and Pan, Hua-Lu}, + Author = {Han, J. and Pan, H.-L.}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxA/Li4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvSGFuLzIwMTEucGRmTxEBvgAAAAABvgACAAAMTWFjaW50b3NoIEhEAAAAAAAAAAAAAAAAAAAA0eckUkgrAAAAWsT5CDIwMTEucGRmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADC1cfTGvlvAAAAAAAAAAAAAgAFAAAJIAAAAAAAAAAAAAAAAAAAAANIYW4AABAACAAA0ed4sgAAABEACAAA0xtNzwAAAAEAGABaxPkAKGyWAChsiwAoZ3sAG14HAAKYXAACAFlNYWNpbnRvc2ggSEQ6VXNlcnM6AGdyYW50ZjoAQ2xvdWRTdGF0aW9uOgBmaXJsX2xpYnJhcnk6AGZpcmxfbGlicmFyeV9maWxlczoASGFuOgAyMDExLnBkZgAADgASAAgAMgAwADEAMQAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIARlVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9IYW4vMjAxMS5wZGYAEwABLwAAFQACAA3//wAAAAgADQAaACQAZgAAAAAAAAIBAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAIo}, Booktitle = {Weather and Forecasting}, Da = {2011/08/01}, Date = {2011/08/01}, @@ -2227,28 +2319,28 @@ @article{han_and_pan_2011 Number = {4}, Pages = {520--533}, Publisher = {American Meteorological Society}, - Title = {Revision of Convection and Vertical Diffusion Schemes in the NCEP Global Forecast System}, + Title = {Revision of Convection and Vertical Diffusion Schemes in the {NCEP} {G}lobal {F}orecast {S}ystem}, Ty = {JOUR}, Url = {http://dx.doi.org/10.1175/WAF-D-10-05038.1}, Volume = {26}, Year = {2011}, Year1 = {2011}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxA/Li4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvSGFuLzIwMTEucGRmTxEBvgAAAAABvgACAAAMTWFjaW50b3NoIEhEAAAAAAAAAAAAAAAAAAAA0eckUkgrAAAAWsT5CDIwMTEucGRmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADC1cfTGvlvAAAAAAAAAAAAAgAFAAAJIAAAAAAAAAAAAAAAAAAAAANIYW4AABAACAAA0ed4sgAAABEACAAA0xtNzwAAAAEAGABaxPkAKGyWAChsiwAoZ3sAG14HAAKYXAACAFlNYWNpbnRvc2ggSEQ6VXNlcnM6AGdyYW50ZjoAQ2xvdWRTdGF0aW9uOgBmaXJsX2xpYnJhcnk6AGZpcmxfbGlicmFyeV9maWxlczoASGFuOgAyMDExLnBkZgAADgASAAgAMgAwADEAMQAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIARlVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9IYW4vMjAxMS5wZGYAEwABLwAAFQACAA3//wAAAAgADQAaACQAZgAAAAAAAAIBAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAIo}, Bdsk-Url-1 = {http://dx.doi.org/10.1175/WAF-D-10-05038.1}} @article{pan_and_wu_1995, - Author = {Pan, H. -L. and W.-S. Wu}, + Author = {Pan, H.-L. and W.-S. Wu}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxA/Li4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvUGFuLzE5OTUucGRmTxEBvgAAAAABvgACAAAMTWFjaW50b3NoIEhEAAAAAAAAAAAAAAAAAAAA0eckUkgrAAAAwtTNCDE5OTUucGRmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADCtU/TGvMJAAAAAAAAAAAAAgAFAAAJIAAAAAAAAAAAAAAAAAAAAANQYW4AABAACAAA0ed4sgAAABEACAAA0xtHaQAAAAEAGADC1M0AKGyWAChsiwAoZ3sAG14HAAKYXAACAFlNYWNpbnRvc2ggSEQ6VXNlcnM6AGdyYW50ZjoAQ2xvdWRTdGF0aW9uOgBmaXJsX2xpYnJhcnk6AGZpcmxfbGlicmFyeV9maWxlczoAUGFuOgAxOTk1LnBkZgAADgASAAgAMQA5ADkANQAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIARlVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9QYW4vMTk5NS5wZGYAEwABLwAAFQACAA3//wAAAAgADQAaACQAZgAAAAAAAAIBAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAIo}, Date-Added = {2016-06-14 23:06:41 +0000}, Date-Modified = {2016-06-14 23:06:41 +0000}, Journal = {NMC Office Note, No. 409}, Pages = {40pp}, - Title = {Implementing a Mass Flux Convection Parameterization Package for the NMC Medium-Range Forecast Model}, - Year = {1995}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxA/Li4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvUGFuLzE5OTUucGRmTxEBvgAAAAABvgACAAAMTWFjaW50b3NoIEhEAAAAAAAAAAAAAAAAAAAA0eckUkgrAAAAwtTNCDE5OTUucGRmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADCtU/TGvMJAAAAAAAAAAAAAgAFAAAJIAAAAAAAAAAAAAAAAAAAAANQYW4AABAACAAA0ed4sgAAABEACAAA0xtHaQAAAAEAGADC1M0AKGyWAChsiwAoZ3sAG14HAAKYXAACAFlNYWNpbnRvc2ggSEQ6VXNlcnM6AGdyYW50ZjoAQ2xvdWRTdGF0aW9uOgBmaXJsX2xpYnJhcnk6AGZpcmxfbGlicmFyeV9maWxlczoAUGFuOgAxOTk1LnBkZgAADgASAAgAMQA5ADkANQAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIARlVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9QYW4vMTk5NS5wZGYAEwABLwAAFQACAA3//wAAAAgADQAaACQAZgAAAAAAAAIBAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAIo}} + Title = {Implementing a Mass Flux Convection Parameterization Package for the {NMC} Medium-Range Forecast Model}, + Year = {1995}} @article{grell_1993, Annote = {doi: 10.1175/1520-0493(1993)121<0764:PEOAUB>2.0.CO;2}, - Author = {Grell, Georg A.}, + Author = {Grell, G. A.}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBBLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvR3JlbGwvMTk5My5wZGZPEQHEAAAAAAHEAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAoie0IMTk5My5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMK4dtMa9LMAAAAAAAAAAAACAAUAAAkgAAAAAAAAAAAAAAAAAAAABUdyZWxsAAAQAAgAANHneLIAAAARAAgAANMbSRMAAAABABgAKIntAChslgAobIsAKGd7ABteBwACmFwAAgBbTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AEdyZWxsOgAxOTkzLnBkZgAADgASAAgAMQA5ADkAMwAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASFVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9HcmVsbC8xOTkzLnBkZgATAAEvAAAVAAIADf//AAAACAANABoAJABoAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAjA=}, Booktitle = {Monthly Weather Review}, Da = {1993/03/01}, Date = {1993/03/01}, @@ -2269,11 +2361,11 @@ @article{grell_1993 Volume = {121}, Year = {1993}, Year1 = {1993}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBBLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvR3JlbGwvMTk5My5wZGZPEQHEAAAAAAHEAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAoie0IMTk5My5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMK4dtMa9LMAAAAAAAAAAAACAAUAAAkgAAAAAAAAAAAAAAAAAAAABUdyZWxsAAAQAAgAANHneLIAAAARAAgAANMbSRMAAAABABgAKIntAChslgAobIsAKGd7ABteBwACmFwAAgBbTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AEdyZWxsOgAxOTkzLnBkZgAADgASAAgAMQA5ADkAMwAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASFVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9HcmVsbC8xOTkzLnBkZgATAAEvAAAVAAIADf//AAAACAANABoAJABoAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAjA=}, Bdsk-Url-1 = {http://dx.doi.org/10.1175/1520-0493(1993)121%3C0764:PEOAUB%3E2.0.CO;2}} @article{arakawa_and_schubert_1974, - Author = {Arakawa, A and Schubert, WH}, + Author = {Arakawa, A. and Schubert, W. H.}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBDLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvQXJha2F3YS8xOTc0LnBkZk8RAcoAAAAAAcoAAgAADE1hY2ludG9zaCBIRAAAAAAAAAAAAAAAAAAAANHnJFJIKwAAAChtVQgxOTc0LnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKG1ctM8h9AAAAAAAAAAAAAIABQAACSAAAAAAAAAAAAAAAAAAAAAHQXJha2F3YQAAEAAIAADR53iyAAAAEQAIAAC0z4RkAAAAAQAYAChtVQAobJYAKGyLAChnewAbXgcAAphcAAIAXU1hY2ludG9zaCBIRDpVc2VyczoAZ3JhbnRmOgBDbG91ZFN0YXRpb246AGZpcmxfbGlicmFyeToAZmlybF9saWJyYXJ5X2ZpbGVzOgBBcmFrYXdhOgAxOTc0LnBkZgAADgASAAgAMQA5ADcANAAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASlVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9BcmFrYXdhLzE5NzQucGRmABMAAS8AABUAAgAN//8AAAAIAA0AGgAkAGoAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACOA==}, Date-Added = {2016-06-14 23:04:30 +0000}, Date-Modified = {2018-07-18 19:00:17 +0000}, Isi = {A1974S778800004}, @@ -2283,10 +2375,9 @@ @article{arakawa_and_schubert_1974 Journal = {Journal of the Atmospheric Sciences}, Pages = {674--701}, Times-Cited = {1300}, - Title = {Interaction of a cumulus cloud ensemble with the large-scale environment, Part I}, + Title = {Interaction of a cumulus cloud ensemble with the large-scale environment, {P}art {I}}, Volume = {31}, Year = {1974}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBDLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvQXJha2F3YS8xOTc0LnBkZk8RAcoAAAAAAcoAAgAADE1hY2ludG9zaCBIRAAAAAAAAAAAAAAAAAAAANHnJFJIKwAAAChtVQgxOTc0LnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKG1ctM8h9AAAAAAAAAAAAAIABQAACSAAAAAAAAAAAAAAAAAAAAAHQXJha2F3YQAAEAAIAADR53iyAAAAEQAIAAC0z4RkAAAAAQAYAChtVQAobJYAKGyLAChnewAbXgcAAphcAAIAXU1hY2ludG9zaCBIRDpVc2VyczoAZ3JhbnRmOgBDbG91ZFN0YXRpb246AGZpcmxfbGlicmFyeToAZmlybF9saWJyYXJ5X2ZpbGVzOgBBcmFrYXdhOgAxOTc0LnBkZgAADgASAAgAMQA5ADcANAAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASlVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9BcmFrYXdhLzE5NzQucGRmABMAAS8AABUAAgAN//8AAAAIAA0AGgAkAGoAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACOA==}, Bdsk-Url-1 = {http://ws.isiknowledge.com/cps/openurl/service?url_ver=Z39.88-2004&rft_id=info:ut/A1974S778800004}} @article{harshvardhan_et_al_1989, @@ -2317,7 +2408,7 @@ @article{mccormack_et_al_2006 Date-Modified = {2016-06-06 17:37:45 +0000}, Journal = {Atmos. Chem. Phys.}, Pages = {4943-4972}, - Title = {CHEM2D-OPP: A new linearized gas-phase ozone photochemistry parameterization for high-altitude NWP and climate models}, + Title = {{CHEM2D-OPP}: A new linearized gas-phase ozone photochemistry parameterization for high-altitude {NWP} and climate models}, Volume = {6}, Year = {2006}} @@ -2327,7 +2418,7 @@ @article{kim_1996 Date-Modified = {2016-06-01 20:21:44 +0000}, Journal = {J. Climate}, Pages = {2698-2717}, - Title = {Representation of subgrid-scale orographic effects in a general circulation model. Part I: Impact on the dynamics of simulated January climate}, + Title = {Representation of subgrid-scale orographic effects in a general circulation model. {P}art {I}: Impact on the dynamics of simulated January climate}, Volume = {9}, Year = {1996}} @@ -2411,7 +2502,7 @@ @inbook{sundqvist_1988 Date-Modified = {2016-05-24 23:03:22 +0000}, Pages = {433-461}, Publisher = {M. E. Schlesinger, Ed., Reidel}, - Title = {Physically-based modeling and simulation of climate and climatic changes, Part I}, + Title = {Physically-based modeling and simulation of climate and climatic changes, {P}art {I}}, Year = {1988}} @misc{Rogers_1979, @@ -2445,22 +2536,22 @@ @booklet{kessler_1969 Year = {1969}} @article{rutledge_and_hobbs_1983, - Author = {S.A. Rutledge and P.V. Hobbs}, + Author = {S. A. Rutledge and P. V. Hobbs}, Date-Added = {2016-05-24 04:07:48 +0000}, Date-Modified = {2016-05-24 04:10:43 +0000}, Journal = {J. Atmos. Sci.}, Pages = {1185-1206}, - Title = {The mesoscale and microscale structure and organization of clouds and precipitation in mid-latitude cyclones. VIII: A model for the 'seeder-feeder' process in warm-frontal rainbands}, + Title = {The mesoscale and microscale structure and organization of clouds and precipitation in mid-latitude cyclones. {VIII}: A model for the 'seeder-feeder' process in warm-frontal rainbands}, Volume = {40}, Year = {1983}} @article{zhao_and_carr_1997, - Author = {Q. Zhao and F.H. Carr}, + Author = {Q. Zhao and F. H. Carr}, Date-Added = {2016-05-24 03:57:40 +0000}, Date-Modified = {2016-05-24 04:02:27 +0000}, Journal = {Monthly Weather Review}, Pages = {1931-1953}, - Title = {A prognostic cloud scheme for operational NWP models}, + Title = {A prognostic cloud scheme for operational {NWP} models}, Volume = {125}, Year = {1997}} @@ -2492,7 +2583,7 @@ @article{chun_et_al_2004 Journal = {J. Climate}, Keywords = {convective gwd}, Pages = {3530-3547}, - Title = {Impact of a convectively forced gravity wave drag parameterization in NCAR CCM3}, + Title = {Impact of a convectively forced gravity wave drag parameterization in {NCAR CCM3}}, Volume = {17}, Year = {2004}} @@ -2508,7 +2599,7 @@ @article{chun_and_baik_1998 Year = {1998}} @article{akmaev_1991, - Author = {R.A. Akmaev}, + Author = {R. A. Akmaev}, Date-Added = {2016-05-20 20:41:25 +0000}, Date-Modified = {2016-05-20 20:44:22 +0000}, Journal = {Monthly Weather Review}, @@ -2519,7 +2610,8 @@ @article{akmaev_1991 @article{siebesma_et_al_2007, Abstract = {A better conceptual understanding and more realistic parameterizations of convective boundary layers in climate and weather prediction models have been major challenges in meteorological research. In particular, parameterizations of the dry convective boundary layer, in spite of the absence of water phase-changes and its consequent simplicity as compared to moist convection, typically suffer from problems in attempting to represent realistically the boundary layer growth and what is often referred to as countergradient fluxes. The eddy-diffusivity (ED) approach has been relatively successful in representing some characteristics of neutral boundary layers and surface layers in general. The mass-flux (MF) approach, on the other hand, has been used for the parameterization of shallow and deep moist convection. In this paper, a new approach that relies on a combination of the ED and MF parameterizations (EDMF) is proposed for the dry convective boundary layer. It is shown that the EDMF approach follows naturally from a decomposition of the turbulent fluxes into 1) a part that includes strong organized updrafts, and 2) a remaining turbulent field. At the basis of the EDMF approach is the concept that nonlocal subgrid transport due to the strong updrafts is taken into account by the MF approach, while the remaining transport is taken into account by an ED closure. Large-eddy simulation (LES) results of the dry convective boundary layer are used to support the theoretical framework of this new approach and to determine the parameters of the EDMF model. The performance of the new formulation is evaluated against LES results, and it is shown that the EDMF closure is able to reproduce the main properties of dry convective boundary layers in a realistic manner. Furthermore, it will be shown that this approach has strong advantages over the more traditional countergradient approach, especially in the entrainment layer. As a result, this EDMF approach opens the way to parameterize the clear and cumulus-topped boundary layer in a simple and unified way.}, - Author = {Siebesma, A. Pier and Soares, Pedro M. M. and Teixeira, Joao}, + Author = {Siebesma, A. P. and Soares, P. M. M. and Teixeira, J.}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBELi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvU2llYmVzbWEvMjAwNy5wZGZPEQHMAAAAAAHMAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAqYEwIMjAwNy5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACphyMc7+4hQREYgQ0FSTwACAAUAAAkgAAAAAAAAAAAAAAAAAAAACFNpZWJlc21hABAACAAA0ed4sgAAABEACAAAxzxd+AAAAAEAGAAqYEwAKGyWAChsiwAoZ3sAG14HAAKYXAACAF5NYWNpbnRvc2ggSEQ6VXNlcnM6AGdyYW50ZjoAQ2xvdWRTdGF0aW9uOgBmaXJsX2xpYnJhcnk6AGZpcmxfbGlicmFyeV9maWxlczoAU2llYmVzbWE6ADIwMDcucGRmAA4AEgAIADIAMAAwADcALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAEtVc2Vycy9ncmFudGYvQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvU2llYmVzbWEvMjAwNy5wZGYAABMAAS8AABUAAgAN//8AAAAIAA0AGgAkAGsAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACOw==}, Date-Added = {2016-05-20 17:17:49 +0000}, Date-Modified = {2016-05-20 17:17:49 +0000}, Doi = {DOI 10.1175/JAS3888.1}, @@ -2533,12 +2625,12 @@ @article{siebesma_et_al_2007 Title = {A combined eddy-diffusivity mass-flux approach for the convective boundary layer}, Volume = {64}, Year = {2007}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBELi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvU2llYmVzbWEvMjAwNy5wZGZPEQHMAAAAAAHMAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAqYEwIMjAwNy5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACphyMc7+4hQREYgQ0FSTwACAAUAAAkgAAAAAAAAAAAAAAAAAAAACFNpZWJlc21hABAACAAA0ed4sgAAABEACAAAxzxd+AAAAAEAGAAqYEwAKGyWAChsiwAoZ3sAG14HAAKYXAACAF5NYWNpbnRvc2ggSEQ6VXNlcnM6AGdyYW50ZjoAQ2xvdWRTdGF0aW9uOgBmaXJsX2xpYnJhcnk6AGZpcmxfbGlicmFyeV9maWxlczoAU2llYmVzbWE6ADIwMDcucGRmAA4AEgAIADIAMAAwADcALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAEtVc2Vycy9ncmFudGYvQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvU2llYmVzbWEvMjAwNy5wZGYAABMAAS8AABUAAgAN//8AAAAIAA0AGgAkAGsAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACOw==}, Bdsk-Url-1 = {http://ws.isiknowledge.com/cps/openurl/service?url_ver=Z39.88-2004&rft_id=info:ut/000245742600011}} @article{soares_et_al_2004, Abstract = {Recently, a new consistent way of parametrizing simultaneously local and non-local turbulent transport for the convective atmospheric boundary layer has been proposed and tested for the clear boundary layer. This approach assumes that in the convective boundary layer the subgrid-scale fluxes result from two different mixing scales: small eddies, that are parametrized by an eddy-diffusivity approach, and thermals, which are represented by a mass-flux contribution. Since the interaction between the cloud layer and the underlying sub-cloud layer predominantly takes place through strong updraughts, this approach offers an interesting avenue of establishing a unified description of the turbulent transport in the cumulus-topped boundary layer. This paper explores the possibility of such a new approach for the cumulus-topped boundary layer. In the sub-cloud and cloud layers, the mass-flux term represents the effect of strong updraughts. These are modelled by a simple entraining parcel, which determines the mean properties of the strong updraughts, the boundary-layer height, the lifting condensation level and cloud top. The residual smaller-scale turbulent transport is parametrized with an eddy-diffusivity approach that uses a turbulent kinetic energy closure. The new scheme is implemented and tested in the research model MesoNH. Copyright {\copyright} 2004 Royal Meteorological Society}, Author = {Soares, P. M. M. and Miranda, P. M. A. and Siebesma, A. P. and Teixeira, J.}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBCLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvU29hcmVzLzIwMDQucGRmTxEBxgAAAAABxgACAAAMTWFjaW50b3NoIEhEAAAAAAAAAAAAAAAAAAAA0eckUkgrAAAAWIC2CDIwMDQucGRmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYf6DSsqNwAAAAAAAAAAAAAgAFAAAJIAAAAAAAAAAAAAAAAAAAAAZTb2FyZXMAEAAIAADR53iyAAAAEQAIAADSswXgAAAAAQAYAFiAtgAobJYAKGyLAChnewAbXgcAAphcAAIAXE1hY2ludG9zaCBIRDpVc2VyczoAZ3JhbnRmOgBDbG91ZFN0YXRpb246AGZpcmxfbGlicmFyeToAZmlybF9saWJyYXJ5X2ZpbGVzOgBTb2FyZXM6ADIwMDQucGRmAA4AEgAIADIAMAAwADQALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAElVc2Vycy9ncmFudGYvQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvU29hcmVzLzIwMDQucGRmAAATAAEvAAAVAAIADf//AAAACAANABoAJABpAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAjM=}, Date-Added = {2016-05-20 17:17:49 +0000}, Date-Modified = {2016-05-20 17:17:49 +0000}, Doi = {10.1256/qj.03.223}, @@ -2552,11 +2644,11 @@ @article{soares_et_al_2004 Url = {http://dx.doi.org/10.1256/qj.03.223}, Volume = {130}, Year = {2004}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBCLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvU29hcmVzLzIwMDQucGRmTxEBxgAAAAABxgACAAAMTWFjaW50b3NoIEhEAAAAAAAAAAAAAAAAAAAA0eckUkgrAAAAWIC2CDIwMDQucGRmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYf6DSsqNwAAAAAAAAAAAAAgAFAAAJIAAAAAAAAAAAAAAAAAAAAAZTb2FyZXMAEAAIAADR53iyAAAAEQAIAADSswXgAAAAAQAYAFiAtgAobJYAKGyLAChnewAbXgcAAphcAAIAXE1hY2ludG9zaCBIRDpVc2VyczoAZ3JhbnRmOgBDbG91ZFN0YXRpb246AGZpcmxfbGlicmFyeToAZmlybF9saWJyYXJ5X2ZpbGVzOgBTb2FyZXM6ADIwMDQucGRmAA4AEgAIADIAMAAwADQALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAElVc2Vycy9ncmFudGYvQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvU29hcmVzLzIwMDQucGRmAAATAAEvAAAVAAIADf//AAAACAANABoAJABpAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAjM=}, Bdsk-Url-1 = {http://dx.doi.org/10.1256/qj.03.223}} @article{troen_and_mahrt_1986, - Author = {Troen, IB and Mahrt, L.}, + Author = {Troen, I. B. and Mahrt, L.}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBBLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvVHJvZW4vMTk4Ni5wZGZPEQHEAAAAAAHEAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAABNeegIMTk4Ni5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE13kNKUWwUAAAAAAAAAAAACAAUAAAkgAAAAAAAAAAAAAAAAAAAABVRyb2VuAAAQAAgAANHneLIAAAARAAgAANKUvXUAAAABABgATXnoAChslgAobIsAKGd7ABteBwACmFwAAgBbTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AFRyb2VuOgAxOTg2LnBkZgAADgASAAgAMQA5ADgANgAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASFVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9Ucm9lbi8xOTg2LnBkZgATAAEvAAAVAAIADf//AAAACAANABoAJABoAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAjA=}, Date-Added = {2016-05-20 17:17:49 +0000}, Date-Modified = {2016-05-20 17:17:49 +0000}, Doi = {10.1007/BF00122760}, @@ -2570,13 +2662,13 @@ @article{troen_and_mahrt_1986 Url = {http://dx.doi.org/10.1007/BF00122760}, Volume = {37}, Year = {1986}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBBLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvVHJvZW4vMTk4Ni5wZGZPEQHEAAAAAAHEAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAABNeegIMTk4Ni5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE13kNKUWwUAAAAAAAAAAAACAAUAAAkgAAAAAAAAAAAAAAAAAAAABVRyb2VuAAAQAAgAANHneLIAAAARAAgAANKUvXUAAAABABgATXnoAChslgAobIsAKGd7ABteBwACmFwAAgBbTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AFRyb2VuOgAxOTg2LnBkZgAADgASAAgAMQA5ADgANgAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASFVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9Ucm9lbi8xOTg2LnBkZgATAAEvAAAVAAIADf//AAAACAANABoAJABoAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAjA=}, Bdsk-Url-1 = {http://dx.doi.org/10.1007/BF00122760}} @article{macvean_and_mason_1990, Abstract = {Abstract In a recent paper, Kuo and Schubert demonstrated the lack of observational support for the relevance of the criterion for cloud-top entrainment instability proposed by Randall and by Deardorff. Here we derive a new criterion, based on a model of the instability as resulting from the energy released close to cloud top, by Mixing between saturated boundary-layer air and unsaturated air from above the capping inversion. The condition is derived by considering the net conversion from potential to kinetic energy in a system consisting of two layers of fluid straddling cloud-top, when a small amount of mixing occurs between these layers. This contrasts with previous analyses, which only considered the change in buoyancy of the cloud layer when unsaturated air is mixed into it. In its most general form, this new criterion depends on the ratio of the depths of the layers involved in the mixing. It is argued that, for a self-sustaining instability, there must be a net release of kinetic energy on the same depth and time scales as the entrainment process itself. There are two plausible ways in which this requirement may be satisfied. Either one takes the depths of the layers involved in the mixing to each be comparable to the vertical scale of the entrainment process, which is typically of order tens of meters or less, or alternatively, one must allow for the efficiency with which energy released by mixing through a much deeper lower layer becomes available to initiate further entrainment. In both cases the same criterion for instability results. This criterion is much more restrictive than that proposed by Randall and by Deardorff; furthermore, the observational data is then consistent with the predictions of the current theory. Further analysis provides estimates of the turbulent fluxes associated with cloud-top entrainment instability. This analysis effectively constitutes an energetically consistent turbulence closure for models of boundary layers with cloud. The implications for such numerical models are discussed. Comparisons are also made with other possible criteria for cloud-top entrainment instability which have recently been suggested.}, Annote = {doi: 10.1175/1520-0469(1990)047<1012:CTEITS>2.0.CO;2}, Author = {MacVean, M. K. and Mason, P. J.}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBDLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvTWFjVmVhbi8xOTkwLnBkZk8RAcoAAAAAAcoAAgAADE1hY2ludG9zaCBIRAAAAAAAAAAAAAAAAAAAANHnJFJIKwAAAFx8zwgxOTkwLnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXHyn0rkkRQAAAAAAAAAAAAIABQAACSAAAAAAAAAAAAAAAAAAAAAHTWFjVmVhbgAAEAAIAADR53iyAAAAEQAIAADSuYa1AAAAAQAYAFx8zwAobJYAKGyLAChnewAbXgcAAphcAAIAXU1hY2ludG9zaCBIRDpVc2VyczoAZ3JhbnRmOgBDbG91ZFN0YXRpb246AGZpcmxfbGlicmFyeToAZmlybF9saWJyYXJ5X2ZpbGVzOgBNYWNWZWFuOgAxOTkwLnBkZgAADgASAAgAMQA5ADkAMAAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASlVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9NYWNWZWFuLzE5OTAucGRmABMAAS8AABUAAgAN//8AAAAIAA0AGgAkAGoAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACOA==}, Booktitle = {Journal of the Atmospheric Sciences}, Da = {1990/04/01}, Date-Added = {2016-05-20 17:16:05 +0000}, @@ -2595,11 +2687,11 @@ @article{macvean_and_mason_1990 Url = {http://dx.doi.org/10.1175/1520-0469(1990)047<1012:CTEITS>2.0.CO;2}, Volume = {47}, Year = {1990}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBDLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvTWFjVmVhbi8xOTkwLnBkZk8RAcoAAAAAAcoAAgAADE1hY2ludG9zaCBIRAAAAAAAAAAAAAAAAAAAANHnJFJIKwAAAFx8zwgxOTkwLnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXHyn0rkkRQAAAAAAAAAAAAIABQAACSAAAAAAAAAAAAAAAAAAAAAHTWFjVmVhbgAAEAAIAADR53iyAAAAEQAIAADSuYa1AAAAAQAYAFx8zwAobJYAKGyLAChnewAbXgcAAphcAAIAXU1hY2ludG9zaCBIRDpVc2VyczoAZ3JhbnRmOgBDbG91ZFN0YXRpb246AGZpcmxfbGlicmFyeToAZmlybF9saWJyYXJ5X2ZpbGVzOgBNYWNWZWFuOgAxOTkwLnBkZgAADgASAAgAMQA5ADkAMAAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASlVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9NYWNWZWFuLzE5OTAucGRmABMAAS8AABUAAgAN//8AAAAIAA0AGgAkAGoAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACOA==}, Bdsk-Url-1 = {http://dx.doi.org/10.1175/1520-0469(1990)047%3C1012:CTEITS%3E2.0.CO;2}} @article{louis_1979, - Author = {Louis, JF}, + Author = {Louis, J. F.}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBBLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvTG91aXMvMTk3OS5wZGZPEQHEAAAAAAHEAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAonogIMTk3OS5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACiej8FuU4pQREYgQ0FSTwACAAUAAAkgAAAAAAAAAAAAAAAAAAAABUxvdWlzAAAQAAgAANHneLIAAAARAAgAAMFutfoAAAABABgAKJ6IAChslgAobIsAKGd7ABteBwACmFwAAgBbTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AExvdWlzOgAxOTc5LnBkZgAADgASAAgAMQA5ADcAOQAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASFVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9Mb3Vpcy8xOTc5LnBkZgATAAEvAAAVAAIADf//AAAACAANABoAJABoAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAjA=}, Date-Added = {2016-05-20 17:15:52 +0000}, Date-Modified = {2016-05-20 17:15:52 +0000}, Isi = {A1979HT69700004}, @@ -2612,12 +2704,12 @@ @article{louis_1979 Title = {A PARAMETRIC MODEL OF VERTICAL EDDY FLUXES IN THE ATMOSPHERE}, Volume = {17}, Year = {1979}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBBLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvTG91aXMvMTk3OS5wZGZPEQHEAAAAAAHEAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAonogIMTk3OS5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACiej8FuU4pQREYgQ0FSTwACAAUAAAkgAAAAAAAAAAAAAAAAAAAABUxvdWlzAAAQAAgAANHneLIAAAARAAgAAMFutfoAAAABABgAKJ6IAChslgAobIsAKGd7ABteBwACmFwAAgBbTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AExvdWlzOgAxOTc5LnBkZgAADgASAAgAMQA5ADcAOQAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASFVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9Mb3Vpcy8xOTc5LnBkZgATAAEvAAAVAAIADf//AAAACAANABoAJABoAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAjA=}, Bdsk-Url-1 = {http://ws.isiknowledge.com/cps/openurl/service?url_ver=Z39.88-2004&rft_id=info:ut/A1979HT69700004}} @article{lock_et_al_2000, Abstract = {A new boundary layer turbulent mixing scheme has been developed for use in the UKMO weather forecasting and climate prediction models. This includes a representation of nonlocal mixing (driven by both surface fluxes and cloud-top processes) in unstable layers, either coupled to or decoupled from the surface, and an explicit entrainment parameterization. The scheme is formulated in moist conserved variables so that it can treat both dry and cloudy layers. Details of the scheme and examples of its performance in single-column model tests are presented.}, - Author = {Lock, AP and Brown, AR and Bush, MR and Martin, GM and Smith, RNB}, + Author = {Lock, A. P. and Brown, A. R. and Bush, M. R. and Martin, G. M. and Smith, R.N.B.}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBALi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvTG9jay8yMDAwLnBkZk8RAcAAAAAAAcAAAgAADE1hY2ludG9zaCBIRAAAAAAAAAAAAAAAAAAAANHnJFJIKwAAACibewgyMDAwLnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKJuLywPrPAAAAAAAAAAAAAIABQAACSAAAAAAAAAAAAAAAAAAAAAETG9jawAQAAgAANHneLIAAAARAAgAAMsETawAAAABABgAKJt7AChslgAobIsAKGd7ABteBwACmFwAAgBaTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AExvY2s6ADIwMDAucGRmAA4AEgAIADIAMAAwADAALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAEdVc2Vycy9ncmFudGYvQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvTG9jay8yMDAwLnBkZgAAEwABLwAAFQACAA3//wAAAAgADQAaACQAZwAAAAAAAAIBAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAIr}, Date-Added = {2016-05-20 17:15:36 +0000}, Date-Modified = {2016-05-20 17:15:36 +0000}, Isi = {000089461100008}, @@ -2630,13 +2722,13 @@ @article{lock_et_al_2000 Title = {A new boundary layer mixing scheme. {P}art {I}: Scheme description and single-column model tests}, Volume = {128}, Year = {2000}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBALi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvTG9jay8yMDAwLnBkZk8RAcAAAAAAAcAAAgAADE1hY2ludG9zaCBIRAAAAAAAAAAAAAAAAAAAANHnJFJIKwAAACibewgyMDAwLnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKJuLywPrPAAAAAAAAAAAAAIABQAACSAAAAAAAAAAAAAAAAAAAAAETG9jawAQAAgAANHneLIAAAARAAgAAMsETawAAAABABgAKJt7AChslgAobIsAKGd7ABteBwACmFwAAgBaTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AExvY2s6ADIwMDAucGRmAA4AEgAIADIAMAAwADAALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAEdVc2Vycy9ncmFudGYvQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvTG9jay8yMDAwLnBkZgAAEwABLwAAFQACAA3//wAAAAgADQAaACQAZwAAAAAAAAIBAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAIr}, Bdsk-Url-1 = {http://ws.isiknowledge.com/cps/openurl/service?url_ver=Z39.88-2004&rft_id=info:ut/000089461100008}} @article{hong_and_pan_1996, Abstract = {Abstract In this paper, the incorporation of a simple atmospheric boundary layer diffusion scheme into the NCEP Medium-Range Forecast Model is described. A boundary layer diffusion package based on the Troen and Mahrt nonlocal diffusion concept has been tested for possible operational implementation. The results from this approach are compared with those from the local diffusion approach, which is the current operational scheme, and verified against FIFE observations during 9?10 August 1987. The comparisons between local and nonlocal approaches are extended to the forecast for a heavy rain case of 15?17 May 1995. The sensitivity of both the boundary layer development and the precipitation forecast to the tuning parameters in the nonlocal diffusion scheme is also investigated. Special attention is given to the interaction of boundary layer processes with precipitation physics. Some results of parallel runs during August 1995 are also presented.}, Annote = {doi: 10.1175/1520-0493(1996)124<2322:NBLVDI>2.0.CO;2}, - Author = {Hong, Song-You and Pan, Hua-Lu}, + Author = {Hong, S.-Y. and Pan, H.-L.}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBALi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvSG9uZy8xOTk2LnBkZk8RAcAAAAAAAcAAAgAADE1hY2ludG9zaCBIRAAAAAAAAAAAAAAAAAAAANHnJFJIKwAAAE18FggxOTk2LnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATXvY0pRb8QAAAAAAAAAAAAIABQAACSAAAAAAAAAAAAAAAAAAAAAESG9uZwAQAAgAANHneLIAAAARAAgAANKUvmEAAAABABgATXwWAChslgAobIsAKGd7ABteBwACmFwAAgBaTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AEhvbmc6ADE5OTYucGRmAA4AEgAIADEAOQA5ADYALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAEdVc2Vycy9ncmFudGYvQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvSG9uZy8xOTk2LnBkZgAAEwABLwAAFQACAA3//wAAAAgADQAaACQAZwAAAAAAAAIBAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAIr}, Booktitle = {Monthly Weather Review}, Da = {1996/10/01}, Date = {1996/10/01}, @@ -2657,13 +2749,13 @@ @article{hong_and_pan_1996 Volume = {124}, Year = {1996}, Year1 = {1996}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBALi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvSG9uZy8xOTk2LnBkZk8RAcAAAAAAAcAAAgAADE1hY2ludG9zaCBIRAAAAAAAAAAAAAAAAAAAANHnJFJIKwAAAE18FggxOTk2LnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATXvY0pRb8QAAAAAAAAAAAAIABQAACSAAAAAAAAAAAAAAAAAAAAAESG9uZwAQAAgAANHneLIAAAARAAgAANKUvmEAAAABABgATXwWAChslgAobIsAKGd7ABteBwACmFwAAgBaTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AEhvbmc6ADE5OTYucGRmAA4AEgAIADEAOQA5ADYALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAEdVc2Vycy9ncmFudGYvQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvSG9uZy8xOTk2LnBkZgAAEwABLwAAFQACAA3//wAAAAgADQAaACQAZwAAAAAAAAIBAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAIr}, Bdsk-Url-1 = {http://dx.doi.org/10.1175/1520-0493(1996)124%3C2322:NBLVDI%3E2.0.CO;2}} @article{han_and_pan_2006, Abstract = {Abstract A parameterization of the convection-induced pressure gradient force (PGF) in convective momentum transport (CMT) is tested for hurricane intensity forecasting using NCEP's operational Global Forecast System (GFS) and its nested Regional Spectral Model (RSM). In the parameterization the PGF is assumed to be proportional to the product of the cloud mass flux and vertical wind shear. Compared to control forecasts using the present operational GFS and RSM where the PGF effect in CMT is taken into account empirically, the new PGF parameterization helps increase hurricane intensity by reducing the vertical momentum exchange, giving rise to a closer comparison to the observations. In addition, the new PGF parameterization forecasts not only show more realistically organized precipitation patterns with enhanced hurricane intensity but also reduce the forecast track error. Nevertheless, the model forecasts with the new PGF parameterization still largely underpredict the observed intensity. One of the many possible reasons for the large underprediction may be the absence of hurricane initialization in the models.}, Annote = {doi: 10.1175/MWR3090.1}, - Author = {Han, Jongil and Pan, Hua-Lu}, + Author = {Han, J. and Pan, H.-L.}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxA/Li4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvSGFuLzIwMDYucGRmTxEBvgAAAAABvgACAAAMTWFjaW50b3NoIEhEAAAAAAAAAAAAAAAAAAAA0eckUkgrAAAAWsT5CDIwMDYucGRmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABazFjStCvVAAAAAAAAAAAAAgAFAAAJIAAAAAAAAAAAAAAAAAAAAANIYW4AABAACAAA0ed4sgAAABEACAAA0rSORQAAAAEAGABaxPkAKGyWAChsiwAoZ3sAG14HAAKYXAACAFlNYWNpbnRvc2ggSEQ6VXNlcnM6AGdyYW50ZjoAQ2xvdWRTdGF0aW9uOgBmaXJsX2xpYnJhcnk6AGZpcmxfbGlicmFyeV9maWxlczoASGFuOgAyMDA2LnBkZgAADgASAAgAMgAwADAANgAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIARlVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9IYW4vMjAwNi5wZGYAEwABLwAAFQACAA3//wAAAAgADQAaACQAZgAAAAAAAAIBAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAIo}, Booktitle = {Monthly Weather Review}, Da = {2006/02/01}, Date-Added = {2016-05-20 17:11:17 +0000}, @@ -2682,11 +2774,11 @@ @article{han_and_pan_2006 Url = {http://dx.doi.org/10.1175/MWR3090.1}, Volume = {134}, Year = {2006}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxA/Li4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvSGFuLzIwMDYucGRmTxEBvgAAAAABvgACAAAMTWFjaW50b3NoIEhEAAAAAAAAAAAAAAAAAAAA0eckUkgrAAAAWsT5CDIwMDYucGRmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABazFjStCvVAAAAAAAAAAAAAgAFAAAJIAAAAAAAAAAAAAAAAAAAAANIYW4AABAACAAA0ed4sgAAABEACAAA0rSORQAAAAEAGABaxPkAKGyWAChsiwAoZ3sAG14HAAKYXAACAFlNYWNpbnRvc2ggSEQ6VXNlcnM6AGdyYW50ZjoAQ2xvdWRTdGF0aW9uOgBmaXJsX2xpYnJhcnk6AGZpcmxfbGlicmFyeV9maWxlczoASGFuOgAyMDA2LnBkZgAADgASAAgAMgAwADAANgAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIARlVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9IYW4vMjAwNi5wZGYAEwABLwAAFQACAA3//wAAAAgADQAaACQAZgAAAAAAAAIBAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAIo}, Bdsk-Url-1 = {http://dx.doi.org/10.1175/MWR3090.1}} @article{businger_et_al_1971, - Author = {Businger, JA and Wyngaard, JC and Izumi, Y and Bradley, EF}, + Author = {Businger, J. A. and Wyngaard, J. C. and Izumi, Y. and Bradley, E. F.}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBELi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvQnVzaW5nZXIvMTk3MS5wZGZPEQHMAAAAAAHMAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAodUUIMTk3MS5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACh1cbTPIxwAAAAAAAAAAAACAAUAAAkgAAAAAAAAAAAAAAAAAAAACEJ1c2luZ2VyABAACAAA0ed4sgAAABEACAAAtM+FjAAAAAEAGAAodUUAKGyWAChsiwAoZ3sAG14HAAKYXAACAF5NYWNpbnRvc2ggSEQ6VXNlcnM6AGdyYW50ZjoAQ2xvdWRTdGF0aW9uOgBmaXJsX2xpYnJhcnk6AGZpcmxfbGlicmFyeV9maWxlczoAQnVzaW5nZXI6ADE5NzEucGRmAA4AEgAIADEAOQA3ADEALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAEtVc2Vycy9ncmFudGYvQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvQnVzaW5nZXIvMTk3MS5wZGYAABMAAS8AABUAAgAN//8AAAAIAA0AGgAkAGsAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACOw==}, Date-Added = {2016-05-20 17:10:50 +0000}, Date-Modified = {2018-07-18 18:58:08 +0000}, Isi = {A1971I822800004}, @@ -2699,11 +2791,10 @@ @article{businger_et_al_1971 Title = {Flux-profile relationships in the atmospheric surface layer}, Volume = {28}, Year = {1971}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBELi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvQnVzaW5nZXIvMTk3MS5wZGZPEQHMAAAAAAHMAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAodUUIMTk3MS5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACh1cbTPIxwAAAAAAAAAAAACAAUAAAkgAAAAAAAAAAAAAAAAAAAACEJ1c2luZ2VyABAACAAA0ed4sgAAABEACAAAtM+FjAAAAAEAGAAodUUAKGyWAChsiwAoZ3sAG14HAAKYXAACAF5NYWNpbnRvc2ggSEQ6VXNlcnM6AGdyYW50ZjoAQ2xvdWRTdGF0aW9uOgBmaXJsX2xpYnJhcnk6AGZpcmxfbGlicmFyeV9maWxlczoAQnVzaW5nZXI6ADE5NzEucGRmAA4AEgAIADEAOQA3ADEALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAEtVc2Vycy9ncmFudGYvQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvQnVzaW5nZXIvMTk3MS5wZGYAABMAAS8AABUAAgAN//8AAAAIAA0AGgAkAGsAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACOw==}, Bdsk-Url-1 = {http://ws.isiknowledge.com/cps/openurl/service?url_ver=Z39.88-2004&rft_id=info:ut/A1971I822800004}} @article{xu_and_randall_1996, - Author = {K-M. Xu and D. A. Randall}, + Author = {K.-M. Xu and D. A. Randall}, Date-Added = {2016-05-20 16:22:45 +0000}, Date-Modified = {2016-05-20 16:24:47 +0000}, Journal = {J. Atmos. Sci.}, @@ -2727,7 +2818,7 @@ @article{clough_et_al_1992 Year = {1992}} @techreport{chou_and_suarez_1999, - Author = {M.D. Chou and M. J. Suarez}, + Author = {M. D. Chou and M. J. Suarez}, Date-Added = {2016-05-20 15:27:31 +0000}, Date-Modified = {2016-05-20 15:30:02 +0000}, Institution = {NASA}, @@ -2737,7 +2828,7 @@ @techreport{chou_and_suarez_1999 Year = {1999}} @article{sato_et_al_1993, - Author = {M. Sato and J.E. Hansan and M. P. McCormick and J. B. Pollack}, + Author = {M. Sato and J. E. Hansan and M. P. McCormick and J. B. Pollack}, Date-Added = {2016-05-20 04:23:08 +0000}, Date-Modified = {2018-02-20 19:58:29 +0000}, Journal = {J. Geophys. Res.}, @@ -2755,7 +2846,7 @@ @article{chin_et_al_2000 Month = {October}, Number = {D20}, Pages = {24671-24687}, - Title = {Atmospheric sulfur cycle simulated in the global model GOCART: Model description and global properties}, + Title = {Atmospheric sulfur cycle simulated in the global model {GOCART}: Model description and global properties}, Volume = {105}, Year = {2000}} @@ -2765,17 +2856,17 @@ @article{hess_et_al_1998 Date-Modified = {2016-05-20 15:08:21 +0000}, Journal = {Bull. Am. Meteor. Soc.}, Pages = {831-844}, - Title = {Optical properties of aerosols and clouds: The software package OPAC.}, + Title = {Optical properties of aerosols and clouds: The software package {OPAC}}, Volume = {79}, Year = {1998}} @article{iacono_et_al_2000, - Author = {M.J. Iacono and E.J. Mlawer and S. A. Clough and J.-J. Morcrette}, + Author = {M. J. Iacono and E. J. Mlawer and S. A. Clough and J.-J. Morcrette}, Date-Added = {2016-05-20 03:45:26 +0000}, Date-Modified = {2016-05-20 15:08:59 +0000}, Journal = {J. Geophys. Res.}, Pages = {14873-14890}, - Title = {Impact of an improved longwave radiation model, RRTM, on the energy budget and thermodynamic properties of the NCAR community climate model, CCM3}, + Title = {Impact of an improved longwave radiation model, {RRTM}, on the energy budget and thermodynamic properties of the {NCAR} community climate model, {CCM3}}, Volume = {105}, Year = {2000}} @@ -2785,32 +2876,32 @@ @article{clough_et_al_2005 Date-Modified = {2016-05-20 15:10:30 +0000}, Journal = {J. Quant. Spectrosc. Radiat. Transfer}, Pages = {233-244}, - Title = {Atmospheric radiative transfer modeling: A summary of the AER codes}, + Title = {Atmospheric radiative transfer modeling: A summary of the {AER} codes}, Volume = {91}, Year = {2005}} @article{heymsfield_and_mcfarquhar_1996, - Author = {A.J. Heymsfield and G. M. McFarquhar}, + Author = {A. J. Heymsfield and G. M. McFarquhar}, Date-Added = {2016-05-20 03:35:53 +0000}, Date-Modified = {2016-05-24 17:35:50 +0000}, Journal = {J. Atmos. Sci.}, Pages = {2424-2451}, - Title = {High albedos of cirrus in the tropical Pacific warm pool: Microphysical interpretations from CEPEX and from Kwajalein, Marshall Islands}, + Title = {High albedos of cirrus in the tropical {P}acific warm pool: Microphysical interpretations from {CEPEX} and from {K}wajalein, {M}arshall {I}slands}, Volume = {53}, Year = {1996}} @article{mlawer_et_al_1997, - Author = {E.J. Mlawer and S.J. Taubman and P.D. Brown and M. J. Iacono and S. A. Clough}, + Author = {E. J. Mlawer and S. J. Taubman and P. D. Brown and M. J. Iacono and S. A. Clough}, Date-Added = {2016-05-20 03:32:32 +0000}, Date-Modified = {2016-05-20 15:12:05 +0000}, Journal = {J. Geophys. Res.}, Number = {16663-16682}, - Title = {Radiative transfer for inhomogenerous atmospheres: RRTM, a validated correlated-k model for the longwave}, + Title = {Radiative transfer for inhomogenerous atmospheres: {RRTM}, a validated correlated-k model for the longwave}, Volume = {102}, Year = {1997}} @article{Schwarzkopf_and_Fels_1991, - Author = {M.D. Schwarzkopf and S.B. Fels}, + Author = {M. D. Schwarzkopf and S. B. Fels}, Date-Added = {2016-05-20 03:29:16 +0000}, Date-Modified = {2016-05-20 15:12:19 +0000}, Journal = {J. Geophys. Res.}, @@ -2820,46 +2911,46 @@ @article{Schwarzkopf_and_Fels_1991 Year = {1991}} @article{briegleb_1992, - Author = {B.P. Briegleb}, + Author = {B. P. Briegleb}, Date-Added = {2016-05-20 03:09:50 +0000}, Date-Modified = {2016-05-20 15:12:27 +0000}, Journal = {J. Geophys. Res.}, Pages = {7603-7612}, - Title = {Delta-Eddington approximation for solar radiation in the NCAR community climate model}, + Title = {Delta-Eddington approximation for solar radiation in the {NCAR} community climate model}, Volume = {97}, Year = {1992}} @conference{alpert_et_al_1988, Address = {Baltimore, MD}, - Author = {J. Alpert and M. Kanamitsu and P.M. Caplan and J.G. Sela and G. H. White and E. Kalnay}, + Author = {J. C. Alpert and M. Kanamitsu and P. M. Caplan and J. G. Sela and G. H. White and E. Kalnay}, Date-Added = {2016-05-19 22:40:01 +0000}, Date-Modified = {2018-10-26 15:54:19 -0600}, Organization = {Eighth Conf. on Numerical Weather Prediction, Amer. Meteor. Soc.}, Pages = {726-733}, - Title = {Mountain induced gravity wave drag parameterization in the NMC medium-range forecast model}, + Title = {Mountain induced gravity wave drag parameterization in the {NMC} medium-range forecast model}, Year = {1988}} @conference{alpert_et_al_1996, Address = {Norfolk}, - Author = {J.C. Alpert and S-Y. Hong and Y-J. Kim}, + Author = {J. C. Alpert and S-Y. Hong and Y-J. Kim}, Date-Added = {2016-05-19 22:36:02 +0000}, Date-Modified = {2016-05-20 15:14:15 +0000}, Organization = {11 Conf. on NWP}, Pages = {322-323}, - Title = {Sensitivity of cyclogenesis to lower troposphere enhancement of gravity wave drag using the EMC MRF}, + Title = {Sensitivity of cyclogenesis to lower troposphere enhancement of gravity wave drag using the {EMC MRF}}, Year = {1996}} @conference{alpert_2006, - Author = {J.C. Alpert}, + Author = {J. C. Alpert}, Booktitle = {20th Conf. WAF/16 Conf. NWP}, Date-Added = {2016-05-19 21:24:23 +0000}, Date-Modified = {2016-05-20 15:14:34 +0000}, Number = {P2.4}, - Title = {Sub-grid scale mountain blocking at NCEP}, + Title = {Sub-grid scale mountain blocking at {NCEP}}, Year = {2006}} @article{ebert_and_curry_1992, - Author = {E.E. Ebert and J.A. Curry}, + Author = {E. E. Ebert and J. A. Curry}, Date-Added = {2016-05-19 21:19:00 +0000}, Date-Modified = {2016-05-20 15:12:43 +0000}, Journal = {J. Geophys. Res.}, @@ -2890,17 +2981,18 @@ @article{kim_and_arakawa_1995 @techreport{hou_et_al_2002, Author = {Y. Hou and S. Moorthi and K. Campana}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxAiLi4vLi4vemhhbmctbGliL2hvdV9ldF9hbF8yMDAyLnBkZk8RAdwAAAAAAdwAAgAADE1hY2ludG9zaCBIRAAAAAAAAAAAAAAAAAAAAM/T1mZIKwAAAFKkjRJob3VfZXRfYWxfMjAwMi5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUqai02OGCgAAAAAAAAAAAAIAAgAACSAAAAAAAAAAAAAAAAAAAAAJemhhbmctbGliAAAQAAgAAM/UKsYAAAARAAgAANNj2moAAAABABgAUqSNAE1lSgAj19QACTbFAAk2xAACZvkAAgBbTWFjaW50b3NoIEhEOlVzZXJzOgBtYW56aGFuZzoARG9jdW1lbnRzOgBNYW4uWmhhbmc6AGdtdGItZG9jOgB6aGFuZy1saWI6AGhvdV9ldF9hbF8yMDAyLnBkZgAADgAmABIAaABvAHUAXwBlAHQAXwBhAGwAXwAyADAAMAAyAC4AcABkAGYADwAaAAwATQBhAGMAaQBuAHQAbwBzAGgAIABIAEQAEgBIVXNlcnMvbWFuemhhbmcvRG9jdW1lbnRzL01hbi5aaGFuZy9nbXRiLWRvYy96aGFuZy1saWIvaG91X2V0X2FsXzIwMDIucGRmABMAAS8AABUAAgAP//8AAAAIAA0AGgAkAEkAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACKQ==}, Date-Added = {2016-05-19 19:52:22 +0000}, Date-Modified = {2016-05-20 15:14:59 +0000}, Institution = {NCEP}, Number = {441}, Title = {Parameterization of Solar Radiation Transfer}, Type = {office note}, - Year = {2002}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxAiLi4vLi4vemhhbmctbGliL2hvdV9ldF9hbF8yMDAyLnBkZk8RAdwAAAAAAdwAAgAADE1hY2ludG9zaCBIRAAAAAAAAAAAAAAAAAAAAM/T1mZIKwAAAFKkjRJob3VfZXRfYWxfMjAwMi5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUqai02OGCgAAAAAAAAAAAAIAAgAACSAAAAAAAAAAAAAAAAAAAAAJemhhbmctbGliAAAQAAgAAM/UKsYAAAARAAgAANNj2moAAAABABgAUqSNAE1lSgAj19QACTbFAAk2xAACZvkAAgBbTWFjaW50b3NoIEhEOlVzZXJzOgBtYW56aGFuZzoARG9jdW1lbnRzOgBNYW4uWmhhbmc6AGdtdGItZG9jOgB6aGFuZy1saWI6AGhvdV9ldF9hbF8yMDAyLnBkZgAADgAmABIAaABvAHUAXwBlAHQAXwBhAGwAXwAyADAAMAAyAC4AcABkAGYADwAaAAwATQBhAGMAaQBuAHQAbwBzAGgAIABIAEQAEgBIVXNlcnMvbWFuemhhbmcvRG9jdW1lbnRzL01hbi5aaGFuZy9nbXRiLWRvYy96aGFuZy1saWIvaG91X2V0X2FsXzIwMDIucGRmABMAAS8AABUAAgAP//8AAAAIAA0AGgAkAEkAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACKQ==}} + Year = {2002}} @article{hu_and_stamnes_1993, - Author = {Y.X. Hu and K. Stamnes}, + Author = {Y. X. Hu and K. Stamnes}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxAnLi4vLi4vemhhbmctbGliL2h1X2FuZF9zdGFtbmVzXzE5OTMucGRmTxEB8AAAAAAB8AACAAAMTWFjaW50b3NoIEhEAAAAAAAAAAAAAAAAAAAAz9PWZkgrAAAAUqSNF2h1X2FuZF9zdGFtbmVzXzE5OTMucGRmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABSpJHTY3R+AAAAAAAAAAAAAgACAAAJIAAAAAAAAAAAAAAAAAAAAAl6aGFuZy1saWIAABAACAAAz9QqxgAAABEACAAA02PI3gAAAAEAGABSpI0ATWVKACPX1AAJNsUACTbEAAJm+QACAGBNYWNpbnRvc2ggSEQ6VXNlcnM6AG1hbnpoYW5nOgBEb2N1bWVudHM6AE1hbi5aaGFuZzoAZ210Yi1kb2M6AHpoYW5nLWxpYjoAaHVfYW5kX3N0YW1uZXNfMTk5My5wZGYADgAwABcAaAB1AF8AYQBuAGQAXwBzAHQAYQBtAG4AZQBzAF8AMQA5ADkAMwAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIATVVzZXJzL21hbnpoYW5nL0RvY3VtZW50cy9NYW4uWmhhbmcvZ210Yi1kb2MvemhhbmctbGliL2h1X2FuZF9zdGFtbmVzXzE5OTMucGRmAAATAAEvAAAVAAIAD///AAAACAANABoAJABOAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAkI=}, Date-Added = {2016-05-19 19:31:56 +0000}, Date-Modified = {2016-05-20 15:13:12 +0000}, Journal = {J. Climate}, @@ -2908,11 +3000,10 @@ @article{hu_and_stamnes_1993 Pages = {728-742}, Title = {An accurate parameterization of the radiative properties of water clouds suitable for use in climate models}, Volume = {6}, - Year = {1993}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxAnLi4vLi4vemhhbmctbGliL2h1X2FuZF9zdGFtbmVzXzE5OTMucGRmTxEB8AAAAAAB8AACAAAMTWFjaW50b3NoIEhEAAAAAAAAAAAAAAAAAAAAz9PWZkgrAAAAUqSNF2h1X2FuZF9zdGFtbmVzXzE5OTMucGRmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABSpJHTY3R+AAAAAAAAAAAAAgACAAAJIAAAAAAAAAAAAAAAAAAAAAl6aGFuZy1saWIAABAACAAAz9QqxgAAABEACAAA02PI3gAAAAEAGABSpI0ATWVKACPX1AAJNsUACTbEAAJm+QACAGBNYWNpbnRvc2ggSEQ6VXNlcnM6AG1hbnpoYW5nOgBEb2N1bWVudHM6AE1hbi5aaGFuZzoAZ210Yi1kb2M6AHpoYW5nLWxpYjoAaHVfYW5kX3N0YW1uZXNfMTk5My5wZGYADgAwABcAaAB1AF8AYQBuAGQAXwBzAHQAYQBtAG4AZQBzAF8AMQA5ADkAMwAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIATVVzZXJzL21hbnpoYW5nL0RvY3VtZW50cy9NYW4uWmhhbmcvZ210Yi1kb2MvemhhbmctbGliL2h1X2FuZF9zdGFtbmVzXzE5OTMucGRmAAATAAEvAAAVAAIAD///AAAACAANABoAJABOAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAkI=}} + Year = {1993}} @article{alexander_et_al_2010, - Author = {Alexander, M. J. and Geller, M. and McLandress, C. and Polavarapu, S. and Preusse, P. and Sassi, F. and Sato, K. and Eckermann, S. and Ern, M. and Hertzog, A. and Kawatani, Y. and Pulido, M. and Shaw, T. A. and Sigmond, M. and Vincent, R. and Watanabe, S.}, + Author = {Alexander, M. J. and Geller, M. and McLandress, C. and et al.}, Doi = {10.1002/qj.637}, Eprint = {https://rmets.onlinelibrary.wiley.com/doi/pdf/10.1002/qj.637}, Journal = {Quarterly Journal of the Royal Meteorological Society}, @@ -2956,7 +3047,7 @@ @article{weinstock_1984 Bdsk-Url-2 = {http://dx.doi.org/10.1029/JA089iA01p00345}} @article{holton_1983, - Author = {Holton, James R.}, + Author = {Holton, J. R.}, Doi = {10.1175/1520-0469(1983)040<2497:TIOGWB>2.0.CO;2}, Eprint = {https://doi.org/10.1175/1520-0469(1983)040<2497:TIOGWB>2.0.CO;2}, Journal = {Journal of the Atmospheric Sciences}, @@ -2970,7 +3061,7 @@ @article{holton_1983 Bdsk-Url-2 = {http://dx.doi.org/10.1175/1520-0469(1983)040%3C2497:TIOGWB%3E2.0.CO;2}} @article{geller_et_al_2013, - Author = {Geller, M. A. and Alexander, M. Joan and Love, P. T. and Bacmeister, J. and Ern, M. and Hertzog, A. and Manzini, E. and Preusse, P. and Sato, K. and Scaife, A. A. and Zhou, T.}, + Author = {Geller, M. A. and Alexander, M. J. and Love, P. T. and et al.}, Doi = {10.1175/JCLI-D-12-00545.1}, Eprint = {https://doi.org/10.1175/JCLI-D-12-00545.1}, Journal = {Journal of Climate}, @@ -2998,23 +3089,23 @@ @article{garcia_et_al_2017 Bdsk-Url-2 = {http://dx.doi.org/10.1175/JAS-D-16-0104.1}} @inproceedings{yudin_et_al_2016, - Author = {Yudin, V.A. and Akmaev, R.A. and Fuller-Rowell, T.J. and Alpert, J.C.}, + Author = {Yudin, V. A. and Akmaev, R. A. and Fuller-Rowell, T. J. and Alpert, J. C.}, Booktitle = {International SPARC Gravity Wave Symposium}, Number = {1}, Pages = {012024}, - Title = {Gravity wave physics in the NOAA Environmental Modeling System}, + Title = {Gravity wave physics in the {NOAA} Environmental Modeling System}, Volume = {48}, Year = {2016}} @inproceedings{alpert_et_al_2018, - Author = {Alpert, Jordan C and Yudin, Valery and Fuller-Rowell, Tim and Akmaev, Rashid A}, + Author = {Alpert, J. C. and Yudin, V. A. and Fuller-Rowell, T. J. and Akmaev, R. A.}, Booktitle = {98th American Meteorological Society Annual Meeting}, Organization = {AMS}, - Title = {Integrating Unified Gravity Wave Physics Research into the Next Generation Global Prediction System for NCEP Research to Operations}, + Title = {Integrating Unified Gravity Wave Physics Research into the Next Generation Global Prediction System for {NCEP} Research to Operations}, Year = {2018}} @article{eckermann_2011, - Author = {Eckermann, Stephen D.}, + Author = {Eckermann, S. D.}, Doi = {10.1175/2011JAS3684.1}, Eprint = {https://doi.org/10.1175/2011JAS3684.1}, Journal = {Journal of the Atmospheric Sciences}, @@ -3042,22 +3133,22 @@ @article{lott_et_al_2012 Bdsk-Url-2 = {http://dx.doi.org/10.1029/2012GL051001}} @conference{yudin_et_al_2018, - Author = {Yudin, V. A and Akmaev, R. A. and Alpert, J. C. and Fuller-Rowell T. J., and Karol S. I.}, + Author = {Yudin, V. A. and Akmaev, R. A. and Alpert, J. C. and Fuller-Rowell T. J., and Karol S. I.}, Booktitle = {25th Conference on Numerical Weather Prediction}, Date-Added = {2018-06-04 10:50:44 -0600}, Date-Modified = {2018-06-04 10:54:39 -0600}, Editor = {Am. Meteorol. Soc.}, - Title = {Gravity Wave Physics and Dynamics in the FV3-based Atmosphere Models Extended into the Mesosphere}, + Title = {Gravity Wave Physics and Dynamics in the {FV3}-based Atmosphere Models Extended into the Mesosphere}, Year = {2018}} @article{hines_1997, - Author = {Colin O. Hines}, + Author = {C. O. Hines}, Doi = {https://doi.org/10.1016/S1364-6826(96)00080-6}, Issn = {1364-6826}, Journal = {Journal of Atmospheric and Solar-Terrestrial Physics}, Number = {4}, Pages = {387 - 400}, - Title = {Doppler-spread parameterization of gravity-wave momentum deposition in the middle atmosphere. Part 2: Broad and quasi monochromatic spectra, and implementation}, + Title = {Doppler-spread parameterization of gravity-wave momentum deposition in the middle atmosphere. {P}art {II}: Broad and quasi monochromatic spectra, and implementation}, Url = {http://www.sciencedirect.com/science/article/pii/S1364682696000806}, Volume = {59}, Year = {1997}, @@ -3079,7 +3170,7 @@ @article{alexander_and_dunkerton_1999 Bdsk-Url-2 = {http://dx.doi.org/10.1175/1520-0469(1999)056%3C4167:ASPOMF%3E2.0.CO;2}} @article{scinocca_2003, - Author = {Scinocca, John F.}, + Author = {Scinocca, J. F.}, Doi = {10.1175/1520-0469(2003)060<0667:AASNGW>2.0.CO;2}, Eprint = {https://doi.org/10.1175/1520-0469(2003)060<0667:AASNGW>2.0.CO;2}, Journal = {Journal of the Atmospheric Sciences}, @@ -3093,7 +3184,7 @@ @article{scinocca_2003 Bdsk-Url-2 = {http://dx.doi.org/10.1175/1520-0469(2003)060%3C0667:AASNGW%3E2.0.CO;2}} @article{shaw_and_shepherd_2009, - Author = {Shaw, Tiffany A. and Shepherd, Theodore G.}, + Author = {Shaw, T. A. and Shepherd, T. G.}, Doi = {10.1175/2009JAS3051.1}, Eprint = {https://doi.org/10.1175/2009JAS3051.1}, Journal = {Journal of the Atmospheric Sciences}, @@ -3112,7 +3203,7 @@ @article{molod_et_al_2015 Journal = {Geoscientific Model Development}, Number = {5}, Pages = {1339--1356}, - Title = {Development of the GEOS-5 atmospheric general circulation model: evolution from MERRA to MERRA2}, + Title = {Development of the {GEOS-5} atmospheric general circulation model: evolution from {MERRA} to {MERRA2}}, Url = {https://www.geosci-model-dev.net/8/1339/2015/}, Volume = {8}, Year = {2015}, @@ -3120,7 +3211,7 @@ @article{molod_et_al_2015 Bdsk-Url-2 = {http://dx.doi.org/10.5194/gmd-8-1339-2015}} @article{richter_et_al_2010, - Author = {Richter, Jadwiga H. and Sassi, Fabrizio and Garcia, Rolando R.}, + Author = {Richter, J. H. and Sassi, F. and Garcia, R. R.}, Doi = {10.1175/2009JAS3112.1}, Eprint = {https://doi.org/10.1175/2009JAS3112.1}, Journal = {Journal of the Atmospheric Sciences}, @@ -3134,14 +3225,14 @@ @article{richter_et_al_2010 Bdsk-Url-2 = {http://dx.doi.org/10.1175/2009JAS3112.1}} @article{richter_et_al_2014, - Author = {Richter, Jadwiga H. and Solomon, Abraham and Bacmeister, Julio T.}, + Author = {Richter, J. H. and Solomon, A. and Bacmeister, J. T.}, Doi = {10.1002/2013MS000303}, Eprint = {https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1002/2013MS000303}, Journal = {Journal of Advances in Modeling Earth Systems}, Keywords = {climate modeling, vertical resolution, modeling, climate, global circulation model, general circulation model}, Number = {2}, Pages = {357-383}, - Title = {Effects of vertical resolution and nonorographic gravity wave drag on the simulated climate in the Community Atmosphere Model, version 5}, + Title = {Effects of vertical resolution and nonorographic gravity wave drag on the simulated climate in the {C}ommunity {A}tmosphere {M}odel, version 5}, Url = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1002/2013MS000303}, Volume = {6}, Year = {2014}, @@ -3149,13 +3240,14 @@ @article{richter_et_al_2014 Bdsk-Url-2 = {http://dx.doi.org/10.1002/2013MS000303}} @article{gelaro_et_al_2017, - Author = {Gelaro, et al.}, + Author = {R. Gelaro and W. McCarty and M. J. Suarez and R. Todling and et al.}, + Date-Modified = {2021-02-03 21:24:37 +0000}, Doi = {10.1175/JCLI-D-16-0758.1}, Eprint = {https://doi.org/10.1175/JCLI-D-16-0758.1}, Journal = {Journal of Climate}, Number = {14}, Pages = {5419-5454}, - Title = {The Modern-Era Retrospective Analysis for Research and Applications, Version 2 (MERRA-2)}, + Title = {The {M}odern-{E}ra {R}etrospective {A}nalysis for {R}esearch and {A}pplications, {V}ersion 2 ({MERRA-2})}, Url = {https://doi.org/10.1175/JCLI-D-16-0758.1}, Volume = {30}, Year = {2017}, @@ -3177,7 +3269,7 @@ @article{garcia_et_al_2007 Bdsk-Url-2 = {http://dx.doi.org/10.1029/2006JD007485}} @article{eckermann_et_al_2009, - Author = {Stephen D. Eckermann and Karl W. Hoppel and Lawrence Coy and John P. McCormack and David E. Siskind and Kim Nielsen and Andrew Kochenash and Michael H. Stevens and Christoph R. Englert and Werner Singer and Mark Hervig}, + Author = {Eckermann, S. D. and K. W. Hoppel and L. Coy and J. P. McCormack and D. E. Siskind and K. Nielsen and A. Kochenash and M. H. Stevens and C. R. Englert and W. Singer and M. Hervig}, Doi = {https://doi.org/10.1016/j.jastp.2008.09.036}, Issn = {1364-6826}, Journal = {Journal of Atmospheric and Solar-Terrestrial Physics}, @@ -3193,7 +3285,7 @@ @article{eckermann_et_al_2009 Bdsk-Url-2 = {https://doi.org/10.1016/j.jastp.2008.09.036}} @inproceedings{alpert_et_al_2019, - Author = {Alpert, Jordan C and Yudin, Valery A and Strobach, Edward}, + Author = {Alpert, J. C. and Yudin, V. A. and Strobach, E.}, Booktitle = {AGU Fall Meeting 2019}, Organization = {AGU}, Title = {Atmospheric Gravity Wave Sources Correlated with Resolved-scale GW Activity and Sub-grid Scale Parameterization in the FV3gfs Model}, @@ -3205,7 +3297,7 @@ @article{ern_et_al_2018 Journal = {Earth System Science Data}, Number = {2}, Pages = {857--892}, - Title = {GRACILE: a comprehensive climatology of atmospheric gravity wave parameters based on satellite limb soundings}, + Title = {{GRACILE}: a comprehensive climatology of atmospheric gravity wave parameters based on satellite limb soundings}, Url = {https://www.earth-syst-sci-data.net/10/857/2018/}, Volume = {10}, Year = {2018}, @@ -3213,48 +3305,22 @@ @article{ern_et_al_2018 Bdsk-Url-2 = {http://dx.doi.org/10.5194/essd-10-857-2018}} @inproceedings{yudin_et_al_2019, - Author = {Yudin V.A. , S. I. Karol, R.A. Akmaev, T. Fuller-Rowell, D. Kleist, A. Kubaryk, and C. Thompson}, + Author = {Yudin, V. A. and S. I. Karol and R. A. Akmaev and et al.}, Booktitle = {Space Weather Workshop}, Title = {Longitudinal Variability of Wave Dynamics in Weather Models Extended into the Mesosphere and Thermosphere}, Year = {2019}} -@article{kim_and_doyle_2005, - Author = {Y.-J. Kim and J.D. Arakawa}, - Doi = {10.1256/qj.04.160}, - Url = {https://doi.org/10.1256/qj.04.160}, - Journal = {Quarterly Journal of the Royal Meteorological Society}, - Pages = {1893-1921}, - Title = {Extension of an orographic-drag parametrization scheme to incorporate orographic inisotropy and flow blocking}, - Volume = {131}, - Year = {2005}} - -@article{steeneveld_et_al_2008, - Author = {Steeneveld, G. J.,A.A. M. Holtslag, C. J. Nappo, B. J. H. van de Wiel, and L. Mahrt}, - Doi = {10.1175/2008JAMC1816.1}, - Url = {https://doi.org/10.1175/2008JAMC1816.1}, - Journal = {J. Appl. Meteor.}, - Pages = {2518-2530}, - Title = {Exploring the possible role of small-scale terrain drag on stable boundary layers over land}, - Volume = {47}, - Year = {2008}} - -@article{tsiringakis_et_al_2017, - Author = {Tsiringakis,A., G. J. Steeneveld, and A.A. M. Holtslag}, - Doi = {10.1002/qj.3021}, - Url = {https://doi.org/10.1002/qj.3021}, - Journal = {Quarterly Journal of the Royal Meteorological Society}, - Pages = {1504-1516}, - Title = {Small-scale orographic gravity wave drag in stable boundary layers and its impact on synoptic systems and near-surface meteorology}, - Volume = {143}, - Year = {2017}} - -@article{beljaars_et_al_2004, - Author = {Beljaars, A.C.M., A.R.Brown, and N.Wood}, - Doi = {10.1256/qj.03.73}, - Url = {https://doi.org/10.1256/qj.03.73}, - Journal = {Quarterly Journal of the Royal Meteorological Society}, - Pages = {1327-1347}, - Title = {A new parametrization of turbulent orographic form drag}, - Volume = {130}, - Year = {2004}} - +@comment{BibDesk Static Groups{ + + + + + + group name + Group + keys + + + + +}} diff --git a/physics/docs/pdftxt/CPT_adv_suite.txt b/physics/docs/pdftxt/CPT_adv_suite.txt index 26d514d51..bc34cc1e6 100644 --- a/physics/docs/pdftxt/CPT_adv_suite.txt +++ b/physics/docs/pdftxt/CPT_adv_suite.txt @@ -18,13 +18,12 @@ The csawmg physics suite uses the parameterizations in the following order: - \ref GFS_SAMFshal - \ref CPT_MG3 - \ref mod_cs_conv_aw_adj - - \ref GFS_CALPRECIPTYPE \section sdf_cpt_suite Suite Definition File \code - + @@ -87,9 +86,9 @@ The csawmg physics suite uses the parameterizations in the following order: GFS_suite_stateout_update ozphys_2015 h2ophys - GFS_DCNV_generic_pre get_phi_fv3 GFS_suite_interstitial_3 + GFS_DCNV_generic_pre cs_conv_pre cs_conv cs_conv_post @@ -106,6 +105,7 @@ The csawmg physics suite uses the parameterizations in the following order: cs_conv_aw_adj GFS_MP_generic_post maximum_hourly_diagnostics + phys_tend diff --git a/physics/docs/pdftxt/CU_GF_deep.txt b/physics/docs/pdftxt/CU_GF_deep.txt new file mode 100644 index 000000000..a17b58d07 --- /dev/null +++ b/physics/docs/pdftxt/CU_GF_deep.txt @@ -0,0 +1,48 @@ +/** +\page CU_GF Grell-Freitas Scale and Aerosol Aware Convection Scheme +\section gfcu_descrip Description + +The Grell-Freitas (GF) scheme as described in Grell and Freitas (2014, GF1) \cite grell_and_freitas_2014 and +Freitas et al. (2018, FG) \cite freitas_et_al_2018 follow the mass flux approach published by Grell (1993) \cite grell_1993. +Further developments by Grell and \f$D\acute{e}v\acute{e}nyi\f$ (2002) \cite Grell_2002 included implementing +stochastics through allowing parameter perturbations. In GF1 scale awareness, and the aerosol dependence through rain generation (following +Berry (1968) \cite berry_1968 and evaporation formulations (following Jiang et al. (2010) \cite Jiang_2010 ), depending on the +cloud concentration nuclei at cloud base were added. FG included mixed phase physics impact, momentum transport (as in ECMWF), + a diurnal cycle closure (Bechtold et al. (2014) \cite bechtold_et_al_2014 ), and a trimodal spectral size to simulate the interaction +and transition from shallow, congestus and deep convection regimes. The vertical massflux distribution of shallow, congestus and +deep convection regimes is characterized by Probability Density Functions (PDF's). The three PDF's are meant to represent the average +statistical mass flux characteristic of deep, congestus, and shallow (respectively) plumes in the grid area. Each PDF therefore represents +a spectrum of plumes within the grid box. Forcing is different for each characteristic type. Entrainment and detrainment are derived +from the PDF's. The deep convection considers scale awareness (Arakawa et al. (2011) \cite Arakawa_2011 ), the congestus type convection +as well as the shallow convection are not scale-aware. Aerosol dependence is implemented through dependence of rain generation and +evaporation formulations depending on the cloud concentration nuclei at cloud base. Aerosol dependence is considered experimental and +is turned off at this point. GF is able to transport tracers. + +A paper describing the latest changes and modifications is in progress and will be submitted to GMD. + +\b Operational \b Impacts \b in \b RAP/HRRR + + - Uses mass-flux schemes, which are more physically realistic than (sounding) adjustment schemes + - Takes parameterization uncertainty into account by allowing parameters from multiple convective schemes which can be perturbed +internally or with temporal and spatial correlation patterns + - For higher resolutions (less than 10 km), in addition to scale awareness as in Arakawa et al. (2011) \cite Arakawa_2011 GF can +transition as grid spacing decreases into a shallow convection scheme + - Coupled to the grid scale precipitation and radiation schemes through passing of diagnosed cloud liquid and ice from simulated +precipitating convective cloud and shallow convective clouds + +\section intra_rough_gf Intraphysics Communication +The GF scheme passes cloud hydrometeors to the grid-scale microphysics scheme (\ref THOMPSON ) through detrainment from each +convective cloud layer containing convective cloud. The detrained condensate interacts with short- and longwave radiation by +contributing to the "opaqueness" to radiation of each grid layer. Additionally, detrained condensate is added to any existing condensate, +to be treated by the complex grid-scale microphysics scheme. This allows for a crude emulation of stratiform precipitation regions +in the RAP. + +Additionally, the shallow convection and PBL schemes pass cloud information to the radiation scheme, which improved cloud/radiation +interaction and retention of the inversion typically found above mixed layers. + +\ref arg_table_cu_gf_driver_run + +\section gen_gfgsd General Algorithm +\ref gen_gf_driver + +*/ diff --git a/physics/docs/pdftxt/GFS_NOAHMP.txt b/physics/docs/pdftxt/GFS_NOAHMP.txt new file mode 100644 index 000000000..7a3636b5f --- /dev/null +++ b/physics/docs/pdftxt/GFS_NOAHMP.txt @@ -0,0 +1,27 @@ +/** +\page NoahMP GFS NoahMP Land Surface Model +\section des_noahmp Description + +This implementation of the NoahMP Land Surface Model (LSM) is adapted from the version implemented in WRF v3.7 with additions by NOAA EMC staff to work with the UFS Atmosphere model. Authoritative documentation of the NoahMP scheme can be accessed at the following links: + +[University of Texas at Austin NoahMP Documentation](http://www.jsg.utexas.edu/noah-mp "University of Texas at Austin NoahMP Documentation") + +[NCAR Research Application Laboratory NoahMP Documentation](https://ral.ucar.edu/solutions/products/noah-multiparameterization-land-surface-model-noah-mp-lsm "NCAR RAL NoahMP Documentation") + +A primary reference for the NoahMP LSM is Niu et al. (2011) \cite niu_et_al_2011. + +The CCPP interface to the NoahMP LSM is a driving software layer on top of the actual NoahMP LSM. During the run sequence, code organization is as follows: ++ \ref noahmpdrv_run() calls + + \ref transfer_mp_parameters() + + \ref noahmp_options() + + \ref noahmp_options_glacier() and noahmp_glacier() if over the ice vegetation type (glacier) + + \ref noahmp_sflx() if over other vegetation types + + \ref penman() + +Note that noahmp_glacer() and noahmp_sflx() are the actual NoahMP codes. + +\section intra_noahmp Intraphysics Communication + + GFS NoahMP LSM Driver (\ref arg_table_noahmpdrv_run) +\section gen_al_noahmp General Algorithm of Driver ++ \ref general_noahmpdrv +*/ diff --git a/physics/docs/pdftxt/GFS_UGWPv0.txt b/physics/docs/pdftxt/GFS_UGWPv0.txt index e6ea3b6f4..82cd06f68 100644 --- a/physics/docs/pdftxt/GFS_UGWPv0.txt +++ b/physics/docs/pdftxt/GFS_UGWPv0.txt @@ -1,5 +1,5 @@ /** -\page GFS_UGWP_v0 CIRES Unified Gravity Wave Physics Scheme - Version 0 +\page GFS_UGWP_v0 Unified Gravity Wave Physics Scheme - Version 0 \section des_UGWP Description Gravity waves (GWs) are generated by a variety of sources in the atmosphere diff --git a/physics/docs/pdftxt/GFSv15p2_suite.txt b/physics/docs/pdftxt/GFSv15p2_suite.txt index 944fd49f1..d79cab076 100644 --- a/physics/docs/pdftxt/GFSv15p2_suite.txt +++ b/physics/docs/pdftxt/GFSv15p2_suite.txt @@ -21,113 +21,269 @@ The GFS_v15p2 physics suite uses the parameterizations in the following order: - \ref GFS_SAMFdeep - \ref GFS_SAMFshal - \ref GFDL_cloud - - \ref GFS_CALPRECIPTYPE \section sdf_gfsv15p2 Suite Definition File -- For NEMSIO initialization data: \subpage suite_FV3_GFS_v15p2_xml +\code + + + + + + + fv_sat_adj + + + + + GFS_time_vary_pre + GFS_rrtmg_setup + GFS_rad_time_vary + GFS_phys_time_vary + + + + + GFS_suite_interstitial_rad_reset + GFS_rrtmg_pre + rrtmg_sw_pre + rrtmg_sw + rrtmg_sw_post + rrtmg_lw_pre + rrtmg_lw + rrtmg_lw_post + GFS_rrtmg_post + + + + + GFS_suite_interstitial_phys_reset + GFS_suite_stateout_reset + get_prs_fv3 + GFS_suite_interstitial_1 + GFS_surface_generic_pre + GFS_surface_composites_pre + dcyc2t3 + GFS_surface_composites_inter + GFS_suite_interstitial_2 + + + + sfc_diff + GFS_surface_loop_control_part1 + sfc_nst_pre + sfc_nst + sfc_nst_post + lsm_noah + sfc_sice + GFS_surface_loop_control_part2 + + + + GFS_surface_composites_post + sfc_diag + sfc_diag_post + GFS_surface_generic_post + GFS_PBL_generic_pre + hedmf + GFS_PBL_generic_post + GFS_GWD_generic_pre + cires_ugwp + cires_ugwp_post + GFS_GWD_generic_post + rayleigh_damp + GFS_suite_stateout_update + ozphys_2015 + h2ophys + get_phi_fv3 + GFS_suite_interstitial_3 + GFS_DCNV_generic_pre + samfdeepcnv + GFS_DCNV_generic_post + GFS_SCNV_generic_pre + samfshalcnv + GFS_SCNV_generic_post + GFS_suite_interstitial_4 + cnvc90 + GFS_MP_generic_pre + gfdl_cloud_microphys + GFS_MP_generic_post + maximum_hourly_diagnostics + + + + + GFS_stochastics + phys_tend + + + + +\endcode + \section gfs15p2_nml_opt_des Namelist -- \b &gfs_physics_nml -\n \c fhzero = 6 -\n \c h2o_phys = .true. -\n \c ldiag3d = .false. -\n \c fhcyc = 24 -\n \c use_ufo = .true. -\n \c pre_rad = .false. -\n \c ncld = 5 -\n \c imp_physics = 11 -\n \c pdfcld = .false. -\n \c fhswr = 3600. -\n \c fhlwr = 3600. -\n \c ialb = 1 -\n \c iems = 1 -\n \c iaer = 111 -\n \c ico2 = 2 -\n \c isubc_sw = 2 -\n \c isubc_lw = 2 -\n \c isol = 2 -\n \c lwhtr = .true. -\n \c swhtr = .true. -\n \c cnvgwd = .true. -\n \c shal_cnv = .true. -\n \c cal_pre = .false. -\n \c redrag = .true. -\n \c dspheat = .true. -\n \c hybedmf = .true. -\n \c random_clds = .false. -\n \c trans_trac = .true. -\n \c cnvcld = .true. -\n \c imfshalcnv = 2 -\n \c imfdeepcnv = 2 -\n \c cdmbgwd = 3.5,0.25 [1.0,1.2] [0.2,2.5] [0.125,3.0] ! [C768] [C384] [C192] [C96]L64 -\n \c prslrd0 = 0. -\n \c ivegsrc = 1 -\n \c isot = 1 -\n \c debug = .false. -\n \c oz_phys = .F. -\n \c oz_phys_2015 = .T. -\n \c nstf_name = @[NSTF_NAME] -\n \c nst_anl = .true. -\n \c psautco = 0.0008,0.0005 -\n \c prautco = 0.00015,0.00015 -\n \c lgfdlmprad = .true. -\n \c effr_in = .true. -\n \c do_sppt = .false. -\n \c do_shum = .false. -\n \c do_skeb = .false. -\n \c do_sfcperts = .false. - -- \b &gfdl_cloud_microphysics_nml -\n \c sedi_transport = .true. -\n \c do_sedi_heat = .false. -\n \c rad_snow = .true. -\n \c rad_graupel = .true. -\n \c rad_rain = .true. -\n \c const_vi = .F. -\n \c const_vs = .F. -\n \c const_vg = .F. -\n \c const_vr = .F. -\n \c vi_max = 1. -\n \c vs_max = 2. -\n \c vg_max = 12. -\n \c vr_max = 12. -\n \c qi_lim = 1. -\n \c prog_ccn = .false. -\n \c do_qa = .true. -\n \c fast_sat_adj = .true. -\n \c tau_l2v = 225. -\n \c tau_v2l = 150. -\n \c tau_g2v = 900. -\n \c rthresh = 10.e-6 -\n \c dw_land = 0.16 -\n \c dw_ocean = 0.10 -\n \c ql_gen = 1.0e-3 -\n \c ql_mlt = 1.0e-3 -\n \c qi0_crt = 8.0E-5 -\n \c qs0_crt = 1.0e-3 -\n \c tau_i2s = 1000. -\n \c c_psaci = 0.05 -\n \c c_pgacs = 0.01 -\n \c rh_inc = 0.30 -\n \c rh_inr = 0.30 -\n \c rh_ins = 0.30 -\n \c ccn_l = 300. -\n \c ccn_o = 100. -\n \c c_paut = 0.5 -\n \c c_cracw = 0.8 -\n \c use_ppm = .false. -\n \c use_ccn = .true. -\n \c mono_prof = .true. -\n \c z_slope_liq = .true. -\n \c z_slope_ice = .true. -\n \c de_ice = .false. -\n \c fix_negative = .true. -\n \c icloud_f = 1 -\n \c mp_time = 150. - -\note nstf_name = \f$[2,0,0,0,0]^1 [2,1,0,0,0]^2 \f$ -- \f$^1\f$ NSST is on and coupled with spin up off -- \f$^2\f$ NSST is on and coupled with spin up on +\code +&gfs_physics_nml + cdmbgwd = 3.5,0.25 + cal_pre = .false. + cnvcld = .true. + cnvgwd = .true. + debug = .false. + do_myjpbl = .false. + do_myjsfc = .false. + do_sfcperts = .false. + do_shum = .false. + do_skeb = .false. + do_sppt = .false. + do_tofd = .false. + do_ugwp = .false. + do_ysu = .false. + dspheat = .true. + effr_in = .true. + fhcyc = 0.0 + fhlwr = 3600.0 + fhswr = 3600.0 + fhzero = 6.0 + h2o_phys = .true. + hybedmf = .true. + iaer = 111 + ialb = 1 + iau_inc_files = '' + ico2 = 2 + iems = 1 + imfdeepcnv = 2 + imfshalcnv = 2 + imp_physics = 11 + iopt_alb = 2 + iopt_btr = 1 + iopt_crs = 1 + iopt_dveg = 2 + iopt_frz = 1 + iopt_inf = 1 + iopt_rad = 1 + iopt_run = 1 + iopt_sfc = 1 + iopt_snf = 4 + iopt_stc = 1 + iopt_tbot = 2 + isol = 2 + isot = 1 + isubc_lw = 2 + isubc_sw = 2 + ivegsrc = 1 + ldiag3d = .false. + ldiag_ugwp = .false. + lgfdlmprad = .true. + lheatstrg = .false. + lsm = 1 + lwhtr = .true. + ncld = 5 + nsradar_reset = 3600 + nst_anl = .true. + nstf_name* = 2, 1, 0, 0, 0 + oz_phys = .false. + oz_phys_2015 = .true. + pdfcld = .false. + pre_rad = .false. + prslrd0 = 0.0 + random_clds = .false. + redrag = .true. + satmedmf = .false. + shal_cnv = .true. + shinhong = .false. + swhtr = .true. + trans_trac = .true. + use_ufo = .true. + xkzm_h = 1.0 + xkzm_m = 1.0 + xkzminv = 0.3 +/ + +&gfdl_cloud_microphysics_nml + sedi_transport = .true. + do_sedi_heat = .false. + rad_snow = .true. + rad_graupel = .true. + rad_rain = .true. + const_vi = .F. + const_vs = .F. + const_vg = .F. + const_vr = .F. + vi_max = 1. + vs_max = 2. + vg_max = 12. + vr_max = 12. + qi_lim = 1. + prog_ccn = .false. + do_qa = .true. + fast_sat_adj = .true. + tau_l2v = 225. + tau_v2l = 150. + tau_g2v = 900. + rthresh = 1e-05 + dw_land = 0.16 + dw_ocean = 0.10 + ql_gen = 1.0e-3 + ql_mlt = 1.0e-3 + qi0_crt = 8.0E-5 + qs0_crt = 1.0e-3 + tau_i2s = 1000. + c_psaci = 0.05 + c_pgacs = 0.01 + rh_inc = 0.30 + rh_inr = 0.30 + rh_ins = 0.30 + ccn_l = 300. + ccn_o = 100. + c_paut = 0.5 + c_cracw = 0.8 + use_ppm = .false. + use_ccn = .true. + mono_prof = .true. + z_slope_liq = .true. + z_slope_ice = .true. + de_ice = .false. + fix_negative = .true. + icloud_f = 1 + mp_time = 90. + +/ + +&cires_ugwp_nml + knob_ugwp_azdir = 2, 4, 4, 4 + knob_ugwp_doaxyz = 1 + knob_ugwp_doheat = 1 + knob_ugwp_dokdis = 1 + knob_ugwp_effac = 1, 1, 1, 1 + knob_ugwp_ndx4lh = 1 + knob_ugwp_solver = 2 + knob_ugwp_source = 1, 1, 0, 0 + knob_ugwp_stoch = 0, 0, 0, 0 + knob_ugwp_version = 0 + knob_ugwp_wvspec = 1, 25, 25, 25 + launch_level = 25 +/ + +&nam_sfcperts + iseed_sfc = 0 + nsfcpert = 6 + pertalb = -999.0 + pertlai = -999.0 + pertshc = -999.0 + pertvegf = -999.0 + pertz0 = -999.0 + pertzt = -999.0 + sfc_lscale = 500000 + sfc_tau = 21600 + sppt_land = .false. +/ + + +\endcode + +- nstf_name = \f$[2,0,0,0,0]^1 [2,1,0,0,0]^2 \f$ + - \f$^1\f$ NSST is on and coupled with spin up off + - \f$^2\f$ NSST is on and coupled with spin up on */ diff --git a/physics/docs/pdftxt/GFSv16beta_suite.txt b/physics/docs/pdftxt/GFSv16beta_suite.txt index 8389d0c40..eac420cd0 100644 --- a/physics/docs/pdftxt/GFSv16beta_suite.txt +++ b/physics/docs/pdftxt/GFSv16beta_suite.txt @@ -24,153 +24,252 @@ The GFS_v16beta physics suite uses the parameterizations in the following order: - \ref GFS_SAMFdeep - \ref GFS_SAMFshal - \ref GFDL_cloud - - \ref GFS_CALPRECIPTYPE \section sdf_gfsv16b Suite Definition File -- For NEMSIO initialization data: \subpage suite_FV3_GFS_v16beta_xml +\code + + + + + + + fv_sat_adj + + + + + GFS_time_vary_pre + GFS_rrtmg_setup + GFS_rad_time_vary + GFS_phys_time_vary + + + + + GFS_suite_interstitial_rad_reset + GFS_rrtmg_pre + rrtmg_sw_pre + rrtmg_sw + rrtmg_sw_post + rrtmg_lw_pre + rrtmg_lw + rrtmg_lw_post + GFS_rrtmg_post + + + + + GFS_suite_interstitial_phys_reset + GFS_suite_stateout_reset + get_prs_fv3 + GFS_suite_interstitial_1 + GFS_surface_generic_pre + GFS_surface_composites_pre + dcyc2t3 + GFS_surface_composites_inter + GFS_suite_interstitial_2 + + + + sfc_diff + GFS_surface_loop_control_part1 + sfc_nst_pre + sfc_nst + sfc_nst_post + lsm_noah + sfc_sice + GFS_surface_loop_control_part2 + + + + GFS_surface_composites_post + sfc_diag + sfc_diag_post + GFS_surface_generic_post + GFS_PBL_generic_pre + satmedmfvdifq + GFS_PBL_generic_post + GFS_GWD_generic_pre + cires_ugwp + cires_ugwp_post + GFS_GWD_generic_post + rayleigh_damp + GFS_suite_stateout_update + ozphys_2015 + h2ophys + GFS_DCNV_generic_pre + get_phi_fv3 + GFS_suite_interstitial_3 + samfdeepcnv + GFS_DCNV_generic_post + GFS_SCNV_generic_pre + samfshalcnv + GFS_SCNV_generic_post + GFS_suite_interstitial_4 + cnvc90 + GFS_MP_generic_pre + gfdl_cloud_microphys + GFS_MP_generic_post + maximum_hourly_diagnostics + + + + + GFS_stochastics + + + + +\endcode -\section gfs16beta_nml_opt_des Namelist -- \b &gfs_physics_nml -\n \c fhzero = 6 -\n \c h2o_phys = .true. -\n \c ldiag3d = .false. -\n \c fhcyc = 24 -\n \c use_ufo = .true. -\n \c pre_rad = .false. -\n \c ncld = 5 -\n \c imp_physics = 11 -\n \c pdfcld = .false. -\n \c fhswr = 3600. -\n \c fhlwr = 3600. -\n \c ialb = 1 -\n \c iems = 1 -\n \c iaer = 5111 -\n \c icliq_sw = 2 -\n \c iovr_lw = 3 -\n \c iovr_sw = 3 -\n \c ico2 = 2 -\n \c isubc_sw = 2 -\n \c isubc_lw = 2 -\n \c isol = 2 -\n \c lwhtr = .true. -\n \c swhtr = .true. -\n \c cnvgwd = .true. -\n \c shal_cnv = .true. -\n \c cal_pre = .false. -\n \c redrag = .true. -\n \c dspheat = .true. -\n \c hybedmf = .false. -\n \c satmedmf = .true. -\n \c isatmedmf = 1 -\n \c lheatstrg = .true. -\n \c random_clds = .false. -\n \c trans_trac = .true. -\n \c cnvcld = .true. -\n \c imfshalcnv = 2 -\n \c imfdeepcnv = 2 -\n \c cdmbgwd = 4.0,0.15,1.0,1.0 [1.1,0.72,1.0,1.0] [0.23,1.5,1.0,1.0] [0.14,1.8,1.0,1.0] ! [C768] [C384] [C192] [C96]L64 -\n \c prslrd0 = 0. -\n \c ivegsrc = 1 -\n \c isot = 1 -\n \c lsoil = 4 -\n \c lsm = 1 -\n \c iopt_dveg = 1 -\n \c iopt_crs = 1 -\n \c iopt_btr = 1 -\n \c iopt_run = 1 -\n \c iopt_sfc = 1 -\n \c iopt_frz = 1 -\n \c iopt_inf = 1 -\n \c iopt_rad = 1 -\n \c iopt_alb = 2 -\n \c iopt_snf = 4 -\n \c iopt_tbot = 2 -\n \c iopt_stc = 1 -\n \c debug = .false. -\n \c oz_phys = .F. -\n \c oz_phys_2015 = .T. -\n \c nstf_name = @[NSTF_NAME] -\n \c nst_anl = .true. -\n \c psautco = 0.0008,0.0005 -\n \c prautco = 0.00015,0.00015 -\n \c lgfdlmprad = .true. -\n \c effr_in = .true. -\n \c ldiag_ugwp = .false. -\n \c do_ugwp = .false. -\n \c do_tofd = .true. -\n \c do_sppt = .false. -\n \c do_shum = .false. -\n \c do_skeb = .false. -\n \c do_sfcperts = .false. +\section gfs16beta_nml_opt_des Namelist + +\code +&gfs_physics_nml + fhzero = 6 + h2o_phys = .true. + ldiag3d = .false. + fhcyc = 24 + use_ufo = .true. + pre_rad = .false. + ncld = 5 + imp_physics = 11 + pdfcld = .false. + fhswr = 3600. + fhlwr = 3600. + ialb = 1 + iems = 1 + iaer = 5111 + icliq_sw = 2 + iovr_lw = 3 + iovr_sw = 3 + ico2 = 2 + isubc_sw = 2 + isubc_lw = 2 + isol = 2 + lwhtr = .true. + swhtr = .true. + cnvgwd = .true. + shal_cnv = .true. + cal_pre = .false. + redrag = .true. + dspheat = .true. + hybedmf = .false. + satmedmf = .true. + isatmedmf = 1 + lheatstrg = .true. + random_clds = .false. + trans_trac = .true. + cnvcld = .true. + imfshalcnv = 2 + imfdeepcnv = 2 + cdmbgwd = 4.0,0.15,1.0,1.0 + prslrd0 = 0. + ivegsrc = 1 + isot = 1 + lsoil = 4 + lsm = 1 + iopt_dveg = 1 + iopt_crs = 1 + iopt_btr = 1 + iopt_run = 1 + iopt_sfc = 1 + iopt_frz = 1 + iopt_inf = 1 + iopt_rad = 1 + iopt_alb = 2 + iopt_snf = 4 + iopt_tbot = 2 + iopt_stc = 1 + debug = .false. + oz_phys = .F. + oz_phys_2015 = .T. + nstf_name = @[NSTF_NAME] + nst_anl = .true. + psautco = 0.0008,0.0005 + prautco = 0.00015,0.00015 + lgfdlmprad = .true. + effr_in = .true. + ldiag_ugwp = .false. + do_ugwp = .false. + do_tofd = .true. + do_sppt = .false. + do_shum = .false. + do_skeb = .false. + do_sfcperts = .false. +/ -- \b &gfdl_cloud_microphysics_nml -\n \c sedi_transport = .true. -\n \c do_sedi_heat = .false. -\n \c rad_snow = .true. -\n \c rad_graupel = .true. -\n \c rad_rain = .true. -\n \c const_vi = .F. -\n \c const_vs = .F. -\n \c const_vg = .F. -\n \c const_vr = .F. -\n \c vi_max = 1. -\n \c vs_max = 2. -\n \c vg_max = 12. -\n \c vr_max = 12. -\n \c qi_lim = 1. -\n \c prog_ccn = .false. -\n \c do_qa = .true. -\n \c fast_sat_adj = .true. -\n \c tau_l2v = 225. -\n \c tau_v2l = 150. -\n \c tau_g2v = 900. -\n \c rthresh = 10.e-6 -\n \c dw_land = 0.16 -\n \c dw_ocean = 0.10 -\n \c ql_gen = 1.0e-3 -\n \c ql_mlt = 1.0e-3 -\n \c qi0_crt = 8.0E-5 -\n \c qs0_crt = 1.0e-3 -\n \c tau_i2s = 1000. -\n \c c_psaci = 0.05 -\n \c c_pgacs = 0.01 -\n \c rh_inc = 0.30 -\n \c rh_inr = 0.30 -\n \c rh_ins = 0.30 -\n \c ccn_l = 300. -\n \c ccn_o = 100. -\n \c c_paut = 0.5 -\n \c c_cracw = 0.8 -\n \c use_ppm = .false. -\n \c use_ccn = .true. -\n \c mono_prof = .true. -\n \c z_slope_liq = .true. -\n \c z_slope_ice = .true. -\n \c de_ice = .false. -\n \c fix_negative = .true. -\n \c icloud_f = 1 -\n \c mp_time = 150. -\n \c reiflag = 2 +&gfdl_cloud_microphysics_nml + sedi_transport = .true. + do_sedi_heat = .false. + rad_snow = .true. + rad_graupel = .true. + rad_rain = .true. + const_vi = .F. + const_vs = .F. + const_vg = .F. + const_vr = .F. + vi_max = 1. + vs_max = 2. + vg_max = 12. + vr_max = 12. + qi_lim = 1. + prog_ccn = .false. + do_qa = .true. + fast_sat_adj = .true. + tau_l2v = 225. + tau_v2l = 150. + tau_g2v = 900. + rthresh = 10.e-6 + dw_land = 0.16 + dw_ocean = 0.10 + ql_gen = 1.0e-3 + ql_mlt = 1.0e-3 + qi0_crt = 8.0E-5 + qs0_crt = 1.0e-3 + tau_i2s = 1000. + c_psaci = 0.05 + c_pgacs = 0.01 + rh_inc = 0.30 + rh_inr = 0.30 + rh_ins = 0.30 + ccn_l = 300. + ccn_o = 100. + c_paut = 0.5 + c_cracw = 0.8 + use_ppm = .false. + use_ccn = .true. + mono_prof = .true. + z_slope_liq = .true. + z_slope_ice = .true. + de_ice = .false. + fix_negative = .true. + icloud_f = 1 + mp_time = 150. + reiflag = 2 +/ +&cires_ugwp_nml + knob_ugwp_solver = 2 + knob_ugwp_source = 1,1,0,0 + knob_ugwp_wvspec = 1,25,25,25 + knob_ugwp_azdir = 2,4,4,4 + knob_ugwp_stoch = 0,0,0,0 + knob_ugwp_effac = 1,1,1,1 + knob_ugwp_doaxyz = 1 + knob_ugwp_doheat = 1 + knob_ugwp_dokdis = 1 + knob_ugwp_ndx4lh = 1 + knob_ugwp_version = 0 + launch_level = 27 +/ -- \b &cires_ugwp_nml -\n \c knob_ugwp_solver = 2 -\n \c knob_ugwp_source = 1,1,0,0 -\n \c knob_ugwp_wvspec = 1,25,25,25 -\n \c knob_ugwp_azdir = 2,4,4,4 -\n \c knob_ugwp_stoch = 0,0,0,0 -\n \c knob_ugwp_effac = 1,1,1,1 -\n \c knob_ugwp_doaxyz = 1 -\n \c knob_ugwp_doheat = 1 -\n \c knob_ugwp_dokdis = 1 -\n \c knob_ugwp_ndx4lh = 1 -\n \c knob_ugwp_version = 0 -\n \c launch_level = 27 +\endcode -\note nstf_name = \f$[2,0,0,0,0]^1 [2,1,0,0,0]^2\f$ -- \f$^1\f$ NSST is on and coupled with spin up off -- \f$^2\f$ NSST is on and coupled with spin up on +- nstf_name = \f$[2,0,0,0,0]^1 [2,1,0,0,0]^2\f$ + - \f$^1\f$ NSST is on and coupled with spin up off + - \f$^2\f$ NSST is on and coupled with spin up on */ diff --git a/physics/docs/pdftxt/GSD_adv_suite.txt b/physics/docs/pdftxt/GSD_adv_suite.txt index 39c5ebd20..4d986075b 100644 --- a/physics/docs/pdftxt/GSD_adv_suite.txt +++ b/physics/docs/pdftxt/GSD_adv_suite.txt @@ -16,23 +16,22 @@ The GSD_v1 physics suite uses the parameterizations in the following order: - \ref GFS_RRTMG - \ref GFS_SFCLYR - \ref GFS_NSST - - \ref GSD_RUCLSM - - \ref GSD_MYNNEDMF + - \ref RUCLSM + - \ref MYNNEDMF - \ref GFS_UGWP_v0 - \ref GFS_RAYLEIGH - \ref GFS_OZPHYS - \ref GFS_H2OPHYS - - \ref GSD_CU_GF + - \ref CU_GF - \ref cu_gf_deep_group - \ref cu_gf_sh_group - - \ref GSD_THOMPSON - - \ref GFS_CALPRECIPTYPE + - \ref THOMPSON \section sdf_gsdsuite Suite Definition File \code - + @@ -45,14 +44,14 @@ The GSD_v1 physics suite uses the parameterizations in the following order: GFS_suite_interstitial_rad_reset + sgscloud_radpre GFS_rrtmg_pre rrtmg_sw_pre - mynnrad_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre rrtmg_lw - mynnrad_post + sgscloud_radpost rrtmg_lw_post GFS_rrtmg_post @@ -97,9 +96,9 @@ The GSD_v1 physics suite uses the parameterizations in the following order: GFS_suite_stateout_update ozphys_2015 h2ophys - GFS_DCNV_generic_pre get_phi_fv3 GFS_suite_interstitial_3 + GFS_DCNV_generic_pre cu_gf_driver_pre cu_gf_driver GFS_DCNV_generic_post @@ -114,6 +113,7 @@ The GSD_v1 physics suite uses the parameterizations in the following order: GFS_MP_generic_post cu_gf_driver_post maximum_hourly_diagnostics + phys_tend diff --git a/physics/docs/pdftxt/MYNN_EDMF.txt b/physics/docs/pdftxt/MYNN_EDMF.txt new file mode 100644 index 000000000..aebe6b9fb --- /dev/null +++ b/physics/docs/pdftxt/MYNN_EDMF.txt @@ -0,0 +1,76 @@ +/** +\page MYNNEDMF MYNN-EDMF Boundary Layer and Shallow Cloud Scheme +\section mynnedmf_descrip Description + +The Mellor-Yamada-Nakanishi-Niino (Nakanishi and Niino 2009 \cite NAKANISHI_2009) eddy +diffusivity-mass flux (EDMF) scheme was implemented into CCPP to introduce an alternative +turbulent kinetic energy (TKE)-based planetary boundary layer (PBL) scheme which could +serve as a candidate PBL parameterization for future operational implementations of the Unified Forecast System. +The MYNN-EDMF is currently employed in NOAA's operational Rapid Refresh (RAP; Benjamin et al.2016 \cite Benjamin_2016) +and High-Resolution Rapid Refresh (HRRR) forecast systems. + +The original MYNN scheme was demonstrated to be an improvement over predecessor Mellor-Yamada-type +PBL schemes (e.g., Mellor and Yamada 1974,1982 \cite Mellor_1974 \cite Mellor_1982) when compared against large-eddy +simulation (LES) of a convective PBL (Nakanishi and Niino 2004, 2009 \cite Nakanishi_2004 \cite NAKANISHI_2009), the +prediction of advection fog (Nakanishi and Niino 2006 \cite Nakanishi_2006), and for the representation of coastal +barrier jets (Olson and Brown 2009 \cite olson_and_brown_2009). The MYNN scheme can be configured to function at either +level 2.5 or 3.0 closure and includes a partial-condensation scheme (also known as a cloud PDF or a statistical-cloud +scheme) to represent the effects of subgrid-scale(SGS) clouds on the buoyancy flux (Nakanishi and Niino 2004, 2006, and 2009 +\cite Nakanishi_2004 \cite Nakanishi_2006 \cite NAKANISHI_2009). The closure constants for the original MYNN scheme +were tuned to a database of LES as opposed to observational data. + +The MYNN-EDMF scheme has been extensively developed to improve upon the forecast skill of the original MYNN, +largely driven by requirements to improve forecast skill in support of the NOAA's National Weather Service (NWS), +the Federal Aviation Administration (FAA) and users within the renewable-energy industry.Specifically, fundamental +changes were made to the formulation of the mixing lengths and representation of subgrid-scale(SGS) clouds, but new components have also +been added to improve the representation of non-local mixing, the turbulence interaction with clouds, and the coupling to other +model components (i.e., radiation). A description of the changes to the MYNN scheme are available in Olson et al.(2019) +\cite olson_et_al_2019. + + +\section intra_mynnpbl Intraphysics Communication +- Cloud-Radiation Interaction + +\sa gsd_mynnrad_pre +\sa gsd_mynnrad_post + +The SGS clouds produced by the MYNN-EDMF scheme are coupled to the longwave and shortwave radiation schemes +if the namelist parameter \p icloud_bl is set to 1. In this case, the SGS cloud fraction, \p CLDFRA_BL, and the SGS +cloud-mixing ratio, \b QC_BL, are added to the microphysics arrays within the radiation driver (mynnrad_pre_run()). +The following two steps are performed: + +(1) the cloud fraction of the resolved-scale clouds are computed, using Xu and Randal (1996) \cite xu_and_randall_1996 +by default; + +(2) if the resolved-scale cloud liquid (\f$q_c\f$) or ice ( \f$q_i\f$), is less than \f$10^{-6}kg kg^{-1}\f$ and +\f$10^{-8}kg kg^{-1}\f$, respectively, and there exists a nonzero SGS cloud fraction, then the SGS components are +added to their respective resolved-scale components by a temperature weighting, according to linear approximation +of Hobbs et al.(1974) \cite HOBBS_1974 : +\f[ + W_{ice}=1-min(1,max(0,(T-254)/15)) + W_{h2o}=1-W_{ice} +\f] + +Then we sort the SGS cloud water and liquid as : + +\f$q_c\f$=QC_BL*\f$W_{h2o}\f$*CLDFRA_BL + +\f$q_i\f$=QC_BL*\f$W_{ice}\f$*CLDFRA_BL + +This allows us to only use one 3-D array for both SGS cloud water and ice. The updated \f$q_{c}\f$,\f$q_{i}\f$, and +\p CLDFRA are then used as input into the radiation schemes. After exiting the radiation schemes, the original +values of \f$q_c, q_i\f$ and \p CLDFRA are restored, so the SGS clouds do not impact the resolved-scale moisture budget. + + +The MYNN-EDMF CCPP-compliant interface: +\ref arg_table_mynnedmf_wrapper_run + +\section gen_mynnedmf_conv MYNN-EDMF Scheme General Algorithm + +\image html MYNN-EDMF_call_order.png "Figure 1.The order of subroutines within the MYNN-EDMF (Courtesy of J.B. Olson). The green rectangles within the main subroutine (mynn_bl_driver()) represent subroutine calls. The blue rectangles represent tasks coded within the main driver. A brief description is shown on the right " width=10cm + + +\ref gen_mynn_bl_driver + + +*/ diff --git a/physics/docs/pdftxt/MYNN_SFCLAYER.txt b/physics/docs/pdftxt/MYNN_SFCLAYER.txt new file mode 100644 index 000000000..301bdb5cd --- /dev/null +++ b/physics/docs/pdftxt/MYNN_SFCLAYER.txt @@ -0,0 +1,52 @@ +/** +\page SFC_MYNNSFL MYNN Surface Layer Scheme +\section mynnsfclayer_descrip Description + +The surface layer scheme controls the degree of coupling between the model surface and the atmosphere. +Traditionally, surface layer schemes have been developed to be paired with certain PBL schemes, but this +pairing is too narrow-scoped, since the surface layer physics should be equally as integrated with the +land-surface model (LSM), modern gravity wave drag suites, and wave models. The expansion of model complexity, +such as the inclusion of subgrid-scale landuse variations, vertically distributed sources of drag [i.e., wind +farm drag (Fitch et al. 2012 \cite fitch_et_al_2012 ), small-scale gravity wave drag (Steeneveld et al. 2008 \cite steeneveld_et_al_2008) and topographic form +drag (Beljaars et al. 2004) \cite beljaars_et_al_2004 ], requires that surface layer scheme be developed within a broader context so +assumptions made across all model components are physically consistent. + +The MYNN surface layer scheme was originally developed for the Mellor-Yamada-Nakanishi-Niino (MYNN)-Eddy Diffusivity-Mass +Flux (EDMF) scheme (Nakanishi and Niino 2009 \cite NAKANISHI_2009, Olson et al. 2019 \cite olson_et_al_2019) and has been used in NOAA's operational +Rapid Refresh (RAP; Benjamin et al. 2016 \cite Benjamin_2016 ) and High-Resolution Rapid Refresh (HRRR) forecast systems since 2014. During this time, the scheme has undergone significant development in tandem with other components of the +forecast systems. More recently, several new features have been added in order to accommodate different +capabilities in the Common Community Physics Package (CCPP) (Heinzeller et al. 2019). This updated version of the +surface layer scheme is a candidate to be used in the Rapid Refresh Forecast System (RRFS), which is a component of +NOAA's Unified Forecast System, and a successor to the RAP/HRRR forecast systems. + +The surface layer schemes in CCPP only compute transfer coefficients and pass them to other modules that +compute the surface fluxes and 2-m and 10-m diagnostics. Therefore, switches were added to bypass the calculation +of surface fluxes and diagnostics for typical use, but kept as an option to used in idealized model configurations. + +The surface layer physics represented by the scheme utilizes traditional Monin-Obukhov stability theory (MOST) +(Monin and Obukhov 1954 \cite monin_and_obukhov_1954 ), which is not novel, but still represents a respectable performance benchmark. This scheme +is built in a modular sense, which allows for flexible testing of a variety of different subcomponents within +the MOST-type bulk-flux algorithm. The specific subcomponents that exploit this modular design include the +specification of the surface roughness lengths, the scalar roughness lengths, and the flux-profile relationships +(a.k.a. stability functions). The configuration options for testing different forms of these subcomponents will +be discussed below. + +\section intra_mynnsfc Intraphysics Communication + +The surface-layer scheme is call directly after the radiation and prior to the surface modules (land-surface, sea-ice, and sea-surface temperature +models). The surface layer scheme and the surface modules collectively calculate the necessary input for the boundary-layer schemes (beyond the +basic state variables): u*, z/L, surface heat and moisture fluxes. + +\ref arg_table_mynnsfc_wrapper_run + +\section gen_mynnsfclay MYNN Surface Layer Scheme General Algorithm + +\image html MYNN-SFCLAY_call_order.png "Figure 1.The order of operations within the MYNN surface layer scheme (Courtesy of J.B. Olson)." width=10cm + +Within the MYNN surface layer scheme, there is a dependency check for the first timestep. If true, several arrays are initialized at every +i point. This is done because (1) some variables are calculated in schemes called after the surface layer call and (2) some variables are used within +iterative processes and may not be specified until later in the surface layer scheme. The main order of operations and hightlight relevant subroutines +in sfclay1d_mynn(). + + +*/ diff --git a/physics/docs/pdftxt/RRFS_SGSCLOUD.txt b/physics/docs/pdftxt/RRFS_SGSCLOUD.txt new file mode 100644 index 000000000..2f199c6ce --- /dev/null +++ b/physics/docs/pdftxt/RRFS_SGSCLOUD.txt @@ -0,0 +1,23 @@ +/** +\page SGSCLOUD_page Subgrid-scale Cloud Pre-radiation Interstitial +\section rrfs_sgscloud_descrip Description + +This interstitial module adds the subgrid-scale cloud information to the resolved-scale (microphysics) clouds. This procedure is required when using microphysics schemes that only produce clouds in fully saturated grid cells, like the Thompson microphysics scheme, and when using boundary layer and convection schemes that produce subgrid-scale cloud information (mixing ratio and cloud fraction). This allows the subgrid-scale cloud information to be assembled into the rest of the cloud information prior to calling the radiation schemes. + +\section intra_rrfssgs Intraphysics Communication +- sgscloud_radpre_run(): \ref arg_table_sgscloud_radpre_run + +\section gen_rrfssgs SGSCLOUD Pre-radiation Interstitial General Algorithm + +The order of procedures is outlined below: +\n 1) Back up the original qc and qi in "save arrays" qc_save and qi_save. +\n 2) Partition the condensate from the convection scheme into liquid and ice. +\n 3) Use Xu and Randall (1996) \cite xu_and_randall_1996 cloud fraction for the convection scheme subgrid clouds. Note that the MYNN-EDMF PBL scheme subgrid clouds input into this scheme are already partitioned into qc and qi and already have assigned cloud fractions. +\n 4) Add the subgrid cloud mixing ratio and cloud fraction to the original (resolved-scale) qc, qi and cloud fraction coming from the microphysics scheme. Note this information is only added to grid cells when resolved-scale clouds are below a very small threshold value. +\n 5) Recompute the diagnostic high, mid, low, total and boundary layer clouds to be consistent with the clouds seen by the radiation scheme. + +To provide a cloud fraction at t=0 (before the boundary layer or convection schemes are called), Xu and Randall (1996) \cite xu_and_randall_1996 cloud fraction is used. After the radiation schemes are called, module_SGSCloud_RadPost.F90 is called to restore the original qc and qi from qc_save and qi_save. + + + +*/ diff --git a/physics/docs/pdftxt/RRFS_v1alpha_suite.txt b/physics/docs/pdftxt/RRFS_v1alpha_suite.txt new file mode 100644 index 000000000..a3051a88b --- /dev/null +++ b/physics/docs/pdftxt/RRFS_v1alpha_suite.txt @@ -0,0 +1,210 @@ +/** +\page RRFS_v1alpha_page RRFS_v1alpha Suite + +\section RRFS_v1alpha_suite_overview Overview + +Suite RRFS_v1alpha is one of the supported suites for use in the UFS Short-Range Weather Application +(UFS SRW App). This suite is most applicable for runs at 3-km resolution since it does not parameterize +deep convection. + +The RRFS_v1alpha physics suite uses the parameterizations in the following order: + - \ref SGSCLOUD_page + - \ref GFS_RRTMG + - \ref GFS_SFCLYR + - \ref GFS_NSST + - \ref NoahMP + - \ref MYNNEDMF + - \ref GFS_UGWP_v0 + - \ref GFS_RAYLEIGH + - \ref GFS_OZPHYS + - \ref GFS_H2OPHYS + - \ref THOMPSON + +\section sdf_rrfssuite Suite Definition File +\code + + + + + + + GFS_time_vary_pre + GFS_rrtmg_setup + GFS_rad_time_vary + GFS_phys_time_vary + + + + + GFS_suite_interstitial_rad_reset + sgscloud_radpre + GFS_rrtmg_pre + rrtmg_sw_pre + rrtmg_sw + rrtmg_sw_post + rrtmg_lw_pre + rrtmg_lw + sgscloud_radpost + rrtmg_lw_post + GFS_rrtmg_post + + + + + GFS_suite_interstitial_phys_reset + GFS_suite_stateout_reset + get_prs_fv3 + GFS_suite_interstitial_1 + GFS_surface_generic_pre + GFS_surface_composites_pre + dcyc2t3 + GFS_surface_composites_inter + GFS_suite_interstitial_2 + + + + sfc_diff + GFS_surface_loop_control_part1 + sfc_nst_pre + sfc_nst + sfc_nst_post + noahmpdrv + sfc_sice + GFS_surface_loop_control_part2 + + + + GFS_surface_composites_post + sfc_diag + sfc_diag_post + GFS_surface_generic_post + mynnedmf_wrapper + GFS_GWD_generic_pre + cires_ugwp + cires_ugwp_post + GFS_GWD_generic_post + rayleigh_damp + GFS_suite_stateout_update + ozphys_2015 + h2ophys + get_phi_fv3 + GFS_suite_interstitial_3 + GFS_suite_interstitial_4 + GFS_MP_generic_pre + mp_thompson_pre + mp_thompson + mp_thompson_post + GFS_MP_generic_post + maximum_hourly_diagnostics + + + + + GFS_stochastics + + + + +\encode + +\section rrfs_nml_option Namelist +\code +&gfs_physics_nml + bl_mynn_edmf = 1 + bl_mynn_edmf_mom = 1 + bl_mynn_tkeadvect = .true. + cal_pre = .false. + cdmbgwd = 3.5,0.25 + cnvcld = .false. + cnvgwd = .false. + cplflx = .false. + debug = .false. + do_deep = .false. + do_mynnedmf = .true. + do_mynnsfclay = .false. + do_sfcperts = .false. + do_shum = .false. + do_skeb = .false. + do_sppt = .false. + dspheat = .true. + effr_in = .true. + fhcyc = 0.0 + fhlwr = 1200.0 + fhswr = 1200.0 + fhzero = 1.0 + h2o_phys = .true. + hybedmf = .false. + iaer = 111 + ialb = 1 + iau_delthrs = 6 + iau_inc_files = '' + iaufhrs = 30 + icloud_bl = 1 + ico2 = 2 + iems = 1 + imfdeepcnv = -1 + imfshalcnv = -1 + imp_physics = 8 + iopt_alb = 2 + iopt_btr = 1 + iopt_crs = 1 + iopt_dveg = 2 + iopt_frz = 1 + iopt_inf = 1 + iopt_rad = 1 + iopt_run = 1 + iopt_sfc = 1 + iopt_snf = 4 + iopt_stc = 1 + iopt_tbot = 2 + isol = 2 + isot = 1 + isubc_lw = 2 + isubc_sw = 2 + ivegsrc = 1 + ldiag3d = .false. + lheatstrg = .false. + lradar = .true. + lsm = 2 + lsoil_lsm = 4 + ltaerosol = .true. + lwhtr = .true. + ncld = 5 + nsradar_reset = 3600 + nst_anl = .true. + nstf_name = 2,1,0,0,0 + oz_phys = .false. + oz_phys_2015 = .true. + pdfcld = .false. + pre_rad = .false. + prslrd0 = 0.0 + random_clds = .false. + redrag = .true. + satmedmf = .false. + shal_cnv = .false. + swhtr = .true. + trans_trac = .true. + ttendlim = -999 + use_ufo = .true. + +/ + +&cires_ugwp_nml + knob_ugwp_azdir = 2,4,4,4 + knob_ugwp_doaxyz = 1 + knob_ugwp_doheat = 1 + knob_ugwp_dokdis = 1 + knob_ugwp_effac = 1,1,1,1 + knob_ugwp_ndx4lh = 1 + knob_ugwp_solver = 2 + knob_ugwp_source = 1,1,0,0 + knob_ugwp_stoch = 0,0,0,0 + knob_ugwp_version = 0 + knob_ugwp_wvspec = 1,25,25,25 + launch_level = 25 + +/ +\endcode + + +*/ diff --git a/physics/docs/pdftxt/RUCLSM.txt b/physics/docs/pdftxt/RUCLSM.txt new file mode 100644 index 000000000..bf45ff4b3 --- /dev/null +++ b/physics/docs/pdftxt/RUCLSM.txt @@ -0,0 +1,100 @@ +/** +\page RUCLSM RUC Land Surface Model +\section ruclsm_descrip Description + +The land surface model (LSM) was originally developed as part of the NOAA Rapid Update Cycle (RUC) model development effort; with ongoing modifications, it is now used as an option for the WRF community model. The RUC model and its WRF-based NOAA successor, the Rapid Refresh (RAP) and High-Resolution Rapid Refresh (HRRR), are hourly updated and have an emphasis on short-range, near-surface forecasts including aviation-impact variables and pre-convective environment. Therefore, coupling to this LSM (hereafter the RUC LSM) has been critical to provide more accurate lower boundary conditions. + +The RUC LSM became operational at the NOAA/National Centers for Environmental Prediction (NCEP) first, as part of the RUC from 1998–2012, and then +as part of the RAP from 2012 through the present and as part of HRRR from 2014 through the present. The simple treatments of basic land surface +processes in the RUC LSM (Smirnova et al. 2016 \cite Smirnova_2016 ) have proven to be physically robust and capable of realistically representing +the evolution of soil moisture, soil temperature, and snow in cycled models. Extension of the RAP domain to encompass all of North America and +adjacent high-latitude ocean areas necessitated further development of the RUC LSM for application in the tundra permafrost regions and over Arctic +sea ice (Smirnova et al. 2000 \cite Smirnova_2000). Other modifications include refinements in the snow model and a more accurate specification of +albedo, roughness length, and other surface properties. These recent modifications in the RUC LSM are described and evaluated in +Smirnova et al. 2016 \cite Smirnova_2016 . + +The parameterizations in the RUC LSM describe complicated atmosphere–land surface interactions in an intentionally simplified fashion to avoid +excessive sensitivity to multiple uncertain surface parameters. Nevertheless, the RUC LSM, when coupled with the hourly-assimilating atmospheric model, +demonstrated over years of ongoing cycling (Benjamin et al. 2004a,b \cite Benjamin_2004a \cite Benjamin_2004b ; Berbery et al. 1999 \cite Berbery_1999) +that it can produce a realistic evolution of hydrologic and time-varying soil fields (i.e., soil moisture and temperature) that cannot be directly +observed over large areas, as well as the evolution of snow cover on the ground surface. This result is possible only if the soil–vegetation–snow +component of the coupled model, constrained only by atmospheric boundary conditions and the specification of surface characteristics, has sufficient +skill to avoid long-term drift. + +International projects for intercomparison of land surface and snow parameterization schemes were essential in providing the testing environment and +afforded an excellent opportunity to evaluate the RUC LSM with different land use and soil types and within a variety of climates. The RUC LSM was +included in phase 2(d) of the Project for the Intercomparison of Land Surface Prediction Schemes [PILPS-2(d)], in which tested models performed +18-yr simulations of the land surface state for the Valdai site in Russia (Schlosser et al. 1997 \cite Schlosser_1997 ; Slater et al. 2001 \cite Slater_2001 ;  +Luo et al. 2003 \cite Luo_2003 ). The RUC LSM was also tested during the Snow Models Intercomparison Project (SnowMIP, SnowMIP2, ESM-SnowMIP), +with emphasis on snow parameterizations for both grassland and forest locations in different parts of the world +(Etchevers et al. 2002, 2004 \cite Etchevers_2002 \cite Etchevers_2004; Essery et al. 2009 \cite Essery_2009 ; Rutter et al. 2009 \cite Rutter_2009 , +Krinner et al. 2018 \cite Krinner_2018 ). The analysis of RUC LSM performance over 10 reference sites in ESM-SnowMIP rated it on the 5th place +among the 26 participating models. + +In global application, RUC LSM is implemented in the Global Systems Division (GSD) physics suite for testing in the NOAA Next-Generation Global +Prediction System (NGGPS)- FV3-GSD suite. To specify surface characteristics, RUC LSM uses the Land Data Sets provided by NCEP for Global +Modeling Systems (see Figure 2 in \ref GFS_NOAH ) + +## RUC LSM characteristics that differ from NOAH LSM: +\image html ruc_lsm_veg_soil.png "Figure 1. RUC LSM Vegetation and Soil Model (Courtesy of T.G. Smirnova) " width=10cm +- \b Implicit \b solution of energy and moisture budgets in the layer spanning the ground surface +- \b 9 \b soil \b levels with high vertical resolution near surface +RUC LSM has more levels in oil than \ref GFS_NOAH model with higher resolution near the interface with the atmosphere +- \b Prognostic \b soil moisture variable (\f$\theta-\theta_r\f$) +The prognostic variables for soil moisture is volumetric soil moisture content minus residual value of soil moisture which is tied +to soil particles and does not participate in moisture transport. +- \b Frozen \b soil \b physics algorithm +RUC LSM has a different approach to take into account freezing and thawing processes in soil. +- Treatment of \b mixed \b phase \b precipitation +It accounts for mixed phase precipitation provided by \ref THOMPSON used in RAP and HRRR. +- Simple treatment of \b sea \c ice which solves heat diffusion in sea ice and allows evolving snow cover on top of sea ice +- sub-grid-scale \b heterogeneity of surface parameters in RUC LSM +With the certain level of confidence in the skill of the model, the next requirement is to provide land static fields and surface +parameters with the best possible accuracy. RAP and HRRR use the same datasets as \ref GFS_NOAH. But instead of specifying surface +parameters for the dominant soil and land-use category in the grid box, RUC LSM takes into account the sub-grid scale heterogeneity +in the computation of such parameters as roughness length, emissivity, soil porosity, soil heat capacity and others. The difference in +roughness between the mosaic and dominant category presented on figure 2 is positive from contribution of the forests, which helped to +reduce high biases of surface wind speeds in these regions. Roughness lenghth has also seasonal variability in the cropland regions, +which again helped to improve the wind forecasts during the warm season. +\image html ruc_lsm_heterogeneity.png "Figure 2: sub-grid scale heterogeneity of surface parameters in RUC LSM (Courtesy of T.G. Smirnova)" width=10cm + +- New: simple irrigation in the cropland area +- New: water/snow intercepted by canopy as function of vegetation fraction and leaf area index (LAI) + +## RUC snow model characteristics: +Snow forms additional two layers on top of soil in RUC LSM +- \b 2-layer \b snow model: when SWE < 1.6 cm - snow layer is combined with top soil layer +- Fractional snow cover (SWE < 3 cm): +- weighted average of snow-covered and snow-free areas to compute snow paramters (roughness, albedo) +- New: "mosaic" approach for patchy snow + - Seperate treatment of energy and moisture budgets for snow-covered and snow-free portions of the grid cell + - Aggregate solutions at the end of time step + - Reduced cold bias for areas with thin snow +\image html ruc_lsm_mosaic.png "Figure 3: recent development: mosaic approach for patchy snow (Courtesy of T.G. Smirnova) " width=10cm +- Iterative snow melting algorithm +- Density of snow on the ground - a function of compaction parameter and snow depth and temperature +- Snow albedo - a function of temperature and snow fraction +- Snow interception by canopy - a function of vegetation fraction and LAI +- Density of falling snow/graupel/ice precipitation + - The density of falling snow/graupel/ice is computed inside RUC LSM using empirical temperature-dependent equations; + - Averaged density of frozen precipitation is defined from weighted contribution of each hydrometeor species: +\f[ + \rho_{fr}=\rho_{sn}*\alpha_{sn}+\rho_{gr}*\alpha_{gr}+\rho_{ice}*\alpha_{ice} +\f] +- The depth of new snow is defined from its liquid equivalent and \f$\rho_{fr}\f$ +\image html ruc_lsm_frozen_precip.png "Figure 4: HRRR 23-h forecasts of snow accumulation, valid 08 UTC, 29 Dec 2015 (Courtesy of T.G. Smirnova)" width=10cm + +snow accumulation with variable density is provided as an additional product in the model guidance. Figure 4 shows one example of this product +from the 23-h HRRR forecast for snowstorm on 29 Dec 2015. This product is in the middle panel. The panel on the left uses traditional 10:1 ratio, +and the right panel is oberved snow accumulation. We can see that the new product in the middle here has a better, further north location of maximum +snow accumulation, and high ammounts of snow in the product with 10:1 ratio are trimmed in central and southern Iowa where both observed and model +precipitation had a high content of sleet. There is even larger improvement in the Chicago area, where observed and model precipitation were almost +totally sleet. + +\section intra_ruclsm Intraphysics Communication +\ref arg_table_lsm_ruc_run + +\section gen_ruclsm General Algorithm +\ref gen_lsmruc + +*/ diff --git a/physics/docs/pdftxt/THOMPSON.txt b/physics/docs/pdftxt/THOMPSON.txt new file mode 100644 index 000000000..8f16ce55b --- /dev/null +++ b/physics/docs/pdftxt/THOMPSON.txt @@ -0,0 +1,85 @@ +/** +\page THOMPSON Thompson Aerosol-Aware Microphysics Scheme +\section thompson_descrp Description + + +The RAP/HRRR microphysics implementation represents the most aggressive attempt to include explicit prediction of +cloud and precipitation microphysical processes in the NCEP operational forecast model suite. The RAP and HRRR are +important guidance to NWS aviation forecasts, and any microphysics improvements are aimed at least in part, to improve +that guidance. The scheme is particularly beneficial for aircraft icing forecasts. + +The scheme computes sources, sinks, and conversions for the mixing ratios of cloud water, rainwater, cloud ice, snow, +and graupel. Number concentration for cloud ice (particles per cubic meter) is also forecast, based on statistical relationships +of number concentration, density, and ice mass from recent observational studies. Since April 2014 (WRFv3.6), this is also the "aerosol-aware" scheme as described in +Thompson and Eidhammer (2014) \cite Thompson_2014 . + +The microphysical processes accounted for are shown in the graphic below: +\image html gsd_thompson.png "Figure 1: Complex Microphysics Model in the RAP" width=10cm + +Descriptions of these preocesses follow: +- \b Deposition: Diffusional growth of ice particles under conditions of vapor supersaturation with respect to ice. +Growth is "aerosol-aware", meaning the number of ice-friendly nulei and ice crystals is estimated by the microphysics scheme. +Deposition of ice is estimated using the properties of these ice-friendly aerosols. Latent heat associated with the phase +change from vapor to ice is released to the atmosphere. + +- \b Sublimation: Diffusional shrinkage of ice particles under conditions of vapor subsaturation with respect to ice. +The effect of aerosols on the sublimation process is estimated. Latent heat associated with the phase change from ice +to vapor is removed from the atmosphere. + +- \b Riming: Rapid freezing of supercooled cloud-size drops as a result of collisions with frozen precipitation particles, +or foreign objects with sub \f$0^{o}C\f$ surface temperatures, such as airplane wings. Latent heat of freezing is released +to the atmosphere during the process. + +- \b Evaporation: Process by which liquid is transformed into the gaseous state. The evaporation process is "aerosol-aware" +through estimation of aerosol impacts. Latent heat is removed from the atmosphere and stored in water vapor during this process. + +- \b Condensation: Process by which vapor is transformed into a liquid state. The impact of aerosols on condensation is estimated. +latent heat is released into the atmosphere during this process. + +- \b Ice \b multiplication: Formation of small ice particles as a result of freezing of supercooled cloud or raindrops. Ice multiplication occurs only under very restrictive conditions, but can be a large source of ice particles when these conditions are met. + +- \b Aggregation/autoconversion \b of \b snow: Process through which frozen precipitation particles grow by collision and the assimilation of cloud particles or other precipitation particles. The autoconversion rate increases as ambient temperatures rise toward freezing. + +- \b Accretion/autoconversion \b of \b cloud \b liquid: Process through which some cloud drops grow to become raindrops by collision and the assimilation of cloud drops. + +- \b Supercooled \b water \b formation: Liquid cloud particles that remain in their liquid state despite being cooled below the freezing point of water. + +The scheme also assumes precipitation particle-size distributions for the three predicted precipitation types: rain, snow, and graupel. +These size distributions are requied to emulate growth of precipitation by accretion of cloud-size particles, coalescence with other +precipitation particles, and fall speeds of precipitation hydrometeors. The rainwater fall speed depends on the rainwater mixing ratio, +with small values associated with fall speeds (and allowing the model to parameterize the behavior) of drizzle. The forecast precipitation +type is based on what prognostic precipitation type actually reaches the surface (Benjamin et al.(2016) \cite Benjamin_2016b ) + +# Advantages of the Thompson Scheme and Updating Cloud Fields +Some of the more general advantages of the upgraded MP scheme implementation in the RAP on the model's cloud and precipitation +forecasts are listed below. + +- Includes five hydrometeor types and their interactions, plus a sixth forecast variable for cloud ice number concentration. Drizzle +is parameterized through using low fall velocities when there are low rain mixing ratios. + +- Includes impact of types of aerosol on condensation of water/deposition of ice + +- Accounts for horizontal and vertical advection of hydrometeors + +- Allows for more accurate prediction of precipitation in the form of snow, because slow fall velocities give time for snow to +advect between grid columns + +- Includes cloud ice sedimentation, which positively influences RH and cloud forecasts + +- Because the scheme is a relatively complete mixed-phase scheme, it can account for the formation of supercooled water, a prerequisite +for the model to provide useful guidance for aircraft icing forecasts + +- Can account for cloud phase changes and provides a sound physical basis for diagnosing precipitation type reaching the ground + + + +\section intra_thompson Intraphysics Communication +\ref arg_table_mp_thompson_run + +\section g_thompson General Algorithm +- \ref gen_thompson_init +- \ref gen_thompson_hrrr +- \ref gen_mpgtdriver +- \ref gen_mp_thompson + +*/ diff --git a/physics/docs/pdftxt/all_shemes_list.txt b/physics/docs/pdftxt/all_shemes_list.txt index 4d7d08e90..03b2ccd9b 100644 --- a/physics/docs/pdftxt/all_shemes_list.txt +++ b/physics/docs/pdftxt/all_shemes_list.txt @@ -3,111 +3,124 @@ \section allscheme_overview Physical Parameterizations -In the CCPP, each parameterization is in its own modern Fortran module, which facilitates model development and -code maintenance. While some individual parameterization can be invoked for the SCM, most users will assemble the -parameterizations in suites. - -- \b Radiation - - \subpage GFS_RRTMG - -- \b PBL \b and \b Turbulence - - \subpage GFS_HEDMF - - \subpage GFS_SATMEDMF - - \subpage GFS_SATMEDMFVDIFQ - - \subpage GSD_MYNNEDMF - -- \b Land \b Surface \b Model - - \subpage GFS_NOAH - - \subpage GSD_RUCLSM - - \subpage NoahMP - -- \b Cumulus \b Parameterizations - - \subpage GFS_SAMF - - \subpage GFS_SAMFdeep - - \subpage GFS_SAMFshal - - \subpage CSAW_scheme - - \subpage GSD_CU_GF - - \ref cu_gf_deep_group - - \ref cu_gf_sh_group - -- \b Microphysics - - \subpage GFDL_cloud - - \subpage CPT_MG3 - - \subpage GSD_THOMPSON - -- \b Ozone \b Photochemical \b Production \b and \b Loss - - \subpage GFS_OZPHYS - -- \b Water \b Vapor \b Photochemical \b Production \b and \b Loss - - \subpage GFS_H2OPHYS - -- \b Gravity \b Wave \b Drag - - \subpage GFS_UGWP_v0 - - \subpage GFS_GWDPS - -- \b Surface \b Layer \b and \b Simplified \b Ocean \b and \b Sea \b Ice \b Representation - - \subpage GFS_SFCLYR - - \subpage GFS_NSST - - \subpage GFS_OCEAN - - \subpage GFS_SFCSICE - -- \b Others - - \subpage GFS_RAYLEIGH - - \subpage GFS_CALPRECIPTYPE - -In addition to the physical schemes themselves, this scientific documentation also covers four modules that define physics/radiation functions, parameters and constants: - - \ref func_phys - - \ref phy_sparam - - \ref physcons - - \ref radcons - -The input information for the physics include the values of the gridbox mean prognostic variables (wind components, temperature, +In the CCPP, each parameterization is in its own modern Fortran module (i.e., CCPP-compliant; see rules for scheme to considered CCPP-compliant at + CCPP-Compliant Physics Parameterizations ), +which facilitates model development and code maintenance. Additionally, we are listing any pre- and post- interstitials that must accompany the scheme. While some individual parameterization can be invoked for the SCM, most host models will assemble the parameterizations in suites. + + +\b Radiation + - \subpage GFS_RRTMG + + CCPP-compliant modules: rrtmg_sw_pre / rrtmg_sw / rrtmg_sw_post / rrtmg_lw_pre / rrtmg_lw / rrtmg_lw_post / dcyc2t3 + - \subpage SGSCLOUD_page + + CCPP-compliant module: sgscloud_radpre + +\b PBL \b and \b Turbulence + - \subpage GFS_HEDMF + + CCPP-compliant module: \ref hedmf + - \subpage GFS_SATMEDMFVDIFQ + + CCPP-compliant module: \ref satmedmfvdifq + - \subpage MYNNEDMF + + CCPP-compliant module: mynnedmf_wrapper + +\b Land \b Surface \b Model + - \subpage GFS_NOAH + + CCPP-compliant module: lsm_noah + - \subpage RUCLSM + + CCPP-compliant module: lsm_ruc + - \subpage NoahMP + + CCPP-compliant module: \ref noahmpdrv + +\b Cumulus \b Parameterizations + - \subpage GFS_SAMFdeep + + CCPP-compliant module: \ref samfdeepcnv + - \subpage GFS_SAMFshal + + CCPP-compliant module: \ref samfshalcnv + - \subpage CSAW_scheme + + CCPP-compliant modules: cs_conv_pre / cs_conv / cs_conv_post / cs_conv_aw_adj + - \subpage CU_GF + + CCPP-compliant modules: \ref cu_gf_driver_pre / cu_gf_driver + +\b Microphysics + - \subpage GFDL_cloud + + CCPP-compliant modules: fv_sat_adj / gfdl_cloud_microphys + - \subpage CPT_MG3 + + CCPP-compliant modules: \ref m_micro_pre / m_micro / \ref m_micro_post + - \subpage THOMPSON + + CCPP-compliant modules: mp_thompson_pre / mp_thompson / mp_thompson_post + +\b Ozone \b Photochemical \b Production \b and \b Loss + - \subpage GFS_OZPHYS + + CCPP-compliant module: ozphys_2015 + +\b Water \b Vapor \b Photochemical \b Production \b and \b Loss + - \subpage GFS_H2OPHYS + + CCPP-compliant module: h2ophys + +\b Gravity \b Wave \b Drag + - \subpage GFS_UGWP_v0 + + CCPP-compliant modules: cires_ugwp / cires_ugwp_post + +\b Surface \b Layer + - \subpage GFS_SFCLYR + + CCPP-compliant module: sfc_diff + +\b Simplified \b Ocean \b and \b Sea \b Ice \b Representation + - \subpage GFS_NSST + + CCPP-compliant modules: sfc_nst_pre / sfc_nst / sfc_nst_post + - \subpage GFS_OCEAN + + CCPP-compliant module: sfc_ocean + - \subpage GFS_SFCSICE + + CCPP-compliant module: sfc_sice + +\b Others + - \subpage GFS_RAYLEIGH + + CCPP-compliant module: rayleigh_damp + +The input information for the parameterizations includes the values of the gridbox mean prognostic variables (wind components, temperature, specific humidity, cloud fraction, water contents for cloud liquid, cloud ice, rain, snow, graupel, and ozone concentration), the provisional dynamical tendencies for the same variables and various surface fields, both fixed and variable. The time integration of the physics suites is based on the following: -- The tendencies from the different physical processes are computed by the parameterizations or derived in separate interstitial routines +- The tendencies from the different physical processes are computed by the parameterizations or derived in separate interstitial routines. - The first part of the suite, comprised of the parameterizations for radiation, surface layer, surface (land, ocean, and sea ice), boundary layer, -orographic gravity wave drag, and Rayleigh damping, is computed using a hybrid of parallel and sequential splitting described in Donahue and Caldwell(2018) +and Rayleigh damping, is computed using a hybrid of parallel and sequential splitting described in Donahue and Caldwell (2018) \cite donahue_and_caldwell_2018, a method in which the various parameterizations use the same model state as input but are impacted by the preceding parameterizations. The tendencies from the various parameterizations are then added together and used to update the model state. -- The surface parameterizations (land, ocean and sea ice) are invoked twice in a loop, with the first time to create a guess, and the second time to +- The surface parameterizations (land, ocean and sea ice) are invoked twice in a subcycling loop, with the first time to create a guess, and the second time to produce the tendencies. -- The second part of the physics suite, comprised of the parameterizations of ozone, stratospheric water vapor, deep convection, convective gravity wave drag, -shallow convection, and microphysics, is computed using sequential splitting in the order listed above, in which the model state is updated between calls +- The second part of the physics suite, comprised of the parameterizations of gravity wave physics, ozone, stratospheric water vapor, deep and shallow convection (if using), + and microphysics, is computed using sequential splitting in the order listed above, in which the model state is updated between calls to the parameterization. - If the in-core saturation adjustment is used (\p do_sat_adj=.true.), it is invoked at shorter timesteps along with the dynamical solver. \section allsuite_overview Physics Suites -The CCPP includes the suite GFS_v15p2, which has the same parameterizations used in the GFS v15 implemented operationally in June 2019, and suite -GFS_v16beta, i.e., the beta version of the suite planned for GFS v16 to be implemented operationally in 2021. Suite GFS_v16beta is identical to -Suite GFS_v15p2 except for an update in the PBL parameterization (Han et al. 2019 \cite Han_2019 ). Additionally, CCPP v4 includes two -developmental suites which are undergoing testing to inform future implementations of the UFS. Suite csawmg differs from GFS_v15p2 as it -contains different convection and microphysics schemes made available through a NOAA Climate Process Team (CPT) with components developed -at multiple research centers and universities, including Colorado State, Utah, NASA, NCAR, and EMC. Suite GSD_v1 differs from GFS_v15p2 as it -uses the convection, microphysics, and boundary layer schemes employed in the Rapid Refresh (RAP) and High-Resolution Rapid Refresh (HRRR \cite Benjamin_2016 ) -operational models and was assembled by NOAA/GSD. An assessment of an earlier version of these suites can be found in - the UFS portal -and in the DTC website . Two variant suites labelled as \a no_nsst are simplification of GFS_v15p2 and GFS_v16beta. -This simplification is needed when the UFS is initialized with files in GRIdded Binary Edition 2 (GRIB2) format instead of files in NOAA Environmental Modeling -System (NEMS) Input/Output (NEMSIO) format because the fields necesary to predict (SST) are not available in the GRIB2 files. +There are two publicly supported host models that use CCPP v5: the UFS Weather Model used in the Short Range Weather Application (SRW App) and the +CCPP Single Column Model (SCM). The SRW App supports the use of suites GFS_v15p2 and RRFS_v1alpha, while the SCM supports the use of suites +GFS_v15p2, GFS_v16beta, RRFS_v1alpha, csawmg and GSD_v1. Suite GFS_v15p2 is an operational suite that invokes the parameterizations used in the GFS v15 +implemented operationally in June 2019. Other suites are experimental, and targeted for future UFS operational implementations. It should be noted +that suite RRFS_v1alpha does not include a convective parameterization scheme and is targeted for convective-allowing resolutions of 3-km grid +spacing. The other suites are primarily targeted for medium-range weather and subseasonal-to-seasonal scales of grid spacing 13-km and coarser. +The forcing datasets included in the CCPP SCM v5.0 public release were created by averaging observations and large-eddy simulations over seas that are +too coarse to resolve convection. Therefore, best results will be obtained with be obtained with the CCPP SCM v5.0 when using suites that include parameterized +convection. Table 1. Physics suite options included in this documentation. \tableofcontents -| Physics suites | GFS_v15p2 | GFS_v16beta | csawmg | GSD_v1 | GFS_v15p2_no_nsst | GFS_v16beta_no_nsst | -|------------------|----------------------|--------------------------|---------------------|---------------------------------------------|-------------------------|---------------------------| -| Deep Cu | \ref GFS_SAMFdeep | \ref GFS_SAMFdeep | \ref CSAW_scheme | \ref GSD_CU_GF | \ref GFS_SAMFdeep | \ref GFS_SAMFdeep | -| Shallow Cu | \ref GFS_SAMFshal | \ref GFS_SAMFshal | \ref GFS_SAMFshal | \ref GSD_MYNNEDMF and \ref cu_gf_sh_group | \ref GFS_SAMFshal | \ref GFS_SAMFshal | -| Microphysics | \ref GFDL_cloud | \ref GFDL_cloud | \ref CPT_MG3 | \ref GSD_THOMPSON | \ref GFDL_cloud | \ref GFDL_cloud | -| PBL/TURB | \ref GFS_HEDMF | \ref GFS_SATMEDMFVDIFQ | \ref GFS_HEDMF | \ref GSD_MYNNEDMF | \ref GFS_HEDMF | \ref GFS_SATMEDMFVDIFQ | -| Radiation | \ref GFS_RRTMG | \ref GFS_RRTMG | \ref GFS_RRTMG | \ref GFS_RRTMG | \ref GFS_RRTMG | \ref GFS_RRTMG | -| Surface Layer | \ref GFS_SFCLYR | \ref GFS_SFCLYR | \ref GFS_SFCLYR | \ref GFS_SFCLYR | \ref GFS_SFCLYR | \ref GFS_SFCLYR | -| Land | \ref GFS_NOAH | \ref GFS_NOAH | \ref GFS_NOAH | \ref GSD_RUCLSM | \ref GFS_NOAH | \ref GFS_NOAH | -| Gravity Wave Drag| \ref GFS_UGWP_v0 | \ref GFS_UGWP_v0 | \ref GFS_UGWP_v0 | \ref GFS_UGWP_v0 | \ref GFS_UGWP_v0 | \ref GFS_UGWP_v0 | -| Ocean | \ref GFS_NSST | \ref GFS_NSST | \ref GFS_NSST | \ref GFS_NSST | \ref GFS_OCEAN | \ref GFS_OCEAN | -| Ozone | \ref GFS_OZPHYS | \ref GFS_OZPHYS | \ref GFS_OZPHYS | \ref GFS_OZPHYS | \ref GFS_OZPHYS | \ref GFS_OZPHYS | -| Water Vapor | \ref GFS_H2OPHYS | \ref GFS_H2OPHYS | \ref GFS_H2OPHYS | \ref GFS_H2OPHYS | \ref GFS_H2OPHYS | \ref GFS_H2OPHYS | +| Physics suites | GFS_v15p2 | GFS_v16beta | csawmg | GSD_v1 | RRFS_v1alpha | +|------------------|----------------------|--------------------------|---------------------|---------------------------------------------|--------------------| +| HOST Model | SCM, SRW | SCM | SCM | SCM | SCM, SRW | +| Deep Cu | \ref GFS_SAMFdeep | \ref GFS_SAMFdeep | \ref CSAW_scheme | \ref CU_GF | \a off | +| Shallow Cu | \ref GFS_SAMFshal | \ref GFS_SAMFshal | \ref GFS_SAMFshal | \ref MYNNEDMF and \ref cu_gf_sh_group | \ref MYNNEDMF | +| Microphysics | \ref GFDL_cloud | \ref GFDL_cloud | \ref CPT_MG3 | \ref THOMPSON | \ref THOMPSON | +| PBL/TURB | \ref GFS_HEDMF | \ref GFS_SATMEDMFVDIFQ | \ref GFS_HEDMF | \ref MYNNEDMF | \ref MYNNEDMF | +| Radiation | \ref GFS_RRTMG | \ref GFS_RRTMG | \ref GFS_RRTMG | \ref GFS_RRTMG | \ref GFS_RRTMG and \ref SGSCLOUD_page | +| Surface Layer | \ref GFS_SFCLYR | \ref GFS_SFCLYR | \ref GFS_SFCLYR | \ref GFS_SFCLYR | \ref GFS_SFCLYR | +| Land | \ref GFS_NOAH | \ref GFS_NOAH | \ref GFS_NOAH | \ref RUCLSM | \ref NoahMP | +| Gravity Wave Drag| \ref GFS_UGWP_v0 | \ref GFS_UGWP_v0 | \ref GFS_UGWP_v0 | \ref GFS_UGWP_v0 | \ref GFS_UGWP_v0 | +| Ocean | \ref GFS_NSST or \ref GFS_OCEAN | \ref GFS_NSST or \ref GFS_OCEAN | \ref GFS_NSST | \ref GFS_NSST | \ref GFS_NSST | +| Ozone | \ref GFS_OZPHYS | \ref GFS_OZPHYS | \ref GFS_OZPHYS | \ref GFS_OZPHYS | \ref GFS_OZPHYS | +| Water Vapor | \ref GFS_H2OPHYS | \ref GFS_H2OPHYS | \ref GFS_H2OPHYS | \ref GFS_H2OPHYS | \ref GFS_H2OPHYS | \tableofcontents diff --git a/physics/docs/pdftxt/all_shemes_list.txt.FV3 b/physics/docs/pdftxt/all_shemes_list.txt.FV3 index 9294027dd..4ddef249b 100644 --- a/physics/docs/pdftxt/all_shemes_list.txt.FV3 +++ b/physics/docs/pdftxt/all_shemes_list.txt.FV3 @@ -5,7 +5,7 @@ In the CCPP-Physics v3.0 release, each parameterization is in its own modern Fortran module, which facilitates model development and -code maintenance. While some individual parameterization can be invoked for the GMTB SCM, most users will assemble the +code maintenance. While some individual parameterization can be invoked for the CCPP SCM, most users will assemble the parameterizations in suites. - Radiation @@ -32,11 +32,11 @@ parameterizations in suites. - Microphysics - \subpage GFDL_cloud - - \subpage fast_sat_adj (not available for the GMTB SCM) + - \subpage fast_sat_adj (not available for the CCPP SCM) - \subpage CPT_MG3 - \subpage GSD_THOMPSON -- Stochastic (not available for the GMTB SCM) +- Stochastic (not available for the CCPP SCM) - \subpage STOCHY_PHYS - \subpage surf_pert (only applicable to \ref GFS_NOAH ) diff --git a/physics/docs/pdftxt/code_overview.txt b/physics/docs/pdftxt/code_overview.txt index 8c13db7a9..9399fa263 100644 --- a/physics/docs/pdftxt/code_overview.txt +++ b/physics/docs/pdftxt/code_overview.txt @@ -2,7 +2,7 @@ \page subpage_overview Overview of the Code In the CCPP-Physics v2 code, each parameterization is placed in its own modern Fortran module, which facilitates model development and -code maintenance. While some individual parameterization can be invoked for GMTB SCM, most users will assemble the +code maintenance. While some individual parameterization can be invoked for CCPP SCM, most users will assemble the parameterizations in suites. The parameterizations contained in CCPP-Physics v2 can be used to run two suites: FV3GFS default (with GFDL cloud microphysics) and GFS with Zhao-Carr microphysics. diff --git a/physics/docs/pdftxt/code_overview.txt.Aug17 b/physics/docs/pdftxt/code_overview.txt.Aug17 index 3ca89fcdb..ebe1f6c2b 100644 --- a/physics/docs/pdftxt/code_overview.txt.Aug17 +++ b/physics/docs/pdftxt/code_overview.txt.Aug17 @@ -1,7 +1,7 @@ /** \page subpage_overview Overview of the Code -The GFS physics parameterization suite is called by GMTB-SCM or FV3 after the explicit dynamical computations. The +The GFS physics parameterization suite is called by CCPP-SCM or FV3 after the explicit dynamical computations. The physics computations are performed only in the vertical. The input information for the physics consists of the values of the gridbox mean prognostic variables (wind components \f$u/v\f$, temperature \f$T\f$, specific humidity \f$q\f$, cloud fraction \f$q_a\f$, water contents for cloud liquid \f$q_l\f$, cloud ice \f$q_i\f$, rain \f$q_r\f$, snow \f$q_s\f$, graupel diff --git a/physics/docs/pdftxt/mainpage.txt b/physics/docs/pdftxt/mainpage.txt index fdf7d1294..315d907f9 100644 --- a/physics/docs/pdftxt/mainpage.txt +++ b/physics/docs/pdftxt/mainpage.txt @@ -1,25 +1,32 @@ /** \mainpage Introduction -Welcome to the scientific documentation for the parameterizations and suites available in the Common -Community Physics Package (CCPP) v4. +Welcome to the scientific documentation for the parameterizations available in the Common +Community Physics Package (CCPP) v5.0.0 and the suites that can be configured using them. + +\image html mesocam.png " " width=10cm The CCPP-Physics is envisioned to contain parameterizations used in NOAA's Unified Forecast System (UFS) -applications for weather through seasonal prediction timescales, encompassing operational schemes as well as -developmental schemes under consideration for upcoming -operational implementations. This version contains all parameterizations of the current operational GFS, -plus additional developmental schemes. There are four suites supported for use with the Single Column Model (SCM) -developed by the Development Testbed Center (GFS_v15p2, GFS_v16beta, GSD_v1, and csawmg), and four suites -supported for use with the atmospheric component of the UFS (i.e., GFS_v15p2, GFS_v15p2_no_nsst, GFS_v16beta and -GFS_v16beta_no_nsst). The variants labelled as \a no_nsst are a simplification of GFS_v15p2 and GFS_v16beta suites -. This simplification is needed when the UFS is initialized with files in GRIdded Binary Edition 2 (GRIB2) -format instead of files in NOAA Environmental Modeling System (NEMS) Input/Output (NEMSIO) format because the -fields necessary to predict (SST) are not available in the GRIB2 files. +applications for weather through seasonal prediction timescales, encompassing the current operational GFS schemes as well as +developmental schemes under consideration for upcoming operational implementations. New in this release is +suite RRFS_v1alpha, which is being tested in the UFS Short-Range Weather Application for future use +in the convective-allowing Rapid Refresh Forecast System (RRFS), slated for operational implementation +in 2023. Convection-allowing models allow us to begin to resolve the fine details within storm systems that are +necessary for the accurate predition of high-impact events such as tornadoes, flash floods, and winter weather. +Experience gained from the development of earlier operational and experimental convective-allowing models (CAMs), +such as the High Resolution Rapid Refresh (HRRR) and HRRR Ensemble (HRRRE), the North American Mesoscale Forecast +System (NAM) nests, the NSSL Experimental Warn-on-Forecast System for ensembles (NEWS-e), the NCAR experimental +CAM ensemble, and GFDL's FV3-based CAM efforts, guide this process. + +The CCPP parameterizations are aggregated in suites by the host models. The CCPP Single Column Model (SCM), developed +by the Development Testbed Center, supports suites GFS_v15p2, GFS_v16beta, GSD_v1, csawmg, and RRFS_v1alpha, while the +UFS Short-Range Weather Application supports suites GFS_v15p2 and RRFS_v1alpha. The UFS Medium-Range Weather Application +is not intended for use with CCPP v5.0.0. In this website you will find documentation on various aspects of each parameterization, including a high-level overview of its function, the input/output argument list, and a description of the algorithm. -The latest CCPP public release is Version 4.0 (March 2020), and more details on it may be found on the +More details about this and other CCPP releases may be found on the CCPP website hosted by the Developmental Testbed Center (DTC). diff --git a/physics/docs/pdftxt/suite_FV3_GFS_v15p2.xml.txt b/physics/docs/pdftxt/suite_FV3_GFS_v15p2.xml.txt index 4074ddfc7..2ec63092e 100644 --- a/physics/docs/pdftxt/suite_FV3_GFS_v15p2.xml.txt +++ b/physics/docs/pdftxt/suite_FV3_GFS_v15p2.xml.txt @@ -1,10 +1,10 @@ /** -\page suite_FV3_GFS_v15p2_xml suite_FV3_GFS_v15p2.xml +\page FV3_GFS_v15p2_sdf GFS_v15p2 Suite Definition File \code - + @@ -72,9 +72,9 @@ GFS_suite_stateout_update ozphys_2015 h2ophys - GFS_DCNV_generic_pre get_phi_fv3 GFS_suite_interstitial_3 + GFS_DCNV_generic_pre samfdeepcnv GFS_DCNV_generic_post GFS_SCNV_generic_pre @@ -91,10 +91,12 @@ GFS_stochastics + phys_tend + \endcode */ diff --git a/physics/docs/pdftxt/suite_FV3_GFS_v15p2_no_nsst.xml.txt b/physics/docs/pdftxt/suite_FV3_GFS_v15p2_no_nsst.xml.txt index 7a60f5e1c..44f8e8296 100644 --- a/physics/docs/pdftxt/suite_FV3_GFS_v15p2_no_nsst.xml.txt +++ b/physics/docs/pdftxt/suite_FV3_GFS_v15p2_no_nsst.xml.txt @@ -4,7 +4,7 @@ \code - + diff --git a/physics/docs/pdftxt/suite_FV3_GFS_v16beta.xml.txt b/physics/docs/pdftxt/suite_FV3_GFS_v16beta.xml.txt index 4abafe01a..fb14b32b5 100644 --- a/physics/docs/pdftxt/suite_FV3_GFS_v16beta.xml.txt +++ b/physics/docs/pdftxt/suite_FV3_GFS_v16beta.xml.txt @@ -4,7 +4,7 @@ \code - + diff --git a/physics/docs/pdftxt/suite_FV3_GFS_v16beta_no_nsst.xml.txt b/physics/docs/pdftxt/suite_FV3_GFS_v16beta_no_nsst.xml.txt index e783be1f9..0cc7a08da 100644 --- a/physics/docs/pdftxt/suite_FV3_GFS_v16beta_no_nsst.xml.txt +++ b/physics/docs/pdftxt/suite_FV3_GFS_v16beta_no_nsst.xml.txt @@ -4,7 +4,7 @@ \code - + diff --git a/physics/docs/pdftxt/suite_FV3_RRFS_v1beta.xml.txt b/physics/docs/pdftxt/suite_FV3_RRFS_v1beta.xml.txt new file mode 100644 index 000000000..681e9d21c --- /dev/null +++ b/physics/docs/pdftxt/suite_FV3_RRFS_v1beta.xml.txt @@ -0,0 +1,91 @@ +/** +\page FV3_RRFS_v1beta_sdf RRFS_v1beta Suite Definition File + +\code + + + + + + + GFS_time_vary_pre + GFS_rrtmg_setup + GFS_rad_time_vary + GFS_phys_time_vary + + + + + GFS_suite_interstitial_rad_reset + sgscloud_radpre + GFS_rrtmg_pre + rrtmg_sw_pre + rrtmg_sw + rrtmg_sw_post + rrtmg_lw_pre + rrtmg_lw + sgscloud_radpost + rrtmg_lw_post + GFS_rrtmg_post + + + + + GFS_suite_interstitial_phys_reset + GFS_suite_stateout_reset + get_prs_fv3 + GFS_suite_interstitial_1 + GFS_surface_generic_pre + GFS_surface_composites_pre + dcyc2t3 + GFS_surface_composites_inter + GFS_suite_interstitial_2 + + + + mynnsfc_wrapper + GFS_surface_loop_control_part1 + sfc_nst_pre + sfc_nst + sfc_nst_post + noahmpdrv + sfc_sice + GFS_surface_loop_control_part2 + + + + GFS_surface_composites_post + sfc_diag + sfc_diag_post + GFS_surface_generic_post + mynnedmf_wrapper + GFS_GWD_generic_pre + cires_ugwp + cires_ugwp_post + GFS_GWD_generic_post + rayleigh_damp + GFS_suite_stateout_update + ozphys_2015 + h2ophys + get_phi_fv3 + GFS_suite_interstitial_3 + GFS_suite_interstitial_4 + GFS_MP_generic_pre + mp_thompson_pre + mp_thompson + mp_thompson_post + GFS_MP_generic_post + maximum_hourly_diagnostics + + + + + GFS_stochastics + + + + + +\endcode + +*/ diff --git a/physics/docs/pdftxt/suite_input.nml.txt b/physics/docs/pdftxt/suite_input.nml.txt index 2565c58eb..360187bd7 100644 --- a/physics/docs/pdftxt/suite_input.nml.txt +++ b/physics/docs/pdftxt/suite_input.nml.txt @@ -3,82 +3,98 @@ The SCM and the UFS Atmosphere access runtime configurations from file \c input.nml. This file contains various namelists records that control aspects of the I/O, dynamics, physics etc. Most physics-related options are in -reords \b &gfs_physics_nml and \b &cires_ugwp_nml. When using the GFDL microphysics scheme, variables in namelist -\b &gfdl_cloud_microphysics_nml are also used. Additional specifications for stochastic physics are in -namelists \b &stochy_nam and \b &nam_sfcperts. +records \b &gfs_physics_nml. Some schemes have their own namelist records as described below. + +- Namelist \b &gfs_physics_nml pertains to all of the suites used, but some of the variables are only relevant for specific +parameterizations. Its variables are defined in file GFS_typedefs.F90 in the host model. - Namelist \b &gfdl_cloud_microphysics_nml is only relevant when the GFDL microphysics is used, and its variables are defined in module_gfdl_cloud_microphys.F90. - Namelist \b &cires_ugwp_nml specifies options for the use of CIRES Unified Gravity Wave Physics Version 0. -- Namelist \b &gfs_physics_nml pertains to all of the suites used, but some of the variables are only relevant for specific -parameterizations. Its variables are defined in file GFS_typedefs.F90 in the host model. +- Namelist \b &nam_sfcperts specifies whether and how stochastic perturbations are used in the Noah Land Surface Model. -- Namelist \b &stochy_nam specifies options for the use of SPPT, SKEB and SHUM, while namelist \b &nam_sfcperts specifies whether -and how stochastic perturbations are used in the Noah Land Surface Model. +Both the SDF and the input.nml contain information about how to specify the physics suite. Some +of this information is redundant, and the user must make sure they are compatible.The safest +practice is to use the SDF and namelist provided for each suite, since those are supported +configurations. Changes to the SDF must be accompanied by corresponding changes to the namelist. +While there is not a one-to-one correspondence between the namelist and the SDF, the tables below +show some variables in the namelist that must match the SDF. -
NML Description
option DDT in Host Model Description Default Value -
\b &gfs_physics_nml -
fhzero gfs_control_type hour between clearing of diagnostic buckets 0.0 -
h2o_phys gfs_control_type flag for stratosphere h2o scheme .false. -
ldiag3d gfs_control_type flag for 3D diagnostic fields .false. -
lssav gfs_control_type logical flag for storing diagnostics .false. -
cplflx gfs_control_type logical flag for cplflx collection .false. -
cplwav gfs_control_type logical flag for cplwav collection .false. -
cplchm gfs_control_type logical flag for chemistry collection .false. -
lsidea gfs_control_type logical flag for idealized physics .false. -
oz_phys gfs_control_type flag for old (2006) ozone physics .true. -
oz_phys_2015 gfs_control_type flag for new (2015) ozone physics .false. -
fhcyc gfs_control_type frequency for surface data cycling in hours 0.0 -
use_ufo gfs_control_type flag for using unfiltered orography surface option .false. -
pre_rad gfs_control_type flag for testing purpose .false. -
ncld gfs_control_type number of hydrometeors 1 -
imp_physics gfs_control_type choice of microphysics scheme: \n +
Option CCPP scheme or interstitial Description Default Value +
\b General \b options +
fhzero GFS_phys_time_vary hour between clearing of diagnostic buckets 0.0 +
h2o_phys h2ophys flag for stratosphere h2o scheme .false. +
ldiag3d see \a GFS_typedefs.F90 flag for 3D diagnostic fields .false. +
qdiag3d see \a GFS_typedefs.F90 flag for 3D tracer diagnostic fields .false. +
lssav see \a GFS_typedefs.F90 flag for storing diagnostics .false. +
cplflx see \a GFS_typedefs.F90 flag for using fluxes provided by an external model .false. +
cplwav see \a GFS_typedefs.F90 flag for using information produced by an external ocean wave model .false. +
cplchm see \a GFS_typedefs.F90 flag for coupled chemistry diagnostics .false. +
cplwav2atm see \a GFS_typedefs.F90 flag for wave to atm coupling .false. +
lsidea rayleigh_damp flag for idealized physics .false. +
oz_phys_2015 ozphys_2015 flag for new (2015) ozone physics .false. +
fhcyc GFS_phys_time_vary frequency for surface data cycling in hours 0.0 +
use_ufo GFS_phys_time_vary flag for using unfiltered orography surface option .false. +
ncld see \a GFS_typedefs.F90 number of hydrometeors 1 +
do_mynnsfclay see \a GFS_typedefs.F90 flag to activate MYNN-SFCLAY scheme .false. +
prslrd0 rayleigh_damp pressure level above which to apply Rayleigh damping 0.0d0 +
ral_ts rayleigh_damp time scale for Rayleigh damping in days 0.0d0 +
do_sppt GFS_stochastics flag for stochastic SPPT option .false. +
do_shum GFS_stochastics flag for stochastic SHUM option .false. +
do_skeb GFS_stochastics flag for stochastic SKEB option .false. +
do_sfcperts GFS_rrtmg_pre flag for stochastic surface perturbations option .false. +
imp_physics choice of microphysics scheme choice of microphysics scheme: \n
  • 11: GFDL microphysics scheme
  • 8: Thompson microphysics scheme
  • 10: Morrison-Gettelman microphysics scheme
99 -
pdfcld gfs_control_type flag for PDF clouds .false. -
fhswr gfs_control_type frequency for shortwave radiation (secs) 3600. -
fhlwr gfs_control_type frequency for longwave radiation (secs) 3600. -
levr gfs_control_type number of vertical levels for radiation calculations -99 -
nfxr gfs_control_type second dimension of radiation input/output array fluxr 39+6 -
iflip gfs_control_type control flag for vertical index direction \n +
\b Parameters \b related \b to \b radiation \b scheme \b options +
pdfcld GFS_rrtmg_pre flag for PDF clouds .false. +
fhswr rrtmg_sw frequency for shortwave radiation (secs) 3600. +
fhlwr rrtmg_lw frequency for longwave radiation (secs) 3600. +
levr GFS_rrtmg_setup number of vertical levels for radiation calculations -99 +
nfxr GFS_rrtmg_pre second dimension of radiation input/output array fluxr 39+6 +
iflip GFS_rrtmg_setup control flag for vertical index direction \n
  • 0: index from TOA to surface
  • 1: index from surface to TOA
1 -
icliq_sw gfs_control_type sw optical property for liquid clouds \n +
icliq_sw rrtmg_sw sw optical property for liquid clouds \n
  • 0: input cloud optical depth, ignoring iswcice setting
  • 1: cloud optical property scheme based on Hu and Stamnes (1993) \cite hu_and_stamnes_1993 method
  • 2: cloud optical property scheme based on Hu and Stamnes (1993) \cite hu_and_stamnes_1993 - updated
1 -
iovr_sw gfs_control_type control flag for cloud overlap in SW radiation \n +
iovr_sw rrtmg_sw control flag for cloud overlap in SW radiation \n
  • 0: random overlapping clouds
  • 1: max/ran overlapping clouds
  • 2: maximum overlap clouds (mcica only)
  • 3: decorrelation-length overlap (mcica only) +
  • 4: exponential overlapping method +
  • 5: exponential-random overlapping method
1 -
iovr_lw gfs_control_type control flag for cloud overlap in LW radiation \n +
iovr_lw rrtmg_lw control flag for cloud overlap in LW radiation \n
  • 0: random overlapping clouds
  • 1: max/ran overlapping clouds
  • 2: maximum overlap clouds (mcica only)
  • 3: decorrelation-length overlap (mcica only) +
  • 4: exponential overlapping method +
  • 5: exponential-random overlapping method
1 -
ictm gfs_control_type external data time/date control flag \n +
ictm GFS_rrtmg_setup external data time/date control flag \n
  • -2: same as 0, but superimpose seasonal cycle from climatology data set
  • -1: use user provided external data for the forecast time, no extrapolation @@ -88,31 +104,31 @@ and how stochastic perturbations are used in the Noah Land Surface Model.
  • yyyy1: use yyyy data for the forecast. if needed, do extrapolation to match the fcst time
1 -
crick_proof gfs_control_type control flag for eliminating CRICK \n +
crick_proof GFS_rrtmg_setup control flag for eliminating CRICK \n
  • .true.: apply layer smoothing to eliminate CRICK
  • .false.: do not apply layer smoothing
.false. -
ccnorm gfs_control_type control flag for in-cloud condensate mixing ratio \n +
ccnorm GFS_rrtmg_setup control flag for in-cloud condensate mixing ratio \n
  • .true.: normalize cloud condensate
  • .false.: not normalize cloud condensate
.false. -
norad_precip gfs_control_type control flag for not using precip in radiation (Ferrier scheme) \n +
norad_precip GFS_rrtmg_setup control flag for not using precip in radiation (Ferrier scheme) \n
  • .true.: snow/rain has no impact on radiation
  • .false.: snow/rain has impact on radiation
.false. -
ialb gfs_control_type SW surface albedo control flag: \n +
ialb GFS_rrtmg_setup SW surface albedo control flag: \n
  • 0: using climatology surface albedo scheme for SW
  • 1: using MODIS based land surface albedo for SW
0 -
iems gfs_control_type LW surface emissivity control flag (ab 2-digit integer) : \n +
iems GFS_rrtmg_setup LW surface emissivity control flag (ab 2-digit integer) : \n
  • a: =0 set surface air/ground t same for LW radiation
  • =1 set surface air/ground t diff for LW radiation @@ -121,7 +137,7 @@ and how stochastic perturbations are used in the Noah Land Surface Model.
  • =2 future development (not yet)
0 -
iaer gfs_control_type 4-digit aerosol flag (dabc for aermdl, volcanic, LW, SW): \n +
iaer GFS_rrtmg_setup 4-digit aerosol flag (dabc for aermdl, volcanic, LW, SW): \n
  • d:tropospheric aerosol model scheme flag \n =0 or none, opac-climatology aerosol scheme \n @@ -136,28 +152,28 @@ and how stochastic perturbations are used in the Noah Land Surface Model. =1 include tropospheric aerosol in SW
1 -
ico2 gfs_control_type \f$CO_2\f$ data source control flag:\n +
ico2 GFS_rrtmg_setup \f$CO_2\f$ data source control flag:\n
  • 0: prescribed value (380 ppmv)
  • 1: yearly global averaged annual mean from observations
  • 2: monthly 15 degree horizontal resolution from observations
0 -
isubc_sw gfs_control_type subgrid cloud approximation control flag in SW radiation: \n +
isubc_sw rrtmg_sw subgrid cloud approximation control flag in SW radiation: \n
  • 0: no McICA approximation in SW radiation
  • 1: use McICA with prescribed permutation seeds (test mode)
  • 2: use McICA with randomly generated permutation seeds
0 -
isubc_lw gfs_control_type subgrid cloud approximation control flag in LW radiation: \n +
isubc_lw rrtmg_lw subgrid cloud approximation control flag in LW radiation: \n
  • 0: no McICA approximation in LW radiation
  • 1: use McICA with prescribed permutatition seeds (test mode)
  • 2: use McICA with randomly generated permutation seeds
0 -
isol gfs_control_type solar constant scheme control flag: \n +
isol GFS_rrtmg_setup solar constant scheme control flag: \n
  • 0: fixed value = 1366.0 \f$W m^{-2}\f$ (old standard)
  • 10: fixed value = 1360.8 \f$W m^{-2}\f$ (new standard) @@ -167,31 +183,11 @@ and how stochastic perturbations are used in the Noah Land Surface Model.
  • 4: CMIP5 TIM-scale TSI table (monthly) with 11-yr cycle approximation
0 -
lwhtr gfs_control_type logical flag for output of longwave heating rate .true. -
swhtr gfs_control_type logical flag for output of shortwave heating rate .true. -
cnvgwd gfs_control_type logical flag for convective gravity wave drag scheme dependent on maxval(cdmbgwd(3:4) == 0.0) .false. -
shal_cnv gfs_control_type logical flag for calling shallow convection .false. -
lmfshal gfs_control_type flag for mass-flux shallow convection scheme in the cloud fraction calculation shal_cnv .and. (imfshalcnv > 0) -
lmfdeep2 gfs_control_type flag for mass-flux deep convection scheme in the cloud fraction calculation imfdeepcnv == 2 .or. 3 .or.4 -
cal_pre gfs_control_type logical flag for calling precipitation type algorithm .false. -
redrag gfs_control_type logical flag for applying reduced drag coefficient for high wind over sea in GFS surface layer scheme .false. -
dspheat gfs_control_type logical flag for using TKE dissipative heating to temperature tendency in hybrid EDMF and TKE-EDMF schemes .false. -
hybedmf gfs_control_type logical flag for calling hybrid EDMF PBL scheme .false. -
satmedmf gfs_control_type logical flag for calling TKE EDMF PBL scheme .false. -
isatmedmf gfs_control_type flag for scale-aware TKE-based moist EDMF scheme \n -
    -
  • 0: initial version of satmedmf (Nov.2018) -
  • 1: updated version of satmedmf (as of May 2019) -
-
0 -
do_mynnedmf gfs_control_type flag to activate MYNN-EDMF scheme .false. -
random_clds gfs_control_type logical flag for whether clouds are random .false. -
trans_trac gfs_control_type logical flag for convective transport of tracers .false. -
lheatstrg gfs_control_type logical flag for canopy heat storage parameterization .false. -
shinhong gfs_control_type flag for scale-aware Shinhong PBL scheme .false. -
do_ysu gfs_control_type flag for YSU PBL scheme .false. -
cnvcld gfs_control_type logical flag for convective cloud .false. -
imfshalcnv gfs_control_type flag for mass flux shallow convective scheme:\n +
lwhtr rrtmg_lw flag for output of longwave heating rate .true. +
swhtr rrtmg_sw flag for output of shortwave heating rate .true. +
nhfrad GFS_time_vary_pre number of timesteps for which to call radiation on physics timestep (coldstarts) 0 +
\b Parameters \b related \b to \b cumulus \b schemes +
imfshalcnv choice of shallow convective scheme flag for mass flux shallow convective scheme:\n
  • 1:July 2010 version of mass-flux shallow convective scheme (operational as of 2016)
  • 2: scale- & aerosol-aware mass-flux shallow convective scheme (2017) @@ -201,7 +197,7 @@ and how stochastic perturbations are used in the Noah Land Surface Model.
  • -1: no shallow convection used
1 -
imfdeepcnv gfs_control_type flag for mass-flux deep convective scheme:\n +
imfdeepcnv choice of deep convective scheme flag for mass-flux deep convective scheme:\n
  • -1: Chikira-Sugiyama deep convection (with \b cscnv = .T.)
  • 1: July 2010 version of SAS convective scheme (operational version as of 2016) @@ -210,311 +206,246 @@ and how stochastic perturbations are used in the Noah Land Surface Model.
  • 4: new Tiedtke scheme (CAPS)
1 -
lgfdlmprad gfs_control_type flag for GFDL mp scheme and radiation consistency .false. -
cdmbgwd(4) gfs_control_type multiplication factors for mountain blocking(1), orographic gravity wave drag(2) -
    -
  • [1]: GWDPS mountain blocking -
  • [2]: GWDPS orographic gravity wave drag -
  • [3]: the modulation total momentum flux of NGWs by intensities of the total precipitation -
  • [4]: TKE for future tests and applications -
-
2.0,0.25,1.0,1.0 -
prslrd0 gfs_control_type pressure level above which to apply Rayleigh damping 0.0d0 -
lsm gfs_control_type flag for land surface model to use \n -
    -
  • 1: Noah LSM -
  • 2: RUC LSM -
-
1 -
lsoil gfs_control_type number of soil layers 4 -
ivegsrc gfs_control_type flag for vegetation type dataset choice: \n +
do_deep see \a GFS_typedefs.F90 consistency check for deep convection .true. +
shal_cnv GFS_suite_interstitial flag for calling shallow convection .false. +
lmfshal GFS_rrtmg_pre flag for mass-flux shallow convection scheme in the cloud fraction calculation shal_cnv .and. (imfshalcnv > 0) +
lmfdeep2 GFS_rrtmg_pre flag for mass-flux deep convection scheme in the cloud fraction calculation imfdeepcnv == 2 .or. 3 .or.4 +
random_clds GFS_phys_time_vary flag for whether clouds are random .false. +
trans_trac GFS_suite_interstitial flag for convective transport of tracers .false. +
cal_pre GFS_phys_time_vary or GFS_MP_generic flag for calling precipitation type algorithm .false. +
shcnvcw \ref samfshalcnv flag for shallow convective cloud .false. +
cscnv cs_conv flag for Chikira-Sugiyama deep convection .false. +
do_aw cs_conv flag for Arakawa-Wu scale-awere adjustment .false. +
do_shoc cs_conv flag for Simplified Hihger-order Closure (SHOC) .false. +
do_awdd cs_conv flag to enable treating convective tendencies following Arakwaw-Wu for downdrafts (2013) .false. +
cs_parm(10) cs_conv tunable parameters for Chikira-Sugiyama convection 8.0,4.0,1.0e3,3.5e3,20.0,1.0,-999.,1.,0.6,0. +
\b Parameters \b related \b to \b PBL \b scheme \b options +
do_mynnedmf mynnedmf_wrapper* flag to activate MYNN-EDMF scheme .false. +
do_myjsfc myjpbl_wrapper flag for MYJ surface layer scheme .false +
dspheat \ref satmedmfvdifq, \ref hedmf flag for using TKE dissipative heating to temperature tendency in hybrid EDMF and TKE-EDMF schemes .false. +
satmedmf \ref satmedmfvdifq flag for calling scale-ware TKE-based EDMF PBL scheme .false. +
isatmedmf \ref satmedmfvdifq flag for scale-aware TKE-based moist EDMF scheme \n
    -
  • 0: USGS -
  • 1: IGBP(20 category) -
  • 2: UMD (13 category) -
-
2 -
isot gfs_control_type flag for soil type dataset choice:\n -
    -
  • 0: Zobler soil type (9 category) -
  • 1: STATSGO soil type (19 category) -
-
0 -
mom4ice gfs_control_type flag controls mom4 sea ice .false. -
debug gfs_control_type flag for debug printout .false. -
nstf_name(5) gfs_control_type NSST related paramters:\n -
    -
  • nstf_name(1): 0=NSST off, 1= NSST on but uncoupled, 2= NSST on and coupled -
  • nstf_name(2): 1=NSST spin up on, 0=NSST spin up off -
  • nstf_name(3): 1=NSST analysis on, 0=NSST analysis off -
  • nstf_name(4): zsea1 in mm -
  • nstf_name(5): zesa2 in mm -
-
/0,0,1,0,5/ -
nst_anl gfs_control_type flag for NSST analysis in gcycle/sfcsub .false. -
effr_in gfs_control_type logical flag for using input cloud effective radii calculation .false. -
aero_in gfs_control_type logical flag for using aerosols in Morrison-Gettelman microphysics .false. -
iau_delthrs gfs_control_type incremental analysis update (IAU) time interval in hours 6 -
iaufhrs gfs_control_type forecast hours associated with increment files -1 -
\b Parameters \b Specific \b to \b csawmg \b Suite -
crtrh(3) gfs_control_type critical relative humidity at the surface, PBL top and at the top of the atmosphere 0.90,0.90,0.90 -
cscnv gfs_control_type logical flag for Chikira-Sugiyama deep convection .false. -
do_aw gfs_control_type flag for Arakawa-Wu scale-awere adjustment .false. -
do_awdd gfs_control_type flag to enable treating convective tendencies following Arakwaw-Wu for downdrafts (2013) .false. -
do_sb_physics gfs_control_type logical flag for SB2001 autoconversion or accretion .true. -
do_cldice gfs_control_type flag for cloud ice processes for MG microphysics .true. -
hetfrz_classnuc gfs_control_type flag for heterogeneous freezing for MG microphysics .false. -
mg_nccons gfs_control_type flag for constant droplet concentration for MG microphysics .false. -
mg_nicons gfs_control_type flag for constant ice concentration for MG microphysics .false. -
mg_ngcons gfs_control_type flag for constant graupel concentration for MG microphysics .false. -
sed_supersat gfs_control_type flag for allowing supersaturation after sedimentation for MG microphysics .true. -
mg_do_graupel gfs_control_type flag for turning on prognostic graupel (with fprcp=2) .true. -
mg_do_hail gfs_control_type flag for turning on prognostic hail (with fprcp=2) .false. -
shcnvcw gfs_control_type logical flag for shallow convective cloud .false. -
xkzm_h gfs_control_type background vertical diffusion for heat and q 1.0d0 -
xkzm_m gfs_control_type background vertical diffusion for momentum 1.0d0 -
xkzm_s gfs_control_type sigma threshold for background mom. diffusion 1.0d0 -
xkzminv gfs_control_type maximum background value of heat diffusivity in the inversion layer 0.3 -
microp_uniform gfs_control_type logical flag for uniform subcolumns for MG microphysics .true. -
mg_do_ice_gmao gfs_control_type logical flag for turning on gmao ice autoconversion in MG microphysics .false. -
mg_do_liq_liu gfs_control_type logical flag for turning on Liu liquid treatment in MG microphysics .true. -
mg_dcs gfs_control_type autoconversion size threshold for cloud ice to snow in MG microphysics 200.0 -
mg_alf gfs_control_type tuning factor for alphas (alpha = 1 - critical relative humidity) 1.0 -
mg_ts_auto_ice(2) gfs_control_type autoconversion time scale for ice in MG microphysics 180.0,180.0 -
mg_qcvar gfs_control_type cloud water relative variance in MG microphysics 1.0 -
mg_rhmini gfs_control_type relative humidity threshold parameter for nucleating ice 1.01 -
mg_ncnst gfs_control_type constant droplet num concentration \f$m^{-3}\f$ 100.e6 -
mg_ninst gfs_control_type constant ice num concentration \f$m^{-3}\f$ 0.15e6 -
mg_ngnst gfs_control_type constant graupel/hail num concertration \f$m^{-3}\f$ 0.10e6 -
mg_berg_eff_factor gfs_control_type berg efficiency factor 2.0 -
mg_qcmin(2) gfs_control_type min liquid and ice mixing ratio in MG macro clouds 1.0d-9, 1.0d-9 -
mg_precip_frac_method gfs_control_type type of precipitation fraction method 'max_overlap' -
fprcp gfs_control_type number of frozen precipitation species in MG microphysics \n -
    -
  • 0: no prognostic rain and snow -
  • 1: MG2 -
  • 2: MG3 +
  • 0: initial version of satmedmf (Nov.2018) +
  • 1: updated version of satmedmf (as of May 2019)
-
0 -
pdfflag gfs_control_type pdf flag for MG macro physics 4 -
cs_parm(10) gfs_control_type tunable parameters for Chikira-Sugiyama convection 8.0,4.0,1.0e3,3.5e3,20.0,1.0,-999.,1.,0.6,0. -
iccn gfs_control_type flag for using IN and CCN forcing in MG2/3 microphysics .false. -
rhcmax gfs_control_type maximum critical relative humidity 0.9999999 -
\b Parameters \b Specific \b to \b GSD_v0 \b Suite -
ltaerosol gfs_control_type logical flag for using aerosol climotology in Thompson MP scheme .false. -
lradar gfs_control_type logical flag for computing radar reflectivity in Thompson MP scheme .false. -
ttendlim gfs_control_type temperature tendency limiter per time step in K/s, set to < 0 to deactivate -999.0 -
do_mynnsfclay gfs_control_type flag to activate MYNN-SFCLAY scheme .false. -
grav_settling gfs_control_type flag to activate gravitational settling of cloud droplets as described in Nakanishi (2000) \cite nakanishi_2000 0 -
bl_mynn_mixlength gfs_control_type flag for different version of mixing length formulation \n + 0 +
hybedmf \ref hedmf flag for calling hybrid EDMF PBL scheme .false. +
shinhong shinhongvdif flag for scale-aware Shinhong PBL scheme .false. +
do_ysu see \a GFS_typedefs.F90 flag for YSU PBL scheme .false. +
debug see \a GFS_typedefs.F90 flag for debug printout .false. +
xkzm_h \ref satmedmfvdifq, \ref hedmf background vertical diffusion for heat and q 1.0d0 +
xkzm_m \ref satmedmfvdifq, \ref hedmf background vertical diffusion for momentum 1.0d0 +
xkzm_s \ref satmedmfvdifq, \ref hedmf sigma threshold for background mom. diffusion 1.0d0 +
xkzminv \ref hedmf maximum background value of heat diffusivity in the inversion layer 0.3 +
moninq_fac \ref hedmf atmosphere diffusivity coefficient factor 1.0 +
dspfac \ref satmedmfvdifq TKE dissipative heating factor 1.0 +
bl_upfr \ref satmedmfvdifq updraft fraction in boundary layer mass flux scheme 0.13 +
bl_dnfr \ref satmedmfvdifq downdraft fraction in boundary layer mass flux scheme 0.1 +
grav_settling mynnedmf_wrapper flag to activate gravitational settling of cloud droplets as described in Nakanishi (2000) \cite nakanishi_2000 0 +
bl_mynn_mixlength mynnedmf_wrapper flag for different version of mixing length formulation \n
  • 0: Original form from Nakanishi and Niino (2009) \cite NAKANISHI_2009 . NO scale-awareness is applied to the master mixing length, regardless of "scaleware" setting
  • 1: HRRR operational form 201609-201807. Designed to work without the mass-flux scheme. Uses BouLac mixing length in free atmosphere.
  • 2: HRRR operational form 201807-present. Designed to be compatible with mass-flux scheme activated (default)
2 -
bl_mynn_edmf gfs_control_type flag to activate the mass-flux scheme \n +
bl_mynn_edmf mynnedmf_wrapper flag to activate the mass-flux scheme \n
  • 0: deactivate mass-flux scheme
  • 1: activate dynamic multiplume mass-flux scheme
0 -
bl_mynn_edmf_mom gfs_control_type flag to activate the transport of momentum \n +
bl_mynn_edmf_mom mynnedmf_wrapper flag to activate the transport of momentum \n
  • 0: deactivate momentum transport in mass-flux scheme
  • 1: activate momentum transport in dynamic multiplume mass-flux scheme. \p bl_mynn_edmf must be set to 1
1 -
bl_mynn_edmf_tke gfs_control_type flag to activate the transport of TKE \n +
bl_mynn_edmf_tke mynnedmf_wrapper flag to activate the transport of TKE \n
  • 0: deactivate TKE transport in mass-flux scheme
  • 1: activate TKE transport in dynamic multiplume mass-flux scheme. \p bl_mynn_edmf must be set to 1
0 -
bl_mynn_edmf_part gfs_control_type flag to partitioning the MF and ED areas 0 -
bl_mynn_edmf_tkeadvect gfs_control_type activate computation of TKE advection (not yet in use for FV3) \n +
bl_mynn_edmf_part mynnedmf_wrapper flag to partitioning the MF and ED areas 0 +
bl_mynn_tkeadvect mynnedmf_wrapper activate computation of TKE advection (not yet in use for FV3) \n
  • false: deactivate TKE advection
  • true: activate TKE advection
.false. -
bl_mynn_edmf_tkebudget gfs_control_type flag to activate TKE budget 0 -
bl_mynn_edmf_cloudpdf gfs_control_type flag to determine which cloud PDF to use \n +
bl_mynn_tkebudget mynnedmf_wrapper flag to activate TKE budget 0 +
bl_mynn_cloudpdf mynnedmf_wrapper flag to determine which cloud PDF to use \n
  • 0: use Sommeria-Deardorff subgrid cloud PDF
  • 1: use Kuwano-Yoshida subgrid cloud PDF
  • 2: use modified Chaboureau-Bechtold subgrid cloud PDF
2 -
bl_mynn_edmf_cloudmix gfs_control_type flag to activate mixing of cloud species \n +
bl_mynn_edmf_cloudmix mynnedmf_wrapper flag to activate mixing of cloud species \n
  • 0: deactivate the mixing of any water species mixing ratios
  • 1: activate the mixing of all water species mixing ratios
1 -
bl_mynn_mixqt gfs_control_type flag to mix total water or individual species \n +
bl_mynn_mixqt mynnedmf_wrapper flag to mix total water or individual species \n
  • 0: mix individual water species separately
  • 1: DO NOT USE
0 -
icloud_bl gfs_control_type flag to coupling SGS clouds to radiation \n +
icloud_bl mynnedmf_wrapper flag to coupling SGS clouds to radiation \n
  • 0: deactivate coupling subgrid clouds to radiation
  • 1: activate subgrid cloud coupling to radiation (highly suggested)
1 -
lsoil_lsm gfs_control_type number of soil layers internal to land surface model -1 -
ldiag_ugwp GFS_control_type flag for CIRES UGWP diagnostics .false. -
do_ugwp GFS_control_type flag for CIRES UGWP revised OGW -
    -
  • .T.: revised gwdps_v0 -
  • .F.: GFS operational orographic gwdps -
-
.false. -
do_tofd GFS_control_type flag for turbulent orographic form drag .false. -
do_sppt gfs_control_type flag for stochastic SPPT option .false. -
do_shum gfs_control_type flag for stochastic SHUM option .false. -
do_skeb gfs_control_type flag for stochastic SKEB option .false. -
do_sfcperts gfs_control_type flag for stochastic surface perturbations option .false. -
\b &nam_sfcperts -
nsfcpert gfs_control_type number of weights for stochastic surface perturbation 0 -
pertz0 gfs_control_type magnitude of perturbation of momentum roughness length -999. -
pertzt gfs_control_type magnitude of perturbation of heat to momentum roughness length ratio -999. -
pertshc gfs_control_type magnitude of perturbation of soil hydraulic conductivity -999. -
pertlai gfs_control_type magnitude of perturbation of leaf area index -999. -
pertalb gfs_control_type magnitude of surface albedo perturbation -999. -
pertvegf gfs_control_type magnitude of perturbation of vegetation fraction -999. -
iseed_sfc compns_stochy_mod random seeds (if 0 use system clock) 0 -
sfc_tau compns_stochy_mod time scales -999. -
sfc_lscale compns_stochy_mod length scales -999. -
sppt_land compns_stochy_mod .false. -
\b &stochy_nam -
use_zmtnblck compns_stochy_mod flag for mountain blocking. .T. = do not apply perturbations below the dividing streamline that is diagnosed by the gravity wave drag, mountain blocking scheme .false. -
ntrunc compns_stochy_mod spectral resolution (e.g. T126) of random patterns -999 -
lon_s, lat_s compns_stochy_mod number of longitude and latitude point for the Gaussian grid -999 -
fhstoch compns_stochy_mod forecast hour to write out random pattern in order to restart the pattern for a different forecast (used in DA), file is stoch_out.F -999.0 -
stochini compns_stochy_mod set to true if wanting to read in a previous random pattern (input file need to be named \c stoch_ini) .false. -
sppt compns_stochy_mod amplitude of random patterns -999. -
sppt_tau compns_stochy_mod decorrelation timescales in seconds -999. -
sppt_lscale compns_stochy_mod decorrelation spatial scales in meters -999. -
sppt_logit compns_stochy_mod logit transform for SPPT to bounded interval [-1,+1] .false. -
iseed_sppt compns_stochy_mod seeds for setting the random number sequence (ignored if \c stochini is true) 0 -
sppt_sigtop1, sppt_sigtop2 compns_stochy_mod sigma levels to taper perturbations to zeros 0.1, 0.025 -
sppt_sfclimit compns_stochy_mod reduce amplitude of SPPT near surface (lowest 2 levels) .false. -
shum compns_stochy_mod amplitude of stochastic boundary layer specific humidity perturbations -999. -
shum_tau compns_stochy_mod decorrelation time scales in seconds -999. -
shum_lscale compns_stochy_mod decorrelation spatial scales in meters -999. -
shum_sigefold compns_stochy_mod e-folding lengthscale (in units of sigma) of specific humidity perturbations 0.2 -
skeb compns_stochy_mod stochastic KE backscatter amplitude -999. -
skeb_tau compns_stochy_mod decorrelation timescales in seconds -999. -
skeb_lscale compns_stochy_mod decorrelation spatial scales in meter -999. -
iseed_skeb compns_stochy_mod seeds for setting the random number sequnce (ignored if \c stochini is true) 0 -
skeb_vfilt compns_stochy_mod 0 -
skebnorm compns_stochy_mod 0: random pattern is stream function,1: pattern is kenorm, 2: pattern is vorticity 0 -
skeb_varspect_opt compns_stochy_mod Gaussian or power law variance spectrum for SKEB (0: Gaussian, 1: power law) 0 -
skeb_npass compns_stochy_mod number of passes of smoother for dissipation estimate 11 -
skeb_vdof compns_stochy_mod the number of degrees of freedom in the vertical for the SKEB random pattern 5 -
skeb_sigtop1, skeb_sigtop2 compns_stochy_mod sigma levels to taper perturbations to zeros 0.1, 0.025 -
skebint compns_stochy_mod 0 -
\b &gfdl_cloud_microphysics_nml -
sedi_transport gfdl_cloud_microphys_mod logical flag for turning on horizontal momentum transport during sedimentation .true. -
do_sedi_w gfdl_cloud_microphys_mod \a .true. to turn on vertical motion transport during sedimentation. (not supported in GFS physics) .false. -
do_sedi_heat gfdl_cloud_microphys_mod logical flag for turning on horizontal heat transport during sedimentation .true. -
rad_snow gfdl_cloud_microphys_mod logical flag for considering snow in cloud fraction calculation .true. -
rad_graupel gfdl_cloud_microphys_mod logical flag for considering graupel in cloud fraction calculation .true. -
rad_rain gfdl_cloud_microphys_mod logical flag for considering rain in cloud fraction calculation .true. -
cld_min gfdl_cloud_microphys_mod minimum cloud fraction. If total cloud condensate exceeds 1.0e-6 kg/kg, cloud fraction cannot be less than \p cld_min 0.05 -
const_vi gfdl_cloud_microphys_mod logical flag for using constant cloud ice fall speed .false. -
const_vs gfdl_cloud_microphys_mod logical flag for using constant snow fall speed .false. -
const_vg gfdl_cloud_microphys_mod logical flag for using constant graupel fall speed .false. -
const_vr gfdl_cloud_microphys_mod logical flag for using constant rain fall speed .false. -
vi_fac gfdl_cloud_microphys_mod tunable factor for cloud ice fall or the constant cloud ice fall speed when \p const_vi is .true. 1. -
vr_fac gfdl_cloud_microphys_mod tunable factor for rain fall or the constant rain fall speed when \p const_vr is .true. 1. -
vs_fac gfdl_cloud_microphys_mod tunable factor for snow fall or the constant snow fall speed when \p const_vs is .true. 1. -
vg_fac gfdl_cloud_microphys_mod tunable factor for graupel fall or the constant graupel fall speed when \p const_vg is .true. 1. -
vi_max gfdl_cloud_microphys_mod maximum fall speed for cloud ice 0.5 -
vs_max gfdl_cloud_microphys_mod maximum fall speed for snow 5.0 -
vg_max gfdl_cloud_microphys_mod maximum fall speed for graupel 8.0 -
vr_max gfdl_cloud_microphys_mod maximum fall speed for rain 12.0 -
qi_lim gfdl_cloud_microphys_mod cloud ice limiter to prevent large ice built up in cloud ice freezing and deposition 1. -
prog_ccn gfdl_cloud_microphys_mod logical flag for activating prognostic CCN (not supported in GFS Physics) .false. -
do_qa gfdl_cloud_microphys_mod \a .true. to activate inline cloud fraction diagnosis in fast saturation adjustment. \a .false. to activate inline cloud fraction diagnosis in major cloud microphysics .true. -
fast_sat_adj gfdl_cloud_microphys_mod logical flag for adjusting cloud water evaporation (cloud water -> water vapor), cloud water freezing (cloud water -> cloud ice), cloud ice deposition (water vapor -> cloud ice) when fast saturation adjustment is activated (\b do_sat_adj = .true. in \b fv_core_nml block) .true. -
tau_l2v gfdl_cloud_microphys_mod time scale for evaporation of cloud water to water vapor. Increasing(decreasing) \p tau_l2v can decrease(boost) deposition of cloud water to water vapor 300. -
tau_v2l gfdl_cloud_microphys_mod time scale for condensation of water vapor to cloud water. Increasing(decreasing) \p tau_v2l can decrease(boost) condensation of water vapor to cloud water 150. -
tau_g2v gfdl_cloud_microphys_mod time scale for sublimation of graupel to water vapor. Increasing(decreasing) \p tau_g2v can decrease(boost) sublimation of graupel to water vapor 900. -
tau_g2r gfdl_cloud_microphys_mod time scale for graupel melting. Increasing(decreasing) \p tau_g2r can decrease(boost) melting of graupel to rain (graupel-> rain) 600. -
tau_v2g gfdl_cloud_microphys_mod time scale for deposition of water vapor to graupel. Increasing(decreasing) \p tau_v2g can decrease(boost) deposition of water vapor to graupel (water vapor -> graupel) 21600. -
tau_l2r gfdl_cloud_microphys_mod time scale for autoconversion of cloud water to rain. Increasing(decreasing) \p tau_l2r can decrese(boost) autoconversion of cloud water to rain (cloud water -> rain) 900. -
tau_r2g gfdl_cloud_microphys_mod time scale for freezing of rain to graupel. Increasing(decreasing) \p tau_r2g can decrease(boost) freezing of rain to graupel (rain->graupel) 900. -
tau_i2s gfdl_cloud_microphys_mod time scale for autoconversion of cloud ice to snow. Increasing(decreasing) \p tau_i2s can decrease(boost) autoconversion of cloud ice to snow (cloud ice -> snow) 1000. -
tau_imlt gfdl_cloud_microphys_mod time scale for cloud ice melting. Increasing(decreasing) \p tau_imlt can decrease(boost) melting of cloud ice to cloud water or rain (cloud ice -> cloud water or rain) 600. -
tau_smlt gfdl_cloud_microphys_mod time scale for snow melting. Increasing(decreasing) \p tau_smlt can decrease(boost) melting of snow to cloud water or rain (snow-> cloud water or rain) 900. -
rthresh gfdl_cloud_microphys_mod critical cloud water radius for autoconversion (cloud water -> rain). Increasing(decreasing) of \p rthresh makes the autoconversion harder(easier) 10.0e-6 -
dw_land gfdl_cloud_microphys_mod base value for subgrid deviation/variability over land 0.20 -
dw_ocean gfdl_cloud_microphys_mod base value for subgrid deviation/variability over ocean 0.10 -
ql_gen gfdl_cloud_microphys_mod maximum value for cloud water generated from condensation of water vapor (water vapor-> cloud water) 1.0e-3 -
qi_gen gfdl_cloud_microphys_mod maximum value of cloud ice generated from deposition of water vapor (water vapor->cloud ice) or freezing(cloud water -> cloud ice). Increasing(decreasing) \p qi_gen can increas(decrease) cloud ice 1.82e-6 -
ql_mlt gfdl_cloud_microphys_mod maximum value of cloud water allowed from melted cloud ice (cloud ice -> cloud water or rain). Exceedance of which will become rain. Increasing(decreasing) \p ql_mlt can increase(decrease) cloud water and decrease(increase) rain 2.0e-3 -
qs_mlt gfdl_cloud_microphys_mod maximum value of cloud water allowed from melted snow (snow -> cloud water or rain). Exceedance of which will become rain. Increasing(decreasing) \p qs_mlt can increas(decrease) cloud water and decrease (increase) rain 1.0e-6 -
ql0_max gfdl_cloud_microphys_mod threshold of cloud water to rain autoconversion (cloud water -> rain). Increasing(decreasing) \p ql0_max can increase(decrease) rain and decrease(increase) cloud water 2.0e-3 -
qi0_max gfdl_cloud_microphys_mod maximum value of cloud ice generated from other sources like convection. Exceedance of which will become snow. Increasing(decreasing) \p qi0_max can increase(decrease) cloud ice and decrease(increase) snow 1.0e-4 -
qi0_crt gfdl_cloud_microphys_mod threshold of cloud ice to snow autoconversion (cloud ice -> snow). Increasing(decreasing) \p qi0_crt can increase(decrease) cloud ice and decrease(increase) snow 1.0e-4 -
qs0_crt gfdl_cloud_microphys_mod threshold of snow to graupel autoconversion (snow -> graupel). Increasing(decreasing) \p qs0_crt can increase(decrease) snow and decrease(increase) graupel 1.0e-3 -
qc_crt gfdl_cloud_microphys_mod minimum value of cloud condensate to allow partial cloudiness. Partial cloud can only exist when total cloud condensate exceeds \p qc_crt 5.0e-8 -
c_psaci gfdl_cloud_microphys_mod accretion efficiency of cloud ice to snow (cloud ice -> snow). Increasing(decreasing) of \p c_psaci can boost(decrease) the accretion of cloud ice to snow 0.02 -
c_pgacs gfdl_cloud_microphys_mod accretion efficiency of snow to graupel (snow -> graupel). Increasing(decreasing) of \p c_pgacs can boost(decrease) the accretion of snow to graupel 2.0e-3 -
rh_inc gfdl_cloud_microphys_mod relative humidity increment for complete evaporation of cloud water and cloud ice 0.25 -
rh_inr gfdl_cloud_microphys_mod relative humidity increment for sublimation of snow 0.25 -
rh_ins gfdl_cloud_microphys_mod relative humidity increment for minimum evaporation of rain 0.25 -
rthresh gfdl_cloud_microphys_mod critical cloud water radius for autoconversion(cloud water->rain). Increasing(decreasing) of \p rthresh makes the autoconversion harder(easier) 1.0e-5 -
ccn_l gfdl_cloud_microphys_mod base CCN over land. Increasing(decreasing) \p ccn_l can on the one hand boost(decrease) the autoconversion of cloud water to rain, on the other hand make the autoconversion harder(easier). The unit is \f$cm^{-3}\f$ 270. -
ccn_o gfdl_cloud_microphys_mod base CCN over ocean. Increasing(decreasing) \p ccn_o can on the one hand boost(decrease) the autoconversion of cloud water to rain, on the other hand make the autoconversion harder(easier). The unit is \f$cm^{-3}\f$ 90. -
c_paut gfdl_cloud_microphys_mod autoconversion efficiency of cloud water to rain (cloud water -> rain). Increasing(decreasing) of \p c_paut can boost(decrease) the autoconversion of cloud water to rain 0.55 -
c_cracw gfdl_cloud_microphys_mod accretion efficiency of cloud water to rain (cloud water -> rain). Increasing(decreasing) of \p c_cracw can boost(decrease) the accretion of cloud water to rain 0.9 -
sat_adj0 gfdl_cloud_microphys_mod adjust factor for condensation of water vapor to cloud water (water vapor->cloud water) and deposition of water vapor to cloud ice 0.9 -
use_ppm gfdl_cloud_microphys_mod \e true to use PPM fall scheme; \e false to use time-implicit monotonic fall scheme .false. -
use_ccn gfdl_cloud_microphys_mod \e true to compute prescribed CCN. It should be .true. when \p prog_ccn = .false. .false. -
mono_prof gfdl_cloud_microphys_mod \e true to turn on terminal fall with monotonic PPM scheme. This is used together with \p use_ppm=.true. .true. -
z_slope_liq gfdl_cloud_microphys_mod \e true to turn on vertically subgrid linear monotonic slope for autoconversion of cloud water to rain .true. -
z_slope_ice gfdl_cloud_microphys_mod \e true to turn on vertically subgrid linear monotonic slope for autoconversion of cloud ice to snow .false. -
de_ice gfdl_cloud_microphys_mod \e true to convert excessive cloud ice to snow to prevent ice over-built from other sources like convection scheme (not supported in GFS physics) .false. -
fix_negative gfdl_cloud_microphys_mod \e true to fix negative water species using nearby points .false. -
icloud_f gfdl_cloud_microphys_mod flag (0,1,or 2) for cloud fraction diagnostic scheme 0 -
irain_f gfdl_cloud_microphys_mod flag (0 or 1) for cloud water autoconversion to rain scheme. 0: with subgrid variability; 1: no subgrid variability 0 -
mp_time gfdl_cloud_microphys_mod time step of GFDL cloud microphysics (MP). If \p mp_time isn't divisible by physics time step or is larger than physics time step, the actual MP time step becomes \p dt/NINT[dt/MIN(dt,mp_time)] 150. -
alin gfdl_cloud_microphys_mod parameter \a a in Lin et al.(1983). Constant in empirical formula for \f$U_R\f$. Increasing(decreasing) \p alin can boost(decrease) accretion of cloud water by rain and rain evaporation 842. -
clin gfdl_cloud_microphys_mod parameter \a c in Lin et al.(1983). Constant in empirical formula for \f$U_S\f$. Increasing(decreasing) \p clin can boost(decrease) accretion of cloud water by snow, accretion of cloud ice by snow, snow sublimation and deposition, and snow melting 4.8 -
t_min gfdl_cloud_microphys_mod temperature threshold for instant deposition. Deposit all water vapor to cloud ice when temperature is lower than \p t_min 178. -
t_sub gfdl_cloud_microphys_mod temperature threshold for sublimation. Cloud ice, snow or graupel stops(starts) sublimation when temperature is lower(higher) then \p t_sub 184. -
mp_print gfdl_cloud_microphys_mod \a .true. to turn on GFDL cloud microphysics debugging print out. (not supported in GFS physics) .false. -
\b &cires_ugwp_nml -
knob_ugwp_version cires_ugwp_module parameter selects a version of the UGWP implementation in FV3GFS-127L \n +
\b Parameters \b related \b to \b surface \b perturbation \b options +
nsfcpert GFS_surface_generic_pre number of weights for stochastic surface perturbation 0 +
pertz0 GFS_surface_generic_pre magnitude of perturbation of momentum roughness length -999. +
pertzt GFS_surface_generic_pre magnitude of perturbation of heat to momentum roughness length ratio -999. +
pertshc GFS_surface_generic_pre magnitude of perturbation of soil hydraulic conductivity -999. +
pertlai GFS_surface_generic_pre magnitude of perturbation of leaf area index -999. +
pertalb GFS_surface_generic_pre magnitude of surface albedo perturbation -999. +
pertvegf GFS_surface_generic_pre magnitude of perturbation of vegetation fraction -999. +
\b Parameters \b related \b to \b microphysics \b scheme \b options +
lradar gfdl_cloud_microphys flag for computing radar reflectivity in Thompson MP scheme .false. +
sedi_transport gfdl_cloud_microphys flag for turning on horizontal momentum transport during sedimentation .true. +
do_sedi_w gfdl_cloud_microphys \a .true. to turn on vertical motion transport during sedimentation. (not supported in GFS physics) .false. +
do_sedi_heat gfdl_cloud_microphys flag for turning on horizontal heat transport during sedimentation .true. +
rad_snow gfdl_cloud_microphys flag for considering snow in cloud fraction calculation .true. +
rad_graupel gfdl_cloud_microphys flag for considering graupel in cloud fraction calculation .true. +
rad_rain gfdl_cloud_microphys flag for considering rain in cloud fraction calculation .true. +
cld_min gfdl_cloud_microphys minimum cloud fraction. If total cloud condensate exceeds 1.0e-6 kg/kg, cloud fraction cannot be less than \p cld_min 0.05 +
const_vi gfdl_cloud_microphys flag for using constant cloud ice fall speed .false. +
const_vs gfdl_cloud_microphys flag for using constant snow fall speed .false. +
const_vg gfdl_cloud_microphys flag for using constant graupel fall speed .false. +
const_vr gfdl_cloud_microphys flag for using constant rain fall speed .false. +
vi_fac gfdl_cloud_microphys tunable factor for cloud ice fall or the constant cloud ice fall speed when \p const_vi is .true. 1. +
vr_fac gfdl_cloud_microphys tunable factor for rain fall or the constant rain fall speed when \p const_vr is .true. 1. +
vs_fac gfdl_cloud_microphys tunable factor for snow fall or the constant snow fall speed when \p const_vs is .true. 1. +
vg_fac gfdl_cloud_microphys tunable factor for graupel fall or the constant graupel fall speed when \p const_vg is .true. 1. +
vi_max gfdl_cloud_microphys maximum fall speed for cloud ice 0.5 +
vs_max gfdl_cloud_microphys maximum fall speed for snow 5.0 +
vg_max gfdl_cloud_microphys maximum fall speed for graupel 8.0 +
vr_max gfdl_cloud_microphys maximum fall speed for rain 12.0 +
qi_lim gfdl_cloud_microphys cloud ice limiter to prevent large ice built up in cloud ice freezing and deposition 1. +
prog_ccn gfdl_cloud_microphys flag for activating prognostic CCN (not supported in GFS Physics) .false. +
do_qa gfdl_cloud_microphys \a .true. to activate inline cloud fraction diagnosis in fast saturation adjustment. \a .false. to activate inline cloud fraction diagnosis in major cloud microphysics .true. +
fast_sat_adj gfdl_cloud_microphys flag for adjusting cloud water evaporation (cloud water -> water vapor), cloud water freezing (cloud water -> cloud ice), cloud ice deposition (water vapor -> cloud ice) when fast saturation adjustment is activated (\b do_sat_adj = .true. in \b fv_core_nml block) .true. +
tau_l2v gfdl_cloud_microphys time scale for evaporation of cloud water to water vapor. Increasing(decreasing) \p tau_l2v can decrease(boost) deposition of cloud water to water vapor 300. +
tau_v2l gfdl_cloud_microphys time scale for condensation of water vapor to cloud water. Increasing(decreasing) \p tau_v2l can decrease(boost) condensation of water vapor to cloud water 150. +
tau_g2v gfdl_cloud_microphys time scale for sublimation of graupel to water vapor. Increasing(decreasing) \p tau_g2v can decrease(boost) sublimation of graupel to water vapor 900. +
tau_g2r gfdl_cloud_microphys time scale for graupel melting. Increasing(decreasing) \p tau_g2r can decrease(boost) melting of graupel to rain (graupel-> rain) 600. +
tau_v2g gfdl_cloud_microphys time scale for deposition of water vapor to graupel. Increasing(decreasing) \p tau_v2g can decrease(boost) deposition of water vapor to graupel (water vapor -> graupel) 21600. +
tau_l2r gfdl_cloud_microphys time scale for autoconversion of cloud water to rain. Increasing(decreasing) \p tau_l2r can decrese(boost) autoconversion of cloud water to rain (cloud water -> rain) 900. +
tau_r2g gfdl_cloud_microphys time scale for freezing of rain to graupel. Increasing(decreasing) \p tau_r2g can decrease(boost) freezing of rain to graupel (rain->graupel) 900. +
tau_i2s gfdl_cloud_microphys time scale for autoconversion of cloud ice to snow. Increasing(decreasing) \p tau_i2s can decrease(boost) autoconversion of cloud ice to snow (cloud ice -> snow) 1000. +
tau_imlt gfdl_cloud_microphys time scale for cloud ice melting. Increasing(decreasing) \p tau_imlt can decrease(boost) melting of cloud ice to cloud water or rain (cloud ice -> cloud water or rain) 600. +
tau_smlt gfdl_cloud_microphys time scale for snow melting. Increasing(decreasing) \p tau_smlt can decrease(boost) melting of snow to cloud water or rain (snow-> cloud water or rain) 900. +
rthresh gfdl_cloud_microphys critical cloud water radius for autoconversion (cloud water -> rain). Increasing(decreasing) of \p rthresh makes the autoconversion harder(easier) 10.0e-6 +
dw_land gfdl_cloud_microphys base value for subgrid deviation/variability over land 0.20 +
dw_ocean gfdl_cloud_microphys base value for subgrid deviation/variability over ocean 0.10 +
ql_gen gfdl_cloud_microphys maximum value for cloud water generated from condensation of water vapor (water vapor-> cloud water) 1.0e-3 +
qi_gen gfdl_cloud_microphys maximum value of cloud ice generated from deposition of water vapor (water vapor->cloud ice) or freezing(cloud water -> cloud ice). Increasing(decreasing) \p qi_gen can increas(decrease) cloud ice 1.82e-6 +
ql_mlt gfdl_cloud_microphys maximum value of cloud water allowed from melted cloud ice (cloud ice -> cloud water or rain). Exceedance of which will become rain. Increasing(decreasing) \p ql_mlt can increase(decrease) cloud water and decrease(increase) rain 2.0e-3 +
qs_mlt gfdl_cloud_microphys maximum value of cloud water allowed from melted snow (snow -> cloud water or rain). Exceedance of which will become rain. Increasing(decreasing) \p qs_mlt can increas(decrease) cloud water and decrease (increase) rain 1.0e-6 +
ql0_max gfdl_cloud_microphys threshold of cloud water to rain autoconversion (cloud water -> rain). Increasing(decreasing) \p ql0_max can increase(decrease) rain and decrease(increase) cloud water 2.0e-3 +
qi0_max gfdl_cloud_microphys maximum value of cloud ice generated from other sources like convection. Exceedance of which will become snow. Increasing(decreasing) \p qi0_max can increase(decrease) cloud ice and decrease(increase) snow 1.0e-4 +
qi0_crt gfdl_cloud_microphys threshold of cloud ice to snow autoconversion (cloud ice -> snow). Increasing(decreasing) \p qi0_crt can increase(decrease) cloud ice and decrease(increase) snow 1.0e-4 +
qs0_crt gfdl_cloud_microphys threshold of snow to graupel autoconversion (snow -> graupel). Increasing(decreasing) \p qs0_crt can increase(decrease) snow and decrease(increase) graupel 1.0e-3 +
qc_crt gfdl_cloud_microphys minimum value of cloud condensate to allow partial cloudiness. Partial cloud can only exist when total cloud condensate exceeds \p qc_crt 5.0e-8 +
c_psaci gfdl_cloud_microphys accretion efficiency of cloud ice to snow (cloud ice -> snow). Increasing(decreasing) of \p c_psaci can boost(decrease) the accretion of cloud ice to snow 0.02 +
c_pgacs gfdl_cloud_microphys accretion efficiency of snow to graupel (snow -> graupel). Increasing(decreasing) of \p c_pgacs can boost(decrease) the accretion of snow to graupel 2.0e-3 +
rh_inc gfdl_cloud_microphys relative humidity increment for complete evaporation of cloud water and cloud ice 0.25 +
rh_inr gfdl_cloud_microphys relative humidity increment for sublimation of snow 0.25 +
rh_ins gfdl_cloud_microphys relative humidity increment for minimum evaporation of rain 0.25 +
rthresh gfdl_cloud_microphys critical cloud water radius for autoconversion(cloud water->rain). Increasing(decreasing) of \p rthresh makes the autoconversion harder(easier) 1.0e-5 +
ccn_l gfdl_cloud_microphys base CCN over land. Increasing(decreasing) \p ccn_l can on the one hand boost(decrease) the autoconversion of cloud water to rain, on the other hand make the autoconversion harder(easier). The unit is \f$cm^{-3}\f$ 270. +
ccn_o gfdl_cloud_microphys base CCN over ocean. Increasing(decreasing) \p ccn_o can on the one hand boost(decrease) the autoconversion of cloud water to rain, on the other hand make the autoconversion harder(easier). The unit is \f$cm^{-3}\f$ 90. +
c_paut gfdl_cloud_microphys autoconversion efficiency of cloud water to rain (cloud water -> rain). Increasing(decreasing) of \p c_paut can boost(decrease) the autoconversion of cloud water to rain 0.55 +
c_cracw gfdl_cloud_microphys accretion efficiency of cloud water to rain (cloud water -> rain). Increasing(decreasing) of \p c_cracw can boost(decrease) the accretion of cloud water to rain 0.9 +
sat_adj0 gfdl_cloud_microphys adjust factor for condensation of water vapor to cloud water (water vapor->cloud water) and deposition of water vapor to cloud ice 0.9 +
use_ppm gfdl_cloud_microphys \e true to use PPM fall scheme; \e false to use time-implicit monotonic fall scheme .false. +
use_ccn gfdl_cloud_microphys \e true to compute prescribed CCN. It should be .true. when \p prog_ccn = .false. .false. +
mono_prof gfdl_cloud_microphys \e true to turn on terminal fall with monotonic PPM scheme. This is used together with \p use_ppm=.true. .true. +
z_slope_liq gfdl_cloud_microphys \e true to turn on vertically subgrid linear monotonic slope for autoconversion of cloud water to rain .true. +
z_slope_ice gfdl_cloud_microphys \e true to turn on vertically subgrid linear monotonic slope for autoconversion of cloud ice to snow .false. +
de_ice gfdl_cloud_microphys \e true to convert excessive cloud ice to snow to prevent ice over-built from other sources like convection scheme (not supported in GFS physics) .false. +
fix_negative gfdl_cloud_microphys \e true to fix negative water species using nearby points .false. +
icloud_f gfdl_cloud_microphys flag (0,1,or 2) for cloud fraction diagnostic scheme 0 +
irain_f gfdl_cloud_microphys flag (0 or 1) for cloud water autoconversion to rain scheme. 0: with subgrid variability; 1: no subgrid variability 0 +
mp_time gfdl_cloud_microphys time step of GFDL cloud microphysics (MP). If \p mp_time isn't divisible by physics time step or is larger than physics time step, the actual MP time step becomes \p dt/NINT[dt/MIN(dt,mp_time)] 150. +
alin gfdl_cloud_microphys parameter \a a in Lin et al.(1983). Constant in empirical formula for \f$U_R\f$. Increasing(decreasing) \p alin can boost(decrease) accretion of cloud water by rain and rain evaporation 842. +
clin gfdl_cloud_microphys parameter \a c in Lin et al.(1983). Constant in empirical formula for \f$U_S\f$. Increasing(decreasing) \p clin can boost(decrease) accretion of cloud water by snow, accretion of cloud ice by snow, snow sublimation and deposition, and snow melting 4.8 +
t_min gfdl_cloud_microphys temperature threshold for instant deposition. Deposit all water vapor to cloud ice when temperature is lower than \p t_min 178. +
t_sub gfdl_cloud_microphys temperature threshold for sublimation. Cloud ice, snow or graupel stops(starts) sublimation when temperature is lower(higher) then \p t_sub 184. +
mp_print gfdl_cloud_microphys \a .true. to turn on GFDL cloud microphysics debugging print out. (not supported in GFS physics) .false. +
ltaerosol mp_thompson flag for using aerosol climotology in Thompson MP scheme .false. +
ttendlim mp_thompson temperature tendency limiter per time step in K/s, set to < 0 to deactivate -999.0 +
effr_in gfdl_cloud_microphys, mp_thompson, m_micro flag for using input cloud effective radii calculation .false. +
cnvcld see \a GFS_typedefs.F90 flag for convective cloud .false. +
lgfdlmprad GFS_rrtmg_pre flag for GFDL mp scheme and radiation consistency .false. +
do_sb_physics m_micro flag for SB2001 autoconversion or accretion .true. +
do_cldice m_micro flag for cloud ice processes for MG microphysics .true. +
hetfrz_classnuc m_micro flag for heterogeneous freezing for MG microphysics .false. +
mg_nccons m_micro flag for constant droplet concentration for MG microphysics .false. +
mg_nicons m_micro flag for constant ice concentration for MG microphysics .false. +
mg_ngcons m_micro flag for constant graupel concentration for MG microphysics .false. +
sed_supersat m_micro flag for allowing supersaturation after sedimentation for MG microphysics .true. +
mg_do_graupel m_micro flag for turning on prognostic graupel (with fprcp=2) .true. +
mg_do_hail m_micro flag for turning on prognostic hail (with fprcp=2) .false. +
microp_uniform m_micro flag for uniform subcolumns for MG microphysics .true. +
mg_do_ice_gmao m_micro flag for turning on gmao ice autoconversion in MG microphysics .false. +
mg_do_liq_liu m_micro flag for turning on Liu liquid treatment in MG microphysics .true. +
mg_dcs m_micro autoconversion size threshold for cloud ice to snow in MG microphysics 200.0 +
mg_ts_auto_ice(2) m_micro autoconversion time scale for ice in MG microphysics 180.0,180.0 +
mg_qcvar m_micro cloud water relative variance in MG microphysics 1.0 +
mg_rhmini m_micro relative humidity threshold parameter for nucleating ice 1.01 +
mg_ncnst m_micro constant droplet num concentration \f$m^{-3}\f$ 100.e6 +
mg_ninst m_micro constant ice num concentration \f$m^{-3}\f$ 0.15e6 +
mg_ngnst m_micro constant graupel/hail num concertration \f$m^{-3}\f$ 0.10e6 +
mg_berg_eff_factor m_micro berg efficiency factor 2.0 +
mg_precip_frac_method m_micro type of precipitation fraction method 'max_overlap' +
fprcp m_micro number of frozen precipitation species in MG microphysics \n +
    +
  • 0: no prognostic rain and snow +
  • 1: MG2 +
  • 2: MG3 +
+
0 +
pdfflag m_micro pdf flag for MG macro physics 4 +
iccn m_micro flag for using IN and CCN forcing in MG2/3 microphysics .false. +
iaerclm m_micro flag for initializing aerosol data .false. +
rhcmax m_micro maximum critical relative humidity 0.9999999 +
aero_in m_micro flag for using aerosols in Morrison-Gettelman microphysics .false. +
\b Parameters \b related \b to \b gravity \b drag \b scheme \b options +
knob_ugwp_version cires_ugwp parameter selects a version of the UGWP implementation in FV3GFS-127L \n
  • 0: default version delivered to EMC in Jan 2019 for implementation
  • 1: version of UGWP under development that plans to consider the physics-based sources of NGWs (\b knob_ugwp_wvspec [2:4]), options for stochastic and deterministic excitation of waves (\b knob_ugwp_stoch), and switches between different UGWP schemes (\b knob_ugwp_solver)
0 -
knob_ugwp_doaxyz cires_ugwp_module parameter controls application of the momentum deposition for NGW-schemes \n +
knob_ugwp_doaxyz cires_ugwp parameter controls application of the momentum deposition for NGW-schemes \n
  • 0: the momentum tendencies due to NGWs are calculated, but tendencies do not change the horizontal winds
  • 1: default value; it changes the horizontal momentum tendencies and horizontal winds
1 -
knob_ugwp_doheat cires_ugwp_module parameter controls application of the heat deposition for NGW-schemes \n +
knob_ugwp_doheat cires_ugwp parameter controls application of the heat deposition for NGW-schemes \n
  • 0: the temperature tendencies due to NGWs are calculated but tendencies do not change the temperature state
  • 1: default value; it changes the temperature tendencies and kinetic temperature
1 -
knob_ugwp_dokdis cires_ugwp_module parameter controls application of the eddy diffusion due to instability of NGWs \n +
knob_ugwp_dokdis cires_ugwp parameter controls application of the eddy diffusion due to instability of NGWs \n
  • 0: the eddy diffusion tendencies due to NGWs are calculated but tendencies do not change the model state vector
  • 1: it computes eddy diffusion coefficient due to instability of NGWs; in UGWP v0, eddy viscosity, heat conductivity and tracer diffusion are not activated
0 -
knob_ugwp_solver cires_ugwp_module parameter controls the selection of UGWP-solvers(wave propagation, dissipation and wave breaking) for NGWs \n +
knob_ugwp_solver cires_ugwp parameter controls the selection of UGWP-solvers(wave propagation, dissipation and wave breaking) for NGWs \n
  • 1: represents the discrete multi-wave solver with background dissipation and linear wave saturation
  • 2: represents the spectral deterministic solver with background dissipation and spectral saturation @@ -522,28 +453,196 @@ and how stochastic perturbations are used in the Noah Land Surface Model.
  • 4: represents the spectral solver with background dissipation, extension of Doppler Spread Theory of Hines (1997)
1 -
knob_ugwp_ndx4lh cires_ugwp_module parameter controls the selection of the horizontal wavenumber(wavelength) for NGW schemes \n +
knob_ugwp_ndx4lh cires_ugwp parameter controls the selection of the horizontal wavenumber(wavelength) for NGW schemes \n
  • 1: selects the \f$4xdx\f$ sub-grid wavelength, where dx is the horizontal resolution of the model configuration (C96-400km; C768-52km)
2 -
knob_ugwp_wvspec cires_ugwp_module four-dimensional array defines number of waves in each arimuthal propagation (as defined by knob_ugwp_azdir) for GWs excited due to the following four sources: \n +
knob_ugwp_wvspec cires_ugwp four-dimensional array defines number of waves in each arimuthal propagation (as defined by knob_ugwp_azdir) for GWs excited due to the following four sources: \n (1) sub-grid orography (\b knob_ugwp_wvspec[1]=1), \n (2) convective (\b knob_ugwp_wvspec[2]=25), \n (3) frontal (\b knob_ugwp_wvspec[3]=25) activity, \n (4) \b knob_ugwp_wvspec[4] represents number of wave excited by dynamical imbalances that may mimic both convective and front-jet mechanisms of GW triggering. \n In UGWP v0, first two elements of the array, \b knob_ugwp_wvspec(1:2), control number of waves for stationary (OGW) and nonstationary waves (NGWs). 1,32,32,32 -
knob_ugwp_azdir cires_ugwp_module four-dimensional array that defines number of azimuths for propagation of GWs triggered by four types of physics-based sources (orography, convection, front-jets, and dynamical imbalance). In UGWP v0, first two elements of the array, \b knob_ugwp_azdir(1:2), control number of azimuths for OGW and NGWs respectively. +
knob_ugwp_azdir cires_ugwp four-dimensional array that defines number of azimuths for propagation of GWs triggered by four types of physics-based sources (orography, convection, front-jets, and dynamical imbalance). In UGWP v0, first two elements of the array, \b knob_ugwp_azdir(1:2), control number of azimuths for OGW and NGWs respectively. 2,4,4,4 -
knob_ugwp_stoch cires_ugwp_module four-dimensional array that control stochastic selection of GWs triggered by four types of physics-based sources. \n +
knob_ugwp_stoch cires_ugwp four-dimensional array that control stochastic selection of GWs triggered by four types of physics-based sources. \n Default values:0,0,0,0 - reflect determinstic selection of GW parameters without stochastic selection 0,0,0,0 -
knob_ugwp_effac cires_ugwp_module four-dimensional array that control efficiency of GWs triggerd by four types of physics-based sources. \n +
knob_ugwp_effac cires_ugwp four-dimensional array that control efficiency of GWs triggerd by four types of physics-based sources. \n Default values: 1.,1.,1.,1. - reflect that calculated GW-tendencies will be applied for the model state. 1.,1.,1.,1. -
launch_level cires_ugwp_module parameter has been introduced by EMC during implementation. It defines the interface model level from the surface at which NGWs are launched. \n +
launch_level cires_ugwp parameter has been introduced by EMC during implementation. It defines the interface model level from the surface at which NGWs are launched. \n Default value for FV3GFS-64L, launch_level=25 and for FV3GFS-128L, launch_level=52. 55 +
ldiag_ugwp cires_ugwp flag for CIRES UGWP diagnostics .false. +
do_ugwp cires_ugwp flag for CIRES UGWP revised OGW \n +
    +
  • .T.: revised gwdps_v0 +
  • .F.: GFS operational orographic gwdps +
+
.false.; The CIRES Unified Gravity Wave Physics (cires_ugwp) scheme is used in GFSv15p2 and GFSv16beta SDFs with do_ugwp=F in the namelist. In this setting, the cires_ugwp calls the operational GFS v15.2 orographic gravity wave drag (gwdps) scheme. When do_ugwp=.T., the cires_ugwp scheme calls an experimental orographic gravity wave (gwdps_v0) +
do_tofd cires_ugwp flag for turbulent orographic form drag .false. +
cnvgwd cires_ugwp flag for convective gravity wave drag scheme dependent on maxval(cdmbgwd(3:4) == 0.0) .false. +
cdmbgwd(4) cires_ugwp multiplication factors for mountain blocking(1), orographic gravity wave drag(2) +
    +
  • [1]: GWDPS mountain blocking +
  • [2]: GWDPS orographic gravity wave drag +
  • [3]: the modulation total momentum flux of NGWs by intensities of the total precipitation +
  • [4]: TKE for future tests and applications +
+
2.0,0.25,1.0,1.0 +
do_cnvgwd gwdc flag for convective GWD cnvgwd .and. maxval(cdmbgwd(3:4)) == 0.0 +
nmtvr cires_ugwp number of topographic variables such as variance etc used in the GWD parameterization-10 more added if GSL orographic drag scheme is used 14 +
cgwf cires_ugwp ,gwdc multiplication factor for convective GWD 0.5d0,0.05d0 +
do_gwd see \a GFS_typedefs.F90 flag for gravity wave drag maxval(cdmbgwd) > 0.0 +
gwd_opt drag_suite flag for GWD scheme \n +
    +
  • 1: original GFS GWD +
  • 3: GSL drag suite +
  • 33: GSL drag suite with extra output +
  • +
+
1 +
\b Parameters \b related \b to \b LSM \b options +
lsm see \a GFS_typedefs.F90 flag for land surface model to use \n +
    +
  • 1: Noah LSM +
  • 2: NoahMP LSM +
  • 3: RUC LSM +
+
1 +
lsoil lsm_noah number of soil layers 4 +
rdlai lsm_ruc flag to read leaf area index from input files .false. +
ivegsrc lsm_noah, lsm_ruc, \ref noahmpdrv, sfc_diff flag for vegetation type dataset choice: \n +
    +
  • 0: USGS +
  • 1: IGBP(20 category): IGBP must be selected if NoahMP is used +
  • 2: UMD (13 category) +
+
2 +
isot lsm_noah, lsm_ruc, \ref noahmpdrv flag for soil type dataset choice:\n +
    +
  • 0: Zobler soil type (9 category) +
  • 1: STATSGO soil type (19 category): STATSGO must be selected if NoahMP is used +
+
0 + +
iopt_dveg \ref noahmpdrv options for dynamic vegetation \n +
    +
  • 1: off (use table LAI; use FVEG = SHDFAC from input) +
  • 2: on (together with \a iopt_crs = 1) +
  • 3: off (use table LAI; calculate FVEG) +
  • 4: off (use table LAI; use maximum vegetation fraction) +
  • 5: on (use maximum vegetation fraction) +
  • 6: on (use FVEG = SHDFAC from input) +
  • 7: off (use input LAI; use FVEG = SHDFAC from input) +
  • 8: off (use input LAI; calculate FVEG) +
  • 9: off (use input LAI; use maximum vegetation fraction) +
+
4 +
iopt_crs \ref noahmpdrv options for canopy stomatal resistance \n +
    +
  • 1: Ball-Berry +
  • 2: Jarvis +
+
1 +
iopt_btr \ref noahmpdrv options for soil moisture factor for stomatal resistance \n +
    +
  • 1: Noah (soil moisture) +
  • 2: CLM (matric potential) +
  • 3: SSIB (matric potential) +
+
1 +
iopt_run \ref noahmpdrv options for runoff and groundwater \n +
    +
  • 1: TOPMODEL with groundwater (Niu et al. 2007 \cite niu_et_al_2007) +
  • 2: TOPMODEL with an equilibrium water table (Niu et al. 2005 \cite niu_et_al_2005) +
  • 3: original surface and subsurface runoff (free drainage) +
  • 4: bats surface and subsurface runoff (free drainage) +
  • 5: Miguez-macho&Fan groundwater scheme (Miguez-Macho et al. 2007 \cite miguez_et_al_2007; Fan et al. 2007 \cite fan_et_al_2007; needs further testing for public use) +
+
3 +
iopt_sfc \ref noahmpdrv options for surface layer drag coeff (CH&CM) \n +
    +
  • 1: m-o +
  • 2: original Noah (Chen et al. 1997 \cite chen_et_al_1997) +
+
1 +
iopt_frz \ref noahmpdrv options for supercooled liquid water (or ice fraction) \n +
    +
  • 1: no interation (Niu and Yang (2006) \cite niu_and_yang_2006 ) +
  • 2: Koren's iteration +
+
1 +
iopt_inf \ref noahmpdrv options for frozen soil permeability \n +
    +
  • 1: linear effects, more permeable (Niu and Yang (2006) \cite niu_and_yang_2006) +
  • 2: nonlinear effects, less permeable (old) +
+
1 +
iopt_rad \ref noahmpdrv options for radiation transfer \n +
    +
  • 1: modified two-stream (gap = f(solar angle, 3d structure ...)<1-fveg) +
  • 2: two-stream applied to grid-cell (gap = 0) +
  • 3: two-stream applied to vegetated fraction (gap=1-FVEG) +
+
3 +
iopt_alb \ref noahmpdrv options for ground snow surface albedo \n +
    +
  • 1: BATS +
  • 2: CLASS +
+
2 +
iopt_snf \ref noahmpdrv options for partitioning precipitation into rainfall and snowfall \n +
    +
  • 1: Jordan (1991) +
  • 2: BATS: when sfctmp < tfrz+2.2 +
  • 3: sfctmp < tfrz +
  • 4: use WRF microphysics output +
+
1 +
iopt_tbot \ref noahmpdrv options for lower boundary condition of soil temperature \n +
    +
  • 1: zero heat flux from bottom (zbot and tbot not used) +
  • 2: tbot at zbot (8m) read from a file (original Noah) +
+
2 +
iopt_stc \ref noahmpdrv options for snow/soil temperature time scheme (only layer 1) \n +
    +
  • 1: semi-implicit; flux top boundary condition +
  • 2: full implicit (original Noah); temperature top boundary condition +
  • 3: same as 1, but fsno for ts calculation (generally improve snow; v3.7) +
+
1 + +
nstf_name(5) sfc_nst NSST related paramters:\n +
    +
  • nstf_name(1): 0=NSST off, 1= NSST on but uncoupled, 2= NSST on and coupled +
  • nstf_name(2): 1=NSST spin up on, 0=NSST spin up off +
  • nstf_name(3): 1=NSST analysis on, 0=NSST analysis off +
  • nstf_name(4): zsea1 in mm +
  • nstf_name(5): zesa2 in mm +
+
/0,0,1,0,5/ +
\b Parameters \b related \b to \b other \b surface \b scheme \b options +
nst_anl GFS_phys_time_vary flag for NSST analysis in gcycle/sfcsub .false. +
frac_grid fractional grid flag for fractional grid .false. +
min_lakeice fractional grid minimum lake ice value 0.15d0 +
min_seaice fractional grid minimum sea ice value 1.0d-11 +
min_lake_height fractional grid minimum lake height value 250.0 +
sfc_z0_type sfc_diff surface roughness options over ocean \n +
    +
  • 0: no change +
  • 6: areodynamical roughness over water with input 10-m wind +
  • 7: slightly decrease Cd for higher wind speed compared to 6 +
  • negative when cplwav2atm=.true. - i.e. two way wave coupling +
+
0 +
redrag sfc_diff flag for applying reduced drag coefficient for high wind over sea in GFS surface layer scheme .false. +
lheatstrg GFS_surface_generic_post flag for canopy heat storage parameterization .false. +
z0fac GFS_surface_generic_post surface roughness fraction factor 0.3 +
e0fac GFS_surface_generic_post latent heat flux fraction factor relative to sensible heat flux,e.g., e0fac=0.5 indicates that canopy heat storage for latent heat flux is 50% of that for sensible heat flux 0.5
*/ diff --git a/physics/drag_suite.F90 b/physics/drag_suite.F90 index 2e68ceb12..9b110d689 100644 --- a/physics/drag_suite.F90 +++ b/physics/drag_suite.F90 @@ -7,7 +7,24 @@ module drag_suite contains - subroutine drag_suite_init() + subroutine drag_suite_init(gwd_opt, errmsg, errflg) + + integer, intent(in) :: gwd_opt + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + ! Consistency checks + if (gwd_opt/=3 .and. gwd_opt/=33) then + write(errmsg,'(*(a))') "Logic error: namelist choice of gravity wave & + & drag is different from drag_suite scheme" + errflg = 1 + return + end if end subroutine drag_suite_init ! \defgroup GFS_ogwd GFS Orographic Gravity Wave Drag @@ -199,7 +216,9 @@ subroutine drag_suite_run( & & g, cp, rd, rv, fv, pi, imx, cdmbgwd, me, master, & & lprnt, ipr, rdxzb, dx, gwd_opt, & & do_gsl_drag_ls_bl, do_gsl_drag_ss, do_gsl_drag_tofd, & - & errmsg, errflg ) + & dtend, dtidx, index_of_process_orographic_gwd, & + & index_of_temperature, index_of_x_wind, & + & index_of_y_wind, ldiag3d, errmsg, errflg) ! ******************************************************************** ! -----> I M P L E M E N T A T I O N V E R S I O N <---------- @@ -300,8 +319,12 @@ subroutine drag_suite_run( & integer, intent(in) :: im, km, imx, kdt, ipr, me, master integer, intent(in) :: gwd_opt logical, intent(in) :: lprnt - integer, intent(in) :: KPBL(im) - real(kind=kind_phys), intent(in) :: deltim, G, CP, RD, RV, cdmbgwd(2) + integer, intent(in) :: KPBL(:) + real(kind=kind_phys), intent(in) :: deltim, G, CP, RD, RV, cdmbgwd(:) + real(kind=kind_phys), intent(inout) :: dtend(:,:,:) + logical, intent(in) :: ldiag3d + integer, intent(in) :: dtidx(:,:), index_of_temperature, & + & index_of_process_orographic_gwd, index_of_x_wind, index_of_y_wind integer :: kpblmax integer, parameter :: ims=1, kms=1, its=1, kts=1 @@ -310,29 +333,29 @@ subroutine drag_suite_run( & real(kind=kind_phys) :: g_inv real(kind=kind_phys), intent(inout) :: & - & dudt(im,km),dvdt(im,km), & - & dtdt(im,km) - real(kind=kind_phys), intent(out) :: rdxzb(im) + & dudt(:,:),dvdt(:,:), & + & dtdt(:,:) + real(kind=kind_phys), intent(out) :: rdxzb(:) real(kind=kind_phys), intent(in) :: & - & u1(im,km),v1(im,km), & - & t1(im,km),q1(im,km), & - & PHII(im,km+1),prsl(im,km), & - & prslk(im,km),PHIL(im,km) - real(kind=kind_phys), intent(in) :: prsi(im,km+1), & - & del(im,km) - real(kind=kind_phys), intent(in) :: var(im),oc1(im), & - & oa4(im,4),ol4(im,4), & - & dx(im) - real(kind=kind_phys), intent(in) :: varss(im),oc1ss(im), & - & oa4ss(im,4),ol4ss(im,4) - real(kind=kind_phys), intent(in) :: THETA(im),SIGMA(im), & - & GAMMA(im),ELVMAX(im) + & u1(:,:),v1(:,:), & + & t1(:,:),q1(:,:), & + & PHII(:,:),prsl(:,:), & + & prslk(:,:),PHIL(:,:) + real(kind=kind_phys), intent(in) :: prsi(:,:), & + & del(:,:) + real(kind=kind_phys), intent(in) :: var(:),oc1(:), & + & oa4(:,:),ol4(:,:), & + & dx(:) + real(kind=kind_phys), intent(in) :: varss(:),oc1ss(:), & + & oa4ss(:,:),ol4ss(:,:) + real(kind=kind_phys), intent(in) :: THETA(:),SIGMA(:), & + & GAMMA(:),ELVMAX(:) ! added for small-scale orographic wave drag real(kind=kind_phys), dimension(im,km) :: utendwave,vtendwave,thx,thvx - real(kind=kind_phys), intent(in) :: br1(im), & - & hpbl(im), & - & slmsk(im) + real(kind=kind_phys), intent(in) :: br1(:), & + & hpbl(:), & + & slmsk(:) real(kind=kind_phys), dimension(im) :: govrth,xland !real(kind=kind_phys), dimension(im,km) :: dz2 real(kind=kind_phys) :: tauwavex0,tauwavey0, & @@ -346,7 +369,7 @@ subroutine drag_suite_run( & !Output: real(kind=kind_phys), intent(out) :: & - & dusfc(im), dvsfc(im) + & dusfc(:), dvsfc(:) !Output (optional): real(kind=kind_phys), intent(out) :: & & dusfc_ls(:),dvsfc_ls(:), & @@ -473,14 +496,26 @@ subroutine drag_suite_run( & character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg + integer :: udtend, vdtend, Tdtend + ! Calculate inverse of gravitational acceleration g_inv = 1./G ! Initialize CCPP error handling variables errmsg = '' errflg = 0 + + ! Initialize local variables var_temp2 = 0. + udtend = -1 + vdtend = -1 + Tdtend = -1 + if(ldiag3d) then + udtend = dtidx(index_of_x_wind,index_of_process_orographic_gwd) + vdtend = dtidx(index_of_y_wind,index_of_process_orographic_gwd) + Tdtend = dtidx(index_of_temperature,index_of_process_orographic_gwd) + endif !-------------------------------------------------------------------- ! SCALE-ADPTIVE PARAMETER FROM GFS GWD SCHEME @@ -1015,6 +1050,12 @@ subroutine drag_suite_run( & dvsfc(i) = dvsfc(i) + vtendwave(i,k) * del(i,k) enddo enddo + if(udtend>0) then + dtend(its:im,kts:km,udtend) = dtend(its:im,kts:km,udtend) + utendwave(its:im,kts:km)*deltim + endif + if(vdtend>0) then + dtend(its:im,kts:km,vdtend) = dtend(its:im,kts:km,vdtend) + vtendwave(its:im,kts:km)*deltim + endif if ( (gwd_opt == 33).or.(gwd_opt == 22) ) then do k = kts,km do i = its,im @@ -1073,6 +1114,12 @@ subroutine drag_suite_run( & dvsfc(i) = dvsfc(i) + vtendform(i,k) * del(i,k) enddo enddo + if(udtend>0) then + dtend(its:im,kts:km,udtend) = dtend(its:im,kts:km,udtend) + utendform(its:im,kts:km)*deltim + endif + if(vdtend>0) then + dtend(its:im,kts:km,vdtend) = dtend(its:im,kts:km,vdtend) + vtendform(its:im,kts:km)*deltim + endif if ( (gwd_opt == 33).or.(gwd_opt == 22) ) then do k = kts,km do i = its,im @@ -1266,6 +1313,26 @@ subroutine drag_suite_run( & dusfc(i) = dusfc(i) + taud_ls(i,k)*xn(i)*del(i,k) + taud_bl(i,k)*xn(i)*del(i,k) dvsfc(i) = dvsfc(i) + taud_ls(i,k)*yn(i)*del(i,k) + taud_bl(i,k)*yn(i)*del(i,k) enddo + if(udtend>0) then + dtend(its:im,k,udtend) = dtend(its:im,k,udtend) + (taud_ls(its:im,k) * xn(its:im) + & + taud_bl(its:im,k) * xn(its:im)) * deltim + endif + if(vdtend>0) then + dtend(its:im,k,vdtend) = dtend(its:im,k,vdtend) + (taud_ls(its:im,k) * yn(its:im) + & + taud_bl(its:im,k) * yn(its:im)) * deltim + endif + if(gsd_diss_ht_opt .EQ. 1 .and. Tdtend>0) then + do i=its,im + ! Calculate dissipation heating + ! Initial kinetic energy (at t0-dt) + eng0 = 0.5*( (rcs*u1(i,k))**2. + (rcs*v1(i,k))**2. ) + ! Kinetic energy after wave-breaking/flow-blocking + eng1 = 0.5*( (rcs*(u1(i,k)+(dtaux+dtauxb)*deltim))**2 + & + (rcs*(v1(i,k)+(dtauy+dtauyb)*deltim))**2 ) + ! Modify theta tendency + dtend(i,k,Tdtend) = dtend(i,k,Tdtend) + max((eng0-eng1),0.0)/cp + enddo + endif enddo ! Finalize dusfc and dvsfc diagnostics @@ -1309,7 +1376,6 @@ subroutine drag_suite_run( & end subroutine drag_suite_run !------------------------------------------------------------------- ! - subroutine drag_suite_finalize() end subroutine drag_suite_finalize diff --git a/physics/drag_suite.meta b/physics/drag_suite.meta index fa5b317fc..71aa3ff4d 100644 --- a/physics/drag_suite.meta +++ b/physics/drag_suite.meta @@ -3,6 +3,36 @@ type = scheme dependencies = +######################################################################## +[ccpp-arg-table] + name = unified_ugwp_init + type = scheme +[gwd_opt] + standard_name = control_for_drag_suite_gravity_wave_drag + long_name = flag to choose gwd scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + ######################################################################## [ccpp-arg-table] name = drag_suite_run @@ -16,7 +46,7 @@ intent = in optional = F [km] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical layers units = count dimensions = () @@ -24,28 +54,28 @@ intent = in optional = F [dvdt] - standard_name = tendency_of_y_wind_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_y_wind long_name = meridional wind tendency due to model physics units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [dudt] - standard_name = tendency_of_x_wind_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_x_wind long_name = zonal wind tendency due to model physics units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [dtdt] - standard_name = tendency_of_air_temperature_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_air_temperature long_name = air temperature tendency due to model physics units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -54,7 +84,7 @@ standard_name = x_wind long_name = zonal wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -63,7 +93,7 @@ standard_name = y_wind long_name = meridional wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -72,16 +102,16 @@ standard_name = air_temperature long_name = mid-layer temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [q1] - standard_name = water_vapor_specific_humidity + standard_name = specific_humidity long_name = mid-layer specific humidity of water vapor units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -98,7 +128,7 @@ standard_name = air_pressure_at_interface long_name = interface pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -107,7 +137,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = difference between mid-layer pressures units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -116,16 +146,16 @@ standard_name = air_pressure long_name = mid-layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [prslk] - standard_name = dimensionless_exner_function_at_model_layers + standard_name = dimensionless_exner_function long_name = mid-layer Exner function units = none - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -134,7 +164,7 @@ standard_name = geopotential_at_interface long_name = interface geopotential units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -143,13 +173,13 @@ standard_name = geopotential long_name = mid-layer geopotential units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [deltim] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics time step units = s dimensions = () @@ -158,7 +188,7 @@ intent = in optional = F [kdt] - standard_name = index_of_time_step + standard_name = index_of_timestep long_name = current time step index units = index dimensions = () @@ -167,7 +197,7 @@ optional = F [var] standard_name = standard_deviation_of_subgrid_orography - long_name = standard deviation of subgrid orography + long_name = standard deviation of subgrid height_above_mean_sea_level units = m dimensions = (horizontal_loop_extent) type = real @@ -176,7 +206,7 @@ optional = F [oc1] standard_name = convexity_of_subgrid_orography - long_name = convexity of subgrid orography + long_name = convexity of subgrid height_above_mean_sea_level units = none dimensions = (horizontal_loop_extent) type = real @@ -185,7 +215,7 @@ optional = F [oa4] standard_name = asymmetry_of_subgrid_orography - long_name = asymmetry of subgrid orography + long_name = asymmetry of subgrid height_above_mean_sea_level units = none dimensions = (horizontal_loop_extent,4) type = real @@ -194,7 +224,7 @@ optional = F [ol4] standard_name = fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height - long_name = horizontal fraction of grid box covered by subgrid orography higher than critical height + long_name = horizontal fraction of grid box covered by subgrid height_above_mean_sea_level higher than critical height units = frac dimensions = (horizontal_loop_extent,4) type = real @@ -203,7 +233,7 @@ optional = F [varss] standard_name = standard_deviation_of_subgrid_orography_small_scale - long_name = standard deviation of subgrid orography small scale + long_name = standard deviation of subgrid height_above_mean_sea_level small scale units = m dimensions = (horizontal_loop_extent) type = real @@ -212,7 +242,7 @@ optional = F [oc1ss] standard_name = convexity_of_subgrid_orography_small_scale - long_name = convexity of subgrid orography small scale + long_name = convexity of subgrid height_above_mean_sea_level small scale units = none dimensions = (horizontal_loop_extent) type = real @@ -221,7 +251,7 @@ optional = F [oa4ss] standard_name = asymmetry_of_subgrid_orography_small_scale - long_name = asymmetry of subgrid orography small scale + long_name = asymmetry of subgrid height_above_mean_sea_level small scale units = none dimensions = (horizontal_loop_extent,4) type = real @@ -230,7 +260,7 @@ optional = F [ol4ss] standard_name = fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height_small_scale - long_name = horizontal fraction of grid box covered by subgrid orography higher than critical height small scale + long_name = horizontal fraction of grid box covered by subgrid height_above_mean_sea_level higher than critical height small scale units = frac dimensions = (horizontal_loop_extent,4) type = real @@ -248,7 +278,7 @@ optional = F [sigma] standard_name = slope_of_subgrid_orography - long_name = slope of subgrid orography + long_name = slope of subgrid height_above_mean_sea_level units = none dimensions = (horizontal_loop_extent) type = real @@ -257,7 +287,7 @@ optional = F [gamma] standard_name = anisotropy_of_subgrid_orography - long_name = anisotropy of subgrid orography + long_name = anisotropy of subgrid height_above_mean_sea_level units = none dimensions = (horizontal_loop_extent) type = real @@ -266,81 +296,81 @@ optional = F [elvmax] standard_name = maximum_subgrid_orography - long_name = maximum of subgrid orography + long_name = maximum of subgrid height_above_mean_sea_level units = m dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = inout + intent = in optional = F [dtaux2d_ls] - standard_name = x_momentum_tendency_from_large_scale_gwd + standard_name = tendency_of_x_wind_due_to_mesoscale_orographic_gravity_wave_drag long_name = x momentum tendency from large scale gwd units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [dtauy2d_ls] - standard_name = y_momentum_tendency_from_large_scale_gwd + standard_name = tendency_of_y_wind_due_to_mesoscale_orographic_gravity_wave_drag long_name = y momentum tendency from large scale gwd units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [dtaux2d_bl] - standard_name = x_momentum_tendency_from_blocking_drag + standard_name = tendency_of_x_momentum_due_to_blocking_drag long_name = x momentum tendency from blocking drag units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [dtauy2d_bl] - standard_name = y_momentum_tendency_from_blocking_drag + standard_name = tendency_of_y_momentum_due_to_blocking_drag long_name = y momentum tendency from blocking drag units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [dtaux2d_ss] - standard_name = x_momentum_tendency_from_small_scale_gwd + standard_name = tendency_of_x_momentum_due_to_small_scale_gravity_wave_drag long_name = x momentum tendency from small scale gwd units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [dtauy2d_ss] - standard_name = y_momentum_tendency_from_small_scale_gwd + standard_name = tendency_of_y_momentum_due_to_small_scale_gravity_wave_drag long_name = y momentum tendency from small scale gwd units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [dtaux2d_fd] - standard_name = x_momentum_tendency_from_form_drag + standard_name = tendency_of_x_momentum_due_to_form_drag long_name = x momentum tendency from form drag units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [dtauy2d_fd] - standard_name = y_momentum_tendency_from_form_drag + standard_name = tendency_of_y_momentum_due_to_form_drag long_name = y momentum tendency from form drag units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -364,79 +394,79 @@ intent = out optional = F [dusfc_ls] - standard_name = integrated_x_momentum_flux_from_large_scale_gwd + standard_name = vertically_integrated_x_momentum_flux_due_to_mesoscale_orographic_gravity_wave_drag long_name = integrated x momentum flux from large scale gwd - units = Pa s + units = Pa dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out optional = F [dvsfc_ls] - standard_name = integrated_y_momentum_flux_from_large_scale_gwd + standard_name = vertically_integrated_y_momentum_flux_due_to_mesoscale_orographic_gravity_wave_drag long_name = integrated y momentum flux from large scale gwd - units = Pa s + units = Pa dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out optional = F [dusfc_bl] - standard_name = integrated_x_momentum_flux_from_blocking_drag + standard_name = vertically_integrated_x_momentum_flux_due_to_blocking_drag long_name = integrated x momentum flux from blocking drag - units = Pa s + units = Pa dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out optional = F [dvsfc_bl] - standard_name = integrated_y_momentum_flux_from_blocking_drag + standard_name = vertically_integrated_y_momentum_flux_due_to_blocking_drag long_name = integrated y momentum flux from blocking drag - units = Pa s + units = Pa dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out optional = F [dusfc_ss] - standard_name = integrated_x_momentum_flux_from_small_scale_gwd + standard_name = vertically_integrated_x_momentum_flux_due_to_small_scale_gravity_wave_drag long_name = integrated x momentum flux from small scale gwd - units = Pa s + units = Pa dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out optional = F [dvsfc_ss] - standard_name = integrated_y_momentum_flux_from_small_scale_gwd + standard_name = vertically_integrated_y_momentum_flux_due_to_small_scale_gravity_wave_drag long_name = integrated y momentum flux from small scale gwd - units = Pa s + units = Pa dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out optional = F [dusfc_fd] - standard_name = integrated_x_momentum_flux_from_form_drag + standard_name = vertically_integrated_x_momentum_flux_due_to_form_drag long_name = integrated x momentum flux from form drag - units = Pa s + units = Pa dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out optional = F [dvsfc_fd] - standard_name = integrated_y_momentum_flux_from_form_drag + standard_name = vertically_integrated_y_momentum_flux_due_to_form_drag long_name = integrated y momentum flux from form drag - units = Pa s + units = Pa dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out optional = F [slmsk] - standard_name = sea_land_ice_mask_real + standard_name = area_type long_name = landmask: sea/land/ice=0/1/2 units = flag dimensions = (horizontal_loop_extent) @@ -481,7 +511,7 @@ intent = in optional = F [rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -525,7 +555,7 @@ intent = in optional = F [cdmbgwd] - standard_name = multiplication_factors_for_mountain_blocking_and_orographic_gravity_wave_drag + standard_name = multiplicative_tunable_parameters_for_mountain_blocking_and_orographic_gravity_wave_drag long_name = multiplic. factors for (1) mountain blocking drag coeff. and (2) ref. level orographic gravity wave drag units = none dimensions = (2) @@ -575,7 +605,7 @@ intent = out optional = F [dx] - standard_name = cell_size + standard_name = characteristic_grid_lengthscale long_name = size of the grid cell units = m dimensions = (horizontal_loop_extent) @@ -584,7 +614,7 @@ intent = in optional = F [gwd_opt] - standard_name = gwd_opt + standard_name = control_for_drag_suite_gravity_wave_drag long_name = flag to choose gwd scheme units = flag dimensions = () @@ -592,7 +622,7 @@ intent = in optional = F [do_gsl_drag_ls_bl] - standard_name = do_gsl_drag_ls_bl + standard_name = flag_for_gsl_drag_suite_large_scale_orographic_and_blocking_drag long_name = flag to activate GSL drag suite - large-scale GWD and blocking units = flag dimensions = () @@ -600,7 +630,7 @@ intent = in optional = F [do_gsl_drag_ss] - standard_name = do_gsl_drag_ss + standard_name = flag_for_gsl_drag_suite_small_scale_orographic_drag long_name = flag to activate GSL drag suite - small-scale GWD units = flag dimensions = () @@ -608,13 +638,71 @@ intent = in optional = F [do_gsl_drag_tofd] - standard_name = do_gsl_drag_tofd + standard_name = flag_for_gsl_drag_suite_turbulent_orographic_form_drag long_name = flag to activate GSL drag suite - turb orog form drag units = flag dimensions = () type = logical intent = in optional = F +[dtend] + standard_name = cumulative_change_of_state_variables + long_name = diagnostic tendencies for state variables + units = various + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_cumulative_change_processes) + type = real + kind = kind_phys + active = (flag_for_diagnostics_3D) + intent = inout + optional = F +[dtidx] + standard_name = cumulative_change_of_state_variables_outer_index + long_name = index of state-variable and process in last dimension of diagnostic tendencies array AKA cumulative_change_index + units = index + dimensions = (number_of_tracers_plus_one_hundred,number_of_cumulative_change_processes) + type = integer + intent = in + optional = F +[index_of_process_orographic_gwd] + standard_name = index_of_orographic_gravity_wave_drag_process_in_cumulative_change_index + long_name = index of orographic gravity wave drag process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_temperature] + standard_name = index_of_temperature_in_cumulative_change_index + long_name = index of temperature in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_x_wind] + standard_name = index_of_x_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_y_wind] + standard_name = index_of_y_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[ldiag3d] + standard_name = flag_for_diagnostics_3D + long_name = flag for 3d diagnostic fields + units = flag + dimensions = () + type = logical + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/flake_driver.F90 b/physics/flake_driver.F90 index b882c7404..94fe8286b 100644 --- a/physics/flake_driver.F90 +++ b/physics/flake_driver.F90 @@ -51,7 +51,7 @@ SUBROUTINE flake_driver_run ( & ! ---- Inputs im, ps, t1, q1, wind, & dlwflx, dswsfc, weasd, lakedepth, & - lake, xlat, delt, zlvl, elev, & + use_flake, xlat, delt, zlvl, elev, & wet, flag_iter, yearlen, julian, imon, & ! ---- in/outs snwdph, hice, tsurf, fice, T_sfc, hflx, evap, & @@ -62,13 +62,13 @@ SUBROUTINE flake_driver_run ( & ! ! Declarations ! use module_flake_ini, only:flake_init - use module_FLake + use module_FLake ! use flake_albedo_ref ! use data_parameters ! use flake_derivedtypes -! use flake_paramoptic_ref +! use flake_paramoptic_ref ! use flake_parameters - use machine , only : kind_phys + use machine , only : kind_phys ! use funcphys, only : fpvs ! use physcons, only : grav => con_g, cp => con_cp, & ! & hvap => con_hvap, rd => con_rd, & @@ -76,26 +76,26 @@ SUBROUTINE flake_driver_run ( & ! & rvrdm1 => con_fvirt !============================================================================== -IMPLICIT NONE + implicit none integer, intent(in) :: im, imon,yearlen -! integer, dimension(im), intent(in) :: islmsk +! integer, dimension(im), intent(in) :: islmsk - real (kind=kind_phys), dimension(im), intent(in) :: ps, wind, & + real (kind=kind_phys), dimension(:), intent(in) :: ps, wind, & & t1, q1, dlwflx, dswsfc, zlvl, elev real (kind=kind_phys), intent(in) :: delt - real (kind=kind_phys), dimension(im), intent(in) :: & + real (kind=kind_phys), dimension(:), intent(in) :: & & xlat, weasd, lakedepth - real (kind=kind_phys),dimension(im),intent(inout) :: & + real (kind=kind_phys),dimension(:),intent(inout) :: & & snwdph, hice, tsurf, t_sfc, hflx, evap, fice, ustar, qsfc, & - & ch, cm, chh, cmm + & ch, cm, chh, cmm real (kind=kind_phys), intent(in) :: julian - logical, dimension(im), intent(in) :: flag_iter, wet, lake + logical, dimension(:), intent(in) :: flag_iter, wet, use_flake character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -116,166 +116,190 @@ SUBROUTINE flake_driver_run ( & h_ML , & ! Thickness of the mixed-layer [m] H_B1 , & ! Thickness of the upper layer of bottom sediments [m] w_albedo , & ! - w_extinc + w_extinc ! Input (procedure arguments) -REAL (KIND = kind_phys) :: & - - dMsnowdt_in , & ! The rate of snow accumulation [kg m^{-2} s^{-1}] - I_atm_in , & ! Solar radiation flux at the surface [W m^{-2}] - Q_atm_lw_in , & ! Long-wave radiation flux from the atmosphere [W m^{-2}] - height_u_in , & ! Height above the lake surface where the wind speed is measured [m] - height_tq_in , & ! Height where temperature and humidity are measured [m] - U_a_in , & ! Wind speed at z=height_u_in [m s^{-1}] - T_a_in , & ! Air temperature at z=height_tq_in [K] - q_a_in , & ! Air specific humidity at z=height_tq_in - P_a_in ! Surface air pressure [N m^{-2} = kg m^{-1} s^{-2}] - -REAL (KIND = kind_phys) :: & - depth_w , & ! The lake depth [m] - fetch_in , & ! Typical wind fetch [m] - depth_bs_in , & ! Depth of the thermally active layer of the bottom sediments [m] - T_bs_in , & ! Temperature at the outer edge of + REAL (KIND = kind_phys) :: & + + dMsnowdt_in , & ! The rate of snow accumulation [kg m^{-2} s^{-1}] + I_atm_in , & ! Solar radiation flux at the surface [W m^{-2}] + Q_atm_lw_in , & ! Long-wave radiation flux from the atmosphere [W m^{-2}] + height_u_in , & ! Height above the lake surface where the wind speed is measured [m] + height_tq_in , & ! Height where temperature and humidity are measured [m] + U_a_in , & ! Wind speed at z=height_u_in [m s^{-1}] + T_a_in , & ! Air temperature at z=height_tq_in [K] + q_a_in , & ! Air specific humidity at z=height_tq_in + P_a_in ! Surface air pressure [N m^{-2} = kg m^{-1} s^{-2}] + + REAL (KIND = kind_phys) :: & + depth_w , & ! The lake depth [m] + fetch_in , & ! Typical wind fetch [m] + depth_bs_in , & ! Depth of the thermally active layer of the bottom sediments [m] + T_bs_in , & ! Temperature at the outer edge of ! the thermally active layer of the bottom sediments [K] - par_Coriolis , & ! The Coriolis parameter [s^{-1}] - del_time ! The model time step [s] - -REAL (KIND = kind_phys) :: & - T_snow_in , & ! Temperature at the air-snow interface [K] - T_ice_in , & ! Temperature at the snow-ice or air-ice interface [K] - T_mnw_in , & ! Mean temperature of the water column [K] - T_wML_in , & ! Mixed-layer temperature [K] - T_bot_in , & ! Temperature at the water-bottom sediment interface [K] - T_B1_in , & ! Temperature at the bottom of the upper layer of the sediments [K] - C_T_in , & ! Shape factor (thermocline) - h_snow_in , & ! Snow thickness [m] - h_ice_in , & ! Ice thickness [m] - h_ML_in , & ! Thickness of the mixed-layer [m] - H_B1_in , & ! Thickness of the upper layer of bottom sediments [m] - T_sfc_in , & ! Surface temperature at the previous time step [K] - ch_in , & - cm_in , & - albedo_water , & - water_extinc - -REAL (KIND = kind_phys) :: & - T_snow_out , & ! Temperature at the air-snow interface [K] - T_ice_out , & ! Temperature at the snow-ice or air-ice interface [K] - T_mnw_out , & ! Mean temperature of the water column [K] - T_wML_out , & ! Mixed-layer temperature [K] - T_bot_out , & ! Temperature at the water-bottom sediment interface [K] - T_B1_out , & ! Temperature at the bottom of the upper layer of the sediments [K] - C_T_out , & ! Shape factor (thermocline) - h_snow_out , & ! Snow thickness [m] - h_ice_out , & ! Ice thickness [m] - h_ML_out , & ! Thickness of the mixed-layer [m] - H_B1_out , & ! Thickness of the upper layer of bottom sediments [m] - T_sfc_out , & ! surface temperature [K] - T_sfc_n , & ! Updated surface temperature [K] - u_star , & - q_sfc , & - chh_out , & - cmm_out - -REAL (KIND = kind_phys) :: & - Q_momentum , & ! Momentum flux [N m^{-2}] - Q_SHT_flx , & ! Sensible heat flux [W m^{-2}] - Q_LHT_flx , & ! Latent heat flux [W m^{-2}] - Q_watvap ! Flux of water vapour [kg m^{-2} s^{-1}] - -REAL (KIND = kind_phys) :: & - lake_depth_max, T_bot_2_in, T_bot_2_out, dxlat,tb,tr,tt,temp,Kbar, DelK - -INTEGER :: i,ipr,iter - -LOGICAL :: lflk_botsed_use -logical :: flag(im) -CHARACTER(LEN=*), PARAMETER :: FMT2 = "(1x,8(F12.4,1x))" + par_Coriolis , & ! The Coriolis parameter [s^{-1}] + del_time ! The model time step [s] + + REAL (KIND = kind_phys) :: & + T_snow_in , & ! Temperature at the air-snow interface [K] + T_ice_in , & ! Temperature at the snow-ice or air-ice interface [K] + T_mnw_in , & ! Mean temperature of the water column [K] + T_wML_in , & ! Mixed-layer temperature [K] + T_bot_in , & ! Temperature at the water-bottom sediment interface [K] + T_B1_in , & ! Temperature at the bottom of the upper layer of the sediments [K] + C_T_in , & ! Shape factor (thermocline) + h_snow_in , & ! Snow thickness [m] + h_ice_in , & ! Ice thickness [m] + h_ML_in , & ! Thickness of the mixed-layer [m] + H_B1_in , & ! Thickness of the upper layer of bottom sediments [m] + T_sfc_in , & ! Surface temperature at the previous time step [K] + ch_in , & + cm_in , & + albedo_water , & + water_extinc + + REAL (KIND = kind_phys) :: & + T_snow_out , & ! Temperature at the air-snow interface [K] + T_ice_out , & ! Temperature at the snow-ice or air-ice interface [K] + T_mnw_out , & ! Mean temperature of the water column [K] + T_wML_out , & ! Mixed-layer temperature [K] + T_bot_out , & ! Temperature at the water-bottom sediment interface [K] + T_B1_out , & ! Temperature at the bottom of the upper layer of the sediments [K] + C_T_out , & ! Shape factor (thermocline) + h_snow_out , & ! Snow thickness [m] + h_ice_out , & ! Ice thickness [m] + h_ML_out , & ! Thickness of the mixed-layer [m] + H_B1_out , & ! Thickness of the upper layer of bottom sediments [m] + T_sfc_out , & ! surface temperature [K] + T_sfc_n , & ! Updated surface temperature [K] + u_star , & + q_sfc , & + chh_out , & + cmm_out + + REAL (KIND = kind_phys) :: & + Q_momentum , & ! Momentum flux [N m^{-2}] + Q_SHT_flx , & ! Sensible heat flux [W m^{-2}] + Q_LHT_flx , & ! Latent heat flux [W m^{-2}] + Q_watvap ! Flux of water vapour [kg m^{-2} s^{-1}] + + REAL (KIND = kind_phys) :: & + lake_depth_max, T_bot_2_in, T_bot_2_out, dxlat,tb,tr,tt,temp,temp2 + + real (kind=kind_phys), parameter :: pi=4.0_kind_phys*atan(1.0_kind_phys) + real (kind=kind_phys), parameter :: degrad=180.0_kind_phys/pi + real (kind=kind_phys), parameter :: Kbar = 3.5_kind_phys, DelK = 3.0_kind_phys, & + KbaroDelK = Kbar / DelK + + REAL (KIND = kind_phys) :: x, y !temperarory variables used for Tbot and Tsfc + !initilizations + + INTEGER :: i,ipr,iter + + LOGICAL :: lflk_botsed_use, do_flake + logical :: flag(im) +! CHARACTER(LEN=*), PARAMETER :: FMT2 = "(1x,8(F12.4,1x))" !============================================================================== ! Start calculations !------------------------------------------------------------------------------ -! FLake_write need to assign original value to make the model somooth - - lake_depth_max = 60.0 - ipr = min(im,10) +! FLake_write need to assign original value to make the model somooth ! --- ... set flag for lake points + do_flake = .false. do i = 1, im - flag(i) = (wet(i) .and. flag_iter(i)) + flag(i) = wet(i) .and. flag_iter(i) .and. use_flake(i) + do_flake = flag(i) .or. do_flake enddo - Kbar=3.5 - DelK=3.0 + if (.not. do_flake) return + + lake_depth_max = 60.0 + ipr = min(im,10) + + x = 0.03279*julian + y = ((((0.0034*x-0.1241)*x+1.6231)*x-8.8666)*x+17.206)*x-4.2929 + + temp = (pi+pi)*(julian-1)/float(yearlen) + temp = 0.006918-0.399912*cos(temp)+0.070257*sin(temp) & + - 0.006758*cos(2.0*temp)+0.000907*sin(2.0*temp) & + - 0.002697*cos(3.0*temp)+0.00148*sin(3.0*temp) + + temp2 = sin((pi+pi)*(julian-151)/244) do i = 1, im if (flag(i)) then - if( lake(i) ) then - T_ice(i) = 273.15 - T_snow(i) = 273.15 - fetch(i) = 2.0E+03 - C_T(i) = 0.50 - - dxlat = 57.29578*abs(xlat(i)) - tt = 29.275+0.0813*dxlat-0.0052*dxlat*dxlat-0.0038*elev(i)+273.15 - tb = 29.075-0.7566*dxlat+0.0051*dxlat*dxlat-0.0038*elev(i)+273.15 -! if(fice(i).le.0.0) then -! h_ice(i) = 0.0 -! h_snow(i)= 0.0 -! endif - if(snwdph(i).gt.0.0 .or. hice(i).gt.0.0) then - if(tsurf(i).lt.T_ice(i)) then - T_sfc(i) = T_ice(i) - else - T_sfc(i) = tsurf(i) - endif - else -! if(tsurf(i).lt.tt) then -! T_sfc(i) = tt -! else -! T_sfc(i) = tsurf(i) -! endif - T_sfc(i) = 0.2*tt + 0.8* tsurf(i) - endif - - T_bot(i) = tb - T_B1(i) = tb - -! if(lakedepth(i).lt.10.0) then -! T_bot(i) = T_sfc(i) -! T_B1(i) = T_bot(i) + T_ice(i) = 273.15 + T_snow(i) = 273.15 + fetch(i) = 2.0E+03 + C_T(i) = 0.50 + + dxlat = degrad*abs(xlat(i)) + tt = 29.275+(0.0813-0.0052*dxlat)*dxlat-0.0038*elev(i)+273.15 + tb = 29.075-(0.7566-0.0051*dxlat)*dxlat-0.0038*elev(i)+273.15 +! if (fice(i).le.0.0) then +! h_ice(i) = 0.0 +! h_snow(i)= 0.0 +! endif + if (snwdph(i) > 0.0 .or. hice(i) > 0.0) then + if (tsurf(i) < T_ice(i)) then + T_sfc(i) = T_ice(i) + else + T_sfc(i) = tsurf(i) + endif + else +! if (tsurf(i) < tt) then +! T_sfc(i) = tt +! else +! T_sfc(i) = tsurf(i) ! endif - - T_mnw(i) = C_T(i)*T_sfc(i)+(1-C_T(i))*T_bot(i) - T_wML(i) = C_T(i)*T_sfc(i)+(1-C_T(i))*T_bot(i) - h_ML(i) = C_T(i)* min ( lakedepth(i), lake_depth_max ) - H_B1(i) = min ( lakedepth(i),4.0) - hflx(i) = 0.0 - evap(i) = 0.0 - -! compute albedo as a function of julian day and latitute - temp = 2*3.14159265*(julian-1)/float(yearlen) - temp = 0.006918-0.399912*cos(temp)+0.070257*sin(temp)- & - 0.006758*cos(2.0*temp)+0.000907*sin(2.0*temp) - & - 0.002697*cos(3.0*temp)+0.00148*sin(3.0*temp) - w_albedo(I) = 0.06/cos((xlat(i)-temp)/1.2) -! w_albedo(I) = 0.06 + T_sfc(i) = 0.1*tt + 0.9* tsurf(i) + endif +! +! Add empirical climatology of lake Tsfc and Tbot to the current Tsfc and Tbot +! to make sure Tsfc and Tbot are warmer than Tair in Winter or colder than Tair +! in Summer + + if (xlat(i) >= 0.0) then + T_sfc(i) = T_sfc(i) + 0.3*y + tb = tb + 0.05*y + else + T_sfc(i) = T_sfc(i) - 0.3*y + tb = tb - 0.05*y + endif + T_bot(i) = tb + T_B1(i) = tb + +! if (lakedepth(i) < 10.0) then +! T_bot(i) = T_sfc(i) +! T_B1(i) = T_bot(i) +! endif + + T_mnw(i) = C_T(i)*T_sfc(i) + (1-C_T(i))*T_bot(i) + T_wML(i) = C_T(i)*T_sfc(i) + (1-C_T(i))*T_bot(i) + h_ML(i) = C_T(i)* min ( lakedepth(i), lake_depth_max ) + H_B1(i) = min ( lakedepth(i),4.0) + hflx(i) = 0.0 + evap(i) = 0.0 + +! compute albedo as a function of julian day and latitude + w_albedo(I) = 0.06/cos((xlat(i)-temp)/1.2) +! w_albedo(I) = 0.06 ! compute water extinction coefficient as a function of julian day - if(julian.lt.90 .or. julian .gt. 333) then - w_extinc(i) = Kbar-Kbar/DelK - else - w_extinc(i) = Kbar+Kbar/DelK*sin(2*3.14159265*(julian-151)/244) - endif -! w_extinc(i) = 3.0 + if (julian < 90 .or. julian > 333) then + w_extinc(i) = Kbar - KbaroDelK + else + w_extinc(i) = Kbar + KbaroDelK*temp2 + endif +! w_extinc(i) = 3.0 ! write(65,1002) julian,xlat(i),w_albedo(I),w_extinc(i),lakedepth(i),elev(i),tb,tt,tsurf(i),T_sfc(i) ! print 1002 julian,xlat(i),w_albedo(I),w_extinc(i),lakedepth(i),elev(i),tb,tt,tsurf(i),T_sfc(i) ! print*,'inside flake driver' ! print*, julian,xlat(i),w_albedo(I),w_extinc(i),lakedepth(i),elev(i),tb,tt,tsurf(i),T_sfc(i) - endif !lake fraction and depth endif !flag enddo 1001 format ( 'At icount=', i5, ' x = ', f5.2,5x, 'y = ', & @@ -284,55 +308,54 @@ SUBROUTINE flake_driver_run ( & 1002 format (I4,1x,3(f8.4,1x),6(f11.4,1x)) -! +! ! call lake interface do i=1,im - if (flag(i)) then - if( lake(i) ) then - dMsnowdt_in = weasd(i)/delt - I_atm_in = dswsfc(i) - Q_atm_lw_in = dlwflx(i) - height_u_in = zlvl(i) - height_tq_in = zlvl(i) - U_a_in = wind(i) - T_a_in = t1(i) - q_a_in = q1(i) - P_a_in = ps(i) - ch_in = ch(i) - cm_in = cm(i) - albedo_water= w_albedo(i) - water_extinc= w_extinc(i) - - depth_w = min ( lakedepth(i), lake_depth_max ) - depth_bs_in = max ( 4.0, min ( depth_w * 0.2, 10.0 ) ) - fetch_in = fetch(i) - T_bs_in = T_bot(i) - par_Coriolis = 2 * 7.2921 / 100000. * sin ( xlat(i) ) - del_time = delt - - do iter=1,10 !interation loop - T_snow_in = T_snow(i) - T_ice_in = T_ice(i) - T_mnw_in = T_mnw(i) - T_wML_in = T_wML(i) - T_bot_in = T_bot(i) - T_B1_in = T_B1(i) - C_T_in = C_T(i) - h_snow_in = snwdph(i) - h_ice_in = hice(i) - h_ML_in = h_ML(i) - H_B1_in = H_B1(i) - T_sfc_in = T_sfc(i) - - T_bot_2_in = T_bot(i) - Q_SHT_flx = hflx(i) - Q_watvap = evap(i) + if (flag(i)) then + dMsnowdt_in = weasd(i)/delt + I_atm_in = dswsfc(i) + Q_atm_lw_in = dlwflx(i) + height_u_in = zlvl(i) + height_tq_in = zlvl(i) + U_a_in = wind(i) + T_a_in = t1(i) + q_a_in = q1(i) + P_a_in = ps(i) + ch_in = ch(i) + cm_in = cm(i) + albedo_water = w_albedo(i) + water_extinc = w_extinc(i) + + depth_w = min ( lakedepth(i), lake_depth_max ) + depth_bs_in = max ( 4.0, min ( depth_w * 0.2, 10.0 ) ) + fetch_in = fetch(i) + T_bs_in = T_bot(i) + par_Coriolis = 2 * 7.2921 / 100000. * sin ( xlat(i) ) + del_time = delt + + do iter=1,10 !interation loop + T_snow_in = T_snow(i) + T_ice_in = T_ice(i) + T_mnw_in = T_mnw(i) + T_wML_in = T_wML(i) + T_bot_in = T_bot(i) + T_B1_in = T_B1(i) + C_T_in = C_T(i) + h_snow_in = snwdph(i) + h_ice_in = hice(i) + h_ML_in = h_ML(i) + H_B1_in = H_B1(i) + T_sfc_in = T_sfc(i) + + T_bot_2_in = T_bot(i) + Q_SHT_flx = hflx(i) + Q_watvap = evap(i) !------------------------------------------------------------------------------ ! Set the rate of snow accumulation !------------------------------------------------------------------------------ - CALL flake_interface(dMsnowdt_in, I_atm_in, Q_atm_lw_in, height_u_in, & + CALL flake_interface(dMsnowdt_in, I_atm_in, Q_atm_lw_in, height_u_in, & height_tq_in, U_a_in, T_a_in, q_a_in, P_a_in, & depth_w, fetch_in, depth_bs_in, T_bs_in, par_Coriolis, del_time, & @@ -344,45 +367,45 @@ SUBROUTINE flake_driver_run ( & T_B1_out, C_T_out, h_snow_out, h_ice_out, h_ML_out, & H_B1_out, T_sfc_out, Q_SHT_flx, Q_watvap, & ! - T_bot_2_in, T_bot_2_out,u_star, q_sfc,chh_out,cmm_out ) + T_bot_2_in, T_bot_2_out,u_star, q_sfc,chh_out,cmm_out ) !------------------------------------------------------------------------------ ! Update output and values for previous time step ! - T_snow(i) = T_snow_out - T_ice(i) = T_ice_out - T_mnw(i) = T_mnw_out - T_wML(i) = T_wML_out - T_sfc(i) = T_sfc_out - Tsurf(i) = T_sfc_out - T_bot(i) = T_bot_out - T_B1(i) = T_B1_out - C_T(i) = C_T_out - h_ML(i) = h_ML_out - H_B1(i) = H_B1_out - ustar(i) = u_star - qsfc(i) = q_sfc - chh(i) = chh_out - cmm(i) = cmm_out - snwdph(i) = h_snow_out - hice(i) = h_ice_out - evap(i) = Q_watvap - hflx(i) = Q_SHT_flx - - if(hice(i) .gt. 0.0 .or. snwdph(i) .gt. 0.0) then - fice(i) = 1.0 - else - fice(i) = 0.0 - endif - enddo !iter loop - endif !endif of lake - endif !endif of flag - - ENDDO - - 125 format(1x,i2,1x,i2,1x,i2,1x,6(1x,f14.8)) - 126 format(1x,i2,1x,i2,1x,6(1x,f14.8)) - 127 format(1x,i2,2(1x,f16.9)) + T_snow(i) = T_snow_out + T_ice(i) = T_ice_out + T_mnw(i) = T_mnw_out + T_wML(i) = T_wML_out + T_sfc(i) = T_sfc_out + Tsurf(i) = T_sfc_out + T_bot(i) = T_bot_out + T_B1(i) = T_B1_out + C_T(i) = C_T_out + h_ML(i) = h_ML_out + H_B1(i) = H_B1_out + ustar(i) = u_star + qsfc(i) = q_sfc + chh(i) = chh_out + cmm(i) = cmm_out + snwdph(i) = h_snow_out + hice(i) = h_ice_out + evap(i) = Q_watvap + hflx(i) = Q_SHT_flx + + if (hice(i) > 0.0 .or. snwdph(i) > 0.0) then + fice(i) = 1.0 + else + fice(i) = 0.0 + endif + enddo !iter loop + + endif !endif of flag + + enddo + +!125 format(1x,i2,1x,i2,1x,i2,1x,6(1x,f14.8)) +!126 format(1x,i2,1x,i2,1x,6(1x,f14.8)) +!127 format(1x,i2,2(1x,f16.9)) !------------------------------------------------------------------------------ ! End calculations !============================================================================== diff --git a/physics/flake_driver.meta b/physics/flake_driver.meta index 2b857e509..9a4941199 100644 --- a/physics/flake_driver.meta +++ b/physics/flake_driver.meta @@ -69,7 +69,7 @@ intent = in optional = F [t1] - standard_name = air_temperature_at_lowest_model_layer + standard_name = air_temperature_at_surface_adjacent_layer long_name = mean temperature at lowest model layer units = K dimensions = (horizontal_loop_extent) @@ -78,7 +78,7 @@ intent = in optional = F [q1] - standard_name = water_vapor_specific_humidity_at_lowest_model_layer + standard_name = specific_humidity_at_surface_adjacent_layer long_name = water vapor specific humidity at lowest model layer units = kg kg-1 dimensions = (horizontal_loop_extent) @@ -96,8 +96,8 @@ intent = in optional = F [dlwflx] - standard_name = surface_downwelling_longwave_flux_absorbed_by_ground_over_ocean - long_name = total sky surface downward longwave flux absorbed by the ground over ocean + standard_name = surface_downwelling_longwave_flux_absorbed_by_ground_over_water + long_name = total sky surface downward longwave flux absorbed by the ground over water units = W m-2 dimensions = (horizontal_loop_extent) type = real @@ -114,13 +114,13 @@ intent = in optional = F [weasd] - standard_name = water_equivalent_accumulated_snow_depth_over_ocean - long_name = water equiv of acc snow depth over ocean + standard_name = water_equivalent_accumulated_snow_depth_over_ice + long_name = water equiv of acc snow depth over ice units = mm dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = inout + intent = in optional = F [lakedepth] standard_name = lake_depth @@ -131,9 +131,9 @@ kind = kind_phys intent = in optional = F -[lake] - standard_name = flag_nonzero_lake_surface_fraction - long_name = flag indicating presence of some lake surface area fraction +[use_flake] + standard_name = flag_for_using_flake + long_name = flag indicating lake points using flake model units = flag dimensions = (horizontal_loop_extent) type = logical @@ -149,7 +149,7 @@ intent = in optional = F [delt] - standard_name = time_step_for_dynamics + standard_name = timestep_for_dynamics long_name = dynamics time step units = s dimensions = () @@ -167,8 +167,8 @@ intent = in optional = F [elev] - standard_name = orography - long_name = orography + standard_name = height_above_mean_sea_level + long_name = height_above_mean_sea_level units = m dimensions = (horizontal_loop_extent) type = real @@ -192,7 +192,7 @@ intent = in optional = F [yearlen] - standard_name = number_of_days_in_year + standard_name = number_of_days_in_current_year long_name = number of days in a year units = days dimensions = () @@ -200,7 +200,7 @@ intent = in optional = F [julian] - standard_name = julian_day + standard_name = forecast_julian_day long_name = julian day units = days dimensions = () @@ -217,13 +217,13 @@ intent = in optional = F [snwdph] - standard_name = surface_snow_thickness_water_equivalent_over_ocean - long_name = water equivalent snow depth over ocean + standard_name = surface_snow_thickness_water_equivalent_over_ice + long_name = water equivalent snow depth over ice units = mm dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = in + intent = inout optional = F [hice] standard_name = sea_ice_thickness @@ -235,16 +235,16 @@ intent = inout optional = F [tsurf] - standard_name = surface_skin_temperature_after_iteration_over_ocean - long_name = surface skin temperature after iteration over ocean + standard_name = surface_skin_temperature_after_iteration_over_water + long_name = surface skin temperature after iteration over water units = K dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = in + intent = inout optional = F [fice] - standard_name = sea_ice_concentration + standard_name = sea_ice_area_fraction_of_sea_area_fraction long_name = ice fraction over open water units = frac dimensions = (horizontal_loop_extent) @@ -253,8 +253,8 @@ intent = inout optional = F [t_sfc] - standard_name = surface_skin_temperature_over_ocean_interstitial - long_name = surface skin temperature over ocean (temporary use as interstitial) + standard_name = surface_skin_temperature_over_water_interstitial + long_name = surface skin temperature over water (temporary use as interstitial) units = K dimensions = (horizontal_loop_extent) type = real @@ -262,8 +262,8 @@ intent = inout optional = F [hflx] - standard_name = kinematic_surface_upward_sensible_heat_flux_over_ocean - long_name = kinematic surface upward sensible heat flux over ocean + standard_name = kinematic_surface_upward_sensible_heat_flux_over_water + long_name = kinematic surface upward sensible heat flux over water units = K m s-1 dimensions = (horizontal_loop_extent) type = real @@ -271,8 +271,8 @@ intent = inout optional = F [evap] - standard_name = kinematic_surface_upward_latent_heat_flux_over_ocean - long_name = kinematic surface upward latent heat flux over ocean + standard_name = kinematic_surface_upward_latent_heat_flux_over_water + long_name = kinematic surface upward latent heat flux over water units = kg kg-1 m s-1 dimensions = (horizontal_loop_extent) type = real @@ -280,8 +280,8 @@ intent = inout optional = F [ustar] - standard_name = surface_friction_velocity_over_ocean - long_name = surface friction velocity over ocean + standard_name = surface_friction_velocity_over_water + long_name = surface friction velocity over water units = m s-1 dimensions = (horizontal_loop_extent) type = real @@ -289,8 +289,8 @@ intent = inout optional = F [qsfc] - standard_name = surface_specific_humidity_over_ocean - long_name = surface air saturation specific humidity over ocean + standard_name = surface_specific_humidity_over_water + long_name = surface air saturation specific humidity over water units = kg kg-1 dimensions = (horizontal_loop_extent) type = real @@ -298,8 +298,8 @@ intent = inout optional = F [ch] - standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ocean - long_name = surface exchange coeff heat & moisture over ocean + standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_water + long_name = surface exchange coeff heat surface exchange coeff heat & moisture over ocean moisture over water units = none dimensions = (horizontal_loop_extent) type = real @@ -307,8 +307,8 @@ intent = inout optional = F [cm] - standard_name = surface_drag_coefficient_for_momentum_in_air_over_ocean - long_name = surface exchange coeff for momentum over ocean + standard_name = surface_drag_coefficient_for_momentum_in_air_over_water + long_name = surface exchange coeff for momentum over water units = none dimensions = (horizontal_loop_extent) type = real @@ -316,8 +316,8 @@ intent = inout optional = F [chh] - standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_ocean - long_name = thermal exchange coefficient over ocean + standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_water + long_name = thermal exchange coefficient over water units = kg m-2 s-1 dimensions = (horizontal_loop_extent) type = real @@ -325,8 +325,8 @@ intent = inout optional = F [cmm] - standard_name = surface_drag_wind_speed_for_momentum_in_air_over_ocean - long_name = momentum exchange coefficient over ocean + standard_name = surface_drag_wind_speed_for_momentum_in_air_over_water + long_name = momentum exchange coefficient over water units = m s-1 dimensions = (horizontal_loop_extent) type = real diff --git a/physics/gcm_shoc.F90 b/physics/gcm_shoc.F90 index dd7791e18..4852310fc 100644 --- a/physics/gcm_shoc.F90 +++ b/physics/gcm_shoc.F90 @@ -14,7 +14,22 @@ module shoc contains -subroutine shoc_init () +subroutine shoc_init (do_shoc, errmsg, errflg) + implicit none + logical, intent(in) :: do_shoc + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + +! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + +! Consistency checks + if (.not. do_shoc) then + errflg = 1 + write(errmsg,'(*(a))') 'Logic error: do_shoc == .false.' + return + end if end subroutine shoc_init subroutine shoc_finalize () @@ -24,7 +39,7 @@ end subroutine shoc_finalize !! \htmlinclude shoc_run.html !! subroutine shoc_run (nx, nzm, tcr, tcrf, con_cp, con_g, con_hvap, con_hfus, con_rv, con_rd, & - con_pi, con_fvirt, dtp, prsl, delp, phii, phil, u, v, omega, rhc, & + con_pi, con_fvirt, con_eps, dtp, prsl, delp, phii, phil, u, v, omega, rhc, & supice, pcrit, cefac, cesfac, tkef1, dis_opt, hflx, evap, prnum, & gt0, gq0, ntrac, ntqv, ntcw, ntiw, ntrw, ntsw, ntgl, ntlnc, ntinc, & cld_sgs, tke, tkh, wthv_sec, errmsg, errflg) @@ -32,15 +47,16 @@ subroutine shoc_run (nx, nzm, tcr, tcrf, con_cp, con_g, con_hvap, con_hfus, con_ implicit none integer, intent(in) :: nx, nzm, ntrac, ntqv, ntcw, ntiw, ntrw, ntsw, ntgl, ntlnc, ntinc - real(kind=kind_phys), intent(in) :: tcr, tcrf, con_cp, con_g, con_hvap, con_hfus, con_rv, con_rd, con_pi, con_fvirt, & + real(kind=kind_phys), intent(in) :: tcr, tcrf, con_cp, con_g, con_hvap, con_hfus, con_rv, & + con_rd, con_pi, con_fvirt, con_eps, & dtp, supice, pcrit, cefac, cesfac, tkef1, dis_opt ! - real(kind=kind_phys), intent(in), dimension(nx) :: hflx, evap - real(kind=kind_phys), intent(in), dimension(nx,nzm) :: prsl, delp, phil, u, v, omega, rhc, prnum - real(kind=kind_phys), intent(in), dimension(nx,nzm+1) :: phii + real(kind=kind_phys), intent(in), dimension(:) :: hflx, evap + real(kind=kind_phys), intent(in), dimension(:,:) :: prsl, delp, phil, u, v, omega, rhc, prnum + real(kind=kind_phys), intent(in), dimension(:,:) :: phii ! - real(kind=kind_phys), intent(inout), dimension(nx,nzm) :: gt0, cld_sgs, tke, tkh, wthv_sec - real(kind=kind_phys), intent(inout), dimension(nx,nzm,ntrac) :: gq0 + real(kind=kind_phys), intent(inout), dimension(:,:) :: gt0, cld_sgs, tke, tkh, wthv_sec + real(kind=kind_phys), intent(inout), dimension(:,:,:) :: gq0 character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -118,7 +134,8 @@ subroutine shoc_run (nx, nzm, tcr, tcrf, con_cp, con_g, con_hvap, con_hfus, con_ rhc, supice, pcrit, cefac, cesfac, tkef1, dis_opt, & cld_sgs, tke, hflx, evap, prnum, tkh, wthv_sec, & ntlnc, ncpl, ncpi, & - con_cp, con_g, con_hvap, con_hfus, con_rv, con_rd, con_pi, con_fvirt) + con_cp, con_g, con_hvap, con_hfus, con_rv, con_rd, con_pi, & + con_fvirt, con_eps) if (ntiw < 0) then ! this is valid only for Zhao-Carr scheme do k=1,nzm @@ -166,13 +183,13 @@ subroutine shoc_work (ix, nx, nzm, nz, dtn, & pcrit, cefac, cesfac, tkef1, dis_opt, & cld_sgs, tke, hflx, evap, prnum, tkh, & wthv_sec, ntlnc, ncpl, ncpi, & - cp, ggr, lcond, lfus, rv, rgas, pi, epsv) + cp, ggr, lcond, lfus, rv, rgas, pi, epsv, eps) use funcphys , only : fpvsl, fpvsi, fpvs ! saturation vapor pressure for water & ice implicit none - real, intent(in) :: cp, ggr, lcond, lfus, rv, rgas, pi, epsv + real, intent(in) :: cp, ggr, lcond, lfus, rv, rgas, pi, epsv, eps integer, intent(in) :: ix ! max number of points in the physics window in the x integer, intent(in) :: nx ! Number of points in the physics window in the x @@ -219,7 +236,7 @@ subroutine shoc_work (ix, nx, nzm, nz, dtn, & real, intent(in) :: prnum (nx,nzm) ! turbulent Prandtl number real, intent(inout) :: wthv_sec (ix,nzm) ! Buoyancy flux, K*m/s - real, parameter :: zero=0.0_kp, one=1.0_kp, half=0.5_kp, two=2.0_kp, eps=0.622_kp, & + real, parameter :: zero=0.0_kp, one=1.0_kp, half=0.5_kp, two=2.0_kp, & three=3.0_kp, oneb3=one/three, twoby3=two/three, fourb3=twoby3+twoby3 real, parameter :: sqrt2 = sqrt(two), twoby15 = two / 15.0_kp, & nmin = 1.0_kp, RI_cub = 6.4e-14_kp, RL_cub = 1.0e-15_kp, & @@ -1724,7 +1741,7 @@ end subroutine assumed_pdf real function esatw(t) - real t ! temperature (K) + real t ! temperature (K) real a0,a1,a2,a3,a4,a5,a6,a7,a8 data a0,a1,a2,a3,a4,a5,a6,a7,a8 / & 6.11239921, 0.443987641, 0.142986287e-1, & @@ -1737,8 +1754,8 @@ end function esatw real function qsatw(t,p) ! implicit none - real t ! temperature (K) - real p ! pressure (Pa) + real t ! temperature (K) + real p ! pressure (Pa) real esat ! esat = fpvs(t) esat = fpvsl(t) @@ -1749,7 +1766,7 @@ end function qsatw real function esati(t) - real t ! temperature (K) + real t ! temperature (K) real a0,a1,a2,a3,a4,a5,a6,a7,a8 data a0,a1,a2,a3,a4,a5,a6,a7,a8 / & 6.11147274, 0.503160820, 0.188439774e-1, & @@ -1769,8 +1786,8 @@ real function esati(t) end function esati real function qsati(t,p) - real t ! temperature (K) - real p ! pressure (Pa) + real t ! temperature (K) + real p ! pressure (Pa) real esat !,esati ! esat = fpvs(t) esat = fpvsi(t) @@ -1780,7 +1797,7 @@ real function qsati(t,p) end function qsati real function dtesatw(t) - real t ! temperature (K) + real t ! temperature (K) real a0,a1,a2,a3,a4,a5,a6,a7,a8 data a0,a1,a2,a3,a4,a5,a6,a7,a8 / & 0.443956472, 0.285976452e-1, 0.794747212e-3, & @@ -1792,14 +1809,14 @@ real function dtesatw(t) end function dtesatw real function dtqsatw(t,p) - real t ! temperature (K) - real p ! pressure (Pa) + real t ! temperature (K) + real p ! pressure (Pa) ! real dtesatw dtqsatw = 100.0*0.622*dtesatw(t)/p end function dtqsatw real function dtesati(t) - real t ! temperature (K) + real t ! temperature (K) real a0,a1,a2,a3,a4,a5,a6,a7,a8 data a0,a1,a2,a3,a4,a5,a6,a7,a8 / & 0.503223089, 0.377174432e-1, 0.126710138e-2, & @@ -1820,8 +1837,8 @@ end function dtesati real function dtqsati(t,p) - real t ! temperature (K) - real p ! pressure (Pa) + real t ! temperature (K) + real p ! pressure (Pa) ! real dtesati dtqsati = 100.0*0.622*dtesati(t)/p end function dtqsati diff --git a/physics/gcm_shoc.meta b/physics/gcm_shoc.meta index 8cb03727d..8ebd8fd05 100644 --- a/physics/gcm_shoc.meta +++ b/physics/gcm_shoc.meta @@ -3,6 +3,36 @@ type = scheme dependencies = funcphys.f90,machine.F +######################################################################## +[ccpp-arg-table] + name = shoc_init + type = scheme +[do_shoc] + standard_name = flag_for_shoc + long_name = flag for SHOC + units = flag + dimensions = () + type = logical + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + ######################################################################## [ccpp-arg-table] name = shoc_run @@ -16,7 +46,7 @@ intent = in optional = F [nzm] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -33,7 +63,7 @@ intent = in optional = F [tcrf] - standard_name = cloud_phase_transition_denominator + standard_name = reciprocal_of_cloud_phase_transition_temperature_range long_name = denominator in cloud phase transition = 1/(tcr-tf) units = K-1 dimensions = () @@ -87,7 +117,7 @@ intent = in optional = F [con_rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -113,8 +143,17 @@ kind = kind_phys intent = in optional = F +[con_eps] + standard_name = ratio_of_dry_air_to_water_vapor_gas_constants + long_name = rd/rv + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F [dtp] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = time step for physics units = s dimensions = () @@ -126,7 +165,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -135,7 +174,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = pres(k) - pres(k+1) units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -144,7 +183,7 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -153,34 +192,34 @@ standard_name = geopotential long_name = geopotential at model layer centers units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [u] - standard_name = x_wind_updated_by_physics + standard_name = x_wind_of_new_state long_name = zonal wind updated by physics units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [v] - standard_name = y_wind_updated_by_physics + standard_name = y_wind_of_new_state long_name = meridional wind updated by physics units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [omega] - standard_name = omega + standard_name = lagrangian_tendency_of_air_pressure long_name = layer mean vertical velocity units = Pa s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -189,13 +228,13 @@ standard_name = critical_relative_humidity long_name = critical relative humidity units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [supice] - standard_name = ice_supersaturation_threshold + standard_name = tunable_parameter_for_ice_supersaturation long_name = ice supersaturation parameter for PDF clouds units = none dimensions = () @@ -204,7 +243,7 @@ intent = in optional = F [pcrit] - standard_name = shoc_tke_dissipatation_pressure_threshold + standard_name = pressure_threshold_for_increased_tke_dissipation long_name = pressure below which extra TKE diss. is applied in SHOC units = Pa dimensions = () @@ -213,7 +252,7 @@ intent = in optional = F [cefac] - standard_name = shoc_tke_dissipation_tunable_parameter + standard_name = multiplicative_tunable_parameter_for_tke_dissipation long_name = mult. tuning parameter for TKE diss. in SHOC units = none dimensions = () @@ -222,7 +261,7 @@ intent = in optional = F [cesfac] - standard_name = shoc_tke_dissipation_tunable_parameter_near_surface + standard_name = multiplicative_tunable_parameter_for_tke_dissipation_at_surface_adjacent_layer long_name = mult. tuning parameter for TKE diss. at surface in SHOC units = none dimensions = () @@ -249,8 +288,8 @@ intent = in optional = F [hflx] - standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness - long_name = kinematic surface upward sensible heat flux + standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness_and_vegetation + long_name = kinematic surface upward sensible heat flux reduced by surface roughness and vegetation units = K m s-1 dimensions = (horizontal_loop_extent) type = real @@ -258,7 +297,7 @@ intent = in optional = F [evap] - standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness + standard_name = surface_upward_specific_humidity_flux long_name = kinematic surface upward latent heat flux units = kg kg-1 m s-1 dimensions = (horizontal_loop_extent) @@ -270,25 +309,25 @@ standard_name = prandtl_number long_name = turbulent Prandtl number units = none - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [gt0] - standard_name = air_temperature_updated_by_physics + standard_name = air_temperature_of_new_state long_name = temperature updated by physics units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [gq0] - standard_name = tracer_concentration_updated_by_physics + standard_name = tracer_concentration_of_new_state long_name = tracer concentration updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = inout @@ -302,7 +341,7 @@ intent = in optional = F [ntqv] - standard_name = index_for_water_vapor + standard_name = index_of_specific_humidity_in_tracer_concentration_array long_name = tracer index for water vapor (specific humidity) units = index dimensions = () @@ -310,7 +349,7 @@ intent = in optional = F [ntcw] - standard_name = index_for_liquid_cloud_condensate + standard_name = index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array long_name = tracer index for cloud condensate (or liquid water) units = index dimensions = () @@ -318,7 +357,7 @@ intent = in optional = F [ntiw] - standard_name = index_for_ice_cloud_condensate + standard_name = index_of_cloud_ice_mixing_ratio_in_tracer_concentration_array long_name = tracer index for ice water units = index dimensions = () @@ -326,7 +365,7 @@ intent = in optional = F [ntrw] - standard_name = index_for_rain_water + standard_name = index_of_rain_mixing_ratio_in_tracer_concentration_array long_name = tracer index for rain water units = index dimensions = () @@ -334,7 +373,7 @@ intent = in optional = F [ntsw] - standard_name = index_for_snow_water + standard_name = index_of_snow_mixing_ratio_in_tracer_concentration_array long_name = tracer index for snow water units = index dimensions = () @@ -342,7 +381,7 @@ intent = in optional = F [ntgl] - standard_name = index_for_graupel + standard_name = index_of_graupel_mixing_ratio_in_tracer_concentration_array long_name = tracer index for graupel units = index dimensions = () @@ -350,7 +389,7 @@ intent = in optional = F [ntlnc] - standard_name = index_for_liquid_cloud_number_concentration + standard_name = index_of_mass_number_concentration_of_cloud_droplets_in_tracer_concentration_array long_name = tracer index for liquid number concentration units = index dimensions = () @@ -358,7 +397,7 @@ intent = in optional = F [ntinc] - standard_name = index_for_ice_cloud_number_concentration + standard_name = index_of_mass_number_concentration_of_cloud_ice_in_tracer_concentration_array long_name = tracer index for ice number concentration units = index dimensions = () @@ -369,7 +408,7 @@ standard_name = subgrid_scale_cloud_fraction_from_shoc long_name = subgrid-scale cloud fraction from the SHOC scheme units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -378,7 +417,7 @@ standard_name = turbulent_kinetic_energy_convective_transport_tracer long_name = turbulent kinetic energy in the convectively transported tracer array units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -387,16 +426,16 @@ standard_name = atmosphere_heat_diffusivity_from_shoc long_name = diffusivity for heat from the SHOC scheme units = m2 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [wthv_sec] - standard_name = kinematic_buoyancy_flux_from_shoc + standard_name = upward_virtual_potential_temperature_flux long_name = upward kinematic buoyancy flux from the SHOC scheme units = K m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/gcycle.F90 b/physics/gcycle.F90 index 558a65860..718b375af 100644 --- a/physics/gcycle.F90 +++ b/physics/gcycle.F90 @@ -15,17 +15,17 @@ module gcycle_mod !>\ingroup mod_GFS_phys_time_vary !! This subroutine repopulates specific time-varying surface properties for !! atmospheric forecast runs. - subroutine gcycle (me, nthrds, nx, ny, isc, jsc, nsst, tile_num, nlunit, & - input_nml_file, lsoil, lsoil_lsm, kice, idate, ialb, isot, ivegsrc, & - use_ufo, nst_anl, fhcyc, phour, lakefrac, min_seaice, min_lakeice, & - frac_grid, smc, slc, stc, smois, sh2o, tslb, tiice, tg3, tref, tsfc, & - tsfco, tisfc, hice, fice, facsf, facwf, alvsf, alvwf, alnsf, alnwf, & - zorli, zorll, zorlo, weasd, slope, snoalb, canopy, vfrac, vtype, & - stype, shdmin, shdmax, snowd, cv, cvb, cvt, oro, oro_uf, & + subroutine gcycle (me, nthrds, nx, ny, isc, jsc, nsst, tile_num, nlunit, & + input_nml_file, lsoil, lsoil_lsm, kice, idate, ialb, isot, ivegsrc, & + use_ufo, nst_anl, fhcyc, phour, landfrac, lakefrac, min_seaice, min_lakeice, & + frac_grid, smc, slc, stc, smois, sh2o, tslb, tiice, tg3, tref, tsfc, & + tsfco, tisfc, hice, fice, facsf, facwf, alvsf, alvwf, alnsf, alnwf, & + zorli, zorll, zorlo, weasd, slope, snoalb, canopy, vfrac, vtype, & + stype, shdmin, shdmax, snowd, cv, cvb, cvt, oro, oro_uf, & xlat_d, xlon_d, slmsk, imap, jmap) ! ! - use machine, only: kind_phys + use machine, only: kind_phys, kind_io8 implicit none integer, intent(in) :: me, nthrds, nx, ny, isc, jsc, nsst, & @@ -33,8 +33,8 @@ subroutine gcycle (me, nthrds, nx, ny, isc, jsc, nsst, tile_num, nlunit, & integer, intent(in) :: idate(:), ialb, isot, ivegsrc character(len=*), intent(in) :: input_nml_file(:) logical, intent(in) :: use_ufo, nst_anl, frac_grid - real(kind=kind_phys), intent(in) :: fhcyc, phour, lakefrac(:), & - min_seaice, min_lakeice, & + real(kind=kind_phys), intent(in) :: fhcyc, phour, landfrac(:), lakefrac(:), & + min_seaice, min_lakeice, & xlat_d(:), xlon_d(:) real(kind=kind_phys), intent(inout) :: smc(:,:), & slc(:,:), & @@ -80,8 +80,10 @@ subroutine gcycle (me, nthrds, nx, ny, isc, jsc, nsst, tile_num, nlunit, & ! ! Local variables ! --------------- - real(kind=kind_phys) :: & - SLMASK (nx*ny), & +! real(kind=kind_phys) :: & + real(kind=kind_io8) :: & + slmskl (nx*ny), & + slmskw (nx*ny), & TSFFCS (nx*ny), & ZORFCS (nx*ny), & AISFCS (nx*ny), & @@ -92,9 +94,10 @@ subroutine gcycle (me, nthrds, nx, ny, isc, jsc, nsst, tile_num, nlunit, & SLCFC1 (nx*ny*max(lsoil,lsoil_lsm)) - logical :: lake(nx*ny) + real (kind=kind_io8) :: min_ice(nx*ny) + integer :: i_indx(nx*ny), j_indx(nx*ny) character(len=6) :: tile_num_ch - real(kind=kind_phys) :: sig1t, dt_warm + real(kind=kind_phys) :: sig1t integer :: npts, nb, ix, jx, ls, ios, ll logical :: exists ! @@ -116,17 +119,59 @@ subroutine gcycle (me, nthrds, nx, ny, isc, jsc, nsst, tile_num, nlunit, & if ( nsst > 0 ) then TSFFCS = tref else - TSFFCS = tsfc + TSFFCS = tsfco end if ! + if (frac_grid) then + do ix=1,npts + if (landfrac(ix) > -1.0e-8_kind_phys) then + slmskl(ix) = ceiling(landfrac(ix)-1.0e-8_kind_phys) + slmskw(ix) = floor(landfrac(ix)+1.0e-8_kind_phys) + else + if (nint(slmsk(ix)) == 1) then + slmskl(ix) = 1.0_kind_phys + slmskw(ix) = 1.0_kind_phys + else + slmskl(ix) = 0.0_kind_phys + slmskw(ix) = 0.0_kind_phys + endif + endif + ZORFCS(ix) = zorll(ix) + if (nint(slmskl(ix)) == 0) then + if (slmsk(ix) > 1.99_kind_phys) then + ZORFCS(ix) = zorli(ix) + else + ZORFCS(ix) = zorlo(ix) + endif + endif + enddo + else + do ix=1,npts + if (nint(slmsk(ix)) == 1) then + slmskl(ix) = 1.0_kind_phys + slmskw(ix) = 1.0_kind_phys + else + slmskl(ix) = 0.0_kind_phys + slmskw(ix) = 0.0_kind_phys + endif + ZORFCS(ix) = zorll(ix) + if (slmsk(ix) > 1.99_kind_phys) then + ZORFCS(ix) = zorli(ix) + elseif (slmsk(ix) < 0.1_kind_phys) then + ZORFCS(ix) = zorlo(ix) + endif + enddo + endif do ix=1,npts - ZORFCS(ix) = zorll (ix) - if (slmsk(ix) > 1.9_kind_phys .and. .not. frac_grid) then - ZORFCS(ix) = zorli (ix) - elseif (slmsk(ix) < 0.1_kind_phys .and. .not. frac_grid) then - ZORFCS(ix) = zorlo (ix) + i_indx(ix) = imap(ix) + isc - 1 + j_indx(ix) = jmap(ix) + jsc - 1 + + if (lakefrac(ix) > 0.0_kind_phys) then + min_ice(ix) = min_lakeice + else + min_ice(ix) = min_seaice endif - ! DH* Why not 1.9 as for ZORFCS? + IF (slmsk(ix) > 1.99_kind_phys) THEN AISFCS(ix) = 1.0_kind_phys ELSE @@ -153,19 +198,8 @@ subroutine gcycle (me, nthrds, nx, ny, isc, jsc, nsst, tile_num, nlunit, & SLCFC1(ll) = sh2o(ix,ls) endif enddo - ! - IF (slmsk(ix) < 0.1_kind_phys .OR. slmsk(ix) > 1.5_kind_phys) THEN - SLMASK(ix) = 0.0_kind_phys - ELSE - SLMASK(ix) = 1.0_kind_phys - ENDIF - ! - if (lakefrac(ix) > 0.0_kind_phys) then - lake(ix) = .true. - else - lake(ix) = .false. - endif - end do +! + enddo ! #ifndef INTERNAL_FILE_NML inquire (file=trim(Model%fn_nml),exist=exists) @@ -179,7 +213,7 @@ subroutine gcycle (me, nthrds, nx, ny, isc, jsc, nsst, tile_num, nlunit, & #endif CALL SFCCYCLE (9998, npts, max(lsoil,lsoil_lsm), sig1t, fhcyc, & idate(4), idate(2), idate(3), idate(1), & - phour, xlat_d, xlon_d, slmask, & + phour, xlat_d, xlon_d, slmskl, slmskw, & oro, oro_uf, use_ufo, nst_anl, & hice, fice, tisfc, snowd, slcfc1, & shdmin, shdmax, slope, snoalb, tsffcs, & @@ -188,9 +222,8 @@ subroutine gcycle (me, nthrds, nx, ny, isc, jsc, nsst, tile_num, nlunit, & vfrac, vtype, stype, alffc1, cv, & cvb, cvt, me, nthrds, & nlunit, size(input_nml_file), input_nml_file, & - lake, min_lakeice, min_seaice, & - ialb, isot, ivegsrc, & - trim(tile_num_ch), imap, jmap) + min_ice, ialb, isot, ivegsrc, & + trim(tile_num_ch), i_indx, j_indx) #ifndef INTERNAL_FILE_NML close (Model%nlunit) #endif @@ -200,14 +233,16 @@ subroutine gcycle (me, nthrds, nx, ny, isc, jsc, nsst, tile_num, nlunit, & else tsfc = TSFFCS tsfco = TSFFCS - end if + endif ! do ix=1,npts zorll(ix) = ZORFCS(ix) - if (slmsk(ix) > 1.9_kind_phys .and. .not. frac_grid) then - zorli(ix) = ZORFCS(ix) - elseif (slmsk(ix) < 0.1_kind_phys .and. .not. frac_grid) then - zorlo(ix) = ZORFCS(ix) + if (nint(slmskl(ix)) == 0) then + if (slmsk(ix) > 1.99_kind_phys) then + zorli(ix) = ZORFCS(ix) + elseif (slmsk(ix) < 0.1_kind_phys) then + zorlo(ix) = ZORFCS(ix) + endif endif ! facsf(ix) = ALFFC1(ix ) @@ -229,7 +264,7 @@ subroutine gcycle (me, nthrds, nx, ny, isc, jsc, nsst, tile_num, nlunit, & tslb(ix,ls) = STCFC1(ll) sh2o(ix,ls) = SLCFC1(ll) endif - if (ls<=kice) tiice(ix,ls) = STCFC1(ll) +! if (ls<=kice) tiice(ix,ls) = STCFC1(ll) enddo enddo ! diff --git a/physics/get_prs_fv3.F90 b/physics/get_prs_fv3.F90 index c2a5c06d4..35bdc35ca 100644 --- a/physics/get_prs_fv3.F90 +++ b/physics/get_prs_fv3.F90 @@ -25,14 +25,14 @@ subroutine get_prs_fv3_run(ix, levs, con_fvirt, phii, prsi, tgrs, qgrs1, del, de ! Interface variables integer, intent(in) :: ix, levs real(kind=kind_phys), intent(in) :: con_fvirt - real(kind=kind_phys), dimension(ix,levs+1), intent(in) :: phii - real(kind=kind_phys), dimension(ix,levs+1), intent(in) :: prsi - real(kind=kind_phys), dimension(ix,levs), intent(in) :: tgrs - real(kind=kind_phys), dimension(ix,levs), intent(in) :: qgrs1 - real(kind=kind_phys), dimension(ix,levs), intent(out) :: del - real(kind=kind_phys), dimension(ix,levs+1), intent(out) :: del_gz - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg + real(kind=kind_phys), dimension(:,:), intent(in) :: phii + real(kind=kind_phys), dimension(:,:), intent(in) :: prsi + real(kind=kind_phys), dimension(:,:), intent(in) :: tgrs + real(kind=kind_phys), dimension(:,:), intent(in) :: qgrs1 + real(kind=kind_phys), dimension(:,:), intent(out) :: del + real(kind=kind_phys), dimension(:,:), intent(out) :: del_gz + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg ! Local variables integer :: i, k @@ -87,13 +87,13 @@ subroutine get_phi_fv3_run(ix, levs, con_fvirt, gt0, gq01, del_gz, phii, phil, e ! Interface variables integer, intent(in) :: ix, levs real(kind=kind_phys), intent(in) :: con_fvirt - real(kind=kind_phys), dimension(ix,levs), intent(in) :: gt0 - real(kind=kind_phys), dimension(ix,levs), intent(in) :: gq01 - real(kind=kind_phys), dimension(ix,levs+1), intent(inout) :: del_gz - real(kind=kind_phys), dimension(ix,levs+1), intent(out) :: phii - real(kind=kind_phys), dimension(ix,levs), intent(out) :: phil - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg + real(kind=kind_phys), dimension(:,:), intent(in) :: gt0 + real(kind=kind_phys), dimension(:,:), intent(in) :: gq01 + real(kind=kind_phys), dimension(:,:), intent(inout) :: del_gz + real(kind=kind_phys), dimension(:,:), intent(out) :: phii + real(kind=kind_phys), dimension(:,:), intent(out) :: phil + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg ! Local variables integer :: i, k diff --git a/physics/get_prs_fv3.meta b/physics/get_prs_fv3.meta index 53e69990f..aa690573a 100644 --- a/physics/get_prs_fv3.meta +++ b/physics/get_prs_fv3.meta @@ -16,7 +16,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical layers units = count dimensions = () @@ -36,7 +36,7 @@ standard_name = geopotential_at_interface long_name = interface geopotential units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -45,7 +45,7 @@ standard_name = air_pressure_at_interface long_name = interface pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -54,16 +54,16 @@ standard_name = air_temperature long_name = mid-layer temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [qgrs1] - standard_name = water_vapor_specific_humidity + standard_name = specific_humidity long_name = mid-layer specific humidity of water vapor units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -72,7 +72,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = difference between mid-layer pressures units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -81,7 +81,7 @@ standard_name = geopotential_difference_between_midlayers_divided_by_midlayer_virtual_temperature long_name = difference between mid-layer geopotentials divided by mid-layer virtual temperature units = m2 s-2 K-1 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = out @@ -123,7 +123,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical layers units = count dimensions = () @@ -140,19 +140,19 @@ intent = in optional = F [gt0] - standard_name = air_temperature_updated_by_physics + standard_name = air_temperature_of_new_state long_name = updated air temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [gq01] - standard_name = water_vapor_specific_humidity_updated_by_physics + standard_name = specific_humidity_of_new_state long_name = mid-layer specific humidity of water vapor units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -161,7 +161,7 @@ standard_name = geopotential_difference_between_midlayers_divided_by_midlayer_virtual_temperature long_name = difference between mid-layer geopotentials divided by mid-layer virtual temperature units = m2 s-2 K-1 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = inout @@ -170,7 +170,7 @@ standard_name = geopotential_at_interface long_name = interface geopotential units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = out @@ -179,7 +179,7 @@ standard_name = geopotential long_name = mid-layer geopotential units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out diff --git a/physics/gfdl_cloud_microphys.F90 b/physics/gfdl_cloud_microphys.F90 index d0e0cc17d..309cbac92 100644 --- a/physics/gfdl_cloud_microphys.F90 +++ b/physics/gfdl_cloud_microphys.F90 @@ -112,13 +112,14 @@ end subroutine gfdl_cloud_microphys_finalize !! \section arg_table_gfdl_cloud_microphys_run Argument Table !! \htmlinclude gfdl_cloud_microphys_run.html !! - subroutine gfdl_cloud_microphys_run( & - levs, im, rainmin, con_g, con_fvirt, con_rd, frland, garea, islmsk, & - gq0, gq0_ntcw, gq0_ntrw, gq0_ntiw, gq0_ntsw, gq0_ntgl, gq0_ntclamt, & - gt0, gu0, gv0, vvl, prsl, phii, del, & - rain0, ice0, snow0, graupel0, prcp0, sr, & - dtp, hydrostatic, phys_hydrostatic, lradar, refl_10cm, & - reset, effr_in, rew, rei, rer, res, reg, errmsg, errflg) + subroutine gfdl_cloud_microphys_run( & + levs, im, rainmin, con_g, con_fvirt, con_rd, con_eps, frland, garea, islmsk, & + gq0, gq0_ntcw, gq0_ntrw, gq0_ntiw, gq0_ntsw, gq0_ntgl, gq0_ntclamt, & + gt0, gu0, gv0, vvl, prsl, phii, del, & + rain0, ice0, snow0, graupel0, prcp0, sr, & + dtp, hydrostatic, phys_hydrostatic, lradar, refl_10cm, & + reset, effr_in, rew, rei, rer, res, reg, & + cplchm, pfi_lsan, pfl_lsan, errmsg, errflg) use machine, only: kind_phys @@ -134,30 +135,33 @@ subroutine gfdl_cloud_microphys_run( & ! interface variables integer, intent(in ) :: levs, im - real(kind=kind_phys), intent(in ) :: con_g, con_fvirt, con_rd, rainmin - real(kind=kind_phys), intent(in ), dimension(1:im) :: frland, garea - integer, intent(in ), dimension(1:im) :: islmsk - real(kind=kind_phys), intent(inout), dimension(1:im,1:levs) :: gq0, gq0_ntcw, gq0_ntrw, gq0_ntiw, & - gq0_ntsw, gq0_ntgl, gq0_ntclamt - real(kind=kind_phys), intent(inout), dimension(1:im,1:levs) :: gt0, gu0, gv0 - real(kind=kind_phys), intent(in ), dimension(1:im,1:levs) :: vvl, prsl, del - real(kind=kind_phys), intent(in ), dimension(1:im,1:levs+1) :: phii + real(kind=kind_phys), intent(in ) :: con_g, con_fvirt, con_rd, con_eps, rainmin + real(kind=kind_phys), intent(in ), dimension(:) :: frland, garea + integer, intent(in ), dimension(:) :: islmsk + real(kind=kind_phys), intent(inout), dimension(:,:) :: gq0, gq0_ntcw, gq0_ntrw, gq0_ntiw, & + gq0_ntsw, gq0_ntgl, gq0_ntclamt + real(kind=kind_phys), intent(inout), dimension(:,:) :: gt0, gu0, gv0 + real(kind=kind_phys), intent(in ), dimension(:,:) :: vvl, prsl, del + real(kind=kind_phys), intent(in ), dimension(:,:) :: phii ! rain/snow/ice/graupel/precip amounts, fraction of frozen precip - real(kind_phys), intent(out ), dimension(1:im) :: rain0 - real(kind_phys), intent(out ), dimension(1:im) :: snow0 - real(kind_phys), intent(out ), dimension(1:im) :: ice0 - real(kind_phys), intent(out ), dimension(1:im) :: graupel0 - real(kind_phys), intent(out ), dimension(1:im) :: prcp0 - real(kind_phys), intent(out ), dimension(1:im) :: sr + real(kind_phys), intent(out ), dimension(:) :: rain0 + real(kind_phys), intent(out ), dimension(:) :: snow0 + real(kind_phys), intent(out ), dimension(:) :: ice0 + real(kind_phys), intent(out ), dimension(:) :: graupel0 + real(kind_phys), intent(out ), dimension(:) :: prcp0 + real(kind_phys), intent(out ), dimension(:) :: sr real(kind_phys), intent(in) :: dtp ! physics time step logical, intent (in) :: hydrostatic, phys_hydrostatic logical, intent (in) :: lradar - real(kind=kind_phys), intent(inout), dimension(1:im,1:levs) :: refl_10cm + real(kind=kind_phys), intent(inout), dimension(:,:) :: refl_10cm logical, intent (in) :: reset, effr_in - real(kind=kind_phys), intent(inout), dimension(1:im,1:levs) :: rew, rei, rer, res, reg + real(kind=kind_phys), intent(inout), dimension(:,:) :: rew, rei, rer, res, reg + logical, intent (in) :: cplchm + ! ice and liquid water 3d precipitation fluxes - only allocated if cplchm is .true. + real(kind=kind_phys), intent(inout), dimension(:,:) :: pfi_lsan, pfl_lsan character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -168,6 +172,7 @@ subroutine gfdl_cloud_microphys_run( & real(kind=kind_phys), dimension(1:im,1:levs) :: delp, dz, uin, vin, pt, qv1, ql1, qr1, qg1, qa1, qn1, qi1, & qs1, pt_dt, qa_dt, u_dt, v_dt, w, qv_dt, ql_dt, qr_dt, qi_dt, & qs_dt, qg_dt, p123, refl + real(kind=kind_phys), dimension(1:im,1,1:levs) :: pfils, pflls real(kind=kind_phys), dimension(:,:), allocatable :: den real(kind=kind_phys) :: onebg real(kind=kind_phys) :: tem @@ -202,6 +207,8 @@ subroutine gfdl_cloud_microphys_run( & u_dt(i,k) = 0.0 v_dt(i,k) = 0.0 qn1(i,k) = 0.0 + pfils(i,1,k) = 0.0 + pflls(i,1,k) = 0.0 ! flip vertical (k) coordinate qv1(i,k) = gq0(i,kk) ql1(i,k) = gq0_ntcw(i,kk) @@ -232,7 +239,7 @@ subroutine gfdl_cloud_microphys_run( & qv1, ql1, qr1, qi1, qs1, qg1, qa1, qn1, qv_dt, ql_dt, qr_dt, qi_dt, & qs_dt, qg_dt, qa_dt, pt_dt, pt, w, uin, vin, u_dt, v_dt, dz, delp, & garea, dtp, frland, rain0, snow0, ice0, graupel0, hydrostatic, & - phys_hydrostatic, p123, lradar, refl, reset) + phys_hydrostatic, p123, lradar, refl, reset, pfils, pflls) tem = dtp*con_p001/con_day ! fix negative values @@ -291,11 +298,22 @@ subroutine gfdl_cloud_microphys_run( & enddo enddo + ! output ice and liquid water 3d precipitation fluxes if requested + if (cplchm) then + do k=1,levs + kk = levs-k+1 + do i=1,im + pfi_lsan(i,k) = pfils(i,1,kk) + pfl_lsan(i,k) = pflls(i,1,kk) + enddo + enddo + endif + if(effr_in) then allocate(den(1:im,1:levs)) do k=1,levs do i=1,im - den(i,k)=0.622*prsl(i,k)/(con_rd*gt0(i,k)*(gq0(i,k)+0.622)) + den(i,k)=con_eps*prsl(i,k)/(con_rd*gt0(i,k)*(gq0(i,k)+con_eps)) enddo enddo call cloud_diagnosis (1, im, 1, levs, den(1:im,1:levs), & diff --git a/physics/gfdl_cloud_microphys.meta b/physics/gfdl_cloud_microphys.meta index 1e3232ec1..f18754703 100644 --- a/physics/gfdl_cloud_microphys.meta +++ b/physics/gfdl_cloud_microphys.meta @@ -24,7 +24,7 @@ intent = in optional = F [nlunit] - standard_name = iounit_namelist + standard_name = iounit_of_namelist long_name = fortran unit number for opening nameliust file units = none dimensions = () @@ -32,16 +32,16 @@ intent = in optional = F [input_nml_file] - standard_name = namelist_filename_for_internal_file_reads + standard_name = filename_of_internal_namelist long_name = character string to store full namelist contents units = none - dimensions = (number_of_lines_of_namelist_filename_for_internal_file_reads) + dimensions = (number_of_lines_in_internal_namelist) type = character kind = len=* intent = in optional = F [logunit] - standard_name = iounit_log + standard_name = iounit_of_log long_name = fortran unit number for writing logfile units = none dimensions = () @@ -49,7 +49,7 @@ intent = in optional = F [fn_nml] - standard_name = namelist_filename + standard_name = filename_of_namelist long_name = namelist filename units = none dimensions = () @@ -58,7 +58,7 @@ intent = in optional = F [imp_physics] - standard_name = flag_for_microphysics_scheme + standard_name = control_for_microphysics_scheme long_name = choice of microphysics scheme units = flag dimensions = () @@ -66,7 +66,7 @@ intent = in optional = F [imp_physics_gfdl] - standard_name = flag_for_gfdl_microphysics_scheme + standard_name = identifier_for_gfdl_microphysics_scheme long_name = choice of GFDL microphysics scheme units = flag dimensions = () @@ -126,7 +126,7 @@ name = gfdl_cloud_microphys_run type = scheme [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () @@ -169,7 +169,7 @@ intent = in optional = F [con_rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -177,6 +177,15 @@ kind = kind_phys intent = in optional = F +[con_eps] + standard_name = ratio_of_dry_air_to_water_vapor_gas_constants + long_name = rd/rv + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F [frland] standard_name = land_area_fraction_for_microphysics long_name = land area fraction used in microphysics schemes @@ -204,100 +213,100 @@ intent = in optional = F [gq0] - standard_name = water_vapor_specific_humidity_updated_by_physics + standard_name = specific_humidity_of_new_state long_name = water vapor specific humidity updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [gq0_ntcw] - standard_name = cloud_condensed_water_mixing_ratio_updated_by_physics + standard_name = cloud_liquid_water_mixing_ratio_of_new_state long_name = cloud condensed water mixing ratio updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [gq0_ntrw] - standard_name = rain_water_mixing_ratio_updated_by_physics + standard_name = rain_mixing_ratio_of_new_state long_name = moist mixing ratio of rain updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [gq0_ntiw] - standard_name = ice_water_mixing_ratio_updated_by_physics + standard_name = cloud_ice_mixing_ratio_of_new_state long_name = moist mixing ratio of cloud ice updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [gq0_ntsw] - standard_name = snow_water_mixing_ratio_updated_by_physics + standard_name = snow_mixing_ratio_of_new_state long_name = moist mixing ratio of snow updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [gq0_ntgl] - standard_name = graupel_mixing_ratio_updated_by_physics + standard_name = graupel_mixing_ratio_of_new_state long_name = moist ratio of mass of graupel to mass of dry air plus vapor (without condensates) updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [gq0_ntclamt] - standard_name = cloud_fraction_updated_by_physics + standard_name = cloud_area_fraction_in_atmosphere_layer_of_new_state long_name = cloud fraction updated by physics units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [gt0] - standard_name = air_temperature_updated_by_physics + standard_name = air_temperature_of_new_state long_name = air temperature updated by physics units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [gu0] - standard_name = x_wind_updated_by_physics + standard_name = x_wind_of_new_state long_name = zonal wind updated by physics units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [gv0] - standard_name = y_wind_updated_by_physics + standard_name = y_wind_of_new_state long_name = meridional wind updated by physics units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [vvl] - standard_name = omega + standard_name = lagrangian_tendency_of_air_pressure long_name = layer mean vertical velocity units = Pa s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -306,7 +315,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -315,7 +324,7 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -324,7 +333,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = air pressure difference between mid-layers units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -384,7 +393,7 @@ intent = out optional = F [dtp] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics timestep units = s dimensions = () @@ -420,7 +429,7 @@ standard_name = radar_reflectivity_10cm long_name = instantaneous refl_10cm units = dBZ - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -442,46 +451,72 @@ intent = in optional = F [rew] - standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle_in_um + standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle long_name = eff. radius of cloud liquid water particle in micrometer units = um - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [rei] - standard_name = effective_radius_of_stratiform_cloud_ice_particle_in_um + standard_name = effective_radius_of_stratiform_cloud_ice_particle long_name = eff. radius of cloud ice water particle in micrometer units = um - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [rer] - standard_name = effective_radius_of_stratiform_cloud_rain_particle_in_um + standard_name = effective_radius_of_stratiform_cloud_rain_particle long_name = effective radius of cloud rain particle in micrometers units = um - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [res] - standard_name = effective_radius_of_stratiform_cloud_snow_particle_in_um + standard_name = effective_radius_of_stratiform_cloud_snow_particle long_name = effective radius of cloud snow particle in micrometers units = um - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [reg] - standard_name = effective_radius_of_stratiform_cloud_graupel_particle_in_um + standard_name = effective_radius_of_stratiform_cloud_graupel_particle long_name = eff. radius of cloud graupel particle in micrometer units = um - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[cplchm] + standard_name = flag_for_chemistry_coupling + long_name = flag controlling cplchm collection (default off) + units = flag + dimensions = () + type = logical + intent = in + optional = F +[pfi_lsan] + standard_name = ice_flux_due_to_large_scale_precipitation + long_name = instantaneous 3D flux of ice from nonconvective precipitation + units = kg m-2 s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[pfl_lsan] + standard_name = liquid_flux_due_to_large_scale_precipitation + long_name = instantaneous 3D flux of liquid water from nonconvective precipitation + units = kg m-2 s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/gfdl_sfc_layer.F90 b/physics/gfdl_sfc_layer.F90 index cd0d1d8f0..a9dc3fe98 100644 --- a/physics/gfdl_sfc_layer.F90 +++ b/physics/gfdl_sfc_layer.F90 @@ -103,12 +103,12 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & lsm_noah, lsm_noahmp, lsm_ruc, lsm_noah_wrfv4, icoef_sf, cplwav, karman,& cplwav2atm, lcurr_sf, pert_Cd, ntsflg, sfenth, z1, shdmax, ivegsrc, & vegtype, sigmaf, dt, wet, dry, icy, isltyp, rd, grav, ep1, ep2, smois, & - psfc, prsl1, q1, t1, u1, v1, wspd, u10, v10, gsw, glw, tsurf_ocn, & - tsurf_lnd, tsurf_ice, tskin_ocn, tskin_lnd, tskin_ice, ustar_ocn, & - ustar_lnd, ustar_ice, znt_ocn, znt_lnd, znt_ice, cdm_ocn, cdm_lnd, & - cdm_ice, stress_ocn, stress_lnd, stress_ice, rib_ocn, rib_lnd, rib_ice, & - fm_ocn, fm_lnd, fm_ice, fh_ocn, fh_lnd, fh_ice, fh2_ocn, fh2_lnd, & - fh2_ice, ch_ocn, ch_lnd, ch_ice, fm10_ocn, fm10_lnd, fm10_ice, qss_ocn, & + psfc, prsl1, q1, t1, u1, v1, wspd, u10, v10, gsw, glw, tsurf_wat, & + tsurf_lnd, tsurf_ice, tskin_wat, tskin_lnd, tskin_ice, ustar_wat, & + ustar_lnd, ustar_ice, znt_wat, znt_lnd, znt_ice, cdm_wat, cdm_lnd, & + cdm_ice, stress_wat, stress_lnd, stress_ice, rib_wat, rib_lnd, rib_ice, & + fm_wat, fm_lnd, fm_ice, fh_wat, fh_lnd, fh_ice, fh2_wat, fh2_lnd, & + fh2_ice, ch_wat, ch_lnd, ch_ice, fm10_wat, fm10_lnd, fm10_ice, qss_wat, & qss_lnd, qss_ice, errmsg, errflg) use funcphys, only: fpvs @@ -130,22 +130,22 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & logical, intent(in) :: cplwav, cplwav2atm !GJF: this scheme has not been tested with these on logical, intent(in) :: lcurr_sf !GJF: this scheme has not been tested with this option turned on; the variables scurx and scury need to be input in order to use this logical, intent(in) :: pert_Cd !GJF: this scheme has not been tested with this option turned on; the variables ens_random_seed and ens_Cdamp need to be input in order to use this - logical, dimension(im), intent(in) :: flag_iter, wet, dry, icy - integer, dimension(im), intent(in) :: isltyp, vegtype - real(kind=kind_phys), intent(in) :: dt, sfenth - real(kind=kind_phys), intent(in) :: rd,grav,ep1,ep2 - real(kind=kind_phys), dimension(im,nsoil), intent(in) :: smois - real(kind=kind_phys), dimension(im), intent(in) :: psfc, prsl1, & + logical, dimension(:), intent(in) :: flag_iter, wet, dry, icy + integer, dimension(:), intent(in) :: isltyp, vegtype + real(kind=kind_phys), intent(in) :: dt, sfenth + real(kind=kind_phys), intent(in) :: rd,grav,ep1,ep2 + real(kind=kind_phys), dimension(:,:), intent(in) :: smois + real(kind=kind_phys), dimension(:), intent(in) :: psfc, prsl1, & q1, t1, u1, v1, wspd, u10, v10, gsw, glw, z1, shdmax, sigmaf, xlat, & - xlon, tsurf_ocn, tsurf_lnd, tsurf_ice + xlon, tsurf_wat, tsurf_lnd, tsurf_ice - real(kind=kind_phys), intent(inout), dimension(im) :: tskin_ocn, & - tskin_lnd, tskin_ice, ustar_ocn, ustar_lnd, ustar_ice, & - znt_ocn, znt_lnd, znt_ice, cdm_ocn, cdm_lnd, cdm_ice, & - stress_ocn, stress_lnd, stress_ice, rib_ocn, rib_lnd, rib_ice, & - fm_ocn, fm_lnd, fm_ice, fh_ocn, fh_lnd, fh_ice, fh2_ocn, fh2_lnd, & - fh2_ice, ch_ocn, ch_lnd, ch_ice, fm10_ocn, fm10_lnd, fm10_ice, & - qss_ocn, qss_lnd, qss_ice + real(kind=kind_phys), intent(inout), dimension(:) :: tskin_wat, & + tskin_lnd, tskin_ice, ustar_wat, ustar_lnd, ustar_ice, & + znt_wat, znt_lnd, znt_ice, cdm_wat, cdm_lnd, cdm_ice, & + stress_wat, stress_lnd, stress_ice, rib_wat, rib_lnd, rib_ice, & + fm_wat, fm_lnd, fm_ice, fh_wat, fh_lnd, fh_ice, fh2_wat, fh2_lnd, & + fh2_ice, ch_wat, ch_lnd, ch_ice, fm10_wat, fm10_lnd, fm10_ice, & + qss_wat, qss_lnd, qss_ice character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -373,11 +373,11 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & ztmax(i) = ztmax(i)*100.0 !convert from m to cm z0max(i) = z0max(i)*100.0 !convert from m to cm - call mflux2 (fxh(i), fxe(i), fxmx(i), fxmy(i), cdm_lnd(i), rib_lnd(i), & + call mflux2 (fxh(i), fxe(i), fxmx(i), fxmy(i), cdm_lnd(i:i), rib_lnd(i:i), & xxfh(i), ztmax(i), z0max(i), tstrc(i), & pspc(i), pkmax(i), wetc(i), slwdc(i), z1_cm(i), icoef_sf, iwavecpl, lcurr_sf, charn(i), msang(i), & - scurx(i), scury(i), pert_Cd, ens_random_seed, ens_Cdamp, upc(i), vpc(i), t1(i), q1(i), & - dt, wind10(i), xxfh2(i), ntsflg, sfenth, tzot(i), errmsg, & + scurx(i), scury(i), pert_Cd, ens_random_seed, ens_Cdamp, upc(i), vpc(i), t1(i:i), q1(i:i), & + dt, wind10(i), xxfh2(i), ntsflg, sfenth, tzot(i), ep2, errmsg, & errflg) if (errflg /= 0) return @@ -522,11 +522,11 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & ztmax(i) = ztmax(i)*100.0 !m to cm z0max(i) = z0max(i)*100.0 !m to cm - call mflux2 (fxh(i), fxe(i), fxmx(i), fxmy(i), cdm_ice(i), rib_ice(i), & + call mflux2 (fxh(i), fxe(i), fxmx(i), fxmy(i), cdm_ice(i:i), rib_ice(i:i), & xxfh(i), ztmax(i), z0max(i), tstrc(i), & pspc(i), pkmax(i), wetc(i), slwdc(i), z1_cm(i), icoef_sf, iwavecpl, lcurr_sf, charn(i), msang(i), & - scurx(i), scury(i), pert_Cd, ens_random_seed, ens_Cdamp, upc(i), vpc(i), t1(i), q1(i), & - dt, wind10(i), xxfh2(i), ntsflg, sfenth, tzot(i), errmsg, & + scurx(i), scury(i), pert_Cd, ens_random_seed, ens_Cdamp, upc(i), vpc(i), t1(i:i), q1(i:i), & + dt, wind10(i), xxfh2(i), ntsflg, sfenth, tzot(i), ep2, errmsg, & errflg) if (errflg /= 0) return @@ -613,40 +613,40 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & wetc(i) = 1.0 !GJF: the lower boundary temperature passed in to MFLUX2 either follows GFS: - tstrc(i) = 0.5*(tskin_ocn(i) + tsurf_ocn(i)) !averaging tskin_ocn and tsurf_ocn as in GFS surface layer breaks ntsflg functionality + tstrc(i) = 0.5*(tskin_wat(i) + tsurf_wat(i)) !averaging tskin_wat and tsurf_wat as in GFS surface layer breaks ntsflg functionality !GJF: or WRF module_sf_gfdl.F: - !tstrc(i) = tskin_ocn(i) + !tstrc(i) = tskin_wat(i) ! DH* 20201009: these bounds on ocean roughness lengths are from Chunxi Zhang's module_sf_sfclayrev.f90 (in cm) - znt_ocn(i)=min(2.85e-1,max(znt_ocn(i),1.27e-5)) + znt_wat(i)=min(2.85e-1,max(znt_wat(i),1.27e-5)) !GJF: from WRF's module_sf_gfdl.F if (wind10(i) <= 1.0e-10 .or. wind10(i) > 150.0) then - wind10(i)=wspd(i)*alog(10.0/(0.01*znt_ocn(i)))/alog(z1(i)/(0.01*znt_ocn(i))) + wind10(i)=wspd(i)*alog(10.0/(0.01*znt_wat(i)))/alog(z1(i)/(0.01*znt_wat(i))) end if wind10(i)=wind10(i)*100.0 !! m/s to cm/s !GJF: mflux2 expects negative roughness length for ocean points - znt_ocn(i) = -znt_ocn(i) + znt_wat(i) = -znt_wat(i) - call mflux2 (fxh(i), fxe(i), fxmx(i), fxmy(i), cdm_ocn(i), rib_ocn(i), & - xxfh(i), znt_ocn(i), mznt(i), tstrc(i), & + call mflux2 (fxh(i), fxe(i), fxmx(i), fxmy(i), cdm_wat(i:i), rib_wat(i:i), & + xxfh(i), znt_wat(i:i), mznt(i), tstrc(i), & pspc(i), pkmax(i), wetc(i), slwdc(i), z1_cm(i), icoef_sf, iwavecpl, lcurr_sf, charn(i), msang(i), & - scurx(i), scury(i), pert_Cd, ens_random_seed, ens_Cdamp, upc(i), vpc(i), t1(i), q1(i), & - dt, wind10(i), xxfh2(i), ntsflg, sfenth, tzot(i), errmsg, & + scurx(i), scury(i), pert_Cd, ens_random_seed, ens_Cdamp, upc(i), vpc(i), t1(i:i), q1(i:i), & + dt, wind10(i), xxfh2(i), ntsflg, sfenth, tzot(i), ep2, errmsg, & errflg) if (errflg /= 0) return !GJF: this is broken when tstrc is set to an average of two variables if (ntsflg==1) then - tskin_ocn(i) = tstrc(i) ! gopal's doing + tskin_wat(i) = tstrc(i) ! gopal's doing end if - znt_ocn(i)= abs(znt_ocn(i)) + znt_wat(i)= abs(znt_wat(i)) mznt(i)= abs(mznt(i)) !GJF: these bounds on ocean roughness lengths are from Chunxi Zhang's module_sf_sfclayrev.f90 (in cm) - znt_ocn(i)=min(2.85e-1,max(znt_ocn(i),1.27e-5)) + znt_wat(i)=min(2.85e-1,max(znt_wat(i),1.27e-5)) if (diag_wind10m) then u10_ocn(i) = u1(i)*(0.01*wind10(i)/wspd(i)) @@ -654,67 +654,67 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & end if !GJF: these variables are not needed in a GFS-based suite, but are found in WRF's module_sf_gfdl.F and kept in comments for legacy - !gz1oz0(i) = alog(zkmax(i)/znt_ocn(i)) + !gz1oz0(i) = alog(zkmax(i)/znt_wat(i)) !taux(i) = fxmx(i)/10. ! gopal's doing for Ocean coupling !tauy(i) = fxmy(i)/10. ! gopal's doing for Ocean coupling - cdm_ocn(i) = max(cdm_ocn(i), cd_low_limit) - cdm_ocn(i) = min(cdm_ocn(i), cd_high_limit) - fm_ocn(i) = karman/sqrt(cdm_ocn(i)) + cdm_wat(i) = max(cdm_wat(i), cd_low_limit) + cdm_wat(i) = min(cdm_wat(i), cd_high_limit) + fm_wat(i) = karman/sqrt(cdm_wat(i)) - !1) try fh_ocn from MFLUX2 - fh_ocn(i) = karman*xxfh(i) + !1) try fh_wat from MFLUX2 + fh_wat(i) = karman*xxfh(i) - !2) calc ch_ocn from fm_ocn and fh_ocn - ch_ocn(i) = karman*karman/(fm_ocn(i) * fh_ocn(i)) + !2) calc ch_wat from fm_wat and fh_wat + ch_wat(i) = karman*karman/(fm_wat(i) * fh_wat(i)) !3) check if ch_lnd is out of bounds (if so, recalculate fh_lnd from bounded value) ch_bound_excursion = .false. - if (ch_ocn(i) < ch_low_limit) then + if (ch_wat(i) < ch_low_limit) then ch_bound_excursion = .true. - ch_ocn(i) = ch_low_limit - else if (ch_ocn(i) > ch_high_limit) then + ch_wat(i) = ch_low_limit + else if (ch_wat(i) > ch_high_limit) then ch_bound_excursion = .true. - ch_ocn(i) = ch_high_limit + ch_wat(i) = ch_high_limit end if - fh2_ocn(i) = karman*xxfh2(i) + fh2_wat(i) = karman*xxfh2(i) if (ch_bound_excursion) then fh2_fh_ratio = min(xxfh2(i)/xxfh(i), 1.0) - fh_ocn(i) = karman*karman/(fm_ocn(i)*ch_ocn(i)) - fh2_ocn(i) = fh2_fh_ratio*fh_ocn(i) + fh_wat(i) = karman*karman/(fm_wat(i)*ch_wat(i)) + fh2_wat(i) = fh2_fh_ratio*fh_wat(i) end if !Other CCPP schemes (PBL) ask for fm/fh instead of psim/psih - !psim_ocn(i)=gz1oz0(i)-fm_ocn(i) - !psih_ocn(i)=gz1oz0(i)-fh_ocn(i) + !psim_ocn(i)=gz1oz0(i)-fm_wat(i) + !psih_ocn(i)=gz1oz0(i)-fh_wat(i) - ustar_ocn(i) = 0.01*sqrt(cdm_ocn(i)* & + ustar_wat(i) = 0.01*sqrt(cdm_wat(i)* & (upc(i)*upc(i) + vpc(i)*vpc(i))) !GJF: from Chunxi Zhang's module_sf_sfclayrev.f90 (I'm not sure it's necessary.) - ustar_ocn(i) = amax1(ustar_ocn(i),0.001) + ustar_wat(i) = amax1(ustar_wat(i),0.001) - stress_ocn(i) = cdm_ocn(i)*wspd(i)*wspd(i) + stress_wat(i) = cdm_wat(i)*wspd(i)*wspd(i) !GJF: from WRF's module_sf_gfdl.F !!! convert cd, ch to values at 10m, for output - cd10 = cdm_ocn(i) + cd10 = cdm_wat(i) if ( wind10(i) .ge. 0.1 ) then - cd10=cdm_ocn(i)* (wspd(i)/(0.01*wind10(i)) )**2 + cd10=cdm_wat(i)* (wspd(i)/(0.01*wind10(i)) )**2 !tmp9=0.01*abs(tzot(i)) - !ch_out(i)=ch_ocn(i)*(wspd(i)/(0.01*wind10(i)) ) * & + !ch_out(i)=ch_wat(i)*(wspd(i)/(0.01*wind10(i)) ) * & ! (alog(zkmax(i)/tmp9)/alog(10.0/tmp9)) end if - fm10_ocn(i) = karman/sqrt(cd10) + fm10_wat(i) = karman/sqrt(cd10) !GJF: conductances aren't used in other CCPP schemes - !chs_ocn(i)=ch_ocn(i)*wspd (i) !conductance - !chs2_ocn(i)=ustar_ocn(i)*karman/fh2_ocn(i) !2m conductance + !chs_ocn(i)=ch_wat(i)*wspd (i) !conductance + !chs2_ocn(i)=ustar_wat(i)*karman/fh2_wat(i) !2m conductance if (diag_qss) then - esat = fpvs(tskin_ocn(i)) - qss_ocn(i) = ep2*esat/(psfc(i)-esat) + esat = fpvs(tskin_wat(i)) + qss_wat(i) = ep2*esat/(psfc(i)-esat) end if end if !wet @@ -756,7 +756,7 @@ SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !m icoef_sf,iwavecpl,lcurr_sf,alpha,gamma,xcur,ycur, & pert_Cd, ens_random_seed, ens_Cdamp, & upc,vpc,tpc,rpc,dt,wind10,xxfh2,ntsflg,sfenth, & - tzot, errmsg, errflg) + tzot, ep2, errmsg, errflg) !------------------------------------------------------------------------ ! @@ -819,6 +819,8 @@ SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !m real(kind=kind_phys), intent ( in), dimension (ims :ime ) :: tpc real(kind=kind_phys), intent ( in), dimension (ims :ime ) :: rpc + real(kind=kind_phys), intent ( in) :: ep2 + character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -1207,7 +1209,7 @@ SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !m if(psps1 .EQ. 0.0)then psps1 = .1 endif - rstso(i) = 0.622*estso(i)/psps1 + rstso(i) = ep2*estso(i)/psps1 vrts (i) = 1. + boycon*ecof(i)*rstso(i) enddo @@ -1735,7 +1737,7 @@ SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !m if(psps2 .EQ. 0.0)then psps2 = .1 endif - rstsop(i) = 0.622*estsop(i)/psps2 + rstsop(i) = ep2*estsop(i)/psps2 rdiff (i) = amin1(0.0,(rkmaxp(i) - rstsop(i))) foft(i) = tss(i) + delsrad(i)*(slwa(i) - aap(i)*tsp(i)**4 - & diff --git a/physics/gfdl_sfc_layer.meta b/physics/gfdl_sfc_layer.meta index 4b90f48bd..893b54379 100644 --- a/physics/gfdl_sfc_layer.meta +++ b/physics/gfdl_sfc_layer.meta @@ -8,15 +8,15 @@ name = gfdl_sfc_layer_init type = scheme [icoef_sf] - standard_name = flag_for_surface_roughness_option_over_ocean - long_name = surface roughness options over ocean + standard_name = flag_for_surface_roughness_option_over_water + long_name = surface roughness options over water units = flag dimensions = () type = integer intent = in optional = F [cplwav] - standard_name = flag_for_wave_coupling + standard_name = flag_for_ocean_wave_coupling long_name = flag controlling cplwav collection (default off) units = flag dimensions = () @@ -24,7 +24,7 @@ intent = in optional = F [cplwav2atm] - standard_name = flag_for_wave_coupling_to_atm + standard_name = flag_for_one_way_ocean_wave_coupling_to_atmosphere long_name = flag controlling ocean wave coupling to the atmosphere (default off) units = flag dimensions = () @@ -32,7 +32,7 @@ intent = in optional = F [lcurr_sf] - standard_name = flag_for_ocean_currents_in_surface_layer_scheme + standard_name = flag_for_surface_layer_scheme_ocean_currents long_name = flag for taking ocean currents into account in surface layer scheme units = flag dimensions = () @@ -40,7 +40,7 @@ intent = in optional = F [pert_cd] - standard_name = flag_for_perturbation_of_surface_drag_coefficient_for_momentum_in_air + standard_name = flag_for_surface_layer_scheme_surface_drag_coefficient_for_momentum_in_air_perturbations long_name = flag for perturbing the surface drag coefficient for momentum in surface layer scheme units = flag dimensions = () @@ -48,7 +48,7 @@ intent = in optional = F [ntsflg] - standard_name = flag_for_updating_skin_temperatuer_in_surface_layer_scheme + standard_name = control_for_surface_layer_scheme_skin_temperature_update long_name = flag for updating skin temperature in the surface layer scheme units = flag dimensions = () @@ -86,7 +86,7 @@ intent = in optional = F [nsoil] - standard_name = soil_vertical_dimension + standard_name = vertical_dimension_of_soil long_name = soil vertical layer dimension units = count dimensions = () @@ -94,7 +94,7 @@ intent = in optional = F [km] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () @@ -136,7 +136,7 @@ intent = in optional = F [lsm] - standard_name = flag_for_land_surface_scheme + standard_name = control_for_land_surface_scheme long_name = flag for land surface model units = flag dimensions = () @@ -144,7 +144,7 @@ intent = in optional = F [lsm_noah] - standard_name = flag_for_noah_land_surface_scheme + standard_name = identifier_for_noah_land_surface_scheme long_name = flag for NOAH land surface model units = flag dimensions = () @@ -152,7 +152,7 @@ intent = in optional = F [lsm_noahmp] - standard_name = flag_for_noahmp_land_surface_scheme + standard_name = identifier_for_noahmp_land_surface_scheme long_name = flag for NOAH MP land surface model units = flag dimensions = () @@ -160,7 +160,7 @@ intent = in optional = F [lsm_ruc] - standard_name = flag_for_ruc_land_surface_scheme + standard_name = identifier_for_ruc_land_surface_scheme long_name = flag for RUC land surface model units = flag dimensions = () @@ -168,7 +168,7 @@ intent = in optional = F [lsm_noah_wrfv4] - standard_name = flag_for_noah_wrfv4_land_surface_scheme + standard_name = identifier_for_noah_wrfv4_land_surface_scheme long_name = flag for NOAH WRFv4 land surface model units = flag dimensions = () @@ -176,15 +176,15 @@ intent = in optional = F [icoef_sf] - standard_name = flag_for_surface_roughness_option_over_ocean - long_name = surface roughness options over ocean + standard_name = flag_for_surface_roughness_option_over_water + long_name = surface roughness options over water units = flag dimensions = () type = integer intent = in optional = F [cplwav] - standard_name = flag_for_wave_coupling + standard_name = flag_for_ocean_wave_coupling long_name = flag controlling cplwav collection (default off) units = flag dimensions = () @@ -192,7 +192,7 @@ intent = in optional = F [cplwav2atm] - standard_name = flag_for_wave_coupling_to_atm + standard_name = flag_for_one_way_ocean_wave_coupling_to_atmosphere long_name = flag controlling ocean wave coupling to the atmosphere (default off) units = flag dimensions = () @@ -200,7 +200,7 @@ intent = in optional = F [lcurr_sf] - standard_name = flag_for_ocean_currents_in_surface_layer_scheme + standard_name = flag_for_surface_layer_scheme_ocean_currents long_name = flag for taking ocean currents into account in surface layer scheme units = flag dimensions = () @@ -208,7 +208,7 @@ intent = in optional = F [pert_Cd] - standard_name = flag_for_perturbation_of_surface_drag_coefficient_for_momentum_in_air + standard_name = flag_for_surface_layer_scheme_surface_drag_coefficient_for_momentum_in_air_perturbations long_name = flag for perturbing the surface drag coefficient for momentum in surface layer scheme units = flag dimensions = () @@ -216,7 +216,7 @@ intent = in optional = F [ntsflg] - standard_name = flag_for_updating_skin_temperatuer_in_surface_layer_scheme + standard_name = control_for_surface_layer_scheme_skin_temperature_update long_name = flag for updating skin temperature in the surface layer scheme units = flag dimensions = () @@ -224,7 +224,7 @@ intent = in optional = F [sfenth] - standard_name = enthalpy_flux_factor + standard_name = surface_layer_scheme_enthalpy_flux_factor long_name = enthalpy flux factor used in surface layer scheme units = none dimensions = () @@ -242,7 +242,7 @@ intent = in optional = F [shdmax] - standard_name = maximum_vegetation_area_fraction + standard_name = max_vegetation_area_fraction long_name = max fractnl cover of green veg units = frac dimensions = (horizontal_loop_extent) @@ -251,7 +251,7 @@ intent = in optional = F [ivegsrc] - standard_name = vegetation_type_dataset_choice + standard_name = control_for_vegetation_dataset long_name = land use dataset choice units = index dimensions = () @@ -276,7 +276,7 @@ intent = in optional = F [dt] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics timestep units = s dimensions = () @@ -317,7 +317,7 @@ intent = in optional = F [rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -353,10 +353,10 @@ intent = in optional = F [smois] - standard_name = volume_fraction_of_soil_moisture + standard_name = volume_fraction_of_condensed_water_in_soil long_name = total soil moisture units = frac - dimensions = (horizontal_loop_extent,soil_vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension_of_soil) type = real kind = kind_phys intent = in @@ -371,7 +371,7 @@ intent = in optional = F [prsl1] - standard_name = air_pressure_at_lowest_model_layer + standard_name = air_pressure_at_surface_adjacent_layer long_name = mean pressure at lowest model layer units = Pa dimensions = (horizontal_loop_extent) @@ -380,7 +380,7 @@ intent = in optional = F [q1] - standard_name = water_vapor_specific_humidity_at_lowest_model_layer + standard_name = specific_humidity_at_surface_adjacent_layer long_name = water vapor specific humidity at lowest model layer units = kg kg-1 dimensions = (horizontal_loop_extent) @@ -389,7 +389,7 @@ intent = in optional = F [t1] - standard_name = air_temperature_at_lowest_model_layer + standard_name = air_temperature_at_surface_adjacent_layer long_name = 1st model layer air temperature units = K dimensions = (horizontal_loop_extent) @@ -398,7 +398,7 @@ intent = in optional = F [u1] - standard_name = x_wind_at_lowest_model_layer + standard_name = x_wind_at_surface_adjacent_layer long_name = zonal wind at lowest model layer units = m s-1 dimensions = (horizontal_loop_extent) @@ -407,7 +407,7 @@ intent = in optional = F [v1] - standard_name = y_wind_at_lowest_model_layer + standard_name = y_wind_at_surface_adjacent_layer long_name = meridional wind at lowest model layer units = m s-1 dimensions = (horizontal_loop_extent) @@ -460,9 +460,9 @@ kind = kind_phys intent = in optional = F -[tsurf_ocn] - standard_name = surface_skin_temperature_after_iteration_over_ocean - long_name = surface skin temperature after iteration over ocean +[tsurf_wat] + standard_name = surface_skin_temperature_after_iteration_over_water + long_name = surface skin temperature after iteration over water units = K dimensions = (horizontal_loop_extent) type = real @@ -487,9 +487,9 @@ kind = kind_phys intent = in optional = F -[tskin_ocn] - standard_name = surface_skin_temperature_over_ocean_interstitial - long_name = surface skin temperature over ocean (temporary use as interstitial) +[tskin_wat] + standard_name = surface_skin_temperature_over_water_interstitial + long_name = surface skin temperature over water (temporary use as interstitial) units = K dimensions = (horizontal_loop_extent) type = real @@ -514,9 +514,9 @@ kind = kind_phys intent = inout optional = F -[ustar_ocn] - standard_name = surface_friction_velocity_over_ocean - long_name = surface friction velocity over ocean +[ustar_wat] + standard_name = surface_friction_velocity_over_water + long_name = surface friction velocity over water units = m s-1 dimensions = (horizontal_loop_extent) type = real @@ -541,9 +541,9 @@ kind = kind_phys intent = inout optional = F -[znt_ocn] - standard_name = surface_roughness_length_over_ocean_interstitial - long_name = surface roughness length over ocean (temporary use as interstitial) +[znt_wat] + standard_name = surface_roughness_length_over_water + long_name = surface roughness length over water (temporary use as interstitial) units = cm dimensions = (horizontal_loop_extent) type = real @@ -551,7 +551,7 @@ intent = inout optional = F [znt_lnd] - standard_name = surface_roughness_length_over_land_interstitial + standard_name = surface_roughness_length_over_land long_name = surface roughness length over land (temporary use as interstitial) units = cm dimensions = (horizontal_loop_extent) @@ -560,7 +560,7 @@ intent = inout optional = F [znt_ice] - standard_name = surface_roughness_length_over_ice_interstitial + standard_name = surface_roughness_length_over_ice long_name = surface roughness length over ice (temporary use as interstitial) units = cm dimensions = (horizontal_loop_extent) @@ -568,9 +568,9 @@ kind = kind_phys intent = inout optional = F -[cdm_ocn] - standard_name = surface_drag_coefficient_for_momentum_in_air_over_ocean - long_name = surface exchange coeff for momentum over ocean +[cdm_wat] + standard_name = surface_drag_coefficient_for_momentum_in_air_over_water + long_name = surface exchange coeff for momentum over water units = none dimensions = (horizontal_loop_extent) type = real @@ -595,9 +595,9 @@ kind = kind_phys intent = inout optional = F -[stress_ocn] - standard_name = surface_wind_stress_over_ocean - long_name = surface wind stress over ocean +[stress_wat] + standard_name = surface_wind_stress_over_water + long_name = surface wind stress over water units = m2 s-2 dimensions = (horizontal_loop_extent) type = real @@ -622,9 +622,9 @@ kind = kind_phys intent = inout optional = F -[rib_ocn] - standard_name = bulk_richardson_number_at_lowest_model_level_over_ocean - long_name = bulk Richardson number at the surface over ocean +[rib_wat] + standard_name = bulk_richardson_number_at_lowest_model_level_over_water + long_name = bulk Richardson number at the surface over water units = none dimensions = (horizontal_loop_extent) type = real @@ -649,9 +649,9 @@ kind = kind_phys intent = inout optional = F -[fm_ocn] - standard_name = Monin_Obukhov_similarity_function_for_momentum_over_ocean - long_name = Monin-Obukhov similarity function for momentum over ocean +[fm_wat] + standard_name = Monin_Obukhov_similarity_function_for_momentum_over_water + long_name = Monin-Obukhov similarity function for momentum over water units = none dimensions = (horizontal_loop_extent) type = real @@ -676,9 +676,9 @@ kind = kind_phys intent = inout optional = F -[fh_ocn] - standard_name = Monin_Obukhov_similarity_function_for_heat_over_ocean - long_name = Monin-Obukhov similarity function for heat over ocean +[fh_wat] + standard_name = Monin_Obukhov_similarity_function_for_heat_over_water + long_name = Monin-Obukhov similarity function for heat over water units = none dimensions = (horizontal_loop_extent) type = real @@ -703,9 +703,9 @@ kind = kind_phys intent = inout optional = F -[fh2_ocn] - standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m_over_ocean - long_name = Monin-Obukhov similarity parameter for heat at 2m over ocean +[fh2_wat] + standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m_over_water + long_name = Monin-Obukhov similarity parameter for heat at 2m over water units = none dimensions = (horizontal_loop_extent) type = real @@ -730,9 +730,9 @@ kind = kind_phys intent = inout optional = F -[ch_ocn] - standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ocean - long_name = surface exchange coeff heat & moisture over ocean +[ch_wat] + standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_water + long_name = surface exchange coeff heat surface exchange coeff heat & moisture over ocean moisture over water units = none dimensions = (horizontal_loop_extent) type = real @@ -757,9 +757,9 @@ kind = kind_phys intent = inout optional = F -[fm10_ocn] - standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_ocean - long_name = Monin-Obukhov similarity parameter for momentum at 10m over ocean +[fm10_wat] + standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_water + long_name = Monin-Obukhov similarity parameter for momentum at 10m over water units = none dimensions = (horizontal_loop_extent) type = real @@ -784,13 +784,15 @@ kind = kind_phys intent = inout optional = F -[qss_ocn] - standard_name = surface_specific_humidity_over_ocean - long_name = surface air saturation specific humidity over ocean +[qss_wat] + standard_name = surface_specific_humidity_over_water + long_name = surface air saturation specific humidity over water units = kg kg-1 dimensions = (horizontal_loop_extent) type = real kind = kind_phys + intent = inout + optional = F [qss_lnd] standard_name = surface_specific_humidity_over_land long_name = surface air saturation specific humidity over land @@ -798,6 +800,8 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys + intent = inout + optional = F [qss_ice] standard_name = surface_specific_humidity_over_ice long_name = surface air saturation specific humidity over ice @@ -805,6 +809,8 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys + intent = inout + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/gfs_phy_tracer_config.F b/physics/gfs_phy_tracer_config.F index 8ed7443d3..0e1185a50 100644 --- a/physics/gfs_phy_tracer_config.F +++ b/physics/gfs_phy_tracer_config.F @@ -66,7 +66,7 @@ subroutine tracer_config_init (ntrac,ntoz,ntcw,ncld, c implicit none ! input - integer, intent(in) :: me, ntoz,ntcw,ncld,ntke, + integer, intent(in) :: me, ntoz,ntcw,ntke, & ntiw,ntlnc,ntinc,nto,nto2, & fprcp,ntrw,ntsw,ntrnc,ntsnc ! output @@ -83,19 +83,7 @@ subroutine tracer_config_init (ntrac,ntoz,ntcw,ncld, ! initialize chem tracers call gocart_tracer_config(me) -! call gocart_tracer_config(gfs_phy_tracer,me) - -! ntrac_met = number of met tracers -!hmhj if ( ntoz < ntcw ) then -!hmhj gfs_phy_tracer%ntrac_met = ntcw + ncld - 1 -!hmhj else -!hmhj gfs_phy_tracer%ntrac_met = ntoz -!hmhj endif -!hmhj if ( gfs_phy_tracer%ntrac_met /= ntrac ) then -!hmhj print *,'LU_TRC: ERROR ! inconsistency in ntrac:', -!hmhj& ntrac, gfs_phy_tracer%ntrac_met -!hmhj stop 222 -!hmhj endif + ! input ntrac is meteorological tracers gfs_phy_tracer%ntrac_met = ntrac @@ -230,7 +218,7 @@ subroutine fixchar(name_in, name_out, option) endif enddo - name_out=trim(name_out) + name_out = trim(name_out) return end subroutine fixchar diff --git a/physics/gscond.f b/physics/gscond.f index 42d7330a5..f36de0209 100644 --- a/physics/gscond.f +++ b/physics/gscond.f @@ -5,19 +5,55 @@ !> This module contains the CCPP-compliant zhao_carr_gscond scheme. module zhaocarr_gscond - contains + + implicit none + public :: zhaocarr_gscond_init, zhaocarr_gscond_run, & + & zhaocarr_gscond_finalize + private + logical :: is_initialized = .False. + contains ! \brief Brief description of the subroutine ! -!> \section arg_table_gscond_init Argument Table +!> \section arg_table_zhaocarr_gscond_init Argument Table !! - subroutine zhaocarr_gscond_init + subroutine zhaocarr_gscond_init (imp_physics, & + & imp_physics_zhao_carr, & + & imp_physics_zhao_carr_pdf, & + & errmsg, errflg) + implicit none + + ! Interface variables + integer, intent(in ) :: imp_physics + integer, intent(in ) :: imp_physics_zhao_carr, & + & imp_physics_zhao_carr_pdf + + ! CCPP error handling + character(len=*), intent( out) :: errmsg + integer, intent( out) :: errflg + + ! Initialize the CCPP error handling variables + errmsg = '' + errflg = 0 + + if (is_initialized) return + + ! Consistency checks + if (imp_physics/=imp_physics_zhao_carr .and. & + & imp_physics/=imp_physics_zhao_carr_pdf) then + write(errmsg,'(*(a))') "Logic error: namelist choice of & + & microphysics is different from Zhao-Carr MP" + errflg = 1 + return + end if + + is_initialized = .true. end subroutine zhaocarr_gscond_init ! \brief Brief description of the subroutine ! -!> \section arg_table_gscond_finalize Argument Table +!> \section arg_table_zhaocarr_gscond_finalize Argument Table !! subroutine zhaocarr_gscond_finalize end subroutine zhaocarr_gscond_finalize @@ -70,14 +106,14 @@ subroutine zhaocarr_gscond_run (im,km,dt,dtf,prsl,ps,q,clw1 & ! Interface variables integer, intent(in) :: im, km, ipr real(kind=kind_phys), intent(in) :: dt, dtf - real(kind=kind_phys), intent(in) :: prsl(im,km), ps(im) - real(kind=kind_phys), intent(inout) :: q(im,km) - real(kind=kind_phys), intent(in) :: clw1(im,km), clw2(im,km) - real(kind=kind_phys), intent(out) :: cwm(im,km) - real(kind=kind_phys), intent(inout) :: t(im,km) & - &, tp(im,km), qp(im,km), psp(im) & - &, tp1(im,km), qp1(im,km), psp1(im) - real(kind=kind_phys), intent(in) :: u(im,km) + real(kind=kind_phys), intent(in) :: prsl(:,:), ps(:) + real(kind=kind_phys), intent(inout) :: q(:,:) + real(kind=kind_phys), intent(in) :: clw1(:,:), clw2(:,:) + real(kind=kind_phys), intent(out) :: cwm(:,:) + real(kind=kind_phys), intent(inout) :: t(:,:) & + &, tp(:,:), qp(:,:), psp(:) & + &, tp1(:,:), qp1(:,:), psp1(:) + real(kind=kind_phys), intent(in) :: u(:,:) logical, intent(in) :: lprnt real(kind=kind_phys), intent(in) :: psat, hvap, grav, hfus & &, ttp, rd, cp, eps, epsm1, rv diff --git a/physics/gscond.meta b/physics/gscond.meta index fdcbeb567..202097825 100644 --- a/physics/gscond.meta +++ b/physics/gscond.meta @@ -3,6 +3,57 @@ type = scheme dependencies = funcphys.f90,machine.F,physcons.F90 +######################################################################## +[ccpp-arg-table] + name = zhaocarr_gscond_init + type = scheme +[imp_physics] + standard_name = control_for_microphysics_scheme + long_name = choice of microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imp_physics_zhao_carr] + standard_name = identifier_for_zhao_carr_microphysics_scheme + long_name = choice of Zhao-Carr microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imp_physics_zhao_carr_pdf] + standard_name = identifier_for_zhao_carr_pdf_microphysics_scheme + long_name = choice of Zhao-Carr microphysics scheme with PDF clouds + units = flag + dimensions = () + type = integer + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + +######################################################################## +[ccpp-arg-table] + name = zhaocarr_gscond_finalize + type = scheme + ######################################################################## [ccpp-arg-table] name = zhaocarr_gscond_run @@ -16,7 +67,7 @@ intent = in optional = F [km] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -24,7 +75,7 @@ intent = in optional = F [dt] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics time step units = s dimensions = () @@ -33,7 +84,7 @@ intent = in optional = F [dtf] - standard_name = time_step_for_dynamics + standard_name = timestep_for_dynamics long_name = dynamics time step units = s dimensions = () @@ -45,7 +96,7 @@ standard_name = air_pressure long_name = layer mean air pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -60,10 +111,10 @@ intent = in optional = F [q] - standard_name = water_vapor_specific_humidity_updated_by_physics + standard_name = specific_humidity_of_new_state long_name = water vapor specific humidity units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -72,7 +123,7 @@ standard_name = ice_water_mixing_ratio_convective_transport_tracer long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -81,25 +132,25 @@ standard_name = cloud_condensed_water_mixing_ratio_convective_transport_tracer long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [cwm] - standard_name = cloud_condensed_water_mixing_ratio_updated_by_physics + standard_name = cloud_liquid_water_mixing_ratio_of_new_state long_name = moist cloud condensed water mixing ratio units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [t] - standard_name = air_temperature_updated_by_physics + standard_name = air_temperature_of_new_state long_name = layer mean air temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -108,16 +159,16 @@ standard_name = air_temperature_two_timesteps_back long_name = air temperature two timesteps back units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [qp] - standard_name = water_vapor_specific_humidity_two_timesteps_back + standard_name = specific_humidity_two_timesteps_back long_name = water vapor specific humidity two timesteps back units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -132,8 +183,8 @@ intent = inout optional = F [psat] - standard_name = pres_at_H2O_3pt - long_name = pres_at_H2O_3pt + standard_name = saturation_pressure_at_triple_point_of_water + long_name = saturation pressure at triple point of water units = Pa dimensions = () type = real @@ -177,7 +228,7 @@ intent = in optional = F [rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -222,25 +273,25 @@ intent = in optional = F [tp1] - standard_name = air_temperature_at_previous_timestep + standard_name = air_temperature_on_previous_timestep_in_xyz_dimensioned_restart_array long_name = air temperature at previous timestep units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [qp1] - standard_name = water_vapor_specific_humidity_at_previous_timestep + standard_name = specific_humidity_on_previous_timestep_in_xyz_dimensioned_restart_array long_name = water vapor specific humidity at previous timestep units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [psp1] - standard_name = surface_air_pressure_at_previous_timestep + standard_name = surface_air_pressure_on_previous_timestep long_name = surface air surface pressure at previous timestep units = Pa dimensions = (horizontal_loop_extent) @@ -252,7 +303,7 @@ standard_name = critical_relative_humidity long_name = critical relative humidity units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in diff --git a/physics/gwdc.f b/physics/gwdc.f index fc81373ce..086662e73 100644 --- a/physics/gwdc.f +++ b/physics/gwdc.f @@ -26,7 +26,7 @@ subroutine gwdc_pre_run ( & integer, intent(in) :: im, levs integer, intent(in) :: kbot(:), ktop(:) real(kind=kind_phys), intent(in) :: dtp - real(kind=kind_phys), intent(in) :: cgwf(2) + real(kind=kind_phys), intent(in) :: cgwf(:) real(kind=kind_phys), intent(in) :: dx(:), work1(:), work2(:) real(kind=kind_phys), intent(in) :: & & gt0(:,:), gt0_init(:,:), del(:,:) @@ -163,7 +163,6 @@ subroutine gwdc_run (im,km,lat,u1,v1,t1,q1,deltim, & USE MACHINE , ONLY : kind_phys implicit none -! DH* TODO - add intent information for all variables !---------------------------- Arguments -------------------------------- ! ! Input variables @@ -188,15 +187,15 @@ subroutine gwdc_run (im,km,lat,u1,v1,t1,q1,deltim, & !----------------------------------------------------------------------- integer, intent(in) :: im, km, lat, ipr - integer, intent(in) :: ktop(im),kbot(im),kcnv(im) + integer, intent(in) :: ktop(:),kbot(:),kcnv(:) real(kind=kind_phys), intent(in) :: grav,cp,rd,fv,fhour,deltim,pi - real(kind=kind_phys), dimension(im), intent(in) :: qmax - real(kind=kind_phys), dimension(im), intent(out) :: tauctx,taucty - real(kind=kind_phys), dimension(im), intent(in) :: cldf,dlength - real(kind=kind_phys), dimension(im,km), intent(in) :: u1,v1,t1, & + real(kind=kind_phys), dimension(:), intent(in) :: qmax + real(kind=kind_phys), dimension(:), intent(out) :: tauctx,taucty + real(kind=kind_phys), dimension(:), intent(in) :: cldf,dlength + real(kind=kind_phys), dimension(:,:), intent(in) :: u1,v1,t1, & & q1,pmid1,dpmid1 - real(kind=kind_phys), dimension(im,km), intent(out) :: utgwc,vtgwc - real(kind=kind_phys), dimension(im,km+1), intent(in) :: pint1 + real(kind=kind_phys), dimension(:,:), intent(out) :: utgwc,vtgwc + real(kind=kind_phys), dimension(:,:), intent(in) :: pint1 ! logical, intent(in) :: lprnt ! @@ -1460,7 +1459,8 @@ end subroutine gwdc_post_init subroutine gwdc_post_run( & & im, levs, lssav, ldiag3d, dtf, dtp, con_cp, & & tauctx, taucty, gwdcu, gwdcv, & - & dugwd, dvgwd, du3dt, dv3dt, gu0, gv0, gt0, & + & dugwd, dvgwd, dtend, dtidx, index_of_x_wind, index_of_y_wind, & + & index_of_process_nonorographic_gwd, gu0, gv0, gt0, & & errmsg, errflg) use machine, only : kind_phys @@ -1472,14 +1472,17 @@ subroutine gwdc_post_run( & real(kind=kind_phys), intent(in) :: & & tauctx(:), taucty(:), gwdcu(:,:), gwdcv(:,:) - real(kind=kind_phys), intent(inout) :: & - & dugwd(:), dvgwd(:), du3dt(:,:), dv3dt(:,:), & + real(kind=kind_phys), intent(inout) :: dugwd(:), dvgwd(:), & & gu0(:,:), gv0(:,:), gt0(:,:) + real(kind=kind_phys), intent(inout), optional :: dtend(:,:,:) + integer, intent(in) :: dtidx(:,:) + integer, intent(in) :: index_of_process_nonorographic_gwd + integer, intent(in) :: index_of_x_wind, index_of_y_wind character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - integer :: i, k + integer :: i, k, idtend real(kind=kind_phys) :: eng0, eng1 ! Initialize CCPP error handling variables @@ -1494,8 +1497,16 @@ subroutine gwdc_post_run( & endif ! end if_lssav if (ldiag3d) then - du3dt(:,:) = du3dt(:,:) + gwdcu(:,:) * dtf - dv3dt(:,:) = dv3dt(:,:) + gwdcv(:,:) * dtf + idtend = dtidx(index_of_x_wind,index_of_process_nonorographic_g& + & wd) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + gwdcu(:,:) * dtf + endif + idtend = dtidx(index_of_y_wind,index_of_process_nonorographic_g& + & wd) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + gwdcv(:,:) * dtf + endif endif ! --- ... update the wind components with gwdc tendencies diff --git a/physics/gwdc.meta b/physics/gwdc.meta index 2fde9c2aa..a28ca895c 100644 --- a/physics/gwdc.meta +++ b/physics/gwdc.meta @@ -16,7 +16,7 @@ intent = in optional = F [cgwf] - standard_name = multiplication_factors_for_convective_gravity_wave_drag + standard_name = tunable_parameters_for_convective_gravity_wave_drag long_name = multiplication factors for convective gravity wave drag units = none dimensions = (2) @@ -25,7 +25,7 @@ intent = in optional = F [dx] - standard_name = cell_size + standard_name = characteristic_grid_lengthscale long_name = grid size in zonal direction units = m dimensions = (horizontal_loop_extent) @@ -70,7 +70,7 @@ intent = out optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical layers units = count dimensions = () @@ -94,7 +94,7 @@ intent = in optional = F [dtp] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics time step units = s dimensions = () @@ -103,10 +103,10 @@ intent = in optional = F [gt0] - standard_name = air_temperature_updated_by_physics + standard_name = air_temperature_of_new_state long_name = updated air temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -115,7 +115,7 @@ standard_name = air_temperature_save long_name = air temperature before entering convection scheme units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -124,7 +124,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = difference between mid-layer pressures units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -205,7 +205,7 @@ intent = in optional = F [km] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical layers units = count dimensions = () @@ -224,7 +224,7 @@ standard_name = x_wind long_name = zonal wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -233,7 +233,7 @@ standard_name = y_wind long_name = meridional wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -242,22 +242,22 @@ standard_name = air_temperature long_name = mid-layer temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [q1] - standard_name = water_vapor_specific_humidity + standard_name = specific_humidity long_name = mid-layer specific humidity of water vapor units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [deltim] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics time step units = s dimensions = () @@ -269,7 +269,7 @@ standard_name = air_pressure long_name = mid-layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -278,7 +278,7 @@ standard_name = air_pressure_at_interface long_name = interface pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -287,7 +287,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = difference between mid-layer pressures units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -353,7 +353,7 @@ intent = in optional = F [rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -417,7 +417,7 @@ standard_name = tendency_of_x_wind_due_to_convective_gravity_wave_drag long_name = zonal wind tendency due to convective gravity wave drag units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -426,7 +426,7 @@ standard_name = tendency_of_y_wind_due_to_convective_gravity_wave_drag long_name = meridional wind tendency due to convective gravity wave drag units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -486,7 +486,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical layers units = count dimensions = () @@ -494,7 +494,7 @@ intent = in optional = F [lssav] - standard_name = flag_diagnostics + standard_name = flag_for_diagnostics long_name = flag for calculating diagnostic fields units = flag dimensions = () @@ -502,7 +502,7 @@ intent = in optional = F [ldiag3d] - standard_name = flag_diagnostics_3D + standard_name = flag_for_diagnostics_3D long_name = flag for calculating 3-D diagnostic fields units = flag dimensions = () @@ -510,7 +510,7 @@ intent = in optional = F [dtf] - standard_name = time_step_for_dynamics + standard_name = timestep_for_dynamics long_name = dynamics time step units = s dimensions = () @@ -519,7 +519,7 @@ intent = in optional = F [dtp] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics time step units = s dimensions = () @@ -558,7 +558,7 @@ standard_name = tendency_of_x_wind_due_to_convective_gravity_wave_drag long_name = zonal wind tendency due to convective gravity wave drag units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -567,7 +567,7 @@ standard_name = tendency_of_y_wind_due_to_convective_gravity_wave_drag long_name = meridional wind tendency due to convective gravity wave drag units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -590,47 +590,71 @@ kind = kind_phys intent = inout optional = F -[du3dt] - standard_name = cumulative_change_in_x_wind_due_to_convective_gravity_wave_drag - long_name = cumulative change in zonal wind due to convective gravity wave drag - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) +[dtend] + standard_name = cumulative_change_of_state_variables + long_name = diagnostic tendencies for state variables + units = various + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_cumulative_change_processes) type = real kind = kind_phys + active = (flag_for_diagnostics_3D) intent = inout optional = F -[dv3dt] - standard_name = cumulative_change_in_y_wind_due_to_convective_gravity_wave_drag - long_name = cumulative change in meridional wind due to convective gravity wave drag - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[dtidx] + standard_name = cumulative_change_of_state_variables_outer_index + long_name = index of state-variable and process in last dimension of diagnostic tendencies array AKA cumulative_change_index + units = index + dimensions = (number_of_tracers_plus_one_hundred,number_of_cumulative_change_processes) + type = integer + intent = in + optional = F +[index_of_x_wind] + standard_name = index_of_x_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_y_wind] + standard_name = index_of_y_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_process_nonorographic_gwd] + standard_name = index_of_nonorographic_gravity_wave_drag_process_in_cumulative_change_index + long_name = index of nonorographic gravity wave drag process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in optional = F [gu0] - standard_name = x_wind_updated_by_physics + standard_name = x_wind_of_new_state long_name = updated zonal wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [gv0] - standard_name = y_wind_updated_by_physics + standard_name = y_wind_of_new_state long_name = updated meridional wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [gt0] - standard_name = air_temperature_updated_by_physics + standard_name = air_temperature_of_new_state long_name = updated air temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/gwdps.f b/physics/gwdps.f index c6d9ab584..285bdf67c 100644 --- a/physics/gwdps.f +++ b/physics/gwdps.f @@ -296,23 +296,23 @@ subroutine gwdps_run( & ! ! Interface variables integer, intent(in) :: im, km, imx, kdt, ipr, me - integer, intent(in) :: KPBL(IM) ! Index for the PBL top layer! + integer, intent(in) :: KPBL(:) ! Index for the PBL top layer! real(kind=kind_phys), intent(in) :: & - & deltim, G, CP, RD, RV, cdmbgwd(4) + & deltim, G, CP, RD, RV, cdmbgwd(:) real(kind=kind_phys), intent(inout) :: & - & A(IM,KM), B(IM,KM), C(IM,KM) + & A(:,:), B(:,:), C(:,:) real(kind=kind_phys), intent(in) :: & - & U1(IM,KM), V1(IM,KM), T1(IM,KM), & - & Q1(IM,KM), PRSI(IM,KM+1), DEL(IM,KM), & - & PRSL(IM,KM), PRSLK(IM,KM), PHIL(IM,KM), & - & PHII(IM,KM+1) + & U1(:,:), V1(:,:), T1(:,:), & + & Q1(:,:), PRSI(:,:), DEL(:,:), & + & PRSL(:,:), PRSLK(:,:), PHIL(:,:), & + & PHII(:,:) real(kind=kind_phys), intent(in) :: & - & OC(IM), OA4(IM,4), CLX4(IM,4), HPRIME(IM) - real(kind=kind_phys), intent(inout) :: ELVMAX(IM) + & OC(:), OA4(:,:), CLX4(:,:), HPRIME(:) + real(kind=kind_phys), intent(inout) :: ELVMAX(:) real(kind=kind_phys), intent(in) :: & - & THETA(IM), SIGMA(IM), GAMMA(IM) - real(kind=kind_phys), intent(out) :: DUSFC(IM), DVSFC(IM), & - & RDXZB(IM) + & THETA(:), SIGMA(:), GAMMA(:) + real(kind=kind_phys), intent(out) :: DUSFC(:), DVSFC(:), & + & RDXZB(:) integer, intent(in) :: nmtvr logical, intent(in) :: lprnt character(len=*), intent(out) :: errmsg @@ -1310,4 +1310,4 @@ end subroutine gwdps_run subroutine gwdps_finalize() end subroutine gwdps_finalize - end module gwdps + end module gwdps \ No newline at end of file diff --git a/physics/gwdps.meta b/physics/gwdps.meta index 1935e9991..4aecc48b8 100644 --- a/physics/gwdps.meta +++ b/physics/gwdps.meta @@ -16,7 +16,7 @@ intent = in optional = F [km] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical layers units = count dimensions = () @@ -24,28 +24,28 @@ intent = in optional = F [A] - standard_name = tendency_of_y_wind_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_y_wind long_name = meridional wind tendency due to model physics units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [B] - standard_name = tendency_of_x_wind_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_x_wind long_name = zonal wind tendency due to model physics units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [C] - standard_name = tendency_of_air_temperature_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_air_temperature long_name = air temperature tendency due to model physics units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -54,7 +54,7 @@ standard_name = x_wind long_name = zonal wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -63,7 +63,7 @@ standard_name = y_wind long_name = meridional wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -72,16 +72,16 @@ standard_name = air_temperature long_name = mid-layer temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [q1] - standard_name = water_vapor_specific_humidity + standard_name = specific_humidity long_name = mid-layer specific humidity of water vapor units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -98,7 +98,7 @@ standard_name = air_pressure_at_interface long_name = interface pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -107,7 +107,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = difference between mid-layer pressures units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -116,16 +116,16 @@ standard_name = air_pressure long_name = mid-layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [prslk] - standard_name = dimensionless_exner_function_at_model_layers + standard_name = dimensionless_exner_function long_name = mid-layer Exner function units = none - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -134,7 +134,7 @@ standard_name = geopotential_at_interface long_name = interface geopotential units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -143,13 +143,13 @@ standard_name = geopotential long_name = mid-layer geopotential units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [deltim] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics time step units = s dimensions = () @@ -158,7 +158,7 @@ intent = in optional = F [kdt] - standard_name = index_of_time_step + standard_name = index_of_timestep long_name = current time step index units = index dimensions = () @@ -167,7 +167,7 @@ optional = F [hprime] standard_name = standard_deviation_of_subgrid_orography - long_name = standard deviation of subgrid orography + long_name = standard deviation of subgrid height_above_mean_sea_level units = m dimensions = (horizontal_loop_extent) type = real @@ -176,7 +176,7 @@ optional = F [oc] standard_name = convexity_of_subgrid_orography - long_name = convexity of subgrid orography + long_name = convexity of subgrid height_above_mean_sea_level units = none dimensions = (horizontal_loop_extent) type = real @@ -185,7 +185,7 @@ optional = F [oa4] standard_name = asymmetry_of_subgrid_orography - long_name = asymmetry of subgrid orography + long_name = asymmetry of subgrid height_above_mean_sea_level units = none dimensions = (horizontal_loop_extent,4) type = real @@ -194,7 +194,7 @@ optional = F [clx4] standard_name = fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height - long_name = horizontal fraction of grid box covered by subgrid orography higher than critical height + long_name = horizontal fraction of grid box covered by subgrid height_above_mean_sea_level higher than critical height units = frac dimensions = (horizontal_loop_extent,4) type = real @@ -212,7 +212,7 @@ optional = F [sigma] standard_name = slope_of_subgrid_orography - long_name = slope of subgrid orography + long_name = slope of subgrid height_above_mean_sea_level units = none dimensions = (horizontal_loop_extent) type = real @@ -221,7 +221,7 @@ optional = F [gamma] standard_name = anisotropy_of_subgrid_orography - long_name = anisotropy of subgrid orography + long_name = anisotropy of subgrid height_above_mean_sea_level units = none dimensions = (horizontal_loop_extent) type = real @@ -230,7 +230,7 @@ optional = F [elvmax] standard_name = maximum_subgrid_orography - long_name = maximum of subgrid orography + long_name = maximum of subgrid height_above_mean_sea_level units = m dimensions = (horizontal_loop_extent) type = real @@ -274,7 +274,7 @@ intent = in optional = F [rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -301,14 +301,14 @@ optional = F [nmtvr] standard_name = number_of_statistical_measures_of_subgrid_orography - long_name = number of statistical measures of subgrid orography + long_name = number of statistical measures of subgrid height_above_mean_sea_level units = count dimensions = () type = integer intent = in optional = F [cdmbgwd] - standard_name = multiplication_factors_for_mountain_blocking_and_orographic_gravity_wave_drag + standard_name = multiplicative_tunable_parameters_for_mountain_blocking_and_orographic_gravity_wave_drag long_name = multiplic. factors for (1) mountain blocking drag coeff. and (2) ref. level orographic gravity wave drag units = none dimensions = (4) diff --git a/physics/h2o_def.meta b/physics/h2o_def.meta index 21f3b903f..524828ba4 100644 --- a/physics/h2o_def.meta +++ b/physics/h2o_def.meta @@ -26,4 +26,3 @@ dimensions = (vertical_dimension_of_h2o_forcing_data) type = real kind = kind_phys - active = (flag_for_stratospheric_water_vapor_physics) \ No newline at end of file diff --git a/physics/h2ophys.f b/physics/h2ophys.f index 8222638ae..e21417e80 100644 --- a/physics/h2ophys.f +++ b/physics/h2ophys.f @@ -12,7 +12,22 @@ module h2ophys contains - subroutine h2ophys_init() + subroutine h2ophys_init(h2o_phys, errmsg, errflg) + + implicit none + logical, intent(in) :: h2o_phys + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (.not.h2o_phys) then + write (errmsg,'(*(a))') 'Logic error: h2o_phys == .false.' + errflg = 1 + return + endif end subroutine h2ophys_init !>\defgroup GFS_h2ophys GFS Water Vapor Photochemical Production and Loss Module @@ -23,7 +38,7 @@ end subroutine h2ophys_init !! \section genal_h2ophys GFS H2O Physics Scheme General Algorithm !> @{ subroutine h2ophys_run(im, levs, kh2o, dt, h2o, ph2o, prsl, & - & h2opltc, h2o_coeff, ldiag3d, me, & + & h2opltc, h2o_coeff, me, & & errmsg, errflg) ! ! May 2015 - Shrinivas Moorthi - Adaptation of NRL H2O physics for @@ -37,11 +52,10 @@ subroutine h2ophys_run(im, levs, kh2o, dt, h2o, ph2o, prsl, & ! interface variables integer, intent(in) :: im, levs, kh2o, h2o_coeff, me real(kind=kind_phys), intent(in) :: dt - real(kind=kind_phys), intent(inout) :: h2o(im,levs) - real(kind=kind_phys), intent(in) :: ph2o(kh2o) - real(kind=kind_phys), intent(in) :: prsl(im,levs) - real(kind=kind_phys), intent(in) :: h2opltc(im,kh2o,h2o_coeff) - logical , intent(in) :: ldiag3d + real(kind=kind_phys), intent(inout) :: h2o(:,:) + real(kind=kind_phys), intent(in) :: ph2o(:) + real(kind=kind_phys), intent(in) :: prsl(:,:) + real(kind=kind_phys), intent(in) :: h2opltc(:,:,:) !real(kind=kind_phys), intent(inout) :: h2op(im,levs,h2o_coeff) character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg diff --git a/physics/h2ophys.meta b/physics/h2ophys.meta index 62db330f4..95822fbfb 100644 --- a/physics/h2ophys.meta +++ b/physics/h2ophys.meta @@ -3,6 +3,36 @@ type = scheme dependencies = machine.F +######################################################################## +[ccpp-arg-table] + name = h2ophys_init + type = scheme +[h2o_phys] + standard_name = flag_for_stratospheric_water_vapor_physics + long_name = flag for stratospheric water vapor physics + units = flag + dimensions = () + type = logical + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + ######################################################################## [ccpp-arg-table] name = h2ophys_run @@ -16,7 +46,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical layers units = count dimensions = () @@ -32,7 +62,7 @@ intent = in optional = F [dt] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics time step units = s dimensions = () @@ -41,10 +71,10 @@ intent = in optional = F [h2o] - standard_name = water_vapor_specific_humidity_updated_by_physics + standard_name = specific_humidity_of_new_state long_name = water vapor specific humidity updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -62,13 +92,13 @@ standard_name = air_pressure long_name = mid-layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [h2opltc] - standard_name = h2o_forcing + standard_name = stratospheric_water_vapor_forcing long_name = water forcing data units = various dimensions = (horizontal_loop_extent,vertical_dimension_of_h2o_forcing_data,number_of_coefficients_in_h2o_forcing_data) @@ -84,14 +114,6 @@ type = integer intent = in optional = F -[ldiag3d] - standard_name = flag_diagnostics_3D - long_name = flag for calculating 3-D diagnostic fields - units = flag - dimensions = () - type = logical - intent = in - optional = F [me] standard_name = mpi_rank long_name = rank of the current MPI task diff --git a/physics/lsm_ruc_sfc_sice_interstitial.F90 b/physics/lsm_ruc_sfc_sice_interstitial.F90 deleted file mode 100644 index 27033fcc8..000000000 --- a/physics/lsm_ruc_sfc_sice_interstitial.F90 +++ /dev/null @@ -1,123 +0,0 @@ -module lsm_ruc_sfc_sice_pre - - use machine, only: kind_phys - - implicit none - - private - - public :: lsm_ruc_sfc_sice_pre_init, lsm_ruc_sfc_sice_pre_run, lsm_ruc_sfc_sice_pre_finalize - -contains - - subroutine lsm_ruc_sfc_sice_pre_init () - end subroutine lsm_ruc_sfc_sice_pre_init - - subroutine lsm_ruc_sfc_sice_pre_finalize () - end subroutine lsm_ruc_sfc_sice_pre_finalize - -#if 0 -!> \section arg_table_lsm_ruc_sfc_sice_pre_run Argument Table -!! \htmlinclude lsm_ruc_sfc_sice_pre_run.html -!! -#endif - subroutine lsm_ruc_sfc_sice_pre_run(im, lsoil_ruc, lsoil, kice, land, icy, stc, tslb, tiice, errmsg, errflg) - - implicit none - - ! Interface variables - integer, intent(in) :: im, lsoil_ruc, lsoil, kice - logical, dimension(im), intent(in) :: land, icy -! --- on Noah levels - real (kind=kind_phys), dimension(im,lsoil), intent(inout) :: stc -! --- on RUC levels - real (kind=kind_phys), dimension(im,lsoil_ruc), intent(in) :: tslb - real (kind=kind_phys), dimension(im,kice), intent(inout) :: tiice - - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - - ! Local variables - integer :: i, k - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - do i=1,im - if (icy(i)) then - do k=1,kice - tiice(i,k) = tslb(i,k) - end do - else if (.not.land(i)) then - do k=1,min(lsoil,lsoil_ruc) - stc(i,k) = tslb(i,k) - end do - end if - end do - - end subroutine lsm_ruc_sfc_sice_pre_run - -end module lsm_ruc_sfc_sice_pre - -module lsm_ruc_sfc_sice_post - - use machine, only: kind_phys - - implicit none - - private - - public :: lsm_ruc_sfc_sice_post_init, lsm_ruc_sfc_sice_post_run, lsm_ruc_sfc_sice_post_finalize - -contains - - subroutine lsm_ruc_sfc_sice_post_init () - end subroutine lsm_ruc_sfc_sice_post_init - - subroutine lsm_ruc_sfc_sice_post_finalize () - end subroutine lsm_ruc_sfc_sice_post_finalize - -#if 0 -!> \section arg_table_lsm_ruc_sfc_sice_post_run Argument Table -!! \htmlinclude lsm_ruc_sfc_sice_post_run.html -!! -#endif - subroutine lsm_ruc_sfc_sice_post_run(im, lsoil_ruc, lsoil, kice, land, icy, stc, tslb, tiice, errmsg, errflg) - - implicit none - - ! Interface variables - integer, intent(in) :: im, lsoil_ruc, lsoil, kice - logical, dimension(im), intent(in) :: land, icy -! --- on Noah levels - real (kind=kind_phys), dimension(im,lsoil), intent(in) :: stc - real (kind=kind_phys), dimension(im,kice), intent(in) :: tiice -! --- on RUC levels - real (kind=kind_phys), dimension(im,lsoil_ruc), intent(inout) :: tslb - - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - - ! Local variables - integer :: i, k - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - do i=1,im - if (icy(i)) then - do k=1,kice - tslb(i,k) = tiice(i,k) - end do - else if (.not.land(i)) then - do k=1,min(lsoil,lsoil_ruc) - tslb(i,k) = stc(i,k) - end do - end if - end do - - end subroutine lsm_ruc_sfc_sice_post_run - -end module lsm_ruc_sfc_sice_post diff --git a/physics/lsm_ruc_sfc_sice_interstitial.meta b/physics/lsm_ruc_sfc_sice_interstitial.meta deleted file mode 100644 index d7a5736a5..000000000 --- a/physics/lsm_ruc_sfc_sice_interstitial.meta +++ /dev/null @@ -1,204 +0,0 @@ -[ccpp-table-properties] - name = lsm_ruc_sfc_sice_pre - type = scheme - dependencies = machine.F - -######################################################################## -[ccpp-arg-table] - name = lsm_ruc_sfc_sice_pre_run - type = scheme -[im] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent - units = count - dimensions = () - type = integer - intent = in - optional = F -[lsoil_ruc] - standard_name = soil_vertical_dimension_for_land_surface_model - long_name = number of soil layers internal to land surface model - units = count - dimensions = () - type = integer - intent = in - optional = F -[lsoil] - standard_name = soil_vertical_dimension - long_name = soil vertical layer dimension - units = count - dimensions = () - type = integer - intent = in - optional = F -[kice] - standard_name = ice_vertical_dimension - long_name = vertical loop extent for ice levels, start at 1 - units = count - dimensions = () - type = integer - intent = in - optional = F -[land] - standard_name = flag_nonzero_land_surface_fraction - long_name = flag indicating presence of some land surface area fraction - units = flag - dimensions = (horizontal_loop_extent) - type = logical - intent = in - optional = F -[icy] - standard_name = flag_nonzero_sea_ice_surface_fraction - long_name = flag indicating presence of some sea ice surface area fraction - units = flag - dimensions = (horizontal_loop_extent) - type = logical - intent = inout - optional = F -[stc] - standard_name = soil_temperature - long_name = soil temperature - units = K - dimensions = (horizontal_loop_extent,soil_vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[tslb] - standard_name = soil_temperature_for_land_surface_model - long_name = soil temperature for land surface model - units = K - dimensions = (horizontal_loop_extent,soil_vertical_dimension_for_land_surface_model) - type = real - kind = kind_phys - intent = in - optional = F -[tiice] - standard_name = internal_ice_temperature - long_name = sea ice internal temperature - units = K - dimensions = (horizontal_loop_extent,ice_vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[errmsg] - standard_name = ccpp_error_message - long_name = error message for error handling in CCPP - units = none - dimensions = () - type = character - kind = len=* - intent = out - optional = F -[errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag - dimensions = () - type = integer - intent = out - optional = F - -######################################################################## -[ccpp-table-properties] - name = lsm_ruc_sfc_sice_post - type = scheme - dependencies = machine.F - -######################################################################## -[ccpp-arg-table] - name = lsm_ruc_sfc_sice_post_run - type = scheme -[im] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent - units = count - dimensions = () - type = integer - intent = in - optional = F -[lsoil_ruc] - standard_name = soil_vertical_dimension_for_land_surface_model - long_name = number of soil layers internal to land surface model - units = count - dimensions = () - type = integer - intent = in - optional = F -[lsoil] - standard_name = soil_vertical_dimension - long_name = soil vertical layer dimension - units = count - dimensions = () - type = integer - intent = in - optional = F -[kice] - standard_name = ice_vertical_dimension - long_name = vertical loop extent for ice levels, start at 1 - units = count - dimensions = () - type = integer - intent = in - optional = F -[land] - standard_name = flag_nonzero_land_surface_fraction - long_name = flag indicating presence of some land surface area fraction - units = flag - dimensions = (horizontal_loop_extent) - type = logical - intent = in - optional = F -[icy] - standard_name = flag_nonzero_sea_ice_surface_fraction - long_name = flag indicating presence of some sea ice surface area fraction - units = flag - dimensions = (horizontal_loop_extent) - type = logical - intent = inout - optional = F -[stc] - standard_name = soil_temperature - long_name = soil temperature - units = K - dimensions = (horizontal_loop_extent,soil_vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[tslb] - standard_name = soil_temperature_for_land_surface_model - long_name = soil temperature for land surface model - units = K - dimensions = (horizontal_loop_extent,soil_vertical_dimension_for_land_surface_model) - type = real - kind = kind_phys - intent = inout - optional = F -[tiice] - standard_name = internal_ice_temperature - long_name = sea ice internal temperature - units = K - dimensions = (horizontal_loop_extent,ice_vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[errmsg] - standard_name = ccpp_error_message - long_name = error message for error handling in CCPP - units = none - dimensions = () - type = character - kind = len=* - intent = out - optional = F -[errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag - dimensions = () - type = integer - intent = out - optional = F diff --git a/physics/m_micro.F90 b/physics/m_micro.F90 index e0ee163fe..51ce44d7f 100644 --- a/physics/m_micro.F90 +++ b/physics/m_micro.F90 @@ -38,7 +38,7 @@ subroutine m_micro_init(imp_physics, imp_physics_mg, fprcp, gravit, rair, rh2o, mg_do_graupel, mg_nccons, mg_nicons, mg_ngcons, & mg_do_ice_gmao, mg_do_liq_liu real(kind=kind_phys), intent(in) :: gravit, rair, rh2o, cpair, eps, tmelt, latvap, latice - real(kind=kind_phys), intent(in) :: mg_dcs, mg_qcvar, mg_ts_auto_ice(2), mg_rhmini, & + real(kind=kind_phys), intent(in) :: mg_dcs, mg_qcvar, mg_ts_auto_ice(:), mg_rhmini, & mg_berg_eff_factor, mg_ncnst, mg_ninst, mg_ngnst character(len=16), intent(in) :: mg_precip_frac_method character(len=*), intent(out) :: errmsg @@ -172,45 +172,38 @@ subroutine m_micro_run( im, lm, flipv, dt_i & integer, parameter :: ncolmicro = 1 integer,intent(in) :: im, lm, kdt, fprcp, pdfflag, iccn logical,intent(in) :: flipv, skip_macro - real (kind=kind_phys), intent(in):: dt_i, alf_fac, qc_min(2) + real (kind=kind_phys), intent(in):: dt_i, alf_fac, qc_min(:) - real (kind=kind_phys), dimension(im,lm),intent(in) :: & + real (kind=kind_phys), dimension(:,:),intent(in) :: & & prsl_i,u_i,v_i,phil, omega_i, QLLS_i,QILS_i, & & lwheat_i,swheat_i - real (kind=kind_phys), dimension(im,0:lm),intent(in):: prsi_i, & - & phii -! GJF* These variables are conditionally allocated depending on whether the -! Morrison-Gettelman microphysics is used, so they must be declared -! using assumed shape. + real (kind=kind_phys), dimension(:,0:),intent(in):: prsi_i, phii real (kind=kind_phys), dimension(:,:), intent(in) :: & & CNV_DQLDT_i, CLCN_i, QLCN_i, QICN_i, & & CNV_MFD_i, cf_upi, CNV_FICE_i, CNV_NDROP_i, & & CNV_NICE_i, w_upi ! *GJF - real (kind=kind_phys), dimension(im,lm),intent(in) :: & + real (kind=kind_phys), dimension(:,:),intent(in) :: & & rhc_i, naai_i, npccn_i - real (kind=kind_phys), dimension(im,lm,ntrcaer),intent(in) :: & + real (kind=kind_phys), dimension(:,:,:),intent(in) :: & & aerfld_i - real (kind=kind_phys),dimension(im),intent(in):: TAUGWX, & + real (kind=kind_phys),dimension(:),intent(in):: TAUGWX, & & TAUGWY, TAUOROX, TAUOROY, FRLAND,ZPBL,xlat,xlon ! & TAUGWY, TAUX, TAUY, TAUOROX, TAUOROY,ps_i,FRLAND,ZPBL ! & CNVPRCP ! output - real (kind=kind_phys),dimension(im,lm), intent(out) :: lwm_o, qi_o, & + real (kind=kind_phys),dimension(:,:), intent(out) :: lwm_o, qi_o, & cldreffl, cldreffi, cldreffr, cldreffs, cldreffg - real (kind=kind_phys),dimension(im), intent(out) :: rn_o, sr_o + real (kind=kind_phys),dimension(:), intent(out) :: rn_o, sr_o character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! input and output ! Anning Cheng 10/24/2016 twat for total water, diagnostic purpose - integer, dimension(IM), intent(inout):: KCBL - real (kind=kind_phys),dimension(im,lm),intent(inout):: q_io, t_io, & + integer, dimension(:), intent(inout):: KCBL + real (kind=kind_phys),dimension(:,:),intent(inout):: q_io, t_io, & & ncpl_io,ncpi_io,CLLS_io -! GJF* These variables are conditionally allocated depending on whether the -! Morrison-Gettelman microphysics is used, so they must be declared -! using assumed shape. real (kind=kind_phys),dimension(:,:),intent(inout):: rnw_io,snw_io,& & ncpr_io, ncps_io, & & qgl_io, ncgl_io @@ -547,16 +540,19 @@ subroutine m_micro_run( im, lm, flipv, dt_i & & NCPI(I,K), qc_min) if (rnw(i,k) <= qc_min(1)) then ncpr(i,k) = zero + rnw(i,k) = zero elseif (ncpr(i,k) <= nmin) then ! make sure NL > 0 if Q >0 ncpr(i,k) = max(rnw(i,k) / (fourb3 * PI *RL_cub*997.0_kp), nmin) endif if (snw(i,k) <= qc_min(2)) then ncps(i,k) = zero + snw(i,k) = zero elseif (ncps(i,k) <= nmin) then ncps(i,k) = max(snw(i,k) / (fourb3 * PI *RL_cub*500.0_kp), nmin) endif if (qgl(i,k) <= qc_min(2)) then ncgl(i,k) = zero + qgl(i,k) = zero elseif (ncgl(i,k) <= nmin) then ncgl(i,k) = max(qgl(i,k) / (fourb3 * PI *RL_cub*500.0_kp), nmin) endif @@ -1701,16 +1697,19 @@ subroutine m_micro_run( im, lm, flipv, dt_i & QI_TOT(I,K) = QILS(I,K) + QICN(I,K) if (rnw(i,k) <= qc_min(1)) then ncpr(i,k) = zero + rnw(i,k) = zero elseif (ncpr(i,k) <= nmin) then ! make sure NL > 0 if Q >0 ncpr(i,k) = max(rnw(i,k) / (fourb3 * PI *RL_cub*997.0_kp), nmin) endif if (snw(i,k) <= qc_min(2)) then ncps(i,k) = zero + snw(i,k) = zero elseif (ncps(i,k) <= nmin) then ncps(i,k) = max(snw(i,k) / (fourb3 * PI *RL_cub*500.0_kp), nmin) endif if (qgl(i,k) <= qc_min(2)) then ncgl(i,k) = zero + qgl(i,k) = zero elseif (ncgl(i,k) <= nmin) then ncgl(i,k) = max(qgl(i,k) / (fourb3 * PI *RL_cub*500.0_kp), nmin) endif @@ -1741,16 +1740,19 @@ subroutine m_micro_run( im, lm, flipv, dt_i & ! if (rnw(i,k) <= qc_min(1)) then ncpr(i,k) = zero + rnw(i,k) = zero elseif (ncpr(i,k) <= nmin) then ! make sure NL > 0 if Q >0 ncpr(i,k) = max(rnw(i,k) / (fourb3 * PI *RL_cub*997.0_kp), nmin) endif if (snw(i,k) <= qc_min(2)) then ncps(i,k) = zero + snw(i,k) = zero elseif (ncps(i,k) <= nmin) then ncps(i,k) = max(snw(i,k) / (fourb3 * PI *RL_cub*500.0_kp), nmin) endif if (qgl(i,k) <= qc_min(2)) then ncgl(i,k) = zero + qgl(i,k) = zero elseif (ncgl(i,k) <= nmin) then ncgl(i,k) = max(qgl(i,k) / (fourb3 * PI *RL_cub*500.0_kp), nmin) endif diff --git a/physics/m_micro.meta b/physics/m_micro.meta index b504935a6..6bda8cec0 100644 --- a/physics/m_micro.meta +++ b/physics/m_micro.meta @@ -8,7 +8,7 @@ name = m_micro_init type = scheme [imp_physics] - standard_name = flag_for_microphysics_scheme + standard_name = control_for_microphysics_scheme long_name = choice of microphysics scheme units = flag dimensions = () @@ -16,7 +16,7 @@ intent = in optional = F [imp_physics_mg] - standard_name = flag_for_morrison_gettelman_microphysics_scheme + standard_name = identifier_for_morrison_gettelman_microphysics_scheme long_name = choice of Morrison-Gettelman microphysics scheme units = flag dimensions = () @@ -41,7 +41,7 @@ intent = in optional = F [rair] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -104,7 +104,7 @@ intent = in optional = F [mg_dcs] - standard_name = mg_autoconversion_size_threshold_ice_snow + standard_name = autoconverion_to_snow_size_threshold long_name = autoconversion size threshold for cloud ice to snow for MG microphysics units = um dimensions = () @@ -113,7 +113,7 @@ intent = in optional = F [mg_qcvar] - standard_name = mg_cloud_water_variance + standard_name = relative_variance_of_subgrid_cloud_condensate_distribution long_name = cloud water relative variance for MG microphysics units = dimensions = () @@ -122,7 +122,7 @@ intent = in optional = F [mg_ts_auto_ice] - standard_name = mg_time_scale_for_autoconversion_of_ice + standard_name = timescale_for_autoconversion_to_snow long_name = autoconversion time scale for ice for MG microphysics units = s dimensions = (2) @@ -131,7 +131,7 @@ intent = in optional = F [mg_rhmini] - standard_name = mg_minimum_rh_for_ice + standard_name = relative_humidity_threshold_for_ice_nucleation long_name = relative humidity threshold parameter for nucleating ice for MG microphysics units = none dimensions = () @@ -140,7 +140,7 @@ intent = in optional = F [microp_uniform] - standard_name = mg_flag_for_uniform_subcolumns + standard_name = flag_for_uniform_subcolumns long_name = flag for uniform subcolumns for MG microphysics units = flag dimensions = () @@ -148,7 +148,7 @@ intent = in optional = F [do_cldice] - standard_name = mg_flag_for_cloud_ice_processes + standard_name = flag_for_cloud_ice_processes long_name = flag for cloud ice processes for MG microphysics units = flag dimensions = () @@ -156,7 +156,7 @@ intent = in optional = F [hetfrz_classnuc] - standard_name = mg_flag_for_heterogeneous_freezing + standard_name = flag_for_heterogeneous_nucleation long_name = flag for heterogeneous freezing for MG microphysics units = flag dimensions = () @@ -164,7 +164,7 @@ intent = in optional = F [mg_precip_frac_method] - standard_name = mg_type_of_precip_fraction_method + standard_name = control_for_precipitation_area_fraction_method long_name = type of precip fraction method for MG microphysics (in_cloud or max_overlap) units = none dimensions = () @@ -173,7 +173,7 @@ intent = in optional = F [mg_berg_eff_factor] - standard_name = mg_bergeron_efficiency_factor + standard_name = bergeron_findeisen_process_efficiency_factor long_name = bergeron efficiency factor for MG microphysics units = frac dimensions = () @@ -182,7 +182,7 @@ intent = in optional = F [sed_supersat] - standard_name = mg_allow_supersat_after_sed + standard_name = flag_for_allowance_of_supersaturation_after_sedimentation long_name = allow supersaturation after sedimentation for MG microphysics units = flag dimensions = () @@ -190,7 +190,7 @@ intent = in optional = F [do_sb_physics] - standard_name = mg_flag_for_sb2001_autoconversion + standard_name = flag_for_seifert_and_beheng_2001_autoconversion long_name = flag for SB 2001 autoconversion or accretion for MG microphysics units = flag dimensions = () @@ -198,7 +198,7 @@ intent = in optional = F [mg_do_hail] - standard_name = mg_flag_for_hail + standard_name = flag_for_hail_instead_of_graupel long_name = flag for hail for MG microphysics (graupel possible if false) units = flag dimensions = () @@ -206,7 +206,7 @@ intent = in optional = F [mg_do_graupel] - standard_name = mg_flag_for_graupel + standard_name = flag_for_graupel_instead_of_hail long_name = flag for graupel for MG microphysics (hail possible if false) units = flag dimensions = () @@ -214,7 +214,7 @@ intent = in optional = F [mg_nccons] - standard_name = mg_flag_drop_concentration_constant + standard_name = flag_for_prescribed_cloud_droplet_number_concentration long_name = flag for constant droplet concentration for MG microphysics units = flag dimensions = () @@ -222,7 +222,7 @@ intent = in optional = F [mg_nicons] - standard_name = mg_flag_ice_concentration_constant + standard_name = flag_for_prescribed_cloud_ice_number_concentration long_name = flag for constant ice concentration for MG microphysics units = flag dimensions = () @@ -230,7 +230,7 @@ intent = in optional = F [mg_ngcons] - standard_name = mg_flag_graupel_concentration_constant + standard_name = flag_for_prescribed_graupel_number_concentration long_name = flag for constant graupel concentration for MG microphysics units = flag dimensions = () @@ -238,7 +238,7 @@ intent = in optional = F [mg_ncnst] - standard_name = mg_drop_concentration_constant + standard_name = prescribed_cloud_droplet_number_concentration long_name = droplet concentration constant for MG microphysics units = m-3 dimensions = () @@ -247,7 +247,7 @@ intent = in optional = F [mg_ninst] - standard_name = mg_ice_concentration_constant + standard_name = prescribed_cloud_ice_number_concentration long_name = ice concentration constant for MG microphysics units = m-3 dimensions = () @@ -256,7 +256,7 @@ intent = in optional = F [mg_ngnst] - standard_name = mg_graupel_concentration_constant + standard_name = prescribed_graupel_number_concentration long_name = graupel concentration constant for MG microphysics units = m-3 dimensions = () @@ -265,7 +265,7 @@ intent = in optional = F [mg_do_ice_gmao] - standard_name = mg_flag_for_gmao_ice_formulation + standard_name = flag_for_gmao_autoconversion_to_snow long_name = flag for gmao ice formulation units = flag dimensions = () @@ -273,7 +273,7 @@ intent = in optional = F [mg_do_liq_liu] - standard_name = mg_flag_for_liu_liquid_treatment + standard_name = flag_for_liu_autoconversion_to_rain long_name = flag for liu liquid treatment units = flag dimensions = () @@ -311,7 +311,7 @@ intent = in optional = F [lm] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -336,7 +336,7 @@ intent = in optional = F [dt_i] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics time step units = s dimensions = () @@ -363,7 +363,7 @@ intent = in optional = F [rgas] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -447,7 +447,7 @@ standard_name = air_pressure long_name = layer mean pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -456,7 +456,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -465,7 +465,7 @@ standard_name = geopotential long_name = geopotential at model layer centers units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -474,16 +474,16 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in optional = F [omega_i] - standard_name = omega + standard_name = lagrangian_tendency_of_air_pressure long_name = layer mean vertical velocity units = Pa s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -492,7 +492,7 @@ standard_name = cloud_condensed_water_mixing_ratio_convective_transport_tracer long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -501,7 +501,7 @@ standard_name = mass_fraction_of_convective_cloud_liquid_water long_name = mass fraction of convective cloud liquid water units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -510,7 +510,7 @@ standard_name = ice_water_mixing_ratio_convective_transport_tracer long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -519,25 +519,25 @@ standard_name = mass_fraction_of_convective_cloud_ice long_name = mass fraction of convective cloud ice water units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [lwheat_i] - standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step + standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_timestep long_name = total sky lw heating rate units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [swheat_i] - standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_timestep long_name = total sky sw heating rate units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -546,7 +546,7 @@ standard_name = vertical_velocity_for_updraft long_name = vertical velocity for updraft units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -555,7 +555,7 @@ standard_name = convective_cloud_fraction_for_microphysics long_name = convective cloud fraction for microphysics units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -582,7 +582,7 @@ standard_name = detrained_mass_flux long_name = detrained mass flux units = kg m-2 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -591,7 +591,7 @@ standard_name = tendency_of_cloud_water_due_to_convective_microphysics long_name = tendency of cloud water due to convective microphysics units = kg m-2 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -600,25 +600,25 @@ standard_name = convective_cloud_volume_fraction long_name = convective cloud volume fraction units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [u_i] - standard_name = x_wind_updated_by_physics + standard_name = x_wind_of_new_state long_name = zonal wind updated by physics units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [v_i] - standard_name = y_wind_updated_by_physics + standard_name = y_wind_of_new_state long_name = meridional wind updated by physics units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -663,7 +663,7 @@ standard_name = ice_fraction_in_convective_tower long_name = ice fraction in convective tower units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -672,7 +672,7 @@ standard_name = number_concentration_of_cloud_liquid_water_particles_for_detrainment long_name = droplet number concentration in convective detrainment units = m-3 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -681,43 +681,43 @@ standard_name = number_concentration_of_ice_crystals_for_detrainment long_name = crystal number concentration in convective detrainment units = m-3 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [q_io] - standard_name = water_vapor_specific_humidity_updated_by_physics + standard_name = specific_humidity_of_new_state long_name = water vapor specific humidity updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [lwm_o] - standard_name = cloud_condensed_water_mixing_ratio_updated_by_physics + standard_name = cloud_liquid_water_mixing_ratio_of_new_state long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [qi_o] - standard_name = ice_water_mixing_ratio_updated_by_physics + standard_name = cloud_ice_mixing_ratio_of_new_state long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [t_io] - standard_name = air_temperature_updated_by_physics + standard_name = air_temperature_of_new_state long_name = temperature updated by physics units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -741,19 +741,19 @@ intent = out optional = F [ncpl_io] - standard_name = cloud_droplet_number_concentration_updated_by_physics + standard_name = mass_number_concentration_of_cloud_liquid_water_particles_in_air_of_new_state long_name = number concentration of cloud droplets updated by physics units = kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [ncpi_io] - standard_name = ice_number_concentration_updated_by_physics + standard_name = mass_number_concentration_of_cloud_ice_water_crystals_in_air_of_new_state long_name = number concentration of ice updated by physics units = kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -770,7 +770,7 @@ standard_name = local_rain_water_mixing_ratio long_name = ratio of mass of rain water to mass of dry air plus vapor (without condensates) local to physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -779,7 +779,7 @@ standard_name = local_snow_water_mixing_ratio long_name = ratio of mass of snow water to mass of dry air plus vapor (without condensates) local to physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -788,7 +788,7 @@ standard_name = local_graupel_mixing_ratio long_name = ratio of mass of graupel to mass of dry air plus vapor (without condensates) local to physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -797,7 +797,7 @@ standard_name = local_rain_number_concentration long_name = number concentration of rain local to physics units = kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -806,7 +806,7 @@ standard_name = local_snow_number_concentration long_name = number concentration of snow local to physics units = kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -815,7 +815,7 @@ standard_name = local_graupel_number_concentration long_name = number concentration of graupel local to physics units = kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -824,7 +824,7 @@ standard_name = cloud_fraction_for_MG long_name = cloud fraction used by Morrison-Gettelman MP units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -838,79 +838,79 @@ intent = inout optional = F [cldreffl] - standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle_in_um + standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle long_name = effective radius of cloud liquid water particle in micrometer units = um - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [cldreffi] - standard_name = effective_radius_of_stratiform_cloud_ice_particle_in_um + standard_name = effective_radius_of_stratiform_cloud_ice_particle long_name = effective radius of cloud ice water particle in micrometers units = um - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [cldreffr] - standard_name = effective_radius_of_stratiform_cloud_rain_particle_in_um + standard_name = effective_radius_of_stratiform_cloud_rain_particle long_name = effective radius of cloud rain particle in micrometers units = um - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [cldreffs] - standard_name = effective_radius_of_stratiform_cloud_snow_particle_in_um + standard_name = effective_radius_of_stratiform_cloud_snow_particle long_name = effective radius of cloud snow particle in micrometers units = um - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [cldreffg] - standard_name = effective_radius_of_stratiform_cloud_graupel_particle_in_um + standard_name = effective_radius_of_stratiform_cloud_graupel_particle long_name = effective radius of cloud graupel particle in micrometers units = um - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [aerfld_i] - standard_name = aerosol_number_concentration_from_gocart_aerosol_climatology + standard_name = mass_number_concentration_of_aerosol_from_gocart_climatology long_name = GOCART aerosol climatology number concentration units = kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_aerosol_tracers_MG) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_aerosol_tracers_MG) type = real kind = kind_phys intent = in optional = F [naai_i] - standard_name = ice_nucleation_number + standard_name = ice_nucleation_number_from_climatology long_name = ice nucleation number in MG MP units = kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [npccn_i] - standard_name = tendency_of_ccn_activated_number + standard_name = tendency_of_activated_cloud_condensation_nuclei_from_climatology long_name = tendency of ccn activated number units = kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [iccn] - standard_name = flag_for_in_ccn_forcing_for_morrison_gettelman_microphysics + standard_name = control_for_ice_cloud_condensation_nuclei_forcing long_name = flag for IN and CCN forcing for morrison gettelman microphysics units = none dimensions = () @@ -926,7 +926,7 @@ intent = in optional = F [alf_fac] - standard_name = mg_tuning_factor_for_alphas + standard_name = alpha_tuning_coefficient_for_morrison_gettelman_microphysics_scheme long_name = tuning factor for alphas (alpha = 1 - critical relative humidity) units = none dimensions = () @@ -935,7 +935,7 @@ intent = in optional = F [qc_min] - standard_name = mg_minimum_cloud_condensed_water_and_ice_mixing_ratio + standard_name = minimum_cloud_condensate_mixing_ratio_threshold long_name = minimum cloud condensed water and ice mixing ratio in MG macro clouds units = kg kg-1 dimensions = (2) @@ -944,7 +944,7 @@ intent = in optional = F [pdfflag] - standard_name = flag_for_pdf_for_morrison_gettelman_microphysics_scheme + standard_name = control_for_pdf_shape_for_microphysics long_name = pdf flag for MG macrophysics units = flag dimensions = () @@ -952,7 +952,7 @@ intent = in optional = F [kdt] - standard_name = index_of_time_step + standard_name = index_of_timestep long_name = current forecast iteration units = index dimensions = () @@ -981,7 +981,7 @@ standard_name = critical_relative_humidity long_name = critical relative humidity units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in diff --git a/physics/m_micro_interstitial.F90 b/physics/m_micro_interstitial.F90 index 55b2bbe93..8d0132cf1 100644 --- a/physics/m_micro_interstitial.F90 +++ b/physics/m_micro_interstitial.F90 @@ -169,22 +169,22 @@ subroutine m_micro_post_run( & integer, intent(in) :: im, levs, fprcp logical, intent(in) :: mg3_as_mg2 - real(kind=kind_phys), intent(in ) :: ncpr(1:im,1:levs) - real(kind=kind_phys), intent(in ) :: ncps(1:im,1:levs) - real(kind=kind_phys), intent(in ) :: ncgl(1:im,1:levs) - real(kind=kind_phys), intent(inout) :: qrn(1:im,1:levs) - real(kind=kind_phys), intent(inout) :: qsnw(1:im,1:levs) - real(kind=kind_phys), intent(inout) :: qgl(1:im,1:levs) - real(kind=kind_phys), intent(inout) :: gq0_ice(1:im,1:levs) - real(kind=kind_phys), intent(inout) :: gq0_rain(1:im,1:levs) - real(kind=kind_phys), intent(inout) :: gq0_snow(1:im,1:levs) - real(kind=kind_phys), intent(inout) :: gq0_graupel(1:im,1:levs) - real(kind=kind_phys), intent(inout) :: gq0_rain_nc(1:im,1:levs) - real(kind=kind_phys), intent(inout) :: gq0_snow_nc(1:im,1:levs) - real(kind=kind_phys), intent(inout) :: gq0_graupel_nc(1:im,1:levs) - real(kind=kind_phys), intent( out) :: ice(1:im) - real(kind=kind_phys), intent( out) :: snow(1:im) - real(kind=kind_phys), intent( out) :: graupel(1:im) + real(kind=kind_phys), intent(in ) :: ncpr(:,:) + real(kind=kind_phys), intent(in ) :: ncps(:,:) + real(kind=kind_phys), intent(in ) :: ncgl(:,:) + real(kind=kind_phys), intent(inout) :: qrn(:,:) + real(kind=kind_phys), intent(inout) :: qsnw(:,:) + real(kind=kind_phys), intent(inout) :: qgl(:,:) + real(kind=kind_phys), intent(in ) :: gq0_ice(:,:) + real(kind=kind_phys), intent(out ) :: gq0_rain(:,:) + real(kind=kind_phys), intent(out ) :: gq0_snow(:,:) + real(kind=kind_phys), intent(out ) :: gq0_graupel(:,:) + real(kind=kind_phys), intent(out ) :: gq0_rain_nc(:,:) + real(kind=kind_phys), intent(out ) :: gq0_snow_nc(:,:) + real(kind=kind_phys), intent(out ) :: gq0_graupel_nc(:,:) + real(kind=kind_phys), intent( out) :: ice(:) + real(kind=kind_phys), intent( out) :: snow(:) + real(kind=kind_phys), intent( out) :: graupel(:) real(kind=kind_phys), intent(in ) :: dtp character(len=*), intent(out) :: errmsg diff --git a/physics/m_micro_interstitial.meta b/physics/m_micro_interstitial.meta index 7961cb2db..7894c3d52 100644 --- a/physics/m_micro_interstitial.meta +++ b/physics/m_micro_interstitial.meta @@ -16,7 +16,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical layers units = count dimensions = () @@ -56,73 +56,73 @@ intent = in optional = F [gq0_ice] - standard_name = ice_water_mixing_ratio_updated_by_physics + standard_name = cloud_ice_mixing_ratio_of_new_state long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [gq0_water] - standard_name = cloud_condensed_water_mixing_ratio_updated_by_physics + standard_name = cloud_liquid_water_mixing_ratio_of_new_state long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [gq0_rain] - standard_name = rain_water_mixing_ratio_updated_by_physics + standard_name = rain_mixing_ratio_of_new_state long_name = ratio of mass of rain water to mass of dry air plus vapor (without condensates) updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [gq0_snow] - standard_name = snow_water_mixing_ratio_updated_by_physics + standard_name = snow_mixing_ratio_of_new_state long_name = ratio of mass of snow water to mass of dry air plus vapor (without condensates) updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [gq0_graupel] - standard_name = graupel_mixing_ratio_updated_by_physics + standard_name = graupel_mixing_ratio_of_new_state long_name = ratio of mass of graupel to mass of dry air plus vapor (without condensates) updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [gq0_rain_nc] - standard_name = rain_number_concentration_updated_by_physics + standard_name = mass_number_concentration_of_rain_of_new_state long_name = number concentration of rain updated by physics units = kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [gq0_snow_nc] - standard_name = snow_number_concentration_updated_by_physics + standard_name = mass_number_concentration_of_snow_of_new_state long_name = number concentration of snow updated by physics units = kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [gq0_graupel_nc] - standard_name = graupel_number_concentration_updated_by_physics + standard_name = mass_number_concentration_of_graupel_of_new_state long_name = number concentration of graupel updated by physics units = kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -131,7 +131,7 @@ standard_name = subgrid_scale_cloud_fraction_from_shoc long_name = subgrid-scale cloud fraction from the SHOC scheme units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -140,7 +140,7 @@ standard_name = convective_cloud_cover long_name = convective cloud cover units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -149,7 +149,7 @@ standard_name = convective_cloud_water_mixing_ratio long_name = moist convective cloud water mixing ratio units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -164,7 +164,7 @@ intent = in optional = F [tcrf] - standard_name = cloud_phase_transition_denominator + standard_name = reciprocal_of_cloud_phase_transition_temperature_range long_name = denominator in cloud phase transition = 1/(tcr-tf) units = K-1 dimensions = () @@ -173,10 +173,10 @@ intent = in optional = F [gt0] - standard_name = air_temperature_updated_by_physics + standard_name = air_temperature_of_new_state long_name = temperature updated by physics units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -185,7 +185,7 @@ standard_name = local_rain_water_mixing_ratio long_name = ratio of mass of rain water to mass of dry air plus vapor (without condensates) local to physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -194,7 +194,7 @@ standard_name = local_snow_water_mixing_ratio long_name = ratio of mass of snow water to mass of dry air plus vapor (without condensates) local to physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -203,7 +203,7 @@ standard_name = local_graupel_mixing_ratio long_name = ratio of mass of graupel to mass of dry air plus vapor (without condensates) local to physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -212,7 +212,7 @@ standard_name = local_rain_number_concentration long_name = number concentration of rain local to physics units = kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -221,7 +221,7 @@ standard_name = local_snow_number_concentration long_name = number concentration of snow local to physics units = kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -230,7 +230,7 @@ standard_name = local_graupel_number_concentration long_name = number concentration of graupel local to physics units = kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -239,7 +239,7 @@ standard_name = cloud_fraction_for_MG long_name = cloud fraction used by Morrison-Gettelman MP units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -248,7 +248,7 @@ standard_name = cloud_condensed_water_mixing_ratio_convective_transport_tracer long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -257,7 +257,7 @@ standard_name = ice_water_mixing_ratio_convective_transport_tracer long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -266,7 +266,7 @@ standard_name = convective_cloud_volume_fraction long_name = convective cloud volume fraction units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -308,7 +308,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical layers units = count dimensions = () @@ -335,7 +335,7 @@ standard_name = local_rain_number_concentration long_name = number concentration of rain local to physics units = kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -344,7 +344,7 @@ standard_name = local_snow_number_concentration long_name = number concentration of snow local to physics units = kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -353,7 +353,7 @@ standard_name = local_graupel_number_concentration long_name = number concentration of graupel local to physics units = kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -362,7 +362,7 @@ standard_name = local_rain_water_mixing_ratio long_name = ratio of mass of rain water to mass of dry air plus vapor (without condensates) local to physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -371,7 +371,7 @@ standard_name = local_snow_water_mixing_ratio long_name = ratio of mass of snow water to mass of dry air plus vapor (without condensates) local to physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -380,70 +380,70 @@ standard_name = local_graupel_mixing_ratio long_name = ratio of mass of graupel to mass of dry air plus vapor (without condensates) local to physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [gq0_ice] - standard_name = ice_water_mixing_ratio_updated_by_physics + standard_name = cloud_ice_mixing_ratio_of_new_state long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys - intent = inout + intent = in optional = F [gq0_rain] - standard_name = rain_water_mixing_ratio_updated_by_physics + standard_name = rain_mixing_ratio_of_new_state long_name = ratio of mass of rain water to mass of dry air plus vapor (without condensates) updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [gq0_snow] - standard_name = snow_water_mixing_ratio_updated_by_physics + standard_name = snow_mixing_ratio_of_new_state long_name = ratio of mass of snow water to mass of dry air plus vapor (without condensates) updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [gq0_graupel] - standard_name = graupel_mixing_ratio_updated_by_physics + standard_name = graupel_mixing_ratio_of_new_state long_name = ratio of mass of graupel to mass of dry air plus vapor (without condensates) updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [gq0_rain_nc] - standard_name = rain_number_concentration_updated_by_physics + standard_name = mass_number_concentration_of_rain_of_new_state long_name = number concentration of rain updated by physics units = kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [gq0_snow_nc] - standard_name = snow_number_concentration_updated_by_physics + standard_name = mass_number_concentration_of_snow_of_new_state long_name = number concentration of snow updated by physics units = kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [gq0_graupel_nc] - standard_name = graupel_number_concentration_updated_by_physics + standard_name = mass_number_concentration_of_graupel_of_new_state long_name = number concentration of graupel updated by physics units = kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -476,7 +476,7 @@ intent = out optional = F [dtp] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics timestep units = s dimensions = () diff --git a/physics/maximum_hourly_diagnostics.F90 b/physics/maximum_hourly_diagnostics.F90 index 174e0c95c..1486ac027 100644 --- a/physics/maximum_hourly_diagnostics.F90 +++ b/physics/maximum_hourly_diagnostics.F90 @@ -30,30 +30,34 @@ subroutine maximum_hourly_diagnostics_run(im, levs, reset, lradar, imp_physics, imp_physics_fer_hires,con_g, phil, & gt0, refl_10cm, refdmax, refdmax263k, u10m, v10m, & u10max, v10max, spd10max, pgr, t2m, q2m, t02max, & - t02min, rh02max, rh02min, errmsg, errflg) + t02min, rh02max, rh02min, dtp, rain, pratemax, & + errmsg, errflg) ! Interface variables integer, intent(in) :: im, levs logical, intent(in) :: reset, lradar integer, intent(in) :: imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_fer_hires real(kind_phys), intent(in ) :: con_g - real(kind_phys), intent(in ) :: phil(im,levs) - real(kind_phys), intent(in ) :: gt0(im,levs) - real(kind_phys), intent(in ) :: refl_10cm(im,levs) - real(kind_phys), intent(inout) :: refdmax(im) - real(kind_phys), intent(inout) :: refdmax263k(im) - real(kind_phys), intent(in ) :: u10m(im) - real(kind_phys), intent(in ) :: v10m(im) - real(kind_phys), intent(inout) :: u10max(im) - real(kind_phys), intent(inout) :: v10max(im) - real(kind_phys), intent(inout) :: spd10max(im) - real(kind_phys), intent(in ) :: pgr(im) - real(kind_phys), intent(in ) :: t2m(im) - real(kind_phys), intent(in ) :: q2m(im) - real(kind_phys), intent(inout) :: t02max(im) - real(kind_phys), intent(inout) :: t02min(im) - real(kind_phys), intent(inout) :: rh02max(im) - real(kind_phys), intent(inout) :: rh02min(im) + real(kind_phys), intent(in ) :: phil(:,:) + real(kind_phys), intent(in ) :: gt0(:,:) + real(kind_phys), intent(in ) :: refl_10cm(:,:) + real(kind_phys), intent(inout) :: refdmax(:) + real(kind_phys), intent(inout) :: refdmax263k(:) + real(kind_phys), intent(in ) :: u10m(:) + real(kind_phys), intent(in ) :: v10m(:) + real(kind_phys), intent(inout) :: u10max(:) + real(kind_phys), intent(inout) :: v10max(:) + real(kind_phys), intent(inout) :: spd10max(:) + real(kind_phys), intent(in ) :: pgr(:) + real(kind_phys), intent(in ) :: t2m(:) + real(kind_phys), intent(in ) :: q2m(:) + real(kind_phys), intent(inout) :: t02max(:) + real(kind_phys), intent(inout) :: t02min(:) + real(kind_phys), intent(inout) :: rh02max(:) + real(kind_phys), intent(inout) :: rh02min(:) + real(kind_phys), intent(in ) :: dtp + real(kind_phys), intent(in ) :: rain(im) + real(kind_phys), intent(inout) :: pratemax(im) character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -96,6 +100,7 @@ subroutine maximum_hourly_diagnostics_run(im, levs, reset, lradar, imp_physics, t02min(i) = 999. rh02max(i) = -999. rh02min(i) = 999. + pratemax(i) = 0. enddo endif do i=1,im @@ -119,6 +124,7 @@ subroutine maximum_hourly_diagnostics_run(im, levs, reset, lradar, imp_physics, rh02min(i) = min(rh02min(i),rh02) t02max(i) = max(t02max(i),t2m(i)) !<--- hourly max 2m t t02min(i) = min(t02min(i),t2m(i)) !<--- hourly min 2m t + pratemax(i) = max(pratemax(i),(3.6E6/dtp)*rain(i)) enddo end subroutine maximum_hourly_diagnostics_run @@ -126,12 +132,12 @@ end subroutine maximum_hourly_diagnostics_run subroutine max_fields(phil,ref3D,grav,im,levs,refd,tk,refd263k) integer, intent(in) :: im,levs real (kind=kind_phys), intent(in) :: grav - real (kind=kind_phys), intent(in),dimension(im,levs) :: phil,ref3D,tk + real (kind=kind_phys), intent(in),dimension(:,:) :: phil,ref3D,tk integer :: i,k,ll,ipt,kpt real :: dbz1avg,zmidp1,zmidloc,refl,fact real, dimension(im,levs) :: z real, dimension(im) :: zintsfc - real, dimension(im), intent(inout) :: refd,refd263k + real, dimension(:), intent(inout) :: refd,refd263k REAL :: dbz1(2),dbzk,dbzk1 logical :: counter do i=1,im diff --git a/physics/maximum_hourly_diagnostics.meta b/physics/maximum_hourly_diagnostics.meta index 67b3df039..140c6390a 100644 --- a/physics/maximum_hourly_diagnostics.meta +++ b/physics/maximum_hourly_diagnostics.meta @@ -16,7 +16,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () @@ -40,7 +40,7 @@ intent = in optional = F [imp_physics] - standard_name = flag_for_microphysics_scheme + standard_name = control_for_microphysics_scheme long_name = choice of microphysics scheme units = flag dimensions = () @@ -48,7 +48,7 @@ intent = in optional = F [imp_physics_gfdl] - standard_name = flag_for_gfdl_microphysics_scheme + standard_name = identifier_for_gfdl_microphysics_scheme long_name = choice of GFDL microphysics scheme units = flag dimensions = () @@ -56,7 +56,7 @@ intent = in optional = F [imp_physics_thompson] - standard_name = flag_for_thompson_microphysics_scheme + standard_name = identifier_for_thompson_microphysics_scheme long_name = choice of Thompson microphysics scheme units = flag dimensions = () @@ -64,7 +64,7 @@ intent = in optional = F [imp_physics_fer_hires] - standard_name = flag_for_fer_hires_microphysics_scheme + standard_name = identifier_for_fer_hires_microphysics_scheme long_name = choice of Ferrier-Aligo microphysics scheme units = flag dimensions = () @@ -84,16 +84,16 @@ standard_name = geopotential long_name = geopotential at model layer centers units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [gt0] - standard_name = air_temperature_updated_by_physics + standard_name = air_temperature_of_new_state long_name = temperature updated by physics units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -102,7 +102,7 @@ standard_name = radar_reflectivity_10cm long_name = instantaneous refl_10cm units = dBZ - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -180,7 +180,7 @@ intent = in optional = F [t2m] - standard_name = temperature_at_2m + standard_name = air_temperature_at_2m long_name = 2 meter temperature units = K dimensions = (horizontal_loop_extent) @@ -233,6 +233,33 @@ kind = kind_phys intent = inout optional = F +[dtp] + standard_name = timestep_for_physics + long_name = physics timestep + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[rain] + standard_name = lwe_thickness_of_precipitation_amount_on_dynamics_timestep + long_name = total rain at this time step + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[pratemax] + standard_name = maximum_precipitation_rate_over_maximum_hourly_time_interval + long_name = maximum precipitation rate over maximum hourly time interval + units = mm h-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/mfpbltq.f b/physics/mfpbltq.f index a6fc22cef..b906052cd 100644 --- a/physics/mfpbltq.f +++ b/physics/mfpbltq.f @@ -40,12 +40,13 @@ subroutine mfpbltq(im,ix,km,kmpbl,ntcw,ntrac1,delt, c local variables and arrays ! integer i, j, k, n, ndc + integer kpblx(im), kpbly(im) ! real(kind=kind_phys) dt2, dz, ce0, cm, & factor, gocp, & g, b1, f1, & bb1, bb2, - & a1, pgcon, + & alp, vpertmax,a1, pgcon, & qmin, qlmin, xmmx, rbint, & tem, tem1, tem2, & ptem, ptem1, ptem2 @@ -54,7 +55,8 @@ subroutine mfpbltq(im,ix,km,kmpbl,ntcw,ntrac1,delt, & tlu, gamma, qlu, & thup, thvu, dq ! - real(kind=kind_phys) rbdn(im), rbup(im), xlamuem(im,km-1) + real(kind=kind_phys) rbdn(im), rbup(im), hpblx(im), + & xlamuem(im,km-1) real(kind=kind_phys) delz(im), xlamax(im) ! real(kind=kind_phys) wu2(im,km), thlu(im,km), @@ -71,7 +73,7 @@ subroutine mfpbltq(im,ix,km,kmpbl,ntcw,ntrac1,delt, parameter(elocp=hvap/cp,el2orc=hvap*hvap/(rv*cp)) parameter(ce0=0.4,cm=1.0) parameter(qmin=1.e-8,qlmin=1.e-12) - parameter(pgcon=0.55) + parameter(alp=1.5,vpertmax=3.0,pgcon=0.55) parameter(b1=0.5,f1=0.15) ! !************************************************************************ @@ -99,9 +101,11 @@ subroutine mfpbltq(im,ix,km,kmpbl,ntcw,ntrac1,delt, ! do i=1,im if(cnvflg(i)) then - thlu(i,1)= thlx(i,1) + vpert(i) + ptem = alp * vpert(i) + ptem = min(ptem, vpertmax) + thlu(i,1)= thlx(i,1) + ptem qtu(i,1) = qtx(i,1) - buo(i,1) = g * vpert(i) / thvx(i,1) + buo(i,1) = g * ptem / thvx(i,1) endif enddo ! @@ -213,6 +217,8 @@ subroutine mfpbltq(im,ix,km,kmpbl,ntcw,ntrac1,delt, ! do i=1,im flg(i) = .true. + kpblx(i) = 1 + kpbly(i) = kpbl(i) if(cnvflg(i)) then flg(i) = .false. rbup(i) = wu2(i,1) @@ -223,14 +229,14 @@ subroutine mfpbltq(im,ix,km,kmpbl,ntcw,ntrac1,delt, if(.not.flg(i)) then rbdn(i) = rbup(i) rbup(i) = wu2(i,k) - kpbl(i)= k + kpblx(i)= k flg(i) = rbup(i).le.0. endif enddo enddo do i = 1,im if(cnvflg(i)) then - k = kpbl(i) + k = kpblx(i) if(rbdn(i) <= 0.) then rbint = 0. elseif(rbup(i) >= 0.) then @@ -238,7 +244,17 @@ subroutine mfpbltq(im,ix,km,kmpbl,ntcw,ntrac1,delt, else rbint = rbdn(i)/(rbdn(i)-rbup(i)) endif - hpbl(i) = zm(i,k-1) + rbint*(zm(i,k)-zm(i,k-1)) + hpblx(i) = zm(i,k-1) + rbint*(zm(i,k)-zm(i,k-1)) + endif + enddo +! + do i = 1,im + if(cnvflg(i)) then + if(kpblx(i) < kpbl(i)) then + kpbl(i) = kpblx(i) + hpbl(i) = hpblx(i) + endif + if(kpbl(i) <= 1) cnvflg(i)=.false. endif enddo ! @@ -255,7 +271,8 @@ subroutine mfpbltq(im,ix,km,kmpbl,ntcw,ntrac1,delt, ! do k = 1, kmpbl do i=1,im - if(cnvflg(i)) then + if(cnvflg(i) .and. kpblx(i) < kpbly(i)) then +! if(cnvflg(i)) then if(k < kpbl(i)) then ptem = 1./(zm(i,k)+delz(i)) tem = max((hpbl(i)-zm(i,k)+delz(i)) ,delz(i)) diff --git a/physics/micro_mg2_0.F90 b/physics/micro_mg2_0.F90 index 744b46ebc..73c46392d 100644 --- a/physics/micro_mg2_0.F90 +++ b/physics/micro_mg2_0.F90 @@ -1792,7 +1792,7 @@ subroutine micro_mg_tend ( & nnucct(i,k) = ratio * nnucct(i,k) npsacws(i,k) = ratio * npsacws(i,k) nsubc(i,k) = ratio * nsubc(i,k) - end if + endif mnuccri(i,k) = zero nnuccri(i,k) = zero @@ -1800,15 +1800,17 @@ subroutine micro_mg_tend ( & if (do_cldice) then ! freezing of rain to produce ice if mean rain size is smaller than Dcs - if (lamr(i,k) > qsmall .and. one/lamr(i,k) < Dcs) then - mnuccri(i,k) = mnuccr(i,k) - nnuccri(i,k) = nnuccr(i,k) - mnuccr(i,k) = zero - nnuccr(i,k) = zero - end if - end if + if (lamr(i,k) > qsmall) then + if (one/lamr(i,k) < Dcs) then + mnuccri(i,k) = mnuccr(i,k) + nnuccri(i,k) = nnuccr(i,k) + mnuccr(i,k) = zero + nnuccr(i,k) = zero + endif + endif + endif - end do + enddo do i=1,mgncol diff --git a/physics/micro_mg3_0.F90 b/physics/micro_mg3_0.F90 index 636293b86..dde143c4d 100644 --- a/physics/micro_mg3_0.F90 +++ b/physics/micro_mg3_0.F90 @@ -2448,7 +2448,7 @@ subroutine micro_mg_tend ( & nnucct(i,k) = ratio * nnucct(i,k) npsacws(i,k) = ratio * npsacws(i,k) nsubc(i,k) = ratio * nsubc(i,k) - end if + endif mnuccri(i,k) = zero nnuccri(i,k) = zero @@ -2456,15 +2456,17 @@ subroutine micro_mg_tend ( & if (do_cldice) then ! freezing of rain to produce ice if mean rain size is smaller than Dcs - if (lamr(i,k) > qsmall .and. one/lamr(i,k) < Dcs) then - mnuccri(i,k) = mnuccr(i,k) - nnuccri(i,k) = nnuccr(i,k) - mnuccr(i,k) = zero - nnuccr(i,k) = zero - end if - end if + if (lamr(i,k) > qsmall) then + if (one/lamr(i,k) < Dcs) then + mnuccri(i,k) = mnuccr(i,k) + nnuccri(i,k) = nnuccr(i,k) + mnuccr(i,k) = zero + nnuccr(i,k) = zero + endif + endif + endif - end do + enddo do i=1,mgncol diff --git a/physics/module_MYJPBL_wrapper.F90 b/physics/module_MYJPBL_wrapper.F90 index 5924de96f..9010b4cdb 100644 --- a/physics/module_MYJPBL_wrapper.F90 +++ b/physics/module_MYJPBL_wrapper.F90 @@ -8,7 +8,22 @@ MODULE myjpbl_wrapper contains - subroutine myjpbl_wrapper_init () + subroutine myjpbl_wrapper_init (do_myjpbl,errmsg,errflg) + + logical, intent(in) :: do_myjpbl + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + ! Consistency checks + if (.not. do_myjpbl) then + write(errmsg,fmt='(*(a))') 'Logic error: do_myjpbl=.false.' + errflg = 1 + return + end if end subroutine myjpbl_wrapper_init subroutine myjpbl_wrapper_finalize () @@ -40,9 +55,10 @@ SUBROUTINE myjpbl_wrapper_run( & & dusfc,dvsfc,dtsfc,dqsfc, & & dkt,xkzm_m, xkzm_h,xkzm_s, gamt,gamq, & & con_cp,con_g,con_rd, & - & me, lprnt, dt3dt_PBL, du3dt_PBL, dv3dt_PBL, & - & dq3dt_PBL, gen_tend, ldiag3d, qdiag3d, & - & errmsg, errflg ) + & me, lprnt, gen_tend, ldiag3d, dtend, dtidx, & + & index_of_temperature, index_of_x_wind, & + & index_of_y_wind, index_of_process_pbl, & + & ntqv, errmsg, errflg ) ! @@ -77,47 +93,50 @@ SUBROUTINE myjpbl_wrapper_run( & character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg + real(kind=kind_phys), intent(inout), optional :: dtend(:,:,:) + integer, intent(in) :: dtidx(:,:) + integer, intent(in) :: index_of_temperature, index_of_x_wind, & + & index_of_y_wind, index_of_process_pbl, ntqv + !MYJ-1D integer,intent(in) :: im, levs integer,intent(in) :: kdt, me integer,intent(in) :: ntrac,ntke,ntcw,ntiw,ntrw,ntsw,ntgl - logical,intent(in) :: restart,do_myjsfc,lprnt,ldiag3d,qdiag3d,gen_tend + logical,intent(in) :: restart,do_myjsfc,lprnt,ldiag3d,gen_tend real(kind=kind_phys),intent(in) :: con_cp, con_g, con_rd real(kind=kind_phys),intent(in) :: dt_phs, xkzm_m, xkzm_h, xkzm_s !MYJ-2D - real(kind=kind_phys),dimension(im),intent(in) :: & - & prsik_1, prslk_1, prslki, slmsk, garea, & + real(kind=kind_phys),dimension(:),intent(in) :: & + & prsik_1, prslk_1, prslki, slmsk, garea, & snowd, evap, hflx, cm, ch, wind, hprime1 - real(kind=kind_phys),dimension(im),intent(inout) :: & - & pblh, zorl, ustar, tsfc, qsfc - real(kind=kind_phys),dimension(im),intent(inout) :: & - & phy_myj_qsfc, phy_myj_thz0, phy_myj_qz0, & - & phy_myj_uz0, phy_myj_vz0, phy_myj_z0base, & - & phy_myj_akhs, phy_myj_akms, & - & phy_myj_chkqlm, phy_myj_elflx, & + real(kind=kind_phys),dimension(:),intent(inout) :: & + & zorl, ustar, tsfc, qsfc + real(kind=kind_phys),dimension(:),intent(inout) :: & + & phy_myj_qsfc, phy_myj_thz0, phy_myj_qz0, & + & phy_myj_uz0, phy_myj_vz0, phy_myj_z0base, & + & phy_myj_akhs, phy_myj_akms, & + & phy_myj_chkqlm, phy_myj_elflx, & & phy_myj_a1u, phy_myj_a1t, phy_myj_a1q - real(kind=kind_phys),dimension(im),intent(out) :: & - & dusfc,dvsfc,dtsfc,dqsfc,gamt,gamq - integer,dimension(im),intent(out) :: kpbl - integer,dimension(im),intent(in) :: kinver + real(kind=kind_phys),dimension(:),intent(out) :: & + & pblh,dusfc,dvsfc,dtsfc,dqsfc,gamt,gamq + integer,dimension(:),intent(out) :: kpbl + integer,dimension(:),intent(in) :: kinver !MYJ-3D - real(kind=kind_phys),dimension(im,levs+1),intent(in) :: & + real(kind=kind_phys),dimension(:,:),intent(in) :: & phii, prsi - real(kind=kind_phys),dimension(im,levs),intent(in) :: & + real(kind=kind_phys),dimension(:,:),intent(in) :: & & ugrs, vgrs, tgrs, prsl -! real(kind=kind_phys),dimension(im,levs),intent(inout) :: & +! real(kind=kind_phys),dimension(:,:),intent(inout) :: & ! dudt, dvdt, dtdt, dkt - real(kind=kind_phys),dimension(im,levs),intent(inout) :: & + real(kind=kind_phys),dimension(:,:),intent(inout) :: & dudt, dvdt, dtdt - real(kind=kind_phys),dimension(im,levs-1),intent(out) :: & + real(kind=kind_phys),dimension(:,:),intent(out) :: & dkt - real(kind=kind_phys),dimension(:,:),intent(inout) :: & - du3dt_PBL, dv3dt_PBL, dt3dt_PBL, dq3dt_PBL !MYJ-4D - real(kind=kind_phys),dimension(im,levs,ntrac),intent(inout) :: & + real(kind=kind_phys),dimension(:,:,:),intent(inout) :: & & qgrs,dqdt !LOCAL @@ -158,6 +177,7 @@ SUBROUTINE myjpbl_wrapper_run( & ! real(kind=kind_phys), dimension(im,levs,ntrac) :: & ! & qgrs_myj real(kind=kind_phys),dimension(im,levs) :: dkt2 + integer :: uidx, vidx, tidx, qidx ! Initialize CCPP error handling variables errmsg = '' @@ -553,12 +573,12 @@ SUBROUTINE myjpbl_wrapper_run( & ! end do end do - dkt2=0. + dkt=0. do k=1,levs k1=levs-k+1 do i=1,im -! dkt2(i,k)=max(xcofh(i,k1),xkzo(i,k)) - dkt2(i,k)=xcofh(i,k1) +! dkt(i,k)=max(xcofh(i,k1),xkzo(i,k)) + dkt(i,k)=xcofh(i,k1) end do end do if(ntke.gt.0)then @@ -581,22 +601,19 @@ SUBROUTINE myjpbl_wrapper_run( & end do end do if (ldiag3d .and. .not. gen_tend) then + uidx = dtidx(index_of_x_wind,index_of_process_pbl) + vidx = dtidx(index_of_y_wind,index_of_process_pbl) + tidx = dtidx(index_of_temperature,index_of_process_pbl) + qidx = dtidx(ntqv+100,index_of_process_pbl) + ! NOTE: The code that was here before was wrong. It replaced the + ! cumulative value with the instantaneous value. do k=1,levs k1=levs+1-k - do i=1,im - du3dt_PBL(i,k) = rublten(i,k1)*dt_phs - dv3dt_PBL(i,k) = rvblten(i,k1)*dt_phs - dt3dt_PBL(i,k) = rthblten(i,k1)*exner(i,k1)*dt_phs - end do + if(uidx>=1) dtend(:,k,uidx)=dtend(:,k,uidx)+rublten(:,k1)*dt_phs + if(vidx>=1) dtend(:,k,vidx)=dtend(:,k,vidx)+rvblten(:,k1)*dt_phs + if(tidx>=1) dtend(:,k,tidx)=dtend(:,k,tidx)+rthblten(:,k1)*exner(:,k1)*dt_phs + if(qidx>=1) dtend(:,k,qidx)=dtend(:,k,qidx)+rqvblten(:,k1)*dt_phs end do - if (qdiag3d) then - do k=1,levs - k1=levs+1-k - do i=1,im - dq3dt_PBL(i,k) = rqvblten(i,k1)*dt_phs - end do - end do - end if end if if (lprnt1) then @@ -662,7 +679,7 @@ SUBROUTINE myjpbl_wrapper_run( & q2(i,k) end do do k=1,levs - print*,'xcofh,el_myj,dkt2=',k,xcofh(i,k),el_myj(i,k),dkt2(i,k) + print*,'xcofh,el_myj,dkt=',k,xcofh(i,k),el_myj(i,k),dkt(i,k) end do end if @@ -805,9 +822,6 @@ SUBROUTINE myjpbl_wrapper_run( & ! print* ! endif - ! External dkt has dimensions (1:im,1:levs-1) - dkt(1:im,1:levs-1) = dkt2(1:im,1:levs-1) - END SUBROUTINE myjpbl_wrapper_run !###================================================================= diff --git a/physics/module_MYJPBL_wrapper.meta b/physics/module_MYJPBL_wrapper.meta index 758dfb77b..08ac65749 100644 --- a/physics/module_MYJPBL_wrapper.meta +++ b/physics/module_MYJPBL_wrapper.meta @@ -3,6 +3,36 @@ type = scheme dependencies = module_BL_MYJPBL.F90 +######################################################################## +[ccpp-arg-table] + name = myjpbl_wrapper_init + type = scheme +[do_myjpbl] + standard_name = flag_for_mellor_yamada_janic_pbl_scheme + long_name = flag to activate MYJ PBL scheme + units = flag + dimensions = () + type = logical + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + ######################################################################## [ccpp-arg-table] name = myjpbl_wrapper_run @@ -16,7 +46,7 @@ intent = in optional = F [do_myjsfc] - standard_name = do_myjsfc + standard_name = flag_for_mellor_yamada_janic_surface_layer_scheme long_name = flag for MYJ surface layer scheme units = flag dimensions = () @@ -32,7 +62,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -40,7 +70,7 @@ intent = in optional = F [dt_phs] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = time step for physics units = s dimensions = () @@ -49,7 +79,7 @@ intent = in optional = F [kdt] - standard_name = index_of_time_step + standard_name = index_of_timestep long_name = current time step index units = index dimensions = () @@ -65,7 +95,7 @@ intent = in optional = F [ntke] - standard_name = index_for_turbulent_kinetic_energy + standard_name = index_of_turbulent_kinetic_energy_in_tracer_concentration_array long_name = tracer index for turbulent kinetic energy units = index dimensions = () @@ -73,7 +103,7 @@ intent = in optional = F [ntcw] - standard_name = index_for_liquid_cloud_condensate + standard_name = index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array long_name = cloud condensate index in tracer array units = index dimensions = () @@ -81,7 +111,7 @@ intent = in optional = F [ntiw] - standard_name = index_for_ice_cloud_condensate + standard_name = index_of_cloud_ice_mixing_ratio_in_tracer_concentration_array long_name = tracer index for ice water units = index dimensions = () @@ -89,7 +119,7 @@ intent = in optional = F [ntrw] - standard_name = index_for_rain_water + standard_name = index_of_rain_mixing_ratio_in_tracer_concentration_array long_name = tracer index for rain water units = index dimensions = () @@ -97,7 +127,7 @@ intent = in optional = F [ntsw] - standard_name = index_for_snow_water + standard_name = index_of_snow_mixing_ratio_in_tracer_concentration_array long_name = tracer index for snow water units = index dimensions = () @@ -105,7 +135,7 @@ intent = in optional = F [ntgl] - standard_name = index_for_graupel + standard_name = index_of_graupel_mixing_ratio_in_tracer_concentration_array long_name = tracer index for graupel units = index dimensions = () @@ -116,7 +146,7 @@ standard_name = x_wind long_name = x component of layer wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -125,7 +155,7 @@ standard_name = y_wind long_name = y component of layer wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -134,7 +164,7 @@ standard_name = air_temperature long_name = layer mean air temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -143,7 +173,7 @@ standard_name = vertically_diffused_tracer_concentration long_name = tracer concentration diffused by PBL scheme units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_vertical_diffusion_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_vertical_diffusion_tracers) type = real kind = kind_phys intent = inout @@ -152,7 +182,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -161,7 +191,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -170,14 +200,14 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in optional = F [hprime1] standard_name = standard_deviation_of_subgrid_orography - long_name = standard deviation of subgrid orography + long_name = standard deviation of subgrid height_above_mean_sea_level units = m dimensions = (horizontal_loop_extent) type = real @@ -185,7 +215,7 @@ intent = in optional = F [prsik_1] - standard_name = dimensionless_exner_function_at_lowest_model_interface + standard_name = surface_dimensionless_exner_function long_name = dimensionless Exner function at lowest model interface units = none dimensions = (horizontal_loop_extent) @@ -194,7 +224,7 @@ intent = in optional = F [prslk_1] - standard_name = dimensionless_exner_function_at_lowest_model_layer + standard_name = dimensionless_exner_function_at_surface_adjacent_layer long_name = dimensionless Exner function at lowest model layer units = none dimensions = (horizontal_loop_extent) @@ -239,7 +269,7 @@ intent = inout optional = F [phy_myj_thz0] - standard_name = potential_temperature_at_viscous_sublayer_top + standard_name = air_potential_temperature_at_top_of_viscous_sublayer long_name = potential temperat at viscous sublayer top over water units = K dimensions = (horizontal_loop_extent) @@ -248,7 +278,7 @@ intent = inout optional = F [phy_myj_qz0] - standard_name = specific_humidity_at_viscous_sublayer_top + standard_name = specific_humidity_at_top_of_viscous_sublayer long_name = specific humidity at_viscous sublayer top over water units = kg kg-1 dimensions = (horizontal_loop_extent) @@ -257,7 +287,7 @@ intent = inout optional = F [phy_myj_uz0] - standard_name = u_wind_component_at_viscous_sublayer_top + standard_name = x_wind_at_top_of_viscous_sublayer long_name = u wind component at viscous sublayer top over water units = m s-1 dimensions = (horizontal_loop_extent) @@ -266,7 +296,7 @@ intent = inout optional = F [phy_myj_vz0] - standard_name = v_wind_component_at_viscous_sublayer_top + standard_name = y_wind_at_top_of_viscous_sublayer long_name = v wind component at viscous sublayer top over water units = m s-1 dimensions = (horizontal_loop_extent) @@ -302,7 +332,7 @@ intent = inout optional = F [phy_myj_chkqlm] - standard_name = surface_layer_evaporation_switch + standard_name = control_for_surface_layer_evaporation long_name = surface layer evaporation switch units = none dimensions = (horizontal_loop_extent) @@ -311,7 +341,7 @@ intent = inout optional = F [phy_myj_elflx] - standard_name = kinematic_surface_latent_heat_flux + standard_name = surface_upward_specific_humidity_flux_for_mellor_yamada_janic_surface_layer_scheme long_name = kinematic surface latent heat flux units = m s-1 kg kg-1 dimensions = (horizontal_loop_extent) @@ -320,7 +350,7 @@ intent = inout optional = F [phy_myj_a1u] - standard_name = weight_for_momentum_at_viscous_sublayer_top + standard_name = weight_for_momentum_at_top_of_viscous_sublayer long_name = Weight for momentum at viscous layer top units = none dimensions = (horizontal_loop_extent) @@ -329,7 +359,7 @@ intent = inout optional = F [phy_myj_a1t] - standard_name = weight_for_potental_temperature_at_viscous_sublayer_top + standard_name = weight_for_potental_temperature_at_top_of_viscous_sublayer long_name = Weight for potental temperature at viscous layer top units = none dimensions = (horizontal_loop_extent) @@ -338,7 +368,7 @@ intent = inout optional = F [phy_myj_a1q] - standard_name = weight_for_specific_humidity_at_viscous_sublayer_top + standard_name = weight_for_specific_humidity_at_top_of_viscous_sublayer long_name = Weight for Specfic Humidity at viscous layer top units = none dimensions = (horizontal_loop_extent) @@ -372,7 +402,7 @@ intent = in optional = F [slmsk] - standard_name = sea_land_ice_mask_real + standard_name = area_type long_name = landmask: sea/land/ice=0/1/2 units = flag dimensions = (horizontal_loop_extent) @@ -405,7 +435,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = inout + intent = in optional = F [ch] standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air @@ -414,7 +444,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = inout + intent = in optional = F [wind] standard_name = wind_speed_at_lowest_model_layer @@ -426,7 +456,7 @@ intent = in optional = F [snowd] - standard_name = surface_snow_thickness_water_equivalent + standard_name = lwe_surface_snow long_name = water equivalent snow depth over land units = mm dimensions = (horizontal_loop_extent) @@ -443,47 +473,47 @@ kind = kind_phys intent = inout optional = F -[hflx] - standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness - long_name = kinematic surface upward sensible heat flux - units = K m s-1 +[evap] + standard_name = surface_upward_specific_humidity_flux + long_name = kinematic surface upward latent heat flux + units = kg kg-1 m s-1 dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in optional = F -[evap] - standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness - long_name = kinematic surface upward latent heat flux - units = kg kg-1 m s-1 +[hflx] + standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness_and_vegetation + long_name = kinematic surface upward sensible heat flux reduced by surface roughness and vegetation + units = K m s-1 dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in optional = F [dudt] - standard_name = tendency_of_x_wind_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_x_wind long_name = updated tendency of the x wind units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [dvdt] - standard_name = tendency_of_y_wind_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_y_wind long_name = updated tendency of the y wind units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [dtdt] - standard_name = tendency_of_air_temperature_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_air_temperature long_name = updated tendency of the temperature units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -492,7 +522,7 @@ standard_name = tendency_of_vertically_diffused_tracer_concentration long_name = updated tendency of the tracers PBL vertical diff units = kg kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_vertical_diffusion_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_vertical_diffusion_tracers) type = real kind = kind_phys intent = inout @@ -535,15 +565,15 @@ optional = F [dkt] standard_name = atmosphere_heat_diffusivity - long_name = diffusivity for heat + long_name = atmospheric heat diffusivity units = m2 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension_minus_one) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [xkzm_m] - standard_name = atmosphere_momentum_diffusivity_background + standard_name = atmosphere_momentum_diffusivity_due_to_background long_name = background value of momentum diffusivity units = m2 s-1 dimensions = () @@ -552,7 +582,7 @@ intent = in optional = F [xkzm_h] - standard_name = atmosphere_heat_diffusivity_background + standard_name = atmosphere_heat_diffusivity_due_to_background long_name = background value of heat diffusivity units = m2 s-1 dimensions = () @@ -561,7 +591,7 @@ intent = in optional = F [xkzm_s] - standard_name = diffusivity_background_sigma_level + standard_name = sigma_pressure_threshold_at_upper_extent_of_background_diffusion long_name = sigma level threshold for background diffusivity units = none dimensions = () @@ -576,7 +606,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = inout + intent = out optional = F [gamq] standard_name = countergradient_mixing_term_for_water_vapor @@ -585,7 +615,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = inout + intent = out optional = F [con_cp] standard_name = specific_heat_of_dry_air_at_constant_pressure @@ -606,7 +636,7 @@ intent = in optional = F [con_rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -630,59 +660,77 @@ type = logical intent = in optional = F -[dt3dt_PBL] - standard_name = cumulative_change_in_temperature_due_to_PBL - long_name = cumulative change in temperature due to PBL - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[du3dt_PBL] - standard_name = cumulative_change_in_x_wind_due_to_PBL - long_name = cumulative change in x wind due to PBL - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[dv3dt_PBL] - standard_name = cumulative_change_in_y_wind_due_to_PBL - long_name = cumulative change in y wind due to PBL - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[dq3dt_PBL] - standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL - long_name = cumulative change in water vapor specific humidity due to PBL - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) +[dtend] + standard_name = cumulative_change_of_state_variables + long_name = diagnostic tendencies for state variables + units = various + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_cumulative_change_processes) type = real kind = kind_phys intent = inout + optional = F +[dtidx] + standard_name = cumulative_change_of_state_variables_outer_index + long_name = index of state-variable and process in last dimension of diagnostic tendencies array AKA cumulative_change_index + units = index + dimensions = (number_of_tracers_plus_one_hundred,number_of_cumulative_change_processes) + type = integer + intent = in + optional = F +[index_of_temperature] + standard_name = index_of_temperature_in_cumulative_change_index + long_name = index of temperature in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_x_wind] + standard_name = index_of_x_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_y_wind] + standard_name = index_of_y_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_process_pbl] + standard_name = index_of_subgrid_scale_vertical_mixing_process_in_cumulative_change_index + long_name = index of subgrid scale vertical mixing process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntqv] + standard_name = index_of_specific_humidity_in_tracer_concentration_array + long_name = tracer index for water vapor (specific humidity) + units = index + dimensions = () + type = integer + intent = in + optional = F [gen_tend] - standard_name = flag_for_generic_planetary_boundary_layer_tendency + standard_name = flag_for_generic_tendency_due_to_planetary_boundary_layer long_name = true if GFS_PBL_generic should calculate tendencies units = flag dimensions = () type = logical intent = in [ldiag3d] - standard_name = flag_diagnostics_3D + standard_name = flag_for_diagnostics_3D long_name = flag for 3d diagnostic fields units = flag dimensions = () type = logical intent = in -[qdiag3d] - standard_name = flag_tracer_diagnostics_3D - long_name = flag for 3d tracer diagnostic fields - units = flag - dimensions = () - type = logical - intent = in [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/module_MYJSFC_wrapper.F90 b/physics/module_MYJSFC_wrapper.F90 index e3dcf4111..3d2b2e017 100644 --- a/physics/module_MYJSFC_wrapper.F90 +++ b/physics/module_MYJSFC_wrapper.F90 @@ -8,7 +8,23 @@ MODULE myjsfc_wrapper contains - subroutine myjsfc_wrapper_init () + subroutine myjsfc_wrapper_init (do_myjsfc, & + & errmsg,errflg) + + logical, intent(in) :: do_myjsfc + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + ! Consistency checks + if (.not. do_myjsfc) then + write(errmsg,fmt='(*(a))') 'Logic error: do_myjsfc = .false.' + errflg = 1 + return + end if end subroutine myjsfc_wrapper_init subroutine myjsfc_wrapper_finalize () @@ -91,22 +107,22 @@ SUBROUTINE myjsfc_wrapper_run( & real(kind=kind_phys),intent(in) :: con_cp, con_g, con_rd !MYJ-2D - logical,dimension(im),intent(in) :: flag_iter - real(kind=kind_phys),dimension(im),intent(in) :: & + logical,dimension(:),intent(in) :: flag_iter + real(kind=kind_phys),dimension(:),intent(in) :: & & prsik_1, prslk_1, tsfc, qsfc, slmsk - real(kind=kind_phys),dimension(im),intent(inout) :: & + real(kind=kind_phys),dimension(:),intent(inout) :: & & phy_myj_qsfc, phy_myj_thz0, phy_myj_qz0, & & phy_myj_uz0, phy_myj_vz0, phy_myj_z0base, & & phy_myj_akhs, phy_myj_akms, & & phy_myj_chkqlm, phy_myj_elflx, & & phy_myj_a1u, phy_myj_a1t, phy_myj_a1q - real(kind=kind_phys),dimension(im),intent(inout) :: & + real(kind=kind_phys),dimension(:),intent(inout) :: & & pblh, zorl, ustar, rib - real(kind=kind_phys),dimension(im),intent(out) :: & + real(kind=kind_phys),dimension(:),intent(inout) :: & & cm, ch, stress, ffm, ffh, fm10, fh2 - real(kind=kind_phys), dimension(im), intent(inout) :: & + real(kind=kind_phys), dimension(:), intent(inout) :: & & landfrac, lakefrac, oceanfrac, fice - real(kind=kind_phys), dimension(im), intent(inout) :: & + real(kind=kind_phys), dimension(:), intent(inout) :: & & z0rl_wat, z0rl_lnd, z0rl_ice, & & ustar_wat, ustar_lnd, ustar_ice, & & cm_wat, cm_lnd, cm_ice, & @@ -121,12 +137,12 @@ SUBROUTINE myjsfc_wrapper_run( & !MYJ-3D - real(kind=kind_phys),dimension(im,levs+1),intent(in) :: & + real(kind=kind_phys),dimension(:,:),intent(in) :: & phii, prsi - real(kind=kind_phys),dimension(im,levs),intent(in) :: & + real(kind=kind_phys),dimension(:,:),intent(in) :: & & ugrs, vgrs, tgrs, prsl !MYJ-4D - real(kind=kind_phys),dimension(im,levs,ntrac),intent(in) :: & + real(kind=kind_phys),dimension(:,:,:),intent(in) :: & & qgrs !LOCAL diff --git a/physics/module_MYJSFC_wrapper.meta b/physics/module_MYJSFC_wrapper.meta index e1e6ab2b9..4f909ef91 100644 --- a/physics/module_MYJSFC_wrapper.meta +++ b/physics/module_MYJSFC_wrapper.meta @@ -3,6 +3,36 @@ type = scheme dependencies = module_SF_JSFC.F90 +######################################################################## +[ccpp-arg-table] + name = myjsfc_wrapper_init + type = scheme +[do_myjsfc] + standard_name = flag_for_mellor_yamada_janic_surface_layer_scheme + long_name = flag to activate MYJ surface layer scheme + units = flag + dimensions = () + type = logical + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + ######################################################################## [ccpp-arg-table] name = myjsfc_wrapper_run @@ -24,7 +54,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -32,7 +62,7 @@ intent = in optional = F [kdt] - standard_name = index_of_time_step + standard_name = index_of_timestep long_name = current time step index units = index dimensions = () @@ -48,7 +78,7 @@ intent = in optional = F [ntke] - standard_name = index_for_turbulent_kinetic_energy + standard_name = index_of_turbulent_kinetic_energy_in_tracer_concentration_array long_name = tracer index for turbulent kinetic energy units = index dimensions = () @@ -56,7 +86,7 @@ intent = in optional = F [ntcw] - standard_name = index_for_liquid_cloud_condensate + standard_name = index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array long_name = cloud condensate index in tracer array units = index dimensions = () @@ -64,7 +94,7 @@ intent = in optional = F [ntiw] - standard_name = index_for_ice_cloud_condensate + standard_name = index_of_cloud_ice_mixing_ratio_in_tracer_concentration_array long_name = tracer index for ice water units = index dimensions = () @@ -72,7 +102,7 @@ intent = in optional = F [ntrw] - standard_name = index_for_rain_water + standard_name = index_of_rain_mixing_ratio_in_tracer_concentration_array long_name = tracer index for rain water units = index dimensions = () @@ -80,7 +110,7 @@ intent = in optional = F [ntsw] - standard_name = index_for_snow_water + standard_name = index_of_snow_mixing_ratio_in_tracer_concentration_array long_name = tracer index for snow water units = index dimensions = () @@ -88,7 +118,7 @@ intent = in optional = F [ntgl] - standard_name = index_for_graupel + standard_name = index_of_graupel_mixing_ratio_in_tracer_concentration_array long_name = tracer index for graupel units = index dimensions = () @@ -115,7 +145,7 @@ standard_name = x_wind long_name = x component of layer wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -124,7 +154,7 @@ standard_name = y_wind long_name = y component of layer wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -133,7 +163,7 @@ standard_name = air_temperature long_name = layer mean air temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -142,7 +172,7 @@ standard_name = tracer_concentration long_name = model layer mean tracer concentration units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = in @@ -151,7 +181,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -160,7 +190,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -169,13 +199,13 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in optional = F [prsik_1] - standard_name = dimensionless_exner_function_at_lowest_model_interface + standard_name = surface_dimensionless_exner_function long_name = dimensionless Exner function at lowest model interface units = none dimensions = (horizontal_loop_extent) @@ -184,7 +214,7 @@ intent = in optional = F [prslk_1] - standard_name = dimensionless_exner_function_at_lowest_model_layer + standard_name = dimensionless_exner_function_at_surface_adjacent_layer long_name = dimensionless Exner function at lowest model layer units = none dimensions = (horizontal_loop_extent) @@ -208,7 +238,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = inout + intent = in optional = F [phy_myj_qsfc] standard_name = surface_specific_humidity_for_MYJ_schemes @@ -220,7 +250,7 @@ intent = inout optional = F [phy_myj_thz0] - standard_name = potential_temperature_at_viscous_sublayer_top + standard_name = air_potential_temperature_at_top_of_viscous_sublayer long_name = potential temperat at viscous sublayer top over water units = K dimensions = (horizontal_loop_extent) @@ -229,7 +259,7 @@ intent = inout optional = F [phy_myj_qz0] - standard_name = specific_humidity_at_viscous_sublayer_top + standard_name = specific_humidity_at_top_of_viscous_sublayer long_name = specific humidity at_viscous sublayer top over water units = kg kg-1 dimensions = (horizontal_loop_extent) @@ -238,7 +268,7 @@ intent = inout optional = F [phy_myj_uz0] - standard_name = u_wind_component_at_viscous_sublayer_top + standard_name = x_wind_at_top_of_viscous_sublayer long_name = u wind component at viscous sublayer top over water units = m s-1 dimensions = (horizontal_loop_extent) @@ -247,7 +277,7 @@ intent = inout optional = F [phy_myj_vz0] - standard_name = v_wind_component_at_viscous_sublayer_top + standard_name = y_wind_at_top_of_viscous_sublayer long_name = v wind component at viscous sublayer top over water units = m s-1 dimensions = (horizontal_loop_extent) @@ -283,7 +313,7 @@ intent = inout optional = F [phy_myj_chkqlm] - standard_name = surface_layer_evaporation_switch + standard_name = control_for_surface_layer_evaporation long_name = surface layer evaporation switch units = none dimensions = (horizontal_loop_extent) @@ -292,7 +322,7 @@ intent = inout optional = F [phy_myj_elflx] - standard_name = kinematic_surface_latent_heat_flux + standard_name = surface_upward_specific_humidity_flux_for_mellor_yamada_janic_surface_layer_scheme long_name = kinematic surface latent heat flux units = m s-1 kg kg-1 dimensions = (horizontal_loop_extent) @@ -301,7 +331,7 @@ intent = inout optional = F [phy_myj_a1u] - standard_name = weight_for_momentum_at_viscous_sublayer_top + standard_name = weight_for_momentum_at_top_of_viscous_sublayer long_name = Weight for momentum at viscous layer top units = none dimensions = (horizontal_loop_extent) @@ -310,7 +340,7 @@ intent = inout optional = F [phy_myj_a1t] - standard_name = weight_for_potental_temperature_at_viscous_sublayer_top + standard_name = weight_for_potental_temperature_at_top_of_viscous_sublayer long_name = Weight for potental temperature at viscous layer top units = none dimensions = (horizontal_loop_extent) @@ -319,7 +349,7 @@ intent = inout optional = F [phy_myj_a1q] - standard_name = weight_for_specific_humidity_at_viscous_sublayer_top + standard_name = weight_for_specific_humidity_at_top_of_viscous_sublayer long_name = Weight for Specfic Humidity at viscous layer top units = none dimensions = (horizontal_loop_extent) @@ -337,7 +367,7 @@ intent = inout optional = F [slmsk] - standard_name = sea_land_ice_mask_real + standard_name = area_type long_name = landmask: sea/land/ice=0/1/2 units = flag dimensions = (horizontal_loop_extent) @@ -397,7 +427,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = out + intent = inout optional = F [ffm] standard_name = Monin_Obukhov_similarity_function_for_momentum @@ -463,7 +493,7 @@ intent = inout optional = F [fice] - standard_name = sea_ice_concentration + standard_name = sea_ice_area_fraction_of_sea_area_fraction long_name = ice fraction over open water units = frac dimensions = (horizontal_loop_extent) @@ -472,8 +502,8 @@ intent = inout optional = F [z0rl_wat] - standard_name = surface_roughness_length_over_ocean_interstitial - long_name = surface roughness length over ocean (interstitial) + standard_name = surface_roughness_length_over_water + long_name = surface roughness length over water (interstitial) units = cm dimensions = (horizontal_loop_extent) type = real @@ -481,7 +511,7 @@ intent = inout optional = F [z0rl_lnd] - standard_name = surface_roughness_length_over_land_interstitial + standard_name = surface_roughness_length_over_land long_name = surface roughness length over land (interstitial) units = cm dimensions = (horizontal_loop_extent) @@ -490,7 +520,7 @@ intent = inout optional = F [z0rl_ice] - standard_name = surface_roughness_length_over_ice_interstitial + standard_name = surface_roughness_length_over_ice long_name = surface roughness length over ice (interstitial) units = cm dimensions = (horizontal_loop_extent) @@ -499,8 +529,8 @@ intent = inout optional = F [ustar_wat] - standard_name = surface_friction_velocity_over_ocean - long_name = surface friction velocity over ocean + standard_name = surface_friction_velocity_over_water + long_name = surface friction velocity over water units = m s-1 dimensions = (horizontal_loop_extent) type = real @@ -526,8 +556,8 @@ intent = inout optional = F [cm_wat] - standard_name = surface_drag_coefficient_for_momentum_in_air_over_ocean - long_name = surface exchange coeff for momentum over ocean + standard_name = surface_drag_coefficient_for_momentum_in_air_over_water + long_name = surface exchange coeff for momentum over water units = none dimensions = (horizontal_loop_extent) type = real @@ -553,8 +583,8 @@ intent = inout optional = F [ch_wat] - standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ocean - long_name = surface exchange coeff heat & moisture over ocean + standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_water + long_name = surface exchange coeff heat surface exchange coeff heat & moisture over ocean moisture over water units = none dimensions = (horizontal_loop_extent) type = real @@ -580,8 +610,8 @@ intent = inout optional = F [rb_wat] - standard_name = bulk_richardson_number_at_lowest_model_level_over_ocean - long_name = bulk Richardson number at the surface over ocean + standard_name = bulk_richardson_number_at_lowest_model_level_over_water + long_name = bulk Richardson number at the surface over water units = none dimensions = (horizontal_loop_extent) type = real @@ -607,8 +637,8 @@ intent = inout optional = F [stress_wat] - standard_name = surface_wind_stress_over_ocean - long_name = surface wind stress over ocean + standard_name = surface_wind_stress_over_water + long_name = surface wind stress over water units = m2 s-2 dimensions = (horizontal_loop_extent) type = real @@ -634,8 +664,8 @@ intent = inout optional = F [fm_wat] - standard_name = Monin_Obukhov_similarity_function_for_momentum_over_ocean - long_name = Monin-Obukhov similarity funct for momentum over ocean + standard_name = Monin_Obukhov_similarity_function_for_momentum_over_water + long_name = Monin-Obukhov similarity funct for momentum over water units = none dimensions = (horizontal_loop_extent) type = real @@ -661,8 +691,8 @@ intent = inout optional = F [fh_wat] - standard_name = Monin_Obukhov_similarity_function_for_heat_over_ocean - long_name = Monin-Obukhov similarity function for heat over ocean + standard_name = Monin_Obukhov_similarity_function_for_heat_over_water + long_name = Monin-Obukhov similarity function for heat over water units = none dimensions = (horizontal_loop_extent) type = real @@ -688,8 +718,8 @@ intent = inout optional = F [fm10_wat] - standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_ocean - long_name = Monin-Obukhov parameter for momentum at 10m over ocean + standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_water + long_name = Monin-Obukhov parameter for momentum at 10m over water units = none dimensions = (horizontal_loop_extent) type = real @@ -715,8 +745,8 @@ intent = inout optional = F [fh2_wat] - standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m_over_ocean - long_name = Monin-Obukhov parameter for heat at 2m over ocean + standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m_over_water + long_name = Monin-Obukhov parameter for heat at 2m over water units = none dimensions = (horizontal_loop_extent) type = real @@ -748,7 +778,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = out + intent = inout optional = F [con_cp] standard_name = specific_heat_of_dry_air_at_constant_pressure @@ -769,7 +799,7 @@ intent = in optional = F [con_rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () diff --git a/physics/module_MYNNPBL_wrapper.F90 b/physics/module_MYNNPBL_wrapper.F90 index 61a65dfe9..4b034f588 100644 --- a/physics/module_MYNNPBL_wrapper.F90 +++ b/physics/module_MYNNPBL_wrapper.F90 @@ -10,9 +10,13 @@ MODULE mynnedmf_wrapper contains - subroutine mynnedmf_wrapper_init (lheatstrg, errmsg, errflg) +!> \section arg_table_mynnedmf_wrapper_init Argument Table +!! \htmlinclude mynnedmf_wrapper_init.html +!! + subroutine mynnedmf_wrapper_init (do_mynnedmf, lheatstrg, errmsg, errflg) implicit none - + + logical, intent(in) :: do_mynnedmf logical, intent(in) :: lheatstrg character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -21,6 +25,13 @@ subroutine mynnedmf_wrapper_init (lheatstrg, errmsg, errflg) errmsg = '' errflg = 0 + ! Consistency checks + if (.not. do_mynnedmf) then + errmsg = 'Logic error: do_mynnedmf = .false.' + errflg = 1 + return + end if + if (lheatstrg) then errmsg = 'Logic error: lheatstrg not implemented for MYNN PBL' errflg = 1 @@ -64,7 +75,7 @@ SUBROUTINE mynnedmf_wrapper_run( & & dtsfc_diag,dqsfc_diag, & & dusfc_cice,dvsfc_cice, & & dtsfc_cice,dqsfc_cice, & - & hflx_ocn,qflx_ocn,stress_ocn, & + & hflx_wat,qflx_wat,stress_wat, & & oceanfrac,fice,wet,icy,dry, & & dusfci_cpl,dvsfci_cpl, & & dtsfci_cpl,dqsfci_cpl, & @@ -80,14 +91,15 @@ SUBROUTINE mynnedmf_wrapper_run( & & sub_thl,sub_sqv,det_thl,det_sqv,& & nupdraft,maxMF,ktop_plume, & & dudt, dvdt, dtdt, & - & dqdt_water_vapor, dqdt_liquid_cloud, & - & dqdt_ice_cloud, dqdt_ozone, & - & dqdt_cloud_droplet_num_conc, dqdt_ice_num_conc, & - & dqdt_water_aer_num_conc, dqdt_ice_aer_num_conc, & + & dqdt_water_vapor, dqdt_liquid_cloud, & ! <=== ntqv, ntcw + & dqdt_ice_cloud, dqdt_ozone, & ! <=== ntiw, ntoz + & dqdt_cloud_droplet_num_conc, dqdt_ice_num_conc, & ! <=== ntlnc, ntinc + & dqdt_water_aer_num_conc, dqdt_ice_aer_num_conc, & ! <=== ntwa, ntia & flag_for_pbl_generic_tend, & - & du3dt_PBL, du3dt_OGWD, dv3dt_PBL, dv3dt_OGWD, & - & do3dt_PBL, dq3dt_PBL, dt3dt_PBL, & - & htrsw, htrlw, xmu, & + & dtend, dtidx, index_of_temperature, & + & index_of_x_wind, index_of_y_wind, ntke, & + & ntqv, ntcw, ntiw, ntoz, ntlnc, ntinc, ntwa, ntia, & + & index_of_process_pbl, htrsw, htrlw, xmu, & & grav_settling, bl_mynn_tkebudget, bl_mynn_tkeadvect, & & bl_mynn_cloudpdf, bl_mynn_mixlength, & & bl_mynn_edmf, bl_mynn_edmf_mom, bl_mynn_edmf_tke, & @@ -200,6 +212,13 @@ SUBROUTINE mynnedmf_wrapper_run( & & imp_physics, imp_physics_wsm6, & & imp_physics_thompson, imp_physics_gfdl +!TENDENCY DIAGNOSTICS + real(kind=kind_phys), intent(inout), optional :: dtend(:,:,:) + integer, intent(in) :: dtidx(:,:) + integer, intent(in) :: index_of_temperature, index_of_x_wind, & + index_of_y_wind, index_of_process_pbl + integer, intent(in) :: ntoz, ntqv, ntcw, ntiw, ntlnc, ntinc, ntwa, ntia, ntke + !MISC CONFIGURATION OPTIONS INTEGER, PARAMETER :: & & spp_pbl=0, & @@ -227,13 +246,13 @@ SUBROUTINE mynnedmf_wrapper_run( & REAL(kind=kind_phys) :: tem !MYNN-3D - real(kind=kind_phys), dimension(im,levs+1), intent(in) :: phii - real(kind=kind_phys), dimension(im,levs ), intent(inout) :: & + real(kind=kind_phys), dimension(:,:), intent(in) :: phii + real(kind=kind_phys), dimension(:,:), intent(inout) :: & & dtdt, dudt, dvdt, & & dqdt_water_vapor, dqdt_liquid_cloud, dqdt_ice_cloud, & & dqdt_cloud_droplet_num_conc, dqdt_ice_num_conc, & & dqdt_ozone, dqdt_water_aer_num_conc, dqdt_ice_aer_num_conc - real(kind=kind_phys), dimension(im,levs), intent(inout) :: & + real(kind=kind_phys), dimension(:,:), intent(inout) :: & & qke, qke_adv, EL_PBL, Sh3D, & & qc_bl, qi_bl, cldfra_bl !These 10 arrays are only allocated when bl_mynn_output > 0 @@ -241,7 +260,7 @@ SUBROUTINE mynnedmf_wrapper_run( & & edmf_a,edmf_w,edmf_qt, & & edmf_thl,edmf_ent,edmf_qc, & & sub_thl,sub_sqv,det_thl,det_sqv - real(kind=kind_phys), dimension(im,levs), intent(in) :: & + real(kind=kind_phys), dimension(:,:), intent(in) :: & & u,v,omega,t3d, & & exner,prsl, & & qgrs_water_vapor, & @@ -252,13 +271,10 @@ SUBROUTINE mynnedmf_wrapper_run( & & qgrs_ozone, & & qgrs_water_aer_num_conc, & & qgrs_ice_aer_num_conc - real(kind=kind_phys), dimension(im,levs), intent(out) :: & + real(kind=kind_phys), dimension(:,:), intent(out) :: & & Tsq, Qsq, Cov, exch_h, exch_m - real(kind=kind_phys), dimension(:,:), intent(inout) :: & - & du3dt_PBL, du3dt_OGWD, dv3dt_PBL, dv3dt_OGWD, & - & do3dt_PBL, dq3dt_PBL, dt3dt_PBL - real(kind=kind_phys), dimension(im), intent(in) :: xmu - real(kind=kind_phys), dimension(im, levs), intent(in) :: htrsw, htrlw + real(kind=kind_phys), dimension(:), intent(in) :: xmu + real(kind=kind_phys), dimension(:,:), intent(in) :: htrsw, htrlw !LOCAL real(kind=kind_phys), dimension(im,levs) :: & & sqv,sqc,sqi,qnc,qni,ozone,qnwfa,qnifa, & @@ -268,6 +284,7 @@ SUBROUTINE mynnedmf_wrapper_run( & & RQNWFABLTEN, RQNIFABLTEN, & & dqke,qWT,qSHEAR,qBUOY,qDISS, & & pattern_spp_pbl + real(kind=kind_phys), allocatable :: old_ozone(:,:) !MYNN-CHEM arrays real(kind=kind_phys), dimension(im,nchem) :: chem3d @@ -277,39 +294,39 @@ SUBROUTINE mynnedmf_wrapper_run( & REAL(kind=kind_phys), DIMENSION( ndvel ) :: vd1 !MYNN-2D - real(kind=kind_phys), dimension(im), intent(in) :: & + real(kind=kind_phys), dimension(:), intent(in) :: & & dx,zorl,slmsk,tsurf,qsfc,ps, & & hflx,qflx,ust,wspd,rb,recmol - real(kind=kind_phys), dimension(im), intent(in) :: & + real(kind=kind_phys), dimension(:), intent(in) :: & & dusfc_cice,dvsfc_cice,dtsfc_cice,dqsfc_cice, & - & stress_ocn,hflx_ocn,qflx_ocn, & + & stress_wat,hflx_wat,qflx_wat, & & oceanfrac,fice - logical, dimension(im), intent(in) :: & + logical, dimension(:), intent(in) :: & & wet, dry, icy - real(kind=kind_phys), dimension(im), intent(inout) :: & - & pblh - real(kind=kind_phys), dimension(im), intent(out) :: & + real(kind=kind_phys), dimension(:), intent(inout) :: & + & pblh,dusfc_diag,dvsfc_diag,dtsfc_diag,dqsfc_diag + real(kind=kind_phys), dimension(:), intent(out) :: & & ch,dtsfc1,dqsfc1,dusfc1,dvsfc1, & - & dtsfci_diag,dqsfci_diag,dtsfc_diag,dqsfc_diag, & - & dusfci_diag,dvsfci_diag,dusfc_diag,dvsfc_diag, & + & dtsfci_diag,dqsfci_diag,dusfci_diag,dvsfci_diag, & & maxMF - integer, dimension(im), intent(inout) :: & + integer, dimension(:), intent(inout) :: & & kpbl,nupdraft,ktop_plume - real(kind=kind_phys), dimension(:), intent(inout) :: & + real(kind=kind_phys), dimension(:), intent(inout) :: & & dusfc_cpl,dvsfc_cpl,dtsfc_cpl,dqsfc_cpl - real(kind=kind_phys), dimension(:), intent(inout) :: & + real(kind=kind_phys), dimension(:), intent(inout) :: & & dusfci_cpl,dvsfci_cpl,dtsfci_cpl,dqsfci_cpl !LOCAL real, dimension(im) :: & & WSTAR,DELTA,qcg,hfx,qfx,rmol,xland, & & uoce,voce,vdfg,znt,ts - + integer :: idtend real, dimension(im) :: dusfci1,dvsfci1,dtsfci1,dqsfci1 + real(kind=kind_phys), allocatable :: save_qke_adv(:,:) ! Initialize CCPP error handling variables errmsg = '' @@ -321,7 +338,15 @@ SUBROUTINE mynnedmf_wrapper_run( & write(0,*)"flag_init=",flag_init write(0,*)"flag_restart=",flag_restart endif - + + if(.not. flag_for_pbl_generic_tend .and. ldiag3d) then + idtend = dtidx(ntke+100,index_of_process_pbl) + if(idtend>=1) then + allocate(save_qke_adv(im,levs)) + save_qke_adv=qke_adv + endif + endif + ! DH* TODO: Use flag_restart to distinguish which fields need ! to be initialized and which are read from restart files if (flag_init) then @@ -484,7 +509,10 @@ SUBROUTINE mynnedmf_wrapper_run( & enddo enddo endif - + if(ldiag3d .and. dtidx(100+ntoz,index_of_process_pbl)>1) then + allocate(old_ozone(im,levs)) + old_ozone = ozone + endif if (lprnt)write(0,*)"prepping MYNN-EDMF variables..." do k=1,levs @@ -564,14 +592,14 @@ SUBROUTINE mynnedmf_wrapper_run( & dqsfci_cpl(i) = dqsfc_cice(i) elseif (icy(i) .or. dry(i)) then ! use stress_ocean for opw component at mixed point if (wspd(i) > zero) then - dusfci_cpl(i) = -1.*rho(i,1)*stress_ocn(i)*u(i,1)/wspd(i) ! U-momentum flux - dvsfci_cpl(i) = -1.*rho(i,1)*stress_ocn(i)*v(i,1)/wspd(i) ! V-momentum flux + dusfci_cpl(i) = -1.*rho(i,1)*stress_wat(i)*u(i,1)/wspd(i) ! U-momentum flux + dvsfci_cpl(i) = -1.*rho(i,1)*stress_wat(i)*v(i,1)/wspd(i) ! V-momentum flux else dusfci_cpl(i) = zero dvsfci_cpl(i) = zero endif - dtsfci_cpl(i) = cp*rho(i,1)*hflx_ocn(i) ! sensible heat flux over open ocean - dqsfci_cpl(i) = XLV*rho(i,1)*qflx_ocn(i) ! latent heat flux over open ocean + dtsfci_cpl(i) = cp*rho(i,1)*hflx_wat(i) ! sensible heat flux over open ocean + dqsfci_cpl(i) = XLV*rho(i,1)*qflx_wat(i) ! latent heat flux over open ocean else ! use results from this scheme for 100% open ocean dusfci_cpl(i) = dusfci_diag(i) dvsfci_cpl(i) = dvsfci_diag(i) @@ -705,22 +733,17 @@ SUBROUTINE mynnedmf_wrapper_run( & dvdt(i,k) = dvdt(i,k) + RVBLTEN(i,k) enddo enddo - accum_duvt3dt: if(lssav) then - if(ldiag3d .and. .not. flag_for_pbl_generic_tend) then - do k = 1, levs - do i = 1, im - du3dt_PBL(i,k) = du3dt_PBL(i,k) + RUBLTEN(i,k)*dtf - dv3dt_PBL(i,k) = dv3dt_PBL(i,k) + RVBLTEN(i,k)*dtf - enddo - enddo - endif - - if (lsidea .or. (ldiag3d .and. .not. flag_for_pbl_generic_tend)) then - do k = 1, levs - do i = 1, im - dt3dt_PBL(i,k) = dt3dt_PBL(i,k) + RTHBLTEN(i,k)*exner(i,k)*dtf - enddo - enddo + accum_duvt3dt: if(ldiag3d .or. lsidea) then + call dtend_helper(index_of_x_wind,RUBLTEN) + call dtend_helper(index_of_y_wind,RVBLTEN) + call dtend_helper(index_of_temperature,RTHBLTEN,exner) + if(ldiag3d) then + call dtend_helper(100+ntoz,dqdt_ozone) + ! idtend = dtidx(100+ntoz,index_of_process_pbl) + ! if(idtend>=1) then + ! dtend(:,:,idtend) = dtend(:,:,idtend) + (ozone-old_ozone) + ! deallocate(old_ozone) + ! endif endif endif accum_duvt3dt !Update T, U and V: @@ -743,6 +766,11 @@ SUBROUTINE mynnedmf_wrapper_run( & !dqdt_ozone(i,k) = 0.0 enddo enddo + if(ldiag3d .and. .not. flag_for_pbl_generic_tend) then + call dtend_helper(100+ntqv,RQVBLTEN) + call dtend_helper(100+ntcw,RQCBLTEN) + call dtend_helper(100+ntiw,RQIBLTEN) + endif !Update moist species: !do k=1,levs ! do i=1,im @@ -767,6 +795,15 @@ SUBROUTINE mynnedmf_wrapper_run( & dqdt_ice_aer_num_conc(i,k) = RQNIFABLTEN(i,k) enddo enddo + if(ldiag3d .and. .not. flag_for_pbl_generic_tend) then + call dtend_helper(100+ntqv,RQVBLTEN) + call dtend_helper(100+ntcw,RQCBLTEN) + call dtend_helper(100+ntlnc,RQNCBLTEN) + call dtend_helper(100+ntiw,RQIBLTEN) + call dtend_helper(100+ntinc,RQNIBLTEN) + call dtend_helper(100+ntwa,RQNWFABLTEN) + call dtend_helper(100+ntia,RQNIFABLTEN) + endif !do k=1,levs ! do i=1,im ! qgrs_water_vapor(i,k) = qgrs_water_vapor(i,k) + (RQVBLTEN(i,k)/(1.0+RQVBLTEN(i,k)))*delt @@ -790,6 +827,12 @@ SUBROUTINE mynnedmf_wrapper_run( & !dqdt_ozone(i,k) = 0.0 enddo enddo + if(ldiag3d .and. .not. flag_for_pbl_generic_tend) then + call dtend_helper(100+ntqv,RQVBLTEN) + call dtend_helper(100+ntcw,RQCBLTEN) + call dtend_helper(100+ntiw,RQIBLTEN) + call dtend_helper(100+ntinc,RQNIBLTEN) + endif !do k=1,levs ! do i=1,im ! qgrs_water_vapor(i,k) = qgrs_water_vapor(i,k) + (RQVBLTEN(i,k)/(1.0+RQVBLTEN(i,k)))*delt @@ -813,6 +856,11 @@ SUBROUTINE mynnedmf_wrapper_run( & !dqdt_ozone(i,k) = 0.0 enddo enddo + if(ldiag3d .and. .not. flag_for_pbl_generic_tend) then + call dtend_helper(100+ntqv,RQVBLTEN) + call dtend_helper(100+ntcw,RQCBLTEN) + call dtend_helper(100+ntiw,RQIBLTEN) + endif !do k=1,levs ! do i=1,im ! qgrs_water_vapor(i,k) = qgrs_water_vapor(i,k) + (RQVBLTEN(i,k)/(1.0+RQVBLTEN(i,k)))*delt @@ -834,16 +882,13 @@ SUBROUTINE mynnedmf_wrapper_run( & !dqdt_ozone(i,k) = 0.0 enddo enddo + if(ldiag3d .and. .not. flag_for_pbl_generic_tend) then + call dtend_helper(100+ntqv,RQVBLTEN) + call dtend_helper(100+ntcw,RQCBLTEN) + call dtend_helper(100+ntiw,RQIBLTEN) + endif endif - if(lssav .and. (ldiag3d .and. qdiag3d .and. .not. flag_for_pbl_generic_tend)) then - do k=1,levs - do i=1,im - dq3dt_PBL(i,k) = dq3dt_PBL(i,k) + dqdt_water_vapor(i,k)*dtf - enddo - enddo - endif - if (lprnt) then print* print*,"===Finished with mynn_bl_driver; output:" @@ -885,6 +930,33 @@ SUBROUTINE mynnedmf_wrapper_run( & print* endif + if(allocated(save_qke_adv)) then + if(ldiag3d .and. .not. flag_for_pbl_generic_tend) then + idtend = dtidx(100+ntke,index_of_process_pbl) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + qke_adv-save_qke_adv + endif + endif + deallocate(save_qke_adv) + endif + + CONTAINS + + SUBROUTINE dtend_helper(itracer,field,mult) + real(kind=kind_phys), intent(in) :: field(im,levs) + real(kind=kind_phys), intent(in), optional :: mult(im,levs) + integer, intent(in) :: itracer + integer :: idtend + + idtend=dtidx(itracer,index_of_process_pbl) + if(idtend>=1) then + if(present(mult)) then + dtend(:,:,idtend) = dtend(:,:,idtend) + field*dtf*mult + else + dtend(:,:,idtend) = dtend(:,:,idtend) + field*dtf + endif + endif + END SUBROUTINE dtend_helper END SUBROUTINE mynnedmf_wrapper_run diff --git a/physics/module_MYNNPBL_wrapper.meta b/physics/module_MYNNPBL_wrapper.meta index ca046f21c..e88975aff 100644 --- a/physics/module_MYNNPBL_wrapper.meta +++ b/physics/module_MYNNPBL_wrapper.meta @@ -7,8 +7,16 @@ [ccpp-arg-table] name = mynnedmf_wrapper_init type = scheme +[do_mynnedmf] + standard_name = flag_for_mellor_yamada_nakanishi_niino_pbl_scheme + long_name = flag to activate MYNN-EDMF + units = flag + dimensions = () + type = logical + intent = in + optional = F [lheatstrg] - standard_name = flag_for_canopy_heat_storage + standard_name = flag_for_canopy_heat_storage_in_land_surface_scheme long_name = flag for canopy heat storage parameterization units = flag dimensions = () @@ -46,7 +54,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -54,7 +62,7 @@ intent = in optional = F [flag_init] - standard_name = flag_for_first_time_step + standard_name = flag_for_first_timestep long_name = flag signaling first time step for time integration loop units = flag dimensions = () @@ -88,7 +96,7 @@ intent = in optional = F [r_d] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -178,7 +186,7 @@ intent = in optional = F [lssav] - standard_name = flag_diagnostics + standard_name = flag_for_diagnostics long_name = logical flag for storing diagnostics units = flag dimensions = () @@ -186,7 +194,7 @@ intent = in optional = F [ldiag3d] - standard_name = flag_diagnostics_3D + standard_name = flag_for_diagnostics_3D long_name = flag for 3d diagnostic fields units = flag dimensions = () @@ -194,7 +202,7 @@ intent = in optional = F [qdiag3d] - standard_name = flag_tracer_diagnostics_3D + standard_name = flag_for_tracer_diagnostics_3D long_name = flag for 3d tracer diagnostic fields units = flag dimensions = () @@ -202,7 +210,7 @@ intent = in optional = F [lsidea] - standard_name = flag_idealized_physics + standard_name = flag_for_integrated_dynamics_through_earths_atmosphere long_name = flag for idealized physics units = flag dimensions = () @@ -210,7 +218,7 @@ intent = in optional = F [cplflx] - standard_name = flag_for_flux_coupling + standard_name = flag_for_surface_flux_coupling long_name = flag controlling cplflx collection (default off) units = flag dimensions = () @@ -218,7 +226,7 @@ intent = in optional = F [delt] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = time step for physics units = s dimensions = () @@ -227,7 +235,7 @@ intent = in optional = F [dtf] - standard_name = time_step_for_dynamics + standard_name = timestep_for_dynamics long_name = dynamics timestep units = s dimensions = () @@ -236,7 +244,7 @@ intent = in optional = F [dx] - standard_name = cell_size + standard_name = characteristic_grid_lengthscale long_name = size of the grid cell units = m dimensions = (horizontal_loop_extent) @@ -257,7 +265,7 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -266,7 +274,7 @@ standard_name = x_wind long_name = x component of layer wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -275,16 +283,16 @@ standard_name = y_wind long_name = y component of layer wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [omega] - standard_name = omega + standard_name = lagrangian_tendency_of_air_pressure long_name = layer mean vertical velocity units = Pa s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -293,52 +301,52 @@ standard_name = air_temperature long_name = layer mean air temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [qgrs_water_vapor] - standard_name = water_vapor_specific_humidity + standard_name = specific_humidity long_name = water vapor specific humidity units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [qgrs_liquid_cloud] - standard_name = cloud_condensed_water_mixing_ratio + standard_name = cloud_liquid_water_mixing_ratio long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [qgrs_ice_cloud] - standard_name = ice_water_mixing_ratio + standard_name = cloud_ice_mixing_ratio long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [qgrs_cloud_droplet_num_conc] - standard_name = cloud_droplet_number_concentration + standard_name = mass_number_concentration_of_cloud_liquid_water_particles_in_air long_name = number concentration of cloud droplets (liquid) units = kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [qgrs_cloud_ice_num_conc] - standard_name = ice_number_concentration + standard_name = mass_number_concentration_of_cloud_ice_water_crystals_in_air long_name = number concentration of ice units = kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -347,25 +355,25 @@ standard_name = ozone_mixing_ratio long_name = ozone mixing ratio units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [qgrs_water_aer_num_conc] - standard_name = water_friendly_aerosol_number_concentration + standard_name = mass_number_concentration_of_hygroscopic_aerosols long_name = number concentration of water-friendly aerosols units = kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [qgrs_ice_aer_num_conc] - standard_name = ice_friendly_aerosol_number_concentration + standard_name = mass_number_concentration_of_nonhygroscopic_ice_nucleating_aerosols long_name = number concentration of ice-friendly aerosols units = kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -374,22 +382,22 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [exner] - standard_name = dimensionless_exner_function_at_model_layers + standard_name = dimensionless_exner_function long_name = Exner function at layers units = none - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [slmsk] - standard_name = sea_land_ice_mask_real + standard_name = area_type long_name = landmask: sea/land/ice=0/1/2 units = flag dimensions = (horizontal_loop_extent) @@ -443,8 +451,8 @@ intent = out optional = F [hflx] - standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness - long_name = kinematic surface upward sensible heat flux reduced by surface roughness + standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness_and_vegetation + long_name = kinematic surface upward sensible heat flux reduced by surface roughness and vegetation units = K m s-1 dimensions = (horizontal_loop_extent) type = real @@ -452,8 +460,8 @@ intent = in optional = F [qflx] - standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness - long_name = kinematic surface upward latent heat flux reduced by surface roughness + standard_name = surface_upward_specific_humidity_flux + long_name = kinematic surface upward latent heat flux units = kg kg-1 m s-1 dimensions = (horizontal_loop_extent) type = real @@ -587,7 +595,7 @@ intent = inout optional = F [dusfc_cice] - standard_name = surface_x_momentum_flux_for_coupling + standard_name = surface_x_momentum_flux_from_coupled_process long_name = sfc x momentum flux for coupling units = Pa dimensions = (horizontal_loop_extent) @@ -596,7 +604,7 @@ intent = in optional = F [dvsfc_cice] - standard_name = surface_y_momentum_flux_for_coupling + standard_name = surface_y_momentum_flux_from_coupled_process long_name = sfc y momentum flux for coupling units = Pa dimensions = (horizontal_loop_extent) @@ -605,7 +613,7 @@ intent = in optional = F [dtsfc_cice] - standard_name = surface_upward_sensible_heat_flux_for_coupling + standard_name = surface_upward_sensible_heat_flux_from_coupled_process long_name = sfc sensible heat flux for coupling units = W m-2 dimensions = (horizontal_loop_extent) @@ -614,7 +622,7 @@ intent = in optional = F [dqsfc_cice] - standard_name = surface_upward_latent_heat_flux_for_coupling + standard_name = surface_upward_latent_heat_flux_from_coupled_process long_name = sfc latent heat flux for coupling units = W m-2 dimensions = (horizontal_loop_extent) @@ -622,27 +630,27 @@ kind = kind_phys intent = in optional = F -[hflx_ocn] - standard_name = kinematic_surface_upward_sensible_heat_flux_over_ocean - long_name = kinematic surface upward sensible heat flux over ocean +[hflx_wat] + standard_name = kinematic_surface_upward_sensible_heat_flux_over_water + long_name = kinematic surface upward sensible heat flux over water units = K m s-1 dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in optional = F -[qflx_ocn] - standard_name = kinematic_surface_upward_latent_heat_flux_over_ocean - long_name = kinematic surface upward latent heat flux over ocean +[qflx_wat] + standard_name = kinematic_surface_upward_latent_heat_flux_over_water + long_name = kinematic surface upward latent heat flux over water units = kg kg-1 m s-1 dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in optional = F -[stress_ocn] - standard_name = surface_wind_stress_over_ocean - long_name = surface wind stress over ocean +[stress_wat] + standard_name = surface_wind_stress_over_water + long_name = surface wind stress over water units = m2 s-2 dimensions = (horizontal_loop_extent) type = real @@ -659,7 +667,7 @@ intent = in optional = F [fice] - standard_name = sea_ice_concentration + standard_name = sea_ice_area_fraction_of_sea_area_fraction long_name = ice fraction over open water units = frac dimensions = (horizontal_loop_extent) @@ -692,7 +700,7 @@ intent = in optional = F [dusfci_cpl] - standard_name = instantaneous_surface_x_momentum_flux_for_coupling + standard_name = surface_x_momentum_flux_for_coupling long_name = instantaneous sfc u momentum flux units = Pa dimensions = (horizontal_loop_extent) @@ -701,7 +709,7 @@ intent = inout optional = F [dvsfci_cpl] - standard_name = instantaneous_surface_y_momentum_flux_for_coupling + standard_name = surface_y_momentum_flux_for_coupling long_name = instantaneous sfc v momentum flux units = Pa dimensions = (horizontal_loop_extent) @@ -710,7 +718,7 @@ intent = inout optional = F [dtsfci_cpl] - standard_name = instantaneous_surface_upward_sensible_heat_flux_for_coupling + standard_name = surface_upward_sensible_heat_flux_for_coupling long_name = instantaneous sfc sensible heat flux units = W m-2 dimensions = (horizontal_loop_extent) @@ -719,7 +727,7 @@ intent = inout optional = F [dqsfci_cpl] - standard_name = instantaneous_surface_upward_latent_heat_flux_for_coupling + standard_name = surface_upward_latent_heat_flux_for_coupling long_name = instantaneous sfc latent heat flux units = W m-2 dimensions = (horizontal_loop_extent) @@ -773,10 +781,10 @@ intent = in optional = F [qke] - standard_name = tke_at_mass_points + standard_name = nonadvected_turbulent_kinetic_energy_multiplied_by_2 long_name = 2 x tke at mass points units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -785,43 +793,43 @@ standard_name = turbulent_kinetic_energy long_name = turbulent kinetic energy units = J - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [tsq] - standard_name = t_prime_squared + standard_name = variance_of_air_temperature long_name = temperature fluctuation squared units = K2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [qsq] - standard_name = q_prime_squared + standard_name = variance_of_specific_humidity long_name = water vapor fluctuation squared units = kg2 kg-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [cov] - standard_name = t_prime_q_prime + standard_name = covariance_of_air_temperature_and_specific_humidity long_name = covariance of temperature and moisture units = K kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [el_pbl] - standard_name = mixing_length + standard_name = turbulent_mixing_length long_name = mixing length in meters units = m - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -830,7 +838,7 @@ standard_name = stability_function_for_heat long_name = stability function for heat units = none - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -839,7 +847,7 @@ standard_name = atmosphere_heat_diffusivity_for_mynnpbl long_name = diffusivity for heat for MYNN PBL (defined for all mass levels) units = m2 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -848,7 +856,7 @@ standard_name = atmosphere_momentum_diffusivity_for_mynnpbl long_name = diffusivity for momentum for MYNN PBL (defined for all mass levels) units = m2 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -871,28 +879,28 @@ intent = inout optional = F [QC_BL] - standard_name = subgrid_cloud_water_mixing_ratio_pbl + standard_name = subgrid_scale_cloud_liquid_water_mixing_ratio long_name = subgrid cloud water mixing ratio from PBL scheme units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [QI_BL] - standard_name = subgrid_cloud_ice_mixing_ratio_pbl + standard_name = subgrid_scale_cloud_ice_mixing_ratio long_name = subgrid cloud ice mixing ratio from PBL scheme units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [CLDFRA_BL] - standard_name = subgrid_cloud_fraction_pbl + standard_name = subgrid_scale_cloud_area_fraction_in_atmosphere_layer long_name = subgrid cloud fraction from PBL scheme units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -901,7 +909,7 @@ standard_name = emdf_updraft_area long_name = updraft area from mass flux scheme units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -910,7 +918,7 @@ standard_name = emdf_updraft_vertical_velocity long_name = updraft vertical velocity from mass flux scheme units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -919,7 +927,7 @@ standard_name = emdf_updraft_total_water long_name = updraft total water from mass flux scheme units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -928,7 +936,7 @@ standard_name = emdf_updraft_theta_l long_name = updraft theta-l from mass flux scheme units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -937,7 +945,7 @@ standard_name = emdf_updraft_entrainment_rate long_name = updraft entrainment rate from mass flux scheme units = s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -946,7 +954,7 @@ standard_name = emdf_updraft_cloud_water long_name = updraft cloud water from mass flux scheme units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -955,7 +963,7 @@ standard_name = theta_subsidence_tendency long_name = updraft theta subsidence tendency units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -964,7 +972,7 @@ standard_name = water_vapor_subsidence_tendency long_name = updraft water vapor subsidence tendency units = kg kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -973,7 +981,7 @@ standard_name = theta_detrainment_tendency long_name = updraft theta detrainment tendency units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -982,7 +990,7 @@ standard_name = water_vapor_detrainment_tendency long_name = updraft water vapor detrainment tendency units = kg kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -1013,189 +1021,247 @@ intent = inout optional = F [dudt] - standard_name = tendency_of_x_wind_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_x_wind long_name = updated tendency of the x wind units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [dvdt] - standard_name = tendency_of_y_wind_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_y_wind long_name = updated tendency of the y wind units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [dtdt] - standard_name = tendency_of_air_temperature_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_air_temperature long_name = updated tendency of the temperature units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [dqdt_water_vapor] - standard_name = tendency_of_water_vapor_specific_humidity_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_specific_humidity long_name = water vapor specific humidity tendency due to model physics units = kg kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [dqdt_liquid_cloud] - standard_name = tendency_of_liquid_cloud_water_mixing_ratio_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_cloud_liquid_water_mixing_ratio long_name = cloud condensed water mixing ratio tendency due to model physics units = kg kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [dqdt_ice_cloud] - standard_name = tendency_of_ice_cloud_water_mixing_ratio_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_cloud_ice_mixing_ratio long_name = cloud condensed water mixing ratio tendency due to model physics units = kg kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [dqdt_ozone] - standard_name = tendency_of_ozone_mixing_ratio_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_ozone_mixing_ratio long_name = ozone mixing ratio tendency due to model physics units = kg kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [dqdt_cloud_droplet_num_conc] - standard_name = tendency_of_cloud_droplet_number_concentration_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_mass_number_concentration_of_cloud_liquid_water_particles_in_air long_name = number conc. of cloud droplets (liquid) tendency due to model physics units = kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [dqdt_ice_num_conc] - standard_name = tendency_of_ice_number_concentration_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_mass_number_concentration_of_cloud_ice_water_crystals_in_air long_name = number conc. of ice tendency due to model physics units = kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [dqdt_water_aer_num_conc] - standard_name = tendency_of_water_friendly_aerosol_number_concentration_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_mass_number_concentration_of_hygroscopic_aerosols long_name = number conc. of water-friendly aerosols tendency due to model physics units = kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [dqdt_ice_aer_num_conc] - standard_name = tendency_of_ice_friendly_aerosol_number_concentration_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_mass_number_concentration_of_nonhygroscopic_ice_nucleating_aerosols long_name = number conc. of ice-friendly aerosols tendency due to model physics units = kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [flag_for_pbl_generic_tend] - standard_name = flag_for_generic_planetary_boundary_layer_tendency + standard_name = flag_for_generic_tendency_due_to_planetary_boundary_layer long_name = true if GFS_PBL_generic should calculate tendencies units = flag dimensions = () type = logical intent = in optional = F -[du3dt_PBL] - standard_name = cumulative_change_in_x_wind_due_to_PBL - long_name = cumulative change in x wind due to PBL - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) +[dtend] + standard_name = cumulative_change_of_state_variables + long_name = diagnostic tendencies for state variables + units = various + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_cumulative_change_processes) type = real kind = kind_phys intent = inout optional = F -[du3dt_OGWD] - standard_name = cumulative_change_in_x_wind_due_to_orographic_gravity_wave_drag - long_name = cumulative change in x wind due to orographic gravity wave drag - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[dtidx] + standard_name = cumulative_change_of_state_variables_outer_index + long_name = index of state-variable and process in last dimension of diagnostic tendencies array AKA cumulative_change_index + units = index + dimensions = (number_of_tracers_plus_one_hundred,number_of_cumulative_change_processes) + type = integer + intent = in optional = F -[dv3dt_PBL] - standard_name = cumulative_change_in_y_wind_due_to_PBL - long_name = cumulative change in y wind due to PBL - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[index_of_temperature] + standard_name = index_of_temperature_in_cumulative_change_index + long_name = index of temperature in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in optional = F -[dv3dt_OGWD] - standard_name = cumulative_change_in_y_wind_due_to_orographic_gravity_wave_drag - long_name = cumulative change in y wind due to orographic gravity wave drag - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[index_of_x_wind] + standard_name = index_of_x_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in optional = F -[do3dt_PBL] - standard_name = cumulative_change_in_ozone_mixing_ratio_due_to_PBL - long_name = cumulative change in ozone mixing ratio due to PBL - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[index_of_y_wind] + standard_name = index_of_y_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in optional = F -[dq3dt_PBL] - standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL - long_name = cumulative change in water vapor specific humidity due to PBL - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[ntke] + standard_name = index_of_turbulent_kinetic_energy_in_tracer_concentration_array + long_name = tracer index for turbulent kinetic energy + units = index + dimensions = () + type = integer + intent = in optional = F -[dt3dt_PBL] - standard_name = cumulative_change_in_temperature_due_to_PBL - long_name = cumulative change in temperature due to PBL - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[ntoz] + standard_name = index_of_ozone_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for ozone mixing ratio + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntqv] + standard_name = index_of_specific_humidity_in_tracer_concentration_array + long_name = tracer index for water vapor (specific humidity) + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntcw] + standard_name = index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for cloud condensate (or liquid water) + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntiw] + standard_name = index_of_cloud_ice_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for ice water + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntlnc] + standard_name = index_of_mass_number_concentration_of_cloud_droplets_in_tracer_concentration_array + long_name = tracer index for liquid number concentration + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntinc] + standard_name = index_of_mass_number_concentration_of_cloud_ice_in_tracer_concentration_array + long_name = tracer index for ice number concentration + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntwa] + standard_name = index_of_mass_number_concentration_of_hygroscopic_aerosols_in_tracer_concentration_array + long_name = tracer index for water friendly aerosol + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntia] + standard_name = index_of_mass_number_concentration_of_nonhygroscopic_ice_nucleating_aerosols_in_tracer_concentration_array + long_name = tracer index for ice friendly aerosol + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_process_pbl] + standard_name = index_of_subgrid_scale_vertical_mixing_process_in_cumulative_change_index + long_name = index of subgrid scale vertical mixing process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in optional = F [htrsw] - standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_timestep long_name = total sky sw heating rate units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [htrlw] - standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step + standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_timestep long_name = total sky lw heating rate units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -1210,7 +1276,7 @@ intent = in optional = F [grav_settling] - standard_name = grav_settling + standard_name = control_for_gravitational_settling_of_cloud_droplets long_name = flag to activate gravitational setting of fog units = flag dimensions = () @@ -1218,7 +1284,7 @@ intent = in optional = F [bl_mynn_tkebudget] - standard_name = tke_budget + standard_name = control_for_tke_budget_output long_name = flag for activating TKE budget units = flag dimensions = () @@ -1226,7 +1292,7 @@ intent = in optional = F [bl_mynn_tkeadvect] - standard_name = tke_advect + standard_name = flag_for_tke_advection long_name = flag for activating TKE advect units = flag dimensions = () @@ -1234,7 +1300,7 @@ intent = in optional = F [bl_mynn_cloudpdf] - standard_name = cloudpdf + standard_name = control_for_cloud_pdf_in_mellor_yamada_nakanishi_niino_pbl_scheme long_name = flag to determine which cloud PDF to use units = flag dimensions = () @@ -1242,7 +1308,7 @@ intent = in optional = F [bl_mynn_mixlength] - standard_name = mixing_length_flag + standard_name = control_for_mixing_length_in_mellor_yamada_nakanishi_niino_pbl_scheme long_name = flag to determine which mixing length form to use units = flag dimensions = () @@ -1250,7 +1316,7 @@ intent = in optional = F [bl_mynn_edmf] - standard_name = edmf_flag + standard_name = control_for_edmf_in_mellor_yamada_nakanishi_niino_pbl_scheme long_name = flag to activate the mass-flux scheme units = flag dimensions = () @@ -1258,7 +1324,7 @@ intent = in optional = F [bl_mynn_edmf_mom] - standard_name = edmf_momentum_transport_flag + standard_name = control_for_edmf_momentum_transport_in_mellor_yamada_nakanishi_niino_pbl_scheme long_name = flag to activate the transport of momentum units = flag dimensions = () @@ -1266,7 +1332,7 @@ intent = in optional = F [bl_mynn_edmf_tke] - standard_name = edmf_tke_transport_flag + standard_name = control_for_edmf_tke_transport_in_mellor_yamada_nakanishi_niino_pbl_scheme long_name = flag to activate the transport of TKE units = flag dimensions = () @@ -1274,7 +1340,7 @@ intent = in optional = F [bl_mynn_edmf_part] - standard_name = edmf_partition_flag + standard_name = control_for_edmf_partitioning_in_mellor_yamada_nakanishi_niino_pbl_scheme long_name = flag to partitioning of the MF and ED areas units = flag dimensions = () @@ -1282,7 +1348,7 @@ intent = in optional = F [bl_mynn_cloudmix] - standard_name = cloud_specie_mix_flag + standard_name = control_for_cloud_species_mixing_in_mellor_yamada_nakanishi_niino_pbl_scheme long_name = flag to activate mixing of cloud species units = flag dimensions = () @@ -1290,7 +1356,7 @@ intent = in optional = F [bl_mynn_mixqt] - standard_name = mix_total_water_flag + standard_name = control_for_total_water_mixing_in_mellor_yamada_nakanishi_niino_pbl_scheme long_name = flag to mix total water or individual species units = flag dimensions = () @@ -1298,7 +1364,7 @@ intent = in optional = F [bl_mynn_output] - standard_name = mynn_output_flag + standard_name = control_for_additional_diagnostics_in_mellor_yamada_nakanishi_niino_pbl_scheme long_name = flag initialize and output extra 3D variables units = flag dimensions = () @@ -1306,7 +1372,7 @@ intent = in optional = F [icloud_bl] - standard_name = couple_sgs_clouds_to_radiation_flag + standard_name = control_for_sgs_cloud_radiation_coupling_in_mellor_yamamda_nakanishi_niino_pbl_scheme long_name = flag for coupling sgs clouds to radiation units = flag dimensions = () @@ -1314,7 +1380,7 @@ intent = in optional = F [do_mynnsfclay] - standard_name = do_mynnsfclay + standard_name = flag_for_mellor_yamada_nakanishi_niino_surface_layer_scheme long_name = flag to activate MYNN surface layer units = flag dimensions = () @@ -1322,7 +1388,7 @@ intent = in optional = F [imp_physics] - standard_name = flag_for_microphysics_scheme + standard_name = control_for_microphysics_scheme long_name = choice of microphysics scheme units = flag dimensions = () @@ -1330,7 +1396,7 @@ intent = in optional = F [imp_physics_gfdl] - standard_name = flag_for_gfdl_microphysics_scheme + standard_name = identifier_for_gfdl_microphysics_scheme long_name = choice of GFDL microphysics scheme units = flag dimensions = () @@ -1338,7 +1404,7 @@ intent = in optional = F [imp_physics_thompson] - standard_name = flag_for_thompson_microphysics_scheme + standard_name = identifier_for_thompson_microphysics_scheme long_name = choice of Thompson microphysics scheme units = flag dimensions = () @@ -1346,7 +1412,7 @@ intent = in optional = F [imp_physics_wsm6] - standard_name = flag_for_wsm6_microphysics_scheme + standard_name = identifier_for_wsm6_microphysics_scheme long_name = choice of WSM6 microphysics scheme units = flag dimensions = () diff --git a/physics/module_MYNNSFC_wrapper.F90 b/physics/module_MYNNSFC_wrapper.F90 index 7cc64bbcf..271ca5a24 100644 --- a/physics/module_MYNNSFC_wrapper.F90 +++ b/physics/module_MYNNSFC_wrapper.F90 @@ -11,17 +11,45 @@ MODULE mynnsfc_wrapper contains - subroutine mynnsfc_wrapper_init() +!! \section arg_table_mynnsfc_wrapper_init Argument Table +!! \htmlinclude mynnsfc_wrapper_init.html - ! initialize tables for psih and psim (stable and unstable) - CALL PSI_INIT(psi_opt) +!! + subroutine mynnsfc_wrapper_init(do_mynnsfclay, & + & errmsg, errflg) + + logical, intent(in) :: do_mynnsfclay + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + ! Consistency checks + if (.not. do_mynnsfclay) then + write(errmsg,fmt='(*(a))') 'Logic error: do_mynnsfclay = .false.' + errflg = 1 + return + end if + + ! initialize tables for psih and psim (stable and unstable) + CALL PSI_INIT(psi_opt,errmsg,errflg) + + IF (debug_code >= 1) THEN + print*,"CHECK INITIALIZATION OF PSI:" + print*,"psim_stab(0-1):",psim_stab(0),psim_stab(1) + print*,"psih_stab(0-1):",psih_stab(0),psih_stab(1) + print*,"psim_unstab(0-1):",psim_unstab(0),psim_unstab(1) + print*,"psih_unstab(0-1):",psih_unstab(0),psih_unstab(1) + ENDIF end subroutine mynnsfc_wrapper_init subroutine mynnsfc_wrapper_finalize () end subroutine mynnsfc_wrapper_finalize -!>\defgroup gsd_mynn_sfc GSD MYNN Surface Layer Scheme Module +!>\defgroup mynn_sfc GSD MYNN Surface Layer Scheme Module !> \brief This scheme (1) performs pre-mynnsfc work, (2) runs the mynn sfc layer scheme, and (3) performs post-mynnsfc work !! \section arg_table_mynnsfc_wrapper_run Argument Table !! \htmlinclude mynnsfc_wrapper_run.html @@ -30,7 +58,7 @@ end subroutine mynnsfc_wrapper_finalize SUBROUTINE mynnsfc_wrapper_run( & & im,levs, & & itimestep,iter, & - & flag_init,flag_restart,lsm, & + & flag_init,flag_restart,lsm,lsm_ruc,& & sigmaf,vegtype,shdmax,ivegsrc, & !intent(in) & z0pert,ztpert, & !intent(in) & redrag,sfc_z0_type, & !intent(in) @@ -38,23 +66,24 @@ SUBROUTINE mynnsfc_wrapper_run( & & u, v, t3d, qvsh, qc, prsl, phii, & & exner, ps, PBLH, slmsk, & & wet, dry, icy, & !intent(in) - & tskin_ocn, tskin_lnd, tskin_ice, & !intent(in) - & tsurf_ocn, tsurf_lnd, tsurf_ice, & !intent(in) - & qsfc_ocn, qsfc_lnd, qsfc_ice, & !intent(in) - & snowh_ocn, snowh_lnd, snowh_ice, & !intent(in) - & znt_ocn, znt_lnd, znt_ice, & !intent(inout) - & ust_ocn, ust_lnd, ust_ice, & !intent(inout) - & cm_ocn, cm_lnd, cm_ice, & !intent(inout) - & ch_ocn, ch_lnd, ch_ice, & !intent(inout) - & rb_ocn, rb_lnd, rb_ice, & !intent(inout) - & stress_ocn,stress_lnd,stress_ice, & !intent(inout) - & fm_ocn, fm_lnd, fm_ice, & !intent(inout) - & fh_ocn, fh_lnd, fh_ice, & !intent(inout) - & fm10_ocn, fm10_lnd, fm10_ice, & !intent(inout) - & fh2_ocn, fh2_lnd, fh2_ice, & !intent(inout) - & hflx_ocn, hflx_lnd, hflx_ice, & - & qflx_ocn, qflx_lnd, qflx_ice, & - & QSFC, qsfc_ruc, USTM, ZOL, MOL, & + & tskin_wat, tskin_lnd, tskin_ice, & !intent(in) + & tsurf_wat, tsurf_lnd, tsurf_ice, & !intent(in) + & qsfc_wat, qsfc_lnd, qsfc_ice, & !intent(in) + & snowh_lnd, snowh_ice, & !intent(in) + & znt_wat, znt_lnd, znt_ice, & !intent(inout) + & ust_wat, ust_lnd, ust_ice, & !intent(inout) + & cm_wat, cm_lnd, cm_ice, & !intent(inout) + & ch_wat, ch_lnd, ch_ice, & !intent(inout) + & rb_wat, rb_lnd, rb_ice, & !intent(inout) + & stress_wat,stress_lnd,stress_ice, & !intent(inout) + & fm_wat, fm_lnd, fm_ice, & !intent(inout) + & fh_wat, fh_lnd, fh_ice, & !intent(inout) + & fm10_wat, fm10_lnd, fm10_ice, & !intent(inout) + & fh2_wat, fh2_lnd, fh2_ice, & !intent(inout) + & hflx_wat, hflx_lnd, hflx_ice, & + & qflx_wat, qflx_lnd, qflx_ice, & + & QSFC, qsfc_lnd_ruc, qsfc_ice_ruc, & + & USTM, ZOL, MOL, & & RMOL, WSPD, ch, HFLX, QFLX, LH, & & FLHC, FLQC, & & U10, V10, TH2, T2, Q2, & @@ -110,61 +139,54 @@ SUBROUTINE mynnsfc_wrapper_run( & & iz0tlnd = 0, & !control: 0 & isfflx = 1 + integer, intent(in) :: im, levs + integer, intent(in) :: iter, itimestep, lsm, lsm_ruc + logical, intent(in) :: flag_init,flag_restart,lprnt integer, intent(in) :: ivegsrc integer, intent(in) :: sfc_z0_type ! option for calculating surface roughness length over ocean logical, intent(in) :: redrag ! reduced drag coeff. flag for high wind over sea (j.han) + real(kind=kind_phys), intent(in) :: delt !Input data - integer, dimension(im), intent(in) :: vegtype - real(kind=kind_phys), dimension(im), intent(in) :: & + integer, dimension(:), intent(in) :: vegtype + real(kind=kind_phys), dimension(:), intent(in) :: & & sigmaf,shdmax,z0pert,ztpert -!MYNN-1D - REAL :: delt - INTEGER :: im, levs - INTEGER :: iter, k, i, itimestep, lsm - LOGICAL :: flag_init,flag_restart,lprnt - INTEGER :: IDS,IDE,JDS,JDE,KDS,KDE, & - & IMS,IME,JMS,JME,KMS,KME, & - & ITS,ITE,JTS,JTE,KTS,KTE - - real(kind=kind_phys), dimension(im,levs+1), & + real(kind=kind_phys), dimension(:,:), & & intent(in) :: phii - real(kind=kind_phys), dimension(im,levs), & + real(kind=kind_phys), dimension(:,:), & & intent(in) :: exner, PRSL, & & u, v, t3d, qvsh, qc - real(kind=kind_phys), dimension(im,levs) :: & - & pattern_spp_pbl, dz, th, qv - - logical, dimension(im), intent(in) :: wet, dry, icy - - real(kind=kind_phys), dimension(im), intent(in) :: & - & tskin_ocn, tskin_lnd, tskin_ice, & - & tsurf_ocn, tsurf_lnd, tsurf_ice, & - & snowh_ocn, snowh_lnd, snowh_ice - - real(kind=kind_phys), dimension(im), intent(inout) :: & - & znt_ocn, znt_lnd, znt_ice, & - & ust_ocn, ust_lnd, ust_ice, & - & cm_ocn, cm_lnd, cm_ice, & - & ch_ocn, ch_lnd, ch_ice, & - & rb_ocn, rb_lnd, rb_ice, & - & stress_ocn,stress_lnd,stress_ice, & - & fm_ocn, fm_lnd, fm_ice, & - & fh_ocn, fh_lnd, fh_ice, & - & fm10_ocn, fm10_lnd, fm10_ice, & - & fh2_ocn, fh2_lnd, fh2_ice, & - & hflx_ocn, hflx_lnd, hflx_ice, & - & qflx_ocn, qflx_lnd, qflx_ice, & - & qsfc_ocn, qsfc_lnd, qsfc_ice + logical, dimension(:), intent(in) :: wet, dry, icy + + real(kind=kind_phys), dimension(:), intent(in) :: & + & tskin_wat, tskin_lnd, tskin_ice, & + & tsurf_wat, tsurf_lnd, tsurf_ice, & + & snowh_lnd, snowh_ice + + real(kind=kind_phys), dimension(:), intent(inout) :: & + & znt_wat, znt_lnd, znt_ice, & + & ust_wat, ust_lnd, ust_ice, & + & cm_wat, cm_lnd, cm_ice, & + & ch_wat, ch_lnd, ch_ice, & + & rb_wat, rb_lnd, rb_ice, & + & stress_wat,stress_lnd,stress_ice, & + & fm_wat, fm_lnd, fm_ice, & + & fh_wat, fh_lnd, fh_ice, & + & fm10_wat, fm10_lnd, fm10_ice, & + & fh2_wat, fh2_lnd, fh2_ice, & + & hflx_wat, hflx_lnd, hflx_ice, & + & qflx_wat, qflx_lnd, qflx_ice, & + & qsfc_wat, qsfc_lnd, qsfc_ice !MYNN-2D - real(kind=kind_phys), dimension(im), intent(in) :: & - & dx, pblh, slmsk, ps + real(kind=kind_phys), dimension(:), intent(in) :: & + & dx, pblh, slmsk, ps, & + & qsfc_lnd_ruc, qsfc_ice_ruc - real(kind=kind_phys), dimension(im), intent(inout) :: & - & ustm, hflx, qflx, wspd, qsfc, qsfc_ruc, & + real(kind=kind_phys), dimension(:), intent(inout) :: & + & ustm, hflx, qflx, wspd, qsfc, & & FLHC, FLQC, U10, V10, TH2, T2, Q2, & & CHS2, CQS2, rmol, zol, mol, ch, & & lh, wstar @@ -172,7 +194,16 @@ SUBROUTINE mynnsfc_wrapper_run( & real, dimension(im) :: & & hfx, znt, psim, psih, & & chs, ck, cd, mavail, xland, GZ1OZ0, & - & cpm, qgh, qfx + & cpm, qgh, qfx, qsfc_ruc, snowh_wat + + real(kind=kind_phys), dimension(im,levs) :: & + & pattern_spp_pbl, dz, th, qv + +!MYNN-1D + INTEGER :: k, i + INTEGER :: IDS,IDE,JDS,JDE,KDS,KDE, & + & IMS,IME,JMS,JME,KMS,KME, & + & ITS,ITE,JTS,JTE,KTS,KTE ! Initialize CCPP error handling variables errmsg = '' @@ -202,20 +233,28 @@ SUBROUTINE mynnsfc_wrapper_run( & else xland(i)=2.0 endif - qgh(i)=0.0 - mavail(i)=1.0 - !snowh(i)=snowd(i)*800. !mm -> m - !znt_lnd(i)=znt_lnd(i)*0.01 !cm -> m - !znt_ocn(i)=znt_ocn(i)*0.01 !cm -> m - !znt_ice(i)=znt_ice(i)*0.01 !cm -> m - cpm(i)=cp + qgh(i) = 0.0 + mavail(i) = 1.0 + !snowh(i) = snowd(i)*800. !mm -> m + !znt_lnd(i) = znt_lnd(i)*0.01 !cm -> m + !znt_wat(i) = znt_wat(i)*0.01 !cm -> m + !znt_ice(i) = znt_ice(i)*0.01 !cm -> m + cpm(i) = cp + snowh_wat(i) = 0.0 enddo ! cm -> m where (dry) znt_lnd=znt_lnd*0.01 - where (wet) znt_ocn=znt_ocn*0.01 + where (wet) znt_wat=znt_wat*0.01 where (icy) znt_ice=znt_ice*0.01 + ! qsfc ruc + qsfc_ruc = 0.0 + if (lsm==lsm_ruc) then + where (dry) qsfc_ruc = qsfc_lnd_ruc + where (icy) qsfc_ruc = qsfc_ice_ruc + end if + ! if (lprnt) then ! write(0,*)"CALLING SFCLAY_mynn; input:" ! write(0,*)"T:",t3d(1,1),t3d(1,2),t3d(1,3) @@ -227,15 +266,15 @@ SUBROUTINE mynnsfc_wrapper_run( & ! write(0,*)"dz:",dz(1,1)," qsfc=",qsfc(1)," rmol:",rmol(1) ! write(0,*)" land water ice" ! write(0,*)dry(1),wet(1),icy(1) -! write(0,*)"ust:",ust_lnd(1),ust_ocn(1),ust_ice(1) -! write(0,*)"Tsk:",tskin_lnd(1),tskin_ocn(1),tskin_ice(1) -! write(0,*)"Tsurf:",tsurf_lnd(1),tsurf_ocn(1),tsurf_ice(1) -! write(0,*)"Qsfc:",qsfc_lnd(1),qsfc_ocn(1),qsfc_ice(1) -! write(0,*)"sno:",snowh_lnd(1),snowh_ocn(1),snowh_ice(1) -! write(0,*)"znt:",znt_lnd(1),znt_ocn(1),znt_ice(1) +! write(0,*)"ust:",ust_lnd(1),ust_wat(1),ust_ice(1) +! write(0,*)"Tsk:",tskin_lnd(1),tskin_wat(1),tskin_ice(1) +! write(0,*)"Tsurf:",tsurf_lnd(1),tsurf_wat(1),tsurf_ice(1) +! write(0,*)"Qsfc:",qsfc_lnd(1),qsfc_wat(1),qsfc_ice(1) +! write(0,*)"sno:",snowh_lnd(1),snowh_wat(1),snowh_ice(1) +! write(0,*)"znt:",znt_lnd(1),znt_wat(1),znt_ice(1) ! !write(0,*)"HFX:",hfx(1)," qfx",qfx(1) ! write(0,*)"qsfc:",qsfc(1)," ps:",ps(1) -! write(0,*)"wspd:",wspd(1),"rb=",rb_ocn(1) +! write(0,*)"wspd:",wspd(1),"rb=",rb_wat(1) ! write(0,*)"delt=",delt," im=",im," levs=",levs ! write(0,*)"flag_init=",flag_init ! write(0,*)"flag_restart=",flag_restart @@ -259,22 +298,22 @@ SUBROUTINE mynnsfc_wrapper_run( & & redrag=redrag,sfc_z0_type=sfc_z0_type, & !intent(in) itimestep=itimestep,iter=iter, & wet=wet, dry=dry, icy=icy, & !intent(in) - tskin_ocn=tskin_ocn, tskin_lnd=tskin_lnd, tskin_ice=tskin_ice, & !intent(in) - tsurf_ocn=tsurf_ocn, tsurf_lnd=tsurf_lnd, tsurf_ice=tsurf_ice, & !intent(in) - qsfc_ocn=qsfc_ocn, qsfc_lnd=qsfc_lnd, qsfc_ice=qsfc_ice, & !intent(in) - snowh_ocn=snowh_ocn, snowh_lnd=snowh_lnd, snowh_ice=snowh_ice, & !intent(in) - znt_ocn=znt_ocn, znt_lnd=znt_lnd, znt_ice=znt_ice, & !intent(inout) - ust_ocn=ust_ocn, ust_lnd=ust_lnd, ust_ice=ust_ice, & !intent(inout) - cm_ocn=cm_ocn, cm_lnd=cm_lnd, cm_ice=cm_ice, & !intent(inout) - ch_ocn=ch_ocn, ch_lnd=ch_lnd, ch_ice=ch_ice, & !intent(inout) - rb_ocn=rb_ocn, rb_lnd=rb_lnd, rb_ice=rb_ice, & !intent(inout) - stress_ocn=stress_ocn,stress_lnd=stress_lnd,stress_ice=stress_ice, & !intent(inout) - fm_ocn=fm_ocn, fm_lnd=fm_lnd, fm_ice=fm_ice, & !intent(inout) - fh_ocn=fh_ocn, fh_lnd=fh_lnd, fh_ice=fh_ice, & !intent(inout) - fm10_ocn=fm10_ocn, fm10_lnd=fm10_lnd, fm10_ice=fm10_ice, & !intent(inout) - fh2_ocn=fh2_ocn, fh2_lnd=fh2_lnd, fh2_ice=fh2_ice, & !intent(inout) - hflx_ocn=hflx_ocn, hflx_lnd=hflx_lnd, hflx_ice=hflx_ice, & - qflx_ocn=qflx_ocn, qflx_lnd=qflx_lnd, qflx_ice=qflx_ice, & + tskin_wat=tskin_wat, tskin_lnd=tskin_lnd, tskin_ice=tskin_ice, & !intent(in) + tsurf_wat=tsurf_wat, tsurf_lnd=tsurf_lnd, tsurf_ice=tsurf_ice, & !intent(in) + qsfc_wat=qsfc_wat, qsfc_lnd=qsfc_lnd, qsfc_ice=qsfc_ice, & !intent(in) + snowh_wat=snowh_wat, snowh_lnd=snowh_lnd, snowh_ice=snowh_ice, & !intent(in) + znt_wat=znt_wat, znt_lnd=znt_lnd, znt_ice=znt_ice, & !intent(inout) + ust_wat=ust_wat, ust_lnd=ust_lnd, ust_ice=ust_ice, & !intent(inout) + cm_wat=cm_wat, cm_lnd=cm_lnd, cm_ice=cm_ice, & !intent(inout) + ch_wat=ch_wat, ch_lnd=ch_lnd, ch_ice=ch_ice, & !intent(inout) + rb_wat=rb_wat, rb_lnd=rb_lnd, rb_ice=rb_ice, & !intent(inout) + stress_wat=stress_wat,stress_lnd=stress_lnd,stress_ice=stress_ice, & !intent(inout) + fm_wat=fm_wat, fm_lnd=fm_lnd, fm_ice=fm_ice, & !intent(inout) + fh_wat=fh_wat, fh_lnd=fh_lnd, fh_ice=fh_ice, & !intent(inout) + fm10_wat=fm10_wat, fm10_lnd=fm10_lnd, fm10_ice=fm10_ice, & !intent(inout) + fh2_wat=fh2_wat, fh2_lnd=fh2_lnd, fh2_ice=fh2_ice, & !intent(inout) + hflx_wat=hflx_wat, hflx_lnd=hflx_lnd, hflx_ice=hflx_ice, & + qflx_wat=qflx_wat, qflx_lnd=qflx_lnd, qflx_ice=qflx_ice, & ch=ch,CHS=chs,CHS2=chs2,CQS2=cqs2,CPM=cpm, & ZNT=znt,USTM=ustm,ZOL=zol,MOL=mol,RMOL=rmol, & psim=psim,psih=psih, & @@ -302,13 +341,13 @@ SUBROUTINE mynnsfc_wrapper_run( & ! !evap(i)=QFX(i) !or /rho ?? ! ! DH* note - this could be automated (CCPP knows how to convert m to cm) ! znt_lnd(i)=znt_lnd(i)*100. !m -> cm - ! znt_ocn(i)=znt_ocn(i)*100. + ! znt_wat(i)=znt_wat(i)*100. ! znt_ice(i)=znt_ice(i)*100. !enddo ! m -> cm where (dry) znt_lnd=znt_lnd*100. - where (wet) znt_ocn=znt_ocn*100. + where (wet) znt_wat=znt_wat*100. where (icy) znt_ice=znt_ice*100. ! if (lprnt) then @@ -316,17 +355,17 @@ SUBROUTINE mynnsfc_wrapper_run( & ! write(0,*)"finished with mynn_surface layer; output:" ! write(0,*)" land water ice" ! write(0,*)dry(1),wet(1),icy(1) -! write(0,*)"ust:",ust_lnd(1),ust_ocn(1),ust_ice(1) -! write(0,*)"Tsk:",tskin_lnd(1),tskin_ocn(1),tskin_ice(1) -! write(0,*)"Tsurf:",tsurf_lnd(1),tsurf_ocn(1),tsurf_ice(1) -! write(0,*)"Qsfc:",qsfc_lnd(1),qsfc_ocn(1),qsfc_ice(1) -! write(0,*)"sno:",snowh_lnd(1),snowh_ocn(1),snowh_ice(1) -! write(0,*)"znt (cm):",znt_lnd(1),znt_ocn(1),znt_ice(1) -! write(0,*)"cm:",cm_lnd(1),cm_ocn(1),cm_ice(1) -! write(0,*)"ch:",ch_lnd(1),ch_ocn(1),ch_ice(1) -! write(0,*)"fm:",fm_lnd(1),fm_ocn(1),fm_ice(1) -! write(0,*)"fh:",fh_lnd(1),fh_ocn(1),fh_ice(1) -! write(0,*)"rb:",rb_lnd(1),rb_ocn(1),rb_ice(1) +! write(0,*)"ust:",ust_lnd(1),ust_wat(1),ust_ice(1) +! write(0,*)"Tsk:",tskin_lnd(1),tskin_wat(1),tskin_ice(1) +! write(0,*)"Tsurf:",tsurf_lnd(1),tsurf_wat(1),tsurf_ice(1) +! write(0,*)"Qsfc:",qsfc_lnd(1),qsfc_wat(1),qsfc_ice(1) +! write(0,*)"sno:",snowh_lnd(1),snowh_wat(1),snowh_ice(1) +! write(0,*)"znt (cm):",znt_lnd(1),znt_wat(1),znt_ice(1) +! write(0,*)"cm:",cm_lnd(1),cm_wat(1),cm_ice(1) +! write(0,*)"ch:",ch_lnd(1),ch_wat(1),ch_ice(1) +! write(0,*)"fm:",fm_lnd(1),fm_wat(1),fm_ice(1) +! write(0,*)"fh:",fh_lnd(1),fh_wat(1),fh_ice(1) +! write(0,*)"rb:",rb_lnd(1),rb_wat(1),rb_ice(1) ! write(0,*)"xland=",xland(1)," wstar:",wstar(1) ! write(0,*)"HFX:",hfx(1)," qfx:",qfx(1) ! write(0,*)"HFLX:",hflx(1)," evap:",evap(1) diff --git a/physics/module_MYNNSFC_wrapper.meta b/physics/module_MYNNSFC_wrapper.meta index 6a410c297..34fb6c372 100644 --- a/physics/module_MYNNSFC_wrapper.meta +++ b/physics/module_MYNNSFC_wrapper.meta @@ -3,6 +3,36 @@ type = scheme dependencies = machine.F,module_sf_mynn.F90 +######################################################################## +[ccpp-arg-table] + name = mynnsfc_wrapper_init + type = scheme +[do_mynnsfclay] + standard_name = flag_for_mellor_yamada_nakanishi_niino_surface_layer_scheme + long_name = flag to activate MYNN surface layer + units = flag + dimensions = () + type = logical + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + ######################################################################## [ccpp-arg-table] name = mynnsfc_wrapper_run @@ -16,7 +46,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -24,7 +54,7 @@ intent = in optional = F [itimestep] - standard_name = index_of_time_step + standard_name = index_of_timestep long_name = current number of time steps units = index dimensions = () @@ -40,7 +70,7 @@ intent = in optional = F [flag_init] - standard_name = flag_for_first_time_step + standard_name = flag_for_first_timestep long_name = flag signaling first time step for time integration loop units = flag dimensions = () @@ -56,13 +86,21 @@ intent = in optional = F [lsm] - standard_name = flag_for_land_surface_scheme + standard_name = control_for_land_surface_scheme long_name = flag for land surface model units = flag dimensions = () type = integer intent = in optional = F +[lsm_ruc] + standard_name = identifier_for_ruc_land_surface_scheme + long_name = flag for RUC land surface model + units = flag + dimensions = () + type = integer + intent = in + optional = F [sigmaf] standard_name = bounded_vegetation_area_fraction long_name = areal fractional cover of green vegetation bounded on the bottom @@ -81,7 +119,7 @@ intent = in optional = F [shdmax] - standard_name = maximum_vegetation_area_fraction + standard_name = max_vegetation_area_fraction long_name = max fractnl cover of green veg units = frac dimensions = (horizontal_loop_extent) @@ -90,7 +128,7 @@ intent = in optional = F [ivegsrc] - standard_name = vegetation_type_dataset_choice + standard_name = control_for_vegetation_dataset long_name = land use dataset choice units = index dimensions = () @@ -116,7 +154,7 @@ intent = in optional = F [redrag] - standard_name = flag_for_reduced_drag_coefficient_over_sea + standard_name = flag_for_limited_surface_roughness_length_over_ocean long_name = flag for reduced drag coefficient over sea units = flag dimensions = () @@ -124,15 +162,15 @@ intent = in optional = F [sfc_z0_type] - standard_name = flag_for_surface_roughness_option_over_ocean - long_name = surface roughness options over ocean + standard_name = flag_for_surface_roughness_option_over_water + long_name = surface roughness options over water units = flag dimensions = () type = integer intent = in optional = F [delt] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = time step for physics units = s dimensions = () @@ -141,7 +179,7 @@ intent = in optional = F [dx] - standard_name = cell_size + standard_name = characteristic_grid_lengthscale long_name = size of the grid cell units = m dimensions = (horizontal_loop_extent) @@ -153,7 +191,7 @@ standard_name = x_wind long_name = x component of layer wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -162,7 +200,7 @@ standard_name = y_wind long_name = y component of layer wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -171,25 +209,25 @@ standard_name = air_temperature long_name = layer mean air temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [qvsh] - standard_name = water_vapor_specific_humidity + standard_name = specific_humidity long_name = water vapor specific humidity units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [qc] - standard_name = cloud_condensed_water_mixing_ratio + standard_name = cloud_liquid_water_mixing_ratio long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -198,7 +236,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -207,16 +245,16 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in optional = F [exner] - standard_name = dimensionless_exner_function_at_model_layers + standard_name = dimensionless_exner_function long_name = Exner function at layers units = none - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -240,7 +278,7 @@ intent = in optional = F [slmsk] - standard_name = sea_land_ice_mask_real + standard_name = area_type long_name = landmask: sea/land/ice=0/1/2 units = flag dimensions = (horizontal_loop_extent) @@ -272,9 +310,9 @@ type = logical intent = in optional = F -[tskin_ocn] - standard_name = surface_skin_temperature_over_ocean_interstitial - long_name = surface skin temperature over ocean (temporary use as interstitial) +[tskin_wat] + standard_name = surface_skin_temperature_over_water_interstitial + long_name = surface skin temperature over water (temporary use as interstitial) units = K dimensions = (horizontal_loop_extent) type = real @@ -299,9 +337,9 @@ kind = kind_phys intent = in optional = F -[tsurf_ocn] - standard_name = surface_skin_temperature_after_iteration_over_ocean - long_name = surface skin temperature after iteration over ocean +[tsurf_wat] + standard_name = surface_skin_temperature_after_iteration_over_water + long_name = surface skin temperature after iteration over water units = K dimensions = (horizontal_loop_extent) type = real @@ -326,9 +364,9 @@ kind = kind_phys intent = in optional = F -[qsfc_ocn] - standard_name = surface_specific_humidity_over_ocean - long_name = surface air saturation specific humidity over ocean +[qsfc_wat] + standard_name = surface_specific_humidity_over_water + long_name = surface air saturation specific humidity over water units = kg kg-1 dimensions = (horizontal_loop_extent) type = real @@ -353,15 +391,6 @@ kind = kind_phys intent = inout optional = F -[snowh_ocn] - standard_name = surface_snow_thickness_water_equivalent_over_ocean - long_name = water equivalent snow depth over ocean - units = mm - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F [snowh_lnd] standard_name = surface_snow_thickness_water_equivalent_over_land long_name = water equivalent snow depth over land @@ -380,9 +409,9 @@ kind = kind_phys intent = in optional = F -[znt_ocn] - standard_name = surface_roughness_length_over_ocean_interstitial - long_name = surface roughness length over ocean (temporary use as interstitial) +[znt_wat] + standard_name = surface_roughness_length_over_water + long_name = surface roughness length over water (temporary use as interstitial) units = cm dimensions = (horizontal_loop_extent) type = real @@ -390,7 +419,7 @@ intent = inout optional = F [znt_lnd] - standard_name = surface_roughness_length_over_land_interstitial + standard_name = surface_roughness_length_over_land long_name = surface roughness length over land (temporary use as interstitial) units = cm dimensions = (horizontal_loop_extent) @@ -399,7 +428,7 @@ intent = inout optional = F [znt_ice] - standard_name = surface_roughness_length_over_ice_interstitial + standard_name = surface_roughness_length_over_ice long_name = surface roughness length over ice (temporary use as interstitial) units = cm dimensions = (horizontal_loop_extent) @@ -407,9 +436,9 @@ kind = kind_phys intent = inout optional = F -[ust_ocn] - standard_name = surface_friction_velocity_over_ocean - long_name = surface friction velocity over ocean +[ust_wat] + standard_name = surface_friction_velocity_over_water + long_name = surface friction velocity over water units = m s-1 dimensions = (horizontal_loop_extent) type = real @@ -434,9 +463,9 @@ kind = kind_phys intent = inout optional = F -[cm_ocn] - standard_name = surface_drag_coefficient_for_momentum_in_air_over_ocean - long_name = surface exchange coeff for momentum over ocean +[cm_wat] + standard_name = surface_drag_coefficient_for_momentum_in_air_over_water + long_name = surface exchange coeff for momentum over water units = none dimensions = (horizontal_loop_extent) type = real @@ -461,9 +490,9 @@ kind = kind_phys intent = inout optional = F -[ch_ocn] - standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ocean - long_name = surface exchange coeff heat & moisture over ocean +[ch_wat] + standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_water + long_name = surface exchange coeff heat surface exchange coeff heat & moisture over ocean moisture over water units = none dimensions = (horizontal_loop_extent) type = real @@ -488,9 +517,9 @@ kind = kind_phys intent = inout optional = F -[rb_ocn] - standard_name = bulk_richardson_number_at_lowest_model_level_over_ocean - long_name = bulk Richardson number at the surface over ocean +[rb_wat] + standard_name = bulk_richardson_number_at_lowest_model_level_over_water + long_name = bulk Richardson number at the surface over water units = none dimensions = (horizontal_loop_extent) type = real @@ -515,9 +544,9 @@ kind = kind_phys intent = inout optional = F -[stress_ocn] - standard_name = surface_wind_stress_over_ocean - long_name = surface wind stress over ocean +[stress_wat] + standard_name = surface_wind_stress_over_water + long_name = surface wind stress over water units = m2 s-2 dimensions = (horizontal_loop_extent) type = real @@ -542,9 +571,9 @@ kind = kind_phys intent = inout optional = F -[fm_ocn] - standard_name = Monin_Obukhov_similarity_function_for_momentum_over_ocean - long_name = Monin-Obukhov similarity function for momentum over ocean +[fm_wat] + standard_name = Monin_Obukhov_similarity_function_for_momentum_over_water + long_name = Monin-Obukhov similarity function for momentum over water units = none dimensions = (horizontal_loop_extent) type = real @@ -569,9 +598,9 @@ kind = kind_phys intent = inout optional = F -[fh_ocn] - standard_name = Monin_Obukhov_similarity_function_for_heat_over_ocean - long_name = Monin-Obukhov similarity function for heat over ocean +[fh_wat] + standard_name = Monin_Obukhov_similarity_function_for_heat_over_water + long_name = Monin-Obukhov similarity function for heat over water units = none dimensions = (horizontal_loop_extent) type = real @@ -596,9 +625,9 @@ kind = kind_phys intent = inout optional = F -[fm10_ocn] - standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_ocean - long_name = Monin-Obukhov similarity parameter for momentum at 10m over ocean +[fm10_wat] + standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_water + long_name = Monin-Obukhov similarity parameter for momentum at 10m over water units = none dimensions = (horizontal_loop_extent) type = real @@ -623,9 +652,9 @@ kind = kind_phys intent = inout optional = F -[fh2_ocn] - standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m_over_ocean - long_name = Monin-Obukhov similarity parameter for heat at 2m over ocean +[fh2_wat] + standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m_over_water + long_name = Monin-Obukhov similarity parameter for heat at 2m over water units = none dimensions = (horizontal_loop_extent) type = real @@ -650,9 +679,9 @@ kind = kind_phys intent = inout optional = F -[hflx_ocn] - standard_name = kinematic_surface_upward_sensible_heat_flux_over_ocean - long_name = kinematic surface upward sensible heat flux over ocean +[hflx_wat] + standard_name = kinematic_surface_upward_sensible_heat_flux_over_water + long_name = kinematic surface upward sensible heat flux over water units = K m s-1 dimensions = (horizontal_loop_extent) type = real @@ -677,9 +706,9 @@ kind = kind_phys intent = inout optional = F -[qflx_ocn] - standard_name = kinematic_surface_upward_latent_heat_flux_over_ocean - long_name = kinematic surface upward latent heat flux over ocean +[qflx_wat] + standard_name = kinematic_surface_upward_latent_heat_flux_over_water + long_name = kinematic surface upward latent heat flux over water units = kg kg-1 m s-1 dimensions = (horizontal_loop_extent) type = real @@ -713,17 +742,26 @@ kind = kind_phys intent = inout optional = F -[qsfc_ruc] - standard_name = water_vapor_mixing_ratio_at_surface - long_name = water vapor mixing ratio at surface +[qsfc_lnd_ruc] + standard_name = water_vapor_mixing_ratio_at_surface_over_land + long_name = water vapor mixing ratio at surface over land units = kg kg-1 dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = inout + intent = in + optional = F +[qsfc_ice_ruc] + standard_name = water_vapor_mixing_ratio_at_surface_over_ice + long_name = water vapor mixing ratio at surface over ice + units = kg kg-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in optional = F [ustm] - standard_name = surface_friction_velocity_drag + standard_name = surface_friction_velocity_for_momentum long_name = friction velocity isolated for momentum only units = m s-1 dimensions = (horizontal_loop_extent) @@ -732,7 +770,7 @@ intent = inout optional = F [zol] - standard_name = surface_stability_parameter + standard_name = ratio_of_height_to_monin_obukhov_length long_name = monin obukhov surface stability parameter units = none dimensions = (horizontal_loop_extent) @@ -741,7 +779,7 @@ intent = inout optional = F [mol] - standard_name = theta_star + standard_name = surface_temperature_scale long_name = temperature flux divided by ustar (temperature scale) units = K dimensions = (horizontal_loop_extent) @@ -777,7 +815,7 @@ intent = inout optional = F [hflx] - standard_name = kinematic_surface_upward_sensible_heat_flux + standard_name = surface_upward_temperature_flux long_name = kinematic surface upward sensible heat flux units = K m s-1 dimensions = (horizontal_loop_extent) @@ -786,7 +824,7 @@ intent = inout optional = F [qflx] - standard_name = kinematic_surface_upward_latent_heat_flux + standard_name = surface_upward_specific_humidity_flux long_name = kinematic surface upward latent heat flux units = kg kg-1 m s-1 dimensions = (horizontal_loop_extent) @@ -795,7 +833,7 @@ intent = inout optional = F [lh] - standard_name = surface_latent_heat + standard_name = surface_upward_latent_heat_flux long_name = latent heating at the surface (pos = up) units = W m-2 dimensions = (horizontal_loop_extent) @@ -840,7 +878,7 @@ intent = inout optional = F [th2] - standard_name = potential_temperature_at_2m + standard_name = air_potential_temperature_at_2m long_name = 2 meter potential temperature units = K dimensions = (horizontal_loop_extent) @@ -849,7 +887,7 @@ intent = inout optional = F [t2] - standard_name = temperature_at_2m + standard_name = air_temperature_at_2m long_name = 2 meter temperature units = K dimensions = (horizontal_loop_extent) @@ -867,7 +905,7 @@ intent = inout optional = F [wstar] - standard_name = surface_wind_enhancement_due_to_convection + standard_name = enhancement_to_wind_speed_at_surface_adjacent_layer_due_to_convection long_name = surface wind enhancement due to convection units = m s-1 dimensions = (horizontal_loop_extent) diff --git a/physics/module_SGSCloud_RadPost.F90 b/physics/module_SGSCloud_RadPost.F90 index bedb660a6..ea262596f 100644 --- a/physics/module_SGSCloud_RadPost.F90 +++ b/physics/module_SGSCloud_RadPost.F90 @@ -34,8 +34,8 @@ subroutine sgscloud_radpost_run( & integer, intent(in) :: im, levs logical, intent(in) :: flag_init, flag_restart - real(kind=kind_phys), dimension(im,levs), intent(inout) :: qc, qi - real(kind=kind_phys), dimension(im,levs), intent(in) :: qc_save, qi_save + real(kind=kind_phys), dimension(:,:), intent(inout) :: qc, qi + real(kind=kind_phys), dimension(:,:), intent(in) :: qc_save, qi_save character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! Local variable diff --git a/physics/module_SGSCloud_RadPost.meta b/physics/module_SGSCloud_RadPost.meta index 06df85da7..70613a404 100644 --- a/physics/module_SGSCloud_RadPost.meta +++ b/physics/module_SGSCloud_RadPost.meta @@ -16,7 +16,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -24,7 +24,7 @@ intent = in optional = F [flag_init] - standard_name = flag_for_first_time_step + standard_name = flag_for_first_timestep long_name = flag signaling first time step for time integration loop units = flag dimensions = () @@ -40,19 +40,19 @@ intent = in optional = F [qc] - standard_name = cloud_condensed_water_mixing_ratio + standard_name = cloud_liquid_water_mixing_ratio long_name = no condensates) ratio of mass of cloud water to mass of dry air plus vapor (without condensates) units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [qi] - standard_name = ice_water_mixing_ratio + standard_name = cloud_ice_mixing_ratio long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -61,7 +61,7 @@ standard_name = cloud_condensed_water_mixing_ratio_save long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -70,7 +70,7 @@ standard_name = ice_water_mixing_ratio_save long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in diff --git a/physics/module_SGSCloud_RadPre.F90 b/physics/module_SGSCloud_RadPre.F90 index a44f17340..20136ba00 100644 --- a/physics/module_SGSCloud_RadPre.F90 +++ b/physics/module_SGSCloud_RadPre.F90 @@ -6,19 +6,24 @@ !! scale) qc, qi and cloud fraction coming from the microphysics scheme. !! 4) Recompute the diagnostic high, mid, low, total and bl clouds to be consistent with radiation +!> \defgroup sgsrad_group GSD sgscloud_radpre_run Module module sgscloud_radpre contains +!> \section arg_table_sgscloud_radpre_init Argument Table +!! \htmlinclude sgscloud_radpre_init.html +!! subroutine sgscloud_radpre_init () end subroutine sgscloud_radpre_init +!> \section arg_table_sgscloud_radpre_finalize Argument Table +!! \htmlinclude sgscloud_radpre_finalize.html +!! subroutine sgscloud_radpre_finalize () end subroutine sgscloud_radpre_finalize -!> \defgroup sgsrad_group GSD sgscloud_radpre_run Module -!> \ingroup sgscloud_radpre -!! This interstitial code adds the subgrid clouds to the resolved-scale clouds +!> This interstitial code adds the subgrid clouds to the resolved-scale clouds !! if there is no resolved-scale clouds in that particular grid box. It can also !! specify a cloud fraction for resolved-scale clouds, using Xu-Randall (1996), !! if desired. @@ -67,20 +72,20 @@ subroutine sgscloud_radpre_run( & integer, intent(in) :: im, levs, imfdeepcnv, imfdeepcnv_gf, & & nlay, imp_physics, imp_physics_gfdl logical, intent(in) :: flag_init, flag_restart, do_mynnedmf - real(kind=kind_phys), dimension(im,levs), intent(inout) :: qc, qi - real(kind=kind_phys), dimension(im,levs), intent(inout) :: qr, qs, qg + real(kind=kind_phys), dimension(:,:), intent(inout) :: qc, qi + real(kind=kind_phys), dimension(:,:), intent(inout) :: qr, qs, qg ! qci_conv only allocated if GF is used real(kind=kind_phys), dimension(:,:), intent(inout) :: qci_conv - real(kind=kind_phys), dimension(im,levs), intent(in) :: T3D,delp, & + real(kind=kind_phys), dimension(:,:), intent(in) :: T3D,delp, & & qv,P3D - real(kind=kind_phys), dimension(im,levs), intent(inout) :: & + real(kind=kind_phys), dimension(:,:), intent(inout) :: & & clouds1,clouds2,clouds3,clouds4,clouds5 - real(kind=kind_phys), dimension(im,levs), intent(inout) :: qc_save, qi_save - real(kind=kind_phys), dimension(im,levs), intent(in) :: qc_bl, qi_bl, cldfra_bl - real(kind=kind_phys), dimension(im), intent(in) :: slmsk, xlat, de_lgth - real(kind=kind_phys), dimension(im,nlay), intent(in) :: plyr, dz - real(kind=kind_phys), dimension(im,5), intent(inout) :: cldsa - integer, dimension(im,3), intent(inout) :: mbota, mtopa + real(kind=kind_phys), dimension(:,:), intent(inout) :: qc_save, qi_save + real(kind=kind_phys), dimension(:,:), intent(in) :: qc_bl, qi_bl, cldfra_bl + real(kind=kind_phys), dimension(:), intent(in) :: slmsk, xlat, de_lgth + real(kind=kind_phys), dimension(:,:), intent(in) :: plyr, dz + real(kind=kind_phys), dimension(:,:), intent(inout) :: cldsa + integer, dimension(:,:), intent(inout) :: mbota, mtopa integer, intent(in) :: iovr character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg diff --git a/physics/module_SGSCloud_RadPre.meta b/physics/module_SGSCloud_RadPre.meta index e35d92f8b..e79e6fc61 100644 --- a/physics/module_SGSCloud_RadPre.meta +++ b/physics/module_SGSCloud_RadPre.meta @@ -16,7 +16,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -24,7 +24,7 @@ intent = in optional = F [flag_init] - standard_name = flag_for_first_time_step + standard_name = flag_for_first_timestep long_name = flag signaling first time step for time integration loop units = flag dimensions = () @@ -75,29 +75,37 @@ kind = kind_phys intent = in optional = F +[do_mynnedmf] + standard_name = flag_for_mellor_yamada_nakanishi_niino_pbl_scheme + long_name = flag to activate MYNN-EDMF + units = flag + dimensions = () + type = logical + intent = in + optional = F [qc] - standard_name = cloud_condensed_water_mixing_ratio + standard_name = cloud_liquid_water_mixing_ratio long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [qi] - standard_name = ice_water_mixing_ratio + standard_name = cloud_ice_mixing_ratio long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [qv] - standard_name = water_vapor_specific_humidity + standard_name = specific_humidity long_name = water vapor specific humidity units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -106,7 +114,7 @@ standard_name = air_temperature long_name = layer mean air temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -115,25 +123,25 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [qr] - standard_name = rain_water_mixing_ratio + standard_name = rain_mixing_ratio long_name = moist (dry+vapor, no condensates) mixing ratio of rain water units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [qs] - standard_name = snow_water_mixing_ratio + standard_name = snow_mixing_ratio long_name = moist (dry+vapor, no condensates) mixing ratio of snow water units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -142,7 +150,7 @@ standard_name = graupel_mixing_ratio long_name = graupel mixing ratio wrt dry+vapor (no condensates) units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -151,13 +159,13 @@ standard_name = convective_cloud_condesate_after_rainout long_name = convective cloud condesate after rainout units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [imfdeepcnv] - standard_name = flag_for_mass_flux_deep_convection_scheme + standard_name = control_for_deep_convection_scheme long_name = flag for mass-flux deep convection scheme units = flag dimensions = () @@ -165,7 +173,7 @@ intent = in optional = F [imfdeepcnv_gf] - standard_name = flag_for_gf_deep_convection_scheme + standard_name = identifier_for_grell_freitas_deep_convection long_name = flag for Grell-Freitas deep convection scheme units = flag dimensions = () @@ -176,7 +184,7 @@ standard_name = cloud_condensed_water_mixing_ratio_save long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -185,34 +193,34 @@ standard_name = ice_water_mixing_ratio_save long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [QC_BL] - standard_name = subgrid_cloud_water_mixing_ratio_pbl + standard_name = subgrid_scale_cloud_liquid_water_mixing_ratio long_name = subgrid cloud water mixing ratio from PBL scheme units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [QI_BL] - standard_name = subgrid_cloud_ice_mixing_ratio_pbl + standard_name = subgrid_scale_cloud_ice_mixing_ratio long_name = subgrid cloud ice mixing ratio from PBL scheme units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [CLDFRA_BL] - standard_name = subgrid_cloud_fraction_pbl + standard_name = subgrid_scale_cloud_area_fraction_in_atmosphere_layer long_name = subgrid cloud fraction from PBL scheme units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -230,7 +238,7 @@ standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -239,7 +247,7 @@ standard_name = cloud_liquid_water_path long_name = layer cloud liquid water path units = g m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -248,7 +256,7 @@ standard_name = mean_effective_radius_for_liquid_cloud long_name = mean effective radius for liquid cloud units = um - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -257,7 +265,7 @@ standard_name = cloud_ice_water_path long_name = layer cloud ice water path units = g m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -266,13 +274,13 @@ standard_name = mean_effective_radius_for_ice_cloud long_name = mean effective radius for ice cloud units = um - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [slmsk] - standard_name = sea_land_ice_mask_real + standard_name = area_type long_name = landmask: sea/land/ice=0/1/2 units = flag dimensions = (horizontal_loop_extent) @@ -349,16 +357,8 @@ type = integer intent = inout optional = F -[do_mynnedmf] - standard_name = do_mynnedmf - long_name = flag to activate MYNN-EDMF - units = flag - dimensions = () - type = logical - intent = in - optional = F [imp_physics] - standard_name = flag_for_microphysics_scheme + standard_name = control_for_microphysics_scheme long_name = choice of microphysics scheme units = flag dimensions = () @@ -366,7 +366,7 @@ intent = in optional = F [imp_physics_gfdl] - standard_name = flag_for_gfdl_microphysics_scheme + standard_name = identifier_for_gfdl_microphysics_scheme long_name = choice of GFDL microphysics scheme units = flag dimensions = () diff --git a/physics/module_bl_mynn.F90 b/physics/module_bl_mynn.F90 index fa892eba8..d691de909 100644 --- a/physics/module_bl_mynn.F90 +++ b/physics/module_bl_mynn.F90 @@ -2947,6 +2947,7 @@ SUBROUTINE mynn_tendencies(kts,kte, & khdz(k) = rhoz(k)*dfh(k) kmdz(k) = rhoz(k)*dfm(k) ENDDO + rhoz(kte+1)=rhoz(kte) khdz(kte+1)=rhoz(kte+1)*dfh(kte) kmdz(kte+1)=rhoz(kte+1)*dfm(kte) diff --git a/physics/module_gfdl_cloud_microphys.F90 b/physics/module_gfdl_cloud_microphys.F90 index 5750d27fd..7f00d9bca 100644 --- a/physics/module_gfdl_cloud_microphys.F90 +++ b/physics/module_gfdl_cloud_microphys.F90 @@ -1,6 +1,6 @@ !> \file gfdl_cloud_microphys.F90 !! This file contains the full GFDL cloud microphysics (Chen and Lin (2013) -!! \cite chen_and_lin_2013 and Zhou et al. 2019 \cite zhou2019toward). +!! \cite chen_and_lin_2013 and Zhou et al. 2019 \cite zhou_etal_2019). !! The module is paired with 'gfdl_fv_sat_adj', which performs the "fast" !! processes !>author Shian-Jiann Lin, Linjiong Zhou @@ -47,6 +47,9 @@ module gfdl_cloud_microphys_mod public gfdl_cloud_microphys_mod_driver, gfdl_cloud_microphys_mod_init, & gfdl_cloud_microphys_mod_end, cloud_diagnosis +! public wqs1, wqs2, qs_blend, wqsat_moist, wqsat2_moist +! public qsmith_init, qsmith, es2_table1d, es3_table1d, esw_table1d +! public setup_con, wet_bulb real :: missing_value = - 1.e10 @@ -116,7 +119,18 @@ module gfdl_cloud_microphys_mod real, parameter :: sfcrho = 1.2 !< surface air density real, parameter :: rhor = 1.e3 !< density of rain water, lin83 + ! intercept parameters + + real, parameter :: rnzr = 8.0e6 ! lin83 + real, parameter :: rnzs = 3.0e6 ! lin83 + real, parameter :: rnzg = 4.0e6 ! rh84 + real, parameter :: rnzh = 4.0e4 ! lin83 --- lmh 29 sep 17 + + ! density parameters + real, parameter :: rhoh = 0.917e3 ! lin83 --- lmh 29 sep 17 + + public rhor, rhos, rhog, rhoh, rnzr, rnzs, rnzg, rnzh real :: cracs, csacr, cgacr, cgacs, csacw, craci, csaci, cgacw, cgaci, cracw !< constants for accretions real :: acco (3, 4) !< constants for accretions real :: cssub (5), cgsub (5), crevp (5), cgfr (2), csmlt (5), cgmlt (5) @@ -283,6 +297,7 @@ module gfdl_cloud_microphys_mod logical :: use_ppm = .false. !< use ppm fall scheme logical :: mono_prof = .true. !< perform terminal fall with mono ppm scheme logical :: mp_print = .false. !< cloud microphysics debugging printout + logical :: do_hail = .false. !< use hail parameters instead of graupel ! real :: global_area = - 1. @@ -316,7 +331,7 @@ module gfdl_cloud_microphys_mod rad_snow, rad_graupel, rad_rain, cld_min, use_ppm, mono_prof, & do_sedi_heat, sedi_transport, do_sedi_w, de_ice, icloud_f, irain_f, & mp_print, reiflag, rewmin, rewmax, reimin, reimax, rermin, rermax, & - resmin, resmax, regmin, regmax, tintqs + resmin, resmax, regmin, regmax, tintqs, do_hail public & mp_time, t_min, t_sub, tau_r2g, tau_smlt, tau_g2r, dw_land, dw_ocean, & @@ -330,7 +345,7 @@ module gfdl_cloud_microphys_mod rad_snow, rad_graupel, rad_rain, cld_min, use_ppm, mono_prof, & do_sedi_heat, sedi_transport, do_sedi_w, de_ice, icloud_f, irain_f, & mp_print, reiflag, rewmin, rewmax, reimin, reimax, rermin, rermax, & - resmin, resmax, regmin, regmax, tintqs + resmin, resmax, regmin, regmax, tintqs, do_hail contains @@ -346,7 +361,7 @@ subroutine gfdl_cloud_microphys_mod_driver ( qv_dt, ql_dt, qr_dt, qi_dt, qs_dt, qg_dt, qa_dt, pt_dt, pt, w, & uin, vin, udt, vdt, dz, delp, area, dt_in, land, & rain, snow, ice, graupel, hydrostatic, phys_hydrostatic, & - p, lradar, refl_10cm,reset) + p, lradar, refl_10cm, reset, pfils, pflls) implicit none @@ -377,6 +392,7 @@ subroutine gfdl_cloud_microphys_mod_driver ( logical, intent (in) :: lradar real, intent (out), dimension (iis:iie, jjs:jje, kks:kke) :: refl_10cm logical, intent (in) :: reset + real, intent (out), dimension (iis:iie, jjs:jje, kks:kke) :: pfils, pflls ! Local variables logical :: melti = .false. @@ -468,6 +484,9 @@ subroutine gfdl_cloud_microphys_mod_driver ( enddo enddo + pfils = 0. + pflls = 0. + ! ----------------------------------------------------------------------- ! major cloud microphysics ! ----------------------------------------------------------------------- @@ -479,6 +498,12 @@ subroutine gfdl_cloud_microphys_mod_driver ( m2_sol, cond (:, j), area (:, j), land (:, j), udt, vdt, pt_dt, & qv_dt, ql_dt, qr_dt, qi_dt, qs_dt, qg_dt, qa_dt, w_var, vt_r, & vt_s, vt_g, vt_i, qn2) + do k = ktop, kbot + do i = is, ie + pfils(i, j, k) = m2_sol (i, k) + pflls(i, j, k) = m2_rain(i, k) + enddo + enddo enddo ! ----------------------------------------------------------------------- @@ -1796,9 +1821,11 @@ subroutine icloud (ktop, kbot, tzk, p1, qvk, qlk, qrk, qik, qsk, qgk, dp1, & !! threshold from wsm6 scheme, Hong et al. (2004) \cite hong_et_al_2004, !! eq (13) : qi0_crt ~0.8e-4. ! ----------------------------------------------------------------------- - - qim = qi0_crt / den (k) - + if (qi0_crt < 0.) then + qim = - qi0_crt + else + qim = qi0_crt / den (k) + endif ! ----------------------------------------------------------------------- ! assuming linear subgrid vertical distribution of cloud ice ! the mismatch computation following lin et al. 1994, mwr @@ -3280,8 +3307,10 @@ subroutine fall_speed (ktop, kbot, den, qs, qi, qg, ql, tk, vts, vti, vtg) real, parameter :: vcons = 6.6280504 real, parameter :: vcong = 87.2382675 + real, parameter :: vconh = vcong * sqrt (rhoh / rhog) real, parameter :: norms = 942477796.076938 real, parameter :: normg = 5026548245.74367 + real, parameter :: normh = pi * rhoh * rnzh real, dimension (ktop:kbot) :: qden, tc, rhof @@ -3346,10 +3375,19 @@ subroutine fall_speed (ktop, kbot, den, qs, qi, qg, ql, tk, vts, vti, vtg) ! ----------------------------------------------------------------------- !> - graupel: ! ----------------------------------------------------------------------- - if (const_vg) then vtg (:) = vg_fac ! 2. else + if (do_hail) then + do k = ktop, kbot + if (qg (k) < thg) then + vtg (k) = vf_min + else + vtg (k) = vg_fac * vconh * rhof (k) * sqrt (sqrt (sqrt (qg (k) * den (k) / normh))) + vtg (k) = min (vg_max, max (vf_min, vtg (k))) + endif + enddo + else do k = ktop, kbot if (qg (k) < thg) then vtg (k) = vf_min @@ -3359,6 +3397,7 @@ subroutine fall_speed (ktop, kbot, den, qs, qi, qg, ql, tk, vts, vti, vtg) endif enddo endif + endif end subroutine fall_speed @@ -3382,9 +3421,9 @@ subroutine setupm ! intercept parameters - real, parameter :: rnzr = 8.0e6 ! lin83 - real, parameter :: rnzs = 3.0e6 ! lin83 - real, parameter :: rnzg = 4.0e6 ! rh84 +! real, parameter :: rnzr = 8.0e6 ! lin83 +! real, parameter :: rnzs = 3.0e6 ! lin83 +! real, parameter :: rnzg = 4.0e6 ! rh84 ! density parameters @@ -3427,8 +3466,13 @@ subroutine setupm cracs = pisq * rnzr * rnzs * rhos csacr = pisq * rnzr * rnzs * rhor - cgacr = pisq * rnzr * rnzg * rhor - cgacs = pisq * rnzg * rnzs * rhos + if (do_hail) then + cgacr = pisq * rnzr * rnzh * rhor + cgacs = pisq * rnzh * rnzs * rhos + else + cgacr = pisq * rnzr * rnzg * rhor + cgacs = pisq * rnzg * rnzs * rhos + endif cgacs = cgacs * c_pgacs ! act: 1 - 2:racs (s - r) ; 3 - 4:sacr (r - s) ; @@ -3436,7 +3480,11 @@ subroutine setupm act (1) = pie * rnzs * rhos act (2) = pie * rnzr * rhor - act (6) = pie * rnzg * rhog + if (do_hail) then + act (6) = pie * rnzh * rhoh + else + act (6) = pie * rnzg * rhog + endif act (3) = act (2) act (4) = act (1) act (5) = act (2) @@ -3457,7 +3505,11 @@ subroutine setupm craci = pie * rnzr * alin * gam380 / (4. * act (2) ** 0.95) csaci = csacw * c_psaci - cgacw = pie * rnzg * gam350 * gcon / (4. * act (6) ** 0.875) + if (do_hail) then + cgacw = pie * rnzh * gam350 * gcon / (4. * act (6) ** 0.875) + else + cgacw = pie * rnzg * gam350 * gcon / (4. * act (6) ** 0.875) + endif ! cgaci = cgacw * 0.1 ! sjl, may 28, 2012 @@ -3470,7 +3522,11 @@ subroutine setupm ! subl and revp: five constants for three separate processes cssub (1) = 2. * pie * vdifu * tcond * rvgas * rnzs - cgsub (1) = 2. * pie * vdifu * tcond * rvgas * rnzg + if (do_hail) then + cgsub (1) = 2. * pie * vdifu * tcond * rvgas * rnzh + else + cgsub (1) = 2. * pie * vdifu * tcond * rvgas * rnzg + endif crevp (1) = 2. * pie * vdifu * tcond * rvgas * rnzr cssub (2) = 0.78 / sqrt (act (1)) cgsub (2) = 0.78 / sqrt (act (6)) @@ -3498,8 +3554,13 @@ subroutine setupm ! gmlt: five constants - cgmlt (1) = 2. * pie * tcond * rnzg / hltf - cgmlt (2) = 2. * pie * vdifu * rnzg * hltc / hltf + if (do_hail) then + cgmlt (1) = 2. * pie * tcond * rnzh / hltf + cgmlt (2) = 2. * pie * vdifu * rnzh * hltc / hltf + else + cgmlt (1) = 2. * pie * tcond * rnzg / hltf + cgmlt (2) = 2. * pie * vdifu * rnzg * hltc / hltf + endif cgmlt (3) = cgsub (2) cgmlt (4) = cgsub (3) cgmlt (5) = ch2o / hltf diff --git a/physics/module_mp_thompson.F90 b/physics/module_mp_thompson.F90 index c19b594dd..f05aa8ba2 100644 --- a/physics/module_mp_thompson.F90 +++ b/physics/module_mp_thompson.F90 @@ -53,13 +53,17 @@ !! perturbations to the graupel intercept parameter, !! the cloud water shape parameter, and the number !! concentration of nucleated aerosols. +!! - Last modified: 12 Feb 2021 G. Thompson updated to align more closely +!! with his WRF version, including bug fixes and designed +!! changes. + MODULE module_mp_thompson USE machine, only : kind_phys USE module_mp_radar -#if !defined(SION) && defined(MPI) +#ifdef MPI use mpi #endif @@ -120,8 +124,8 @@ MODULE module_mp_thompson !.. mixing ratio. Also, when mu_g is non-zero, these become equiv !.. y-intercept for an exponential distrib and proper values are !.. computed based on same mixing ratio and total number concentration. - REAL, PARAMETER, PRIVATE:: gonv_min = 1.E4 - REAL, PARAMETER, PRIVATE:: gonv_max = 3.E6 + REAL, PARAMETER, PRIVATE:: gonv_min = 1.E2 + REAL, PARAMETER, PRIVATE:: gonv_max = 1.E6 !..Mass power law relations: mass = am*D**bm !.. Snow from Field et al. (2005), others assume spherical form. @@ -183,7 +187,7 @@ MODULE module_mp_thompson REAL, PRIVATE:: Sc3 !..Homogeneous freezing temperature - REAL, PARAMETER, PRIVATE:: HGFR = 235.16 !< Homogeneous freezing temperature + REAL, PARAMETER, PRIVATE:: HGFR = 235.16 !..Water vapor and air gas constants at constant pressure REAL, PARAMETER, PRIVATE:: Rv = 461.5 @@ -214,6 +218,15 @@ MODULE module_mp_thompson REAL, PARAMETER, PRIVATE:: D0g = 250.E-6 REAL, PRIVATE:: D0i, xm0s, xm0g +!..Min and max radiative effective radius of cloud water, cloud ice, and snow; +!.. performed by subroutine calc_effectRad. On purpose, these should stay PUBLIC. + REAL, PARAMETER:: re_qc_min = 2.50E-6 ! 2.5 microns + REAL, PARAMETER:: re_qc_max = 50.0E-6 ! 50 microns + REAL, PARAMETER:: re_qi_min = 2.50E-6 ! 2.5 microns + REAL, PARAMETER:: re_qi_max = 125.0E-6 ! 125 microns + REAL, PARAMETER:: re_qs_min = 5.00E-6 ! 5 microns + REAL, PARAMETER:: re_qs_max = 999.0E-6 ! 999 microns (1 mm) + !..Lookup table dimensions INTEGER, PARAMETER, PRIVATE:: nbins = 100 INTEGER, PARAMETER, PRIVATE:: nbc = nbins @@ -226,7 +239,7 @@ MODULE module_mp_thompson INTEGER, PARAMETER, PRIVATE:: ntb_r = 37 INTEGER, PARAMETER, PRIVATE:: ntb_s = 28 INTEGER, PARAMETER, PRIVATE:: ntb_g = 28 - INTEGER, PARAMETER, PRIVATE:: ntb_g1 = 28 + INTEGER, PARAMETER, PRIVATE:: ntb_g1 = 37 INTEGER, PARAMETER, PRIVATE:: ntb_r1 = 37 INTEGER, PARAMETER, PRIVATE:: ntb_i1 = 55 INTEGER, PARAMETER, PRIVATE:: ntb_t = 9 @@ -299,10 +312,11 @@ MODULE module_mp_thompson !> Lookup tables for graupel y-intercept parameter (/m**4). REAL, DIMENSION(ntb_g1), PARAMETER, PRIVATE:: & - N0g_exp = (/1.e4,2.e4,3.e4,4.e4,5.e4,6.e4,7.e4,8.e4,9.e4, & + N0g_exp = (/1.e2,2.e2,3.e2,4.e2,5.e2,6.e2,7.e2,8.e2,9.e2, & + 1.e3,2.e3,3.e3,4.e3,5.e3,6.e3,7.e3,8.e3,9.e3, & + 1.e4,2.e4,3.e4,4.e4,5.e4,6.e4,7.e4,8.e4,9.e4, & 1.e5,2.e5,3.e5,4.e5,5.e5,6.e5,7.e5,8.e5,9.e5, & - 1.e6,2.e6,3.e6,4.e6,5.e6,6.e6,7.e6,8.e6,9.e6, & - 1.e7/) + 1.e6/) !> Lookup tables for ice number concentration (/m**3). REAL, DIMENSION(ntb_i1), PARAMETER, PRIVATE:: & @@ -354,6 +368,15 @@ MODULE module_mp_thompson !.. and temperature array indices. Variables beginning with t-p/c/m/n !.. represent lookup tables. Save compile-time memory by making !.. allocatable (2009Jun12, J. Michalakes). + +!..To permit possible creation of new lookup tables as variables expand/change, +!.. specify a name of external file(s) including version number for pre-computed +!.. Thompson tables. + character(len=*), parameter :: thomp_table_file = 'thompson_tables_precomp_v2.sl' + character(len=*), parameter :: qr_acr_qg_file = 'qr_acr_qgV2.dat' + character(len=*), parameter :: qr_acr_qs_file = 'qr_acr_qsV2.dat' + character(len=*), parameter :: freeze_h2o_file = 'freezeH2O.dat' + INTEGER, PARAMETER, PRIVATE:: R8SIZE = 8 INTEGER, PARAMETER, PRIVATE:: R4SIZE = 4 REAL (KIND=R8SIZE), ALLOCATABLE, DIMENSION(:,:,:,:):: & @@ -398,11 +421,8 @@ MODULE module_mp_thompson !..MPI communicator INTEGER:: mpi_communicator -!..If SIONlib isn't used, write Thompson tables with master MPI task -!.. after computing them in thompson_init -#ifndef SION +!..Write tables with master MPI task after computing them in thompson_init LOGICAL:: thompson_table_writer -#endif !+---+ !+---+-----------------------------------------------------------------+ @@ -417,40 +437,34 @@ MODULE module_mp_thompson !! lookup tables in Thomspson scheme. !>\section gen_thompson_init thompson_init General Algorithm !> @{ - SUBROUTINE thompson_init(nwfa2d, nifa2d, nwfa, nifa, & - mpicomm, mpirank, mpiroot, & + SUBROUTINE thompson_init(is_aerosol_aware_in, & + mpicomm, mpirank, mpiroot, & threads, errmsg, errflg) IMPLICIT NONE -!..OPTIONAL variables that control application of aerosol-aware scheme - - REAL, DIMENSION(:,:), OPTIONAL, INTENT(IN) :: nwfa, nifa - REAL, DIMENSION(:), OPTIONAL, INTENT(IN) :: nwfa2d, nifa2d + LOGICAL, INTENT(IN) :: is_aerosol_aware_in INTEGER, INTENT(IN) :: mpicomm, mpirank, mpiroot INTEGER, INTENT(IN) :: threads CHARACTER(len=*), INTENT(INOUT) :: errmsg INTEGER, INTENT(INOUT) :: errflg - INTEGER:: i, j, k, l, m, n - REAL:: h_01, airmass, niIN3, niCCN3, max_test LOGICAL:: micro_init real :: stime, etime -#ifdef SION - INTEGER :: ierr - LOGICAL :: precomputed_tables -#else LOGICAL, PARAMETER :: precomputed_tables = .FALSE. -#endif - is_aerosol_aware = .FALSE. - micro_init = .FALSE. +! Set module variable is_aerosol_aware + is_aerosol_aware = is_aerosol_aware_in + if (mpirank==mpiroot) then + if (is_aerosol_aware) then + write (0,'(a)') 'Using aerosol-aware version of Thompson microphysics' + else + write (0,'(a)') 'Using non-aerosol-aware version of Thompson microphysics' + end if + end if - if (present(nwfa2d) .and. & - present(nifa2d) .and. & - present(nwfa) .and. & - present(nifa) ) is_aerosol_aware = .true. + micro_init = .FALSE. !> - Allocate space for lookup tables (J. Michalakes 2009Jun08). @@ -746,18 +760,7 @@ SUBROUTINE thompson_init(nwfa2d, nifa2d, nwfa, nifa, & ! Assign mpicomm to module variable mpi_communicator = mpicomm -#ifdef SION - call cpu_time(stime) - call readwrite_tables("read", mpicomm, mpirank, mpiroot, ierr) - call cpu_time(etime) - if (ierr==0) then - precomputed_tables = .true. - if (mpirank==mpiroot) print '("Reading and broadcasting precomputed Thompson tables took ",f10.3," seconds.")', etime-stime - else - precomputed_tables = .false. - if (mpirank==mpiroot) write(0,*) "An error occurred reading Thompson tables from disk, recalculate" - end if -#else + ! Standard tables are only written by master MPI task; ! (physics init cannot be called by multiple threads, ! hence no need to test for a specific thread number) @@ -766,7 +769,6 @@ SUBROUTINE thompson_init(nwfa2d, nifa2d, nwfa, nifa, & else thompson_table_writer = .false. end if -#endif precomputed_tables_1: if (.not.precomputed_tables) then @@ -880,9 +882,6 @@ SUBROUTINE thompson_init(nwfa2d, nifa2d, nwfa, nifa, & !> - Call table_ccnact() to read a static file containing CCN activation of aerosols. The !! data were created from a parcel model by Feingold & Heymsfield with !! further changes by Eidhammer and Kriedenweis - ! This computation is cheap compared to the others below, and - ! doing it always ensures that the correct data is in the SIONlib - ! file containing the precomputed tables *DH if (mpirank==mpiroot) write(0,*) ' calling table_ccnAct routine' call table_ccnAct(errmsg,errflg) if (.not. errflg==0) return @@ -897,6 +896,10 @@ SUBROUTINE thompson_init(nwfa2d, nifa2d, nwfa, nifa, & if (mpirank==mpiroot) write(0,*) ' creating rain evap table' call table_dropEvap +!> - Call qi_aut_qs() to create conversion of some ice mass into snow category + if (mpirank==mpiroot) write(0,*) ' creating ice converting to snow table' + call qi_aut_qs + call cpu_time(etime) if (mpirank==mpiroot) print '("Calculating Thompson tables part 1 took ",f10.3," seconds.")', etime-stime @@ -945,27 +948,9 @@ SUBROUTINE thompson_init(nwfa2d, nifa2d, nwfa, nifa, & call cpu_time(etime) if (mpirank==mpiroot) print '("Computing freezing of water drops table took ",f10.3," seconds.")', etime-stime -!> - Call qi_aut_qs() to create conversion of some ice mass into snow category - if (mpirank==mpiroot) write(0,*) ' creating ice converting to snow table' - call cpu_time(stime) - call qi_aut_qs - call cpu_time(etime) - if (mpirank==mpiroot) print '("Computing ice converting to snow table took ",f10.3," seconds.")', etime-stime - call cpu_time(etime) if (mpirank==mpiroot) print '("Calculating Thompson tables part 2 took ",f10.3," seconds.")', etime-stime -#ifdef SION - call cpu_time(stime) - call readwrite_tables("write", mpicomm, mpirank, mpiroot, ierr) - if (ierr/=0) then - write(0,*) "An error occurred writing Thompson tables to disk" - stop 1 - end if - call cpu_time(etime) - if (mpirank==mpiroot) print '("Writing Thompson tables took ",f10.3," seconds.")', etime-stime -#endif - end if precomputed_tables_2 endif if_not_iiwarm @@ -984,7 +969,7 @@ END SUBROUTINE thompson_init SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, & nwfa, nifa, nwfa2d, nifa2d, & tt, th, pii, & - p, w, dz, dt_in, & + p, w, dz, dt_in, dt_inner, & RAINNC, RAINNCV, & SNOWNC, SNOWNCV, & ICENC, ICENCV, & @@ -1002,7 +987,25 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, & ids,ide, jds,jde, kds,kde, & ! domain dims ims,ime, jms,jme, kms,kme, & ! memory dims its,ite, jts,jte, kts,kte, & ! tile dims - errmsg, errflg, reset) + reset_dBZ, istep, nsteps, & + errmsg, errflg, & + ! Extended diagnostics, array pointers + ! only associated if ext_diag flag is .true. + ext_diag, & + !vts1, txri, txrc, & + prw_vcdc, & + prw_vcde, tpri_inu, tpri_ide_d, & + tpri_ide_s, tprs_ide, tprs_sde_d, & + tprs_sde_s, tprg_gde_d, & + tprg_gde_s, tpri_iha, tpri_wfz, & + tpri_rfz, tprg_rfz, tprs_scw, tprg_scw, & + tprg_rcs, tprs_rcs, & + tprr_rci, tprg_rcg, & + tprw_vcd_c, tprw_vcd_e, tprr_sml, & + tprr_gml, tprr_rcg, & + tprr_rcs, tprv_rev, tten3, qvten3, & + qrten3, qsten3, qgten3, qiten3, niten3, & + nrten3, ncten3, qcten3) implicit none @@ -1019,7 +1022,7 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, & REAL, DIMENSION(ims:ime, kms:kme, jms:jme), OPTIONAL, INTENT(INOUT):: & nc, nwfa, nifa REAL, DIMENSION(ims:ime, jms:jme), OPTIONAL, INTENT(IN):: nwfa2d, nifa2d - REAL, DIMENSION(ims:ime, kms:kme, jms:jme), OPTIONAL, INTENT(OUT):: & + REAL, DIMENSION(ims:ime, kms:kme, jms:jme), OPTIONAL, INTENT(INOUT):: & re_cloud, re_ice, re_snow INTEGER, INTENT(IN) :: rand_perturb_on, kme_stoch REAL, DIMENSION(ims:ime,kms:kme_stoch,jms:jme), INTENT(IN), OPTIONAL:: & @@ -1042,15 +1045,51 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, & refl_10cm REAL, DIMENSION(ims:ime, kms:kme, jms:jme), OPTIONAL, INTENT(INOUT):: & vt_dbz_wt - LOGICAL, OPTIONAL, INTENT(IN) :: first_time_step - REAL, INTENT(IN):: dt_in - LOGICAL, INTENT (IN) :: reset + LOGICAL, INTENT(IN) :: first_time_step + REAL, INTENT(IN):: dt_in, dt_inner + ! To support subcycling: current step and maximum number of steps + INTEGER, INTENT (IN) :: istep, nsteps + LOGICAL, INTENT (IN) :: reset_dBZ + ! Extended diagnostics, array pointers only associated if ext_diag flag is .true. + LOGICAL, INTENT (IN) :: ext_diag + REAL, DIMENSION(:,:,:), INTENT(INOUT):: & + !vts1, txri, txrc, & + prw_vcdc, & + prw_vcde, tpri_inu, tpri_ide_d, & + tpri_ide_s, tprs_ide, & + tprs_sde_d, tprs_sde_s, tprg_gde_d, & + tprg_gde_s, tpri_iha, tpri_wfz, & + tpri_rfz, tprg_rfz, tprs_scw, tprg_scw, & + tprg_rcs, tprs_rcs, & + tprr_rci, tprg_rcg, & + tprw_vcd_c, tprw_vcd_e, tprr_sml, & + tprr_gml, tprr_rcg, & + tprr_rcs, tprv_rev, tten3, qvten3, & + qrten3, qsten3, qgten3, qiten3, niten3, & + nrten3, ncten3, qcten3 !..Local variables REAL, DIMENSION(kts:kte):: & qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & nr1d, nc1d, nwfa1d, nifa1d, & t1d, p1d, w1d, dz1d, rho, dBZ +!..Extended diagnostics, single column arrays + REAL, DIMENSION(:), ALLOCATABLE:: & + !vtsk1, txri1, txrc1, & + prw_vcdc1, & + prw_vcde1, tpri_inu1, tpri_ide1_d, & + tpri_ide1_s, tprs_ide1, & + tprs_sde1_d, tprs_sde1_s, tprg_gde1_d, & + tprg_gde1_s, tpri_iha1, tpri_wfz1, & + tpri_rfz1, tprg_rfz1, tprs_scw1, tprg_scw1,& + tprg_rcs1, tprs_rcs1, & + tprr_rci1, tprg_rcg1, & + tprw_vcd1_c, tprw_vcd1_e, tprr_sml1, & + tprr_gml1, tprr_rcg1, & + tprr_rcs1, tprv_rev1, tten1, qvten1, & + qrten1, qsten1, qgten1, qiten1, niten1, & + nrten1, ncten1, qcten1 + REAL, DIMENSION(kts:kte):: re_qc1d, re_qi1d, re_qs1d #if ( WRF_CHEM == 1 ) REAL, DIMENSION(kts:kte):: & @@ -1059,7 +1098,6 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, & REAL, DIMENSION(its:ite, jts:jte):: pcp_ra, pcp_sn, pcp_gr, pcp_ic REAL:: dt, pptrain, pptsnow, pptgraul, pptice REAL:: qc_max, qr_max, qs_max, qi_max, qg_max, ni_max, nr_max - REAL:: nwfa1 REAL:: rand1, rand2, rand3, min_rand INTEGER:: i, j, k, m INTEGER:: imax_qc,imax_qr,imax_qi,imax_qs,imax_qg,imax_ni,imax_nr @@ -1069,6 +1107,7 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, & LOGICAL, OPTIONAL, INTENT(IN) :: diagflag INTEGER, OPTIONAL, INTENT(IN) :: do_radar_ref logical :: melti = .false. + INTEGER :: ndt, it ! CCPP error handling character(len=*), optional, intent( out) :: errmsg @@ -1078,63 +1117,110 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, & if (present(errmsg)) errmsg = '' if (present(errflg)) errflg = 0 - ! DH* 2020-06-05: The stochastic perturbations code was retrofitted - ! from a newer version of the Thompson MP scheme, but it has not been - ! tested yet. - if (rand_perturb_on .ne. 0) then - errmsg = 'Logic error in mp_gt_driver: the stochastic perturbations code ' // & - 'has not been tested yet with this version of the Thompson scheme' - errflg = 1 - return - end if - ! Activate this code when removing the guard above - !if (rand_perturb_on .ne. 0 .and. .not. present(rand_pert)) then - ! errmsg = 'Logic error in mp_gt_driver: random perturbations are on, ' // & - ! 'but optional argument rand_pert is not present' - ! errflg = 1 - ! return - !end if - ! *DH 2020-06-05 - - if ( (present(tt) .and. (present(th) .or. present(pii))) .or. & - (.not.present(tt) .and. .not.(present(th) .and. present(pii))) ) then - if (present(errmsg)) then - write(errmsg, '(a)') 'Logic error in mp_gt_driver: provide either tt or th+pii' - else - write(*,'(a)') 'Logic error in mp_gt_driver: provide either tt or th+pii' - end if - if (present(errflg)) then - errflg = 1 - return - else - stop + ! No need to test for every subcycling step + test_only_once: if (first_time_step .and. istep==1) then + ! DH* 2020-06-05: The stochastic perturbations code was retrofitted + ! from a newer version of the Thompson MP scheme, but it has not been + ! tested yet. + if (rand_perturb_on .ne. 0) then + errmsg = 'Logic error in mp_gt_driver: the stochastic perturbations code ' // & + 'has not been tested yet with this version of the Thompson scheme' + errflg = 1 + return end if - end if - - if (is_aerosol_aware .and. (.not.present(nc) .or. & - .not.present(nwfa) .or. & - .not.present(nifa) .or. & - .not.present(nwfa2d) .or. & - .not.present(nifa2d) )) then - if (present(errmsg)) then - write(errmsg, '(*(a))') 'Logic error in mp_gt_driver: provide nc, nwfa, nifa, nwfa2d', & - ' and nifa2d for aerosol-aware version of Thompson microphysics' - else - write(*, '(*(a))') 'Logic error in mp_gt_driver: provide nc, nwfa, nifa, nwfa2d', & - ' and nifa2d for aerosol-aware version of Thompson microphysics' + ! Activate this code when removing the guard above + !if (rand_perturb_on .ne. 0 .and. .not. present(rand_pert)) then + ! errmsg = 'Logic error in mp_gt_driver: random perturbations are on, ' // & + ! 'but optional argument rand_pert is not present' + ! errflg = 1 + ! return + !end if + ! *DH 2020-06-05 + + if ( (present(tt) .and. (present(th) .or. present(pii))) .or. & + (.not.present(tt) .and. .not.(present(th) .and. present(pii))) ) then + if (present(errmsg)) then + write(errmsg, '(a)') 'Logic error in mp_gt_driver: provide either tt or th+pii' + else + write(*,'(a)') 'Logic error in mp_gt_driver: provide either tt or th+pii' + end if + if (present(errflg)) then + errflg = 1 + return + else + stop + end if end if - if (present(errflg)) then - errflg = 1 - return - else - stop + + if (is_aerosol_aware .and. (.not.present(nc) .or. & + .not.present(nwfa) .or. & + .not.present(nifa) .or. & + .not.present(nwfa2d) .or. & + .not.present(nifa2d) )) then + if (present(errmsg)) then + write(errmsg, '(*(a))') 'Logic error in mp_gt_driver: provide nc, nwfa, nifa, nwfa2d', & + ' and nifa2d for aerosol-aware version of Thompson microphysics' + else + write(*, '(*(a))') 'Logic error in mp_gt_driver: provide nc, nwfa, nifa, nwfa2d', & + ' and nifa2d for aerosol-aware version of Thompson microphysics' + end if + if (present(errflg)) then + errflg = 1 + return + else + stop + end if + else if (.not.is_aerosol_aware .and. (present(nwfa) .or. & + present(nifa) .or. & + present(nwfa2d) .or. & + present(nifa2d) )) then + write(*,*) 'WARNING, nc/nwfa/nifa/nwfa2d/nifa2d present but is_aerosol_aware is FALSE' end if - else if (.not.is_aerosol_aware .and. (present(nwfa) .or. & - present(nifa) .or. & - present(nwfa2d) .or. & - present(nifa2d) )) then - write(*,*) 'WARNING, nc/nwfa/nifa/nwfa2d/nifa2d present but is_aerosol_aware is FALSE' - end if + end if test_only_once + + ! These must be alwyas allocated + !allocate (vtsk1(kts:kte)) + !allocate (txri1(kts:kte)) + !allocate (txrc1(kts:kte)) + allocate_extended_diagnostics: if (ext_diag) then + allocate (prw_vcdc1(kts:kte)) + allocate (prw_vcde1(kts:kte)) + allocate (tpri_inu1(kts:kte)) + allocate (tpri_ide1_d(kts:kte)) + allocate (tpri_ide1_s(kts:kte)) + allocate (tprs_ide1(kts:kte)) + allocate (tprs_sde1_d(kts:kte)) + allocate (tprs_sde1_s(kts:kte)) + allocate (tprg_gde1_d(kts:kte)) + allocate (tprg_gde1_s(kts:kte)) + allocate (tpri_iha1(kts:kte)) + allocate (tpri_wfz1(kts:kte)) + allocate (tpri_rfz1(kts:kte)) + allocate (tprg_rfz1(kts:kte)) + allocate (tprs_scw1(kts:kte)) + allocate (tprg_scw1(kts:kte)) + allocate (tprg_rcs1(kts:kte)) + allocate (tprs_rcs1(kts:kte)) + allocate (tprr_rci1(kts:kte)) + allocate (tprg_rcg1(kts:kte)) + allocate (tprw_vcd1_c(kts:kte)) + allocate (tprw_vcd1_e(kts:kte)) + allocate (tprr_sml1(kts:kte)) + allocate (tprr_gml1(kts:kte)) + allocate (tprr_rcg1(kts:kte)) + allocate (tprr_rcs1(kts:kte)) + allocate (tprv_rev1(kts:kte)) + allocate (tten1(kts:kte)) + allocate (qvten1(kts:kte)) + allocate (qrten1(kts:kte)) + allocate (qsten1(kts:kte)) + allocate (qgten1(kts:kte)) + allocate (qiten1(kts:kte)) + allocate (niten1(kts:kte)) + allocate (nrten1(kts:kte)) + allocate (ncten1(kts:kte)) + allocate (qcten1(kts:kte)) + end if allocate_extended_diagnostics !+---+ i_start = its @@ -1151,7 +1237,30 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, & ! j_end = jte ! endif - dt = dt_in +! dt = dt_in + RAINNC(:,:) = 0.0 + SNOWNC(:,:) = 0.0 + ICENC(:,:) = 0.0 + GRAUPELNC(:,:) = 0.0 + pcp_ra(:,:) = 0.0 + pcp_sn(:,:) = 0.0 + pcp_gr(:,:) = 0.0 + pcp_ic(:,:) = 0.0 + ndt = max(nint(dt_in/dt_inner),1) + dt = dt_in/ndt + if(dt_in .le. dt_inner) dt= dt_in + if(nsteps>1 .and. ndt>1) then + if (present(errmsg) .and. present(errflg)) then + write(errmsg, '(a)') 'Logic error in mp_gt_driver: inner loop cannot be used with subcycling' + errflg = 1 + return + else + write(*,'(a)') 'Warning: inner loop cannot be used with subcycling, resetting ndt=1' + ndt = 1 + endif + endif + + do it = 1, ndt qc_max = 0. qr_max = 0. @@ -1195,8 +1304,8 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, & ! 5 gives both 1+4 ! 6 gives both 2+4 ! 7 gives all 1+2+4 -! For now (22Mar2018), standard deviation should be only 0.25 and cut-off at 1.5 -! in order to constrain the various perturbations from being too extreme. +! For now (22Mar2018), standard deviation should be up to 0.75 and cut-off at 3.0 +! stddev in order to constrain the various perturbations from being too extreme. !+---+-----------------------------------------------------------------+ rand1 = 0.0 rand2 = 0.0 @@ -1206,7 +1315,7 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, & m = RSHIFT(ABS(rand_perturb_on),1) if (MOD(m,2) .ne. 0) rand2 = rand_pert(i,1,j)*2. m = RSHIFT(ABS(rand_perturb_on),2) - if (MOD(m,2) .ne. 0) rand3 = 0.1*(rand_pert(i,1,j)+ABS(min_rand)) + if (MOD(m,2) .ne. 0) rand3 = 0.25*(rand_pert(i,1,j)+ABS(min_rand)) m = RSHIFT(ABS(rand_perturb_on),3) endif !+---+-----------------------------------------------------------------+ @@ -1244,6 +1353,51 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, & qg1d(k) = qg(i,k,j) ni1d(k) = ni(i,k,j) nr1d(k) = nr(i,k,j) + rho(k) = 0.622*p1d(k)/(R*t1d(k)*(qv1d(k)+0.622)) + + ! These arrays are always allocated and must be initialized + !vtsk1(k) = 0. + !txrc1(k) = 0. + !txri1(k) = 0. + initialize_extended_diagnostics: if (ext_diag) then + prw_vcdc1(k) = 0. + prw_vcde1(k) = 0. + tpri_inu1(k) = 0. + tpri_ide1_d(k) = 0. + tpri_ide1_s(k) = 0. + tprs_ide1(k) = 0. + tprs_sde1_d(k) = 0. + tprs_sde1_s(k) = 0. + tprg_gde1_d(k) = 0. + tprg_gde1_s(k) = 0. + tpri_iha1(k) = 0. + tpri_wfz1(k) = 0. + tpri_rfz1(k) = 0. + tprg_rfz1(k) = 0. + tprs_scw1(k) = 0. + tprg_scw1(k) = 0. + tprg_rcs1(k) = 0. + tprs_rcs1(k) = 0. + tprr_rci1(k) = 0. + tprg_rcg1(k) = 0. + tprw_vcd1_c(k) = 0. + tprw_vcd1_e(k) = 0. + tprr_sml1(k) = 0. + tprr_gml1(k) = 0. + tprr_rcg1(k) = 0. + tprr_rcs1(k) = 0. + tprv_rev1(k) = 0. + tten1(k) = 0. + qvten1(k) = 0. + qrten1(k) = 0. + qsten1(k) = 0. + qgten1(k) = 0. + qiten1(k) = 0. + niten1(k) = 0. + nrten1(k) = 0. + ncten1(k) = 0. + qcten1(k) = 0. + endif initialize_extended_diagnostics enddo if (is_aerosol_aware) then do k = kts, kte @@ -1251,15 +1405,12 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, & nwfa1d(k) = nwfa(i,k,j) nifa1d(k) = nifa(i,k,j) enddo - nwfa1 = nwfa2d(i,j) else do k = kts, kte - rho(k) = 0.622*p1d(k)/(R*t1d(k)*(qv1d(k)+0.622)) nc1d(k) = Nt_c/rho(k) - nwfa1d(k) = 11.1E6/rho(k) - nifa1d(k) = naIN1*0.01/rho(k) + nwfa1d(k) = 11.1E6 + nifa1d(k) = naIN1*0.01 enddo - nwfa1 = 11.1E6 endif !> - Call mp_thompson() @@ -1270,12 +1421,25 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, & rainprod1d, evapprod1d, & #endif rand1, rand2, rand3, & - kts, kte, dt, i, j) - - pcp_ra(i,j) = pptrain - pcp_sn(i,j) = pptsnow - pcp_gr(i,j) = pptgraul - pcp_ic(i,j) = pptice + kts, kte, dt, i, j, & + ext_diag, & + !vtsk1, txri1, txrc1, & + prw_vcdc1, prw_vcde1, & + tpri_inu1, tpri_ide1_d, tpri_ide1_s, tprs_ide1, & + tprs_sde1_d, tprs_sde1_s, & + tprg_gde1_d, tprg_gde1_s, tpri_iha1, tpri_wfz1, & + tpri_rfz1, tprg_rfz1, tprs_scw1, tprg_scw1, & + tprg_rcs1, tprs_rcs1, tprr_rci1, & + tprg_rcg1, tprw_vcd1_c, & + tprw_vcd1_e, tprr_sml1, tprr_gml1, tprr_rcg1, & + tprr_rcs1, tprv_rev1, & + tten1, qvten1, qrten1, qsten1, & + qgten1, qiten1, niten1, nrten1, ncten1, qcten1) + + pcp_ra(i,j) = pcp_ra(i,j) + pptrain + pcp_sn(i,j) = pcp_sn(i,j) + pptsnow + pcp_gr(i,j) = pcp_gr(i,j) + pptgraul + pcp_ic(i,j) = pcp_ic(i,j) + pptice RAINNCV(i,j) = pptrain + pptsnow + pptgraul + pptice RAINNC(i,j) = RAINNC(i,j) + pptrain + pptsnow + pptgraul + pptice IF ( PRESENT(snowncv) .AND. PRESENT(snownc) ) THEN @@ -1305,7 +1469,6 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, & !.. Changed 13 May 2013 to fake emissions in which nwfa2d is aerosol !.. number tendency (number per kg per second). if (is_aerosol_aware) then -!-GT nwfa1d(kts) = nwfa1 nwfa1d(kts) = nwfa1d(kts) + nwfa2d(i,j)*dt_in nifa1d(kts) = nifa1d(kts) + nifa2d(i,j)*dt_in @@ -1409,49 +1572,117 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, & endif enddo + assign_extended_diagnostics: if (ext_diag) then + do k=kts,kte + !vts1(i,k,j) = vtsk1(k) + !txri(i,k,j) = txri(i,k,j) + txri1(k) + !txrc(i,k,j) = txrc(i,k,j) + txrc1(k) + prw_vcdc(i,k,j) = prw_vcdc(i,k,j) + prw_vcdc1(k) + prw_vcde(i,k,j) = prw_vcde(i,k,j) + prw_vcde1(k) + tpri_inu(i,k,j) = tpri_inu(i,k,j) + tpri_inu1(k) + tpri_ide_d(i,k,j) = tpri_ide_d(i,k,j) + tpri_ide1_d(k) + tpri_ide_s(i,k,j) = tpri_ide_s(i,k,j) + tpri_ide1_s(k) + tprs_ide(i,k,j) = tprs_ide(i,k,j) + tprs_ide1(k) + tprs_sde_s(i,k,j) = tprs_sde_s(i,k,j) + tprs_sde1_s(k) + tprs_sde_d(i,k,j) = tprs_sde_d(i,k,j) + tprs_sde1_d(k) + tprg_gde_d(i,k,j) = tprg_gde_d(i,k,j) + tprg_gde1_d(k) + tprg_gde_s(i,k,j) = tprg_gde_s(i,k,j) + tprg_gde1_s(k) + tpri_iha(i,k,j) = tpri_iha(i,k,j) + tpri_iha1(k) + tpri_wfz(i,k,j) = tpri_wfz(i,k,j) + tpri_wfz1(k) + tpri_rfz(i,k,j) = tpri_rfz(i,k,j) + tpri_rfz1(k) + tprg_rfz(i,k,j) = tprg_rfz(i,k,j) + tprg_rfz1(k) + tprs_scw(i,k,j) = tprs_scw(i,k,j) + tprs_scw1(k) + tprg_scw(i,k,j) = tprg_scw(i,k,j) + tprg_scw1(k) + tprg_rcs(i,k,j) = tprg_rcs(i,k,j) + tprg_rcs1(k) + tprs_rcs(i,k,j) = tprs_rcs(i,k,j) + tprs_rcs1(k) + tprr_rci(i,k,j) = tprr_rci(i,k,j) + tprr_rci1(k) + tprg_rcg(i,k,j) = tprg_rcg(i,k,j) + tprg_rcg1(k) + tprw_vcd_c(i,k,j) = tprw_vcd_c(i,k,j) + tprw_vcd1_c(k) + tprw_vcd_e(i,k,j) = tprw_vcd_e(i,k,j) + tprw_vcd1_e(k) + tprr_sml(i,k,j) = tprr_sml(i,k,j) + tprr_sml1(k) + tprr_gml(i,k,j) = tprr_gml(i,k,j) + tprr_gml1(k) + tprr_rcg(i,k,j) = tprr_rcg(i,k,j) + tprr_rcg1(k) + tprr_rcs(i,k,j) = tprr_rcs(i,k,j) + tprr_rcs1(k) + tprv_rev(i,k,j) = tprv_rev(i,k,j) + tprv_rev1(k) + tten3(i,k,j) = tten3(i,k,j) + tten1(k) + qvten3(i,k,j) = qvten3(i,k,j) + qvten1(k) + qrten3(i,k,j) = qrten3(i,k,j) + qrten1(k) + qsten3(i,k,j) = qsten3(i,k,j) + qsten1(k) + qgten3(i,k,j) = qgten3(i,k,j) + qgten1(k) + qiten3(i,k,j) = qiten3(i,k,j) + qiten1(k) + niten3(i,k,j) = niten3(i,k,j) + niten1(k) + nrten3(i,k,j) = nrten3(i,k,j) + nrten1(k) + ncten3(i,k,j) = ncten3(i,k,j) + ncten1(k) + qcten3(i,k,j) = qcten3(i,k,j) + qcten1(k) + + enddo + endif assign_extended_diagnostics + + if (ndt>1 .and. it==ndt) then + + SR(i,j) = (pcp_sn(i,j) + pcp_gr(i,j) + pcp_ic(i,j))/(RAINNC(i,j)+1.e-12) + RAINNCV(i,j) = RAINNC(i,j) + IF ( PRESENT (snowncv) ) THEN + SNOWNCV(i,j) = SNOWNC(i,j) + ENDIF + IF ( PRESENT (icencv) ) THEN + ICENCV(i,j) = ICENC(i,j) + ENDIF + IF ( PRESENT (graupelncv) ) THEN + GRAUPELNCV(i,j) = GRAUPELNC(i,j) + ENDIF + endif + + ! Diagnostic calculations only for last step + ! if Thompson MP is called multiple times + last_step_only: IF ((ndt>1 .and. it==ndt) .or. & + (nsteps>1 .and. istep==nsteps) .or. & + (nsteps==1 .and. ndt==1)) THEN + !> - Call calc_refl10cm() - IF ( PRESENT (diagflag) ) THEN - if (diagflag .and. do_radar_ref == 1) then + diagflag_present: IF ( PRESENT (diagflag) ) THEN + if (diagflag .and. do_radar_ref == 1) then ! - ! Only set melti to true at the output times - if (reset) then + ! Only set melti to true at the output times + if (reset_dBZ) then melti=.true. - else + else melti=.false. - endif + endif ! - if (present(vt_dbz_wt) .and. present(first_time_step)) then - call calc_refl10cm (qv1d, qc1d, qr1d, nr1d, qs1d, qg1d, & - t1d, p1d, dBZ, rand1, kts, kte, i, j, & - melti, vt_dbz_wt(i,:,j), & - first_time_step) - else - call calc_refl10cm (qv1d, qc1d, qr1d, nr1d, qs1d, qg1d, & - t1d, p1d, dBZ, rand1, kts, kte, i, j, & - melti) - end if - do k = kts, kte - refl_10cm(i,k,j) = MAX(-35., dBZ(k)) - enddo - endif - ENDIF + if (present(vt_dbz_wt)) then + call calc_refl10cm (qv1d, qc1d, qr1d, nr1d, qs1d, qg1d, & + t1d, p1d, dBZ, rand1, kts, kte, i, j, & + melti, vt_dbz_wt(i,:,j), & + first_time_step) + else + call calc_refl10cm (qv1d, qc1d, qr1d, nr1d, qs1d, qg1d, & + t1d, p1d, dBZ, rand1, kts, kte, i, j, & + melti) + end if + do k = kts, kte + refl_10cm(i,k,j) = MAX(-35., dBZ(k)) + enddo + endif + ENDIF diagflag_present - IF (has_reqc.ne.0 .and. has_reqi.ne.0 .and. has_reqs.ne.0) THEN - do k = kts, kte - re_qc1d(k) = 2.50E-6 ! 2.49E-6 - re_qi1d(k) = 5.00E-6 ! 4.99E-6 - re_qs1d(k) = 1.00E-5 ! 9.99E-6 - enddo + IF (has_reqc.ne.0 .and. has_reqi.ne.0 .and. has_reqs.ne.0) THEN + do k = kts, kte + re_qc1d(k) = re_qc_min + re_qi1d(k) = re_qi_min + re_qs1d(k) = re_qs_min + enddo !> - Call calc_effectrad() - call calc_effectRad (t1d, p1d, qv1d, qc1d, nc1d, qi1d, ni1d, qs1d, & - re_qc1d, re_qi1d, re_qs1d, kts, kte) - do k = kts, kte - re_cloud(i,k,j) = MAX(2.50E-6, MIN(re_qc1d(k), 50.E-6)) ! MAX(2.49E-6, MIN(re_qc1d(k), 50.E-6)) - re_ice(i,k,j) = MAX(5.00E-6, MIN(re_qi1d(k), 125.E-6)) ! MAX(4.99E-6, MIN(re_qi1d(k), 125.E-6)) - re_snow(i,k,j) = MAX(1.00E-5, MIN(re_qs1d(k), 999.E-6)) ! MAX(9.99E-6, MIN(re_qs1d(k), 999.E-6)) - enddo - ENDIF + call calc_effectRad (t1d, p1d, qv1d, qc1d, nc1d, qi1d, ni1d, qs1d, & + re_qc1d, re_qi1d, re_qs1d, kts, kte) + do k = kts, kte + re_cloud(i,k,j) = MAX(re_qc_min, MIN(re_qc1d(k), re_qc_max)) + re_ice(i,k,j) = MAX(re_qi_min, MIN(re_qi1d(k), re_qi_max)) + re_snow(i,k,j) = MAX(re_qs_min, MIN(re_qs1d(k), re_qs_max)) + enddo + ENDIF + ENDIF last_step_only enddo i_loop enddo j_loop @@ -1466,6 +1697,51 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, & ! 'ni: ', ni_max, '(', imax_ni, ',', jmax_ni, ',', kmax_ni, ')', & ! 'nr: ', nr_max, '(', imax_nr, ',', jmax_nr, ',', kmax_nr, ')' ! END DEBUG - GT + enddo ! end of nt loop + + ! These are always allocated + !deallocate (vtsk1) + !deallocate (txri1) + !deallocate (txrc1) + deallocate_extended_diagnostics: if (ext_diag) then + deallocate (prw_vcdc1) + deallocate (prw_vcde1) + deallocate (tpri_inu1) + deallocate (tpri_ide1_d) + deallocate (tpri_ide1_s) + deallocate (tprs_ide1) + deallocate (tprs_sde1_d) + deallocate (tprs_sde1_s) + deallocate (tprg_gde1_d) + deallocate (tprg_gde1_s) + deallocate (tpri_iha1) + deallocate (tpri_wfz1) + deallocate (tpri_rfz1) + deallocate (tprg_rfz1) + deallocate (tprs_scw1) + deallocate (tprg_scw1) + deallocate (tprg_rcs1) + deallocate (tprs_rcs1) + deallocate (tprr_rci1) + deallocate (tprg_rcg1) + deallocate (tprw_vcd1_c) + deallocate (tprw_vcd1_e) + deallocate (tprr_sml1) + deallocate (tprr_gml1) + deallocate (tprr_rcg1) + deallocate (tprr_rcs1) + deallocate (tprv_rev1) + deallocate (tten1) + deallocate (qvten1) + deallocate (qrten1) + deallocate (qsten1) + deallocate (qgten1) + deallocate (qiten1) + deallocate (niten1) + deallocate (nrten1) + deallocate (ncten1) + deallocate (qcten1) + end if deallocate_extended_diagnostics END SUBROUTINE mp_gt_driver !> @} @@ -1531,14 +1807,30 @@ END SUBROUTINE thompson_finalize !! Thompson et al. (2004, 2008)\cite Thompson_2004 \cite Thompson_2008. !>\section gen_mp_thompson mp_thompson General Algorithm !> @{ - subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & - nr1d, nc1d, nwfa1d, nifa1d, t1d, p1d, w1d, dzq, & - pptrain, pptsnow, pptgraul, pptice, & + subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & + nr1d, nc1d, nwfa1d, nifa1d, t1d, p1d, w1d, dzq, & + pptrain, pptsnow, pptgraul, pptice, & #if ( WRF_CHEM == 1 ) - rainprod, evapprod, & + rainprod, evapprod, & #endif - rand1, rand2, rand3, & - kts, kte, dt, ii, jj) + rand1, rand2, rand3, & + kts, kte, dt, ii, jj, & + ! Extended diagnostics, most arrays only + ! allocated if ext_diag flag is .true. + ext_diag, & + !vtsk1, txri1, txrc1, & + prw_vcdc1, prw_vcde1, & + tpri_inu1, tpri_ide1_d, tpri_ide1_s, tprs_ide1, & + tprs_sde1_d, tprs_sde1_s, & + tprg_gde1_d, tprg_gde1_s, tpri_iha1, tpri_wfz1, & + tpri_rfz1, tprg_rfz1, tprs_scw1, tprg_scw1, & + tprg_rcs1, tprs_rcs1, tprr_rci1, & + tprg_rcg1, tprw_vcd1_c, & + tprw_vcd1_e, tprr_sml1, tprr_gml1, tprr_rcg1, & + tprr_rcs1, tprv_rev1, & + tten1, qvten1, qrten1, qsten1, & + qgten1, qiten1, niten1, nrten1, ncten1, qcten1) + #ifdef MPI use mpi #endif @@ -1553,6 +1845,23 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & REAL, INTENT(INOUT):: pptrain, pptsnow, pptgraul, pptice REAL, INTENT(IN):: dt REAL, INTENT(IN):: rand1, rand2, rand3 + ! Extended diagnostics, most arrays only allocated if ext_diag is true + LOGICAL, INTENT(IN) :: ext_diag + REAL, DIMENSION(:), INTENT(OUT):: & + !vtsk1, txri1, txrc1, & + prw_vcdc1, & + prw_vcde1, tpri_inu1, tpri_ide1_d, & + tpri_ide1_s, tprs_ide1, & + tprs_sde1_d, tprs_sde1_s, tprg_gde1_d, & + tprg_gde1_s, tpri_iha1, tpri_wfz1, & + tpri_rfz1, tprg_rfz1, tprs_scw1, tprg_scw1,& + tprg_rcs1, tprs_rcs1, & + tprr_rci1, tprg_rcg1, & + tprw_vcd1_c, tprw_vcd1_e, tprr_sml1, & + tprr_gml1, tprr_rcg1, & + tprr_rcs1, tprv_rev1, tten1, qvten1, & + qrten1, qsten1, qgten1, qiten1, niten1, & + nrten1, ncten1, qcten1 #if ( WRF_CHEM == 1 ) REAL, DIMENSION(kts:kte), INTENT(INOUT):: & @@ -1631,7 +1940,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & REAL:: r_frac, g_frac REAL:: Ef_rw, Ef_sw, Ef_gw, Ef_rr REAL:: Ef_ra, Ef_sa, Ef_ga - REAL:: dtsave, odts, odt, odzq, hgt_agl + REAL:: dtsave, odts, odt, odzq, hgt_agl, SR REAL:: xslw1, ygra1, zans1, eva_factor INTEGER:: i, k, k2, n, nn, nstep, k_0, kbot, IT, iexfrq INTEGER, DIMENSION(5):: ksed1 @@ -1762,6 +2071,52 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & enddo #endif +!Diagnostics + if (ext_diag) then + do k = kts, kte + !vtsk1(k) = 0. + !txrc1(k) = 0. + !txri1(k) = 0. + prw_vcdc1(k) = 0. + prw_vcde1(k) = 0. + tpri_inu1(k) = 0. + tpri_ide1_d(k) = 0. + tpri_ide1_s(k) = 0. + tprs_ide1(k) = 0. + tprs_sde1_d(k) = 0. + tprs_sde1_s(k) = 0. + tprg_gde1_d(k) = 0. + tprg_gde1_s(k) = 0. + tpri_iha1(k) = 0. + tpri_wfz1(k) = 0. + tpri_rfz1(k) = 0. + tprg_rfz1(k) = 0. + tprg_scw1(k) = 0. + tprs_scw1(k) = 0. + tprg_rcs1(k) = 0. + tprs_rcs1(k) = 0. + tprr_rci1(k) = 0. + tprg_rcg1(k) = 0. + tprw_vcd1_c(k) = 0. + tprw_vcd1_e(k) = 0. + tprr_sml1(k) = 0. + tprr_gml1(k) = 0. + tprr_rcg1(k) = 0. + tprr_rcs1(k) = 0. + tprv_rev1(k) = 0. + tten1(k) = 0. + qvten1(k) = 0. + qrten1(k) = 0. + qsten1(k) = 0. + qgten1(k) = 0. + qiten1(k) = 0. + niten1(k) = 0. + nrten1(k) = 0. + ncten1(k) = 0. + qcten1(k) = 0. + enddo + endif + !..Bug fix (2016Jun15), prevent use of uninitialized value(s) of snow moments. do k = kts, kte smo0(k) = 0. @@ -1782,17 +2137,20 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & qv(k) = MAX(1.E-10, qv1d(k)) pres(k) = p1d(k) rho(k) = 0.622*pres(k)/(R*temp(k)*(qv(k)+0.622)) - nwfa(k) = MAX(11.1E6, MIN(9999.E6, nwfa1d(k)*rho(k))) - nifa(k) = MAX(naIN1*0.01, MIN(9999.E6, nifa1d(k)*rho(k))) + nwfa(k) = MAX(11.1E6*rho(k), MIN(9999.E6*rho(k), nwfa1d(k)*rho(k))) + nifa(k) = MAX(naIN1*0.01*rho(k), MIN(9999.E6*rho(k), nifa1d(k)*rho(k))) mvd_r(k) = D0r + mvd_c(k) = D0c if (qc1d(k) .gt. R1) then no_micro = .false. rc(k) = qc1d(k)*rho(k) nc(k) = MAX(2., MIN(nc1d(k)*rho(k), Nt_c_max)) L_qc(k) = .true. - if (rand2 .eq. 0.0) then - nu_c = MIN(15, NINT(1000.E6/nc(k)) + 2) + if (nc(k).gt.10000.E6) then + nu_c = 2 + elseif (nc(k).lt.100.) then + nu_c = 15 else nu_c = NINT(1000.E6/nc(k)) + 2 nu_c = MAX(2, MIN(nu_c+NINT(rand2), 15)) @@ -1820,8 +2178,8 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & ri(k) = qi1d(k)*rho(k) ni(k) = MAX(R2, ni1d(k)*rho(k)) if (ni(k).le. R2) then - lami = cie(2)/25.E-6 - ni(k) = MIN(499.D3, cig(1)*oig2*ri(k)/am_i*lami**bm_i) + lami = cie(2)/5.E-6 + ni(k) = MIN(9999.D3, cig(1)*oig2*ri(k)/am_i*lami**bm_i) endif L_qi(k) = .true. lami = (am_i*cig(2)*oig1*ni(k)/ri(k))**obmi @@ -1829,7 +2187,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & xDi = (bm_i + mu_i + 1.) * ilami if (xDi.lt. 5.E-6) then lami = cie(2)/5.E-6 - ni(k) = MIN(499.D3, cig(1)*oig2*ri(k)/am_i*lami**bm_i) + ni(k) = MIN(9999.D3, cig(1)*oig2*ri(k)/am_i*lami**bm_i) elseif (xDi.gt. 300.E-6) then lami = cie(2)/300.E-6 ni(k) = cig(1)*oig2*ri(k)/am_i*lami**bm_i @@ -2033,26 +2391,11 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & !+---+-----------------------------------------------------------------+ !> - Calculate y-intercept, slope values for graupel. !+---+-----------------------------------------------------------------+ - N0_min = gonv_max - k_0 = kts do k = kte, kts, -1 - if (temp(k).ge.270.65) k_0 = MAX(k_0, k) - enddo - do k = kte, kts, -1 - if (k.gt.k_0 .and. L_qr(k) .and. mvd_r(k).gt.100.E-6) then - xslw1 = 4.01 + alog10(mvd_r(k)) - else - xslw1 = 0.01 - endif - ygra1 = 4.31 + alog10(max(5.E-5, rg(k))) - zans1 = (3.1 + (100./(300.*xslw1*ygra1/(10./xslw1+1.+0.25*ygra1)+30.+10.*ygra1))) + rand1 - if (rand1 .ne. 0.0) then - zans1 = MAX(2., MIN(zans1, 7.)) - endif + ygra1 = alog10(max(1.E-9, rg(k))) + zans1 = 3.0 + 2./7.*(ygra1+8.) + rand1 N0_exp = 10.**(zans1) N0_exp = MAX(DBLE(gonv_min), MIN(N0_exp, DBLE(gonv_max))) - N0_min = MIN(N0_exp, N0_min) - N0_exp = N0_min lam_exp = (N0_exp*am_g*cgg(1)/rg(k))**oge1 lamg = lam_exp * (cgg(3)*ogg2*ogg1)**obmg ilamg(k) = 1./lamg @@ -2087,10 +2430,11 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & pnr_rcr(k) = Ef_rr * 2.0*nr(k)*rr(k) endif - mvd_c(k) = D0c if (L_qc(k)) then - if (rand2 .eq. 0.0) then - nu_c = MIN(15, NINT(1000.E6/nc(k)) + 2) + if (nc(k).gt.10000.E6) then + nu_c = 2 + elseif (nc(k).lt.100.) then + nu_c = 15 else nu_c = NINT(1000.E6/nc(k)) + 2 nu_c = MAX(2, MIN(nu_c+NINT(rand2), 15)) @@ -2098,6 +2442,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & xDc = MAX(D0c*1.E6, ((rc(k)/(am_r*nc(k)))**obmr) * 1.E6) lamc = (nc(k)*am_r* ccg(2,nu_c) * ocg1(nu_c) / rc(k))**obmr mvd_c(k) = (3.0+nu_c+0.672) / lamc + mvd_c(k) = MAX(D0c, MIN(mvd_c(k), D0r)) endif !> - Autoconversion follows Berry & Reinhardt (1974) with characteristic @@ -2113,7 +2458,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & tau = 3.72/(rc(k)*taud) prr_wau(k) = zeta/tau prr_wau(k) = MIN(DBLE(rc(k)*odts), prr_wau(k)) - pnr_wau(k) = prr_wau(k) / (am_r*nu_c*D0r*D0r*D0r) ! RAIN2M + pnr_wau(k) = prr_wau(k) / (am_r*nu_c*200.*D0r*D0r*D0r) ! RAIN2M pnc_wau(k) = MIN(DBLE(nc(k)*odts), prr_wau(k) & / (am_r*mvd_c(k)*mvd_c(k)*mvd_c(k))) ! Qc2M endif @@ -2153,7 +2498,9 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & !+---+-----------------------------------------------------------------+ if (.not. iiwarm) then do k = kts, kte - vts_boost(k) = 1.5 + vts_boost(k) = 1.0 + xDs = 0.0 + if (L_qs(k)) xDs = smoc(k) / smob(k) !> - Temperature lookup table indexes. tempc = temp(k) - 273.15 @@ -2305,13 +2652,12 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & !> - Snow collecting cloud water. In CE, assume Dc< - Snow and graupel collecting aerosols, wet scavenging. if (rs(k) .gt. r_s(1)) then - xDs = smoc(k) / smob(k) Ef_sa = Eff_aero(xDs,0.04E-6,visco(k),rho(k),temp(k),'s') pna_sca(k) = rhof(k)*t1_qs_qc*Ef_sa*nwfa(k)*smoe(k) pna_sca(k) = MIN(DBLE(nwfa(k)*odts), pna_sca(k)) @@ -2387,6 +2732,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & + tnr_racs2(idx_s,idx_t,idx_r1,idx_r) & + tnr_sacr1(idx_s,idx_t,idx_r1,idx_r) & + tnr_sacr2(idx_s,idx_t,idx_r1,idx_r) + pnr_rcs(k) = MIN(DBLE(nr(k)*odts), pnr_rcs(k)) else prs_rcs(k) = -tcs_racs1(idx_s,idx_t,idx_r1,idx_r) & - tms_sacr1(idx_s,idx_t,idx_r1,idx_r) & @@ -2394,10 +2740,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & + tcr_sacr2(idx_s,idx_t,idx_r1,idx_r) prs_rcs(k) = MAX(DBLE(-rs(k)*odts), prs_rcs(k)) prr_rcs(k) = -prs_rcs(k) - pnr_rcs(k) = tnr_racs2(idx_s,idx_t,idx_r1,idx_r) & ! RAIN2M - + tnr_sacr2(idx_s,idx_t,idx_r1,idx_r) endif - pnr_rcs(k) = MIN(DBLE(nr(k)*odts), pnr_rcs(k)) endif !> - Rain collecting graupel. Cannot assume Wisner (1972) approximation @@ -2422,17 +2765,59 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & endif endif + if (temp(k).lt.T_0) then + rate_max = (qv(k)-qvsi(k))*rho(k)*odts*0.999 + +!> - Deposition/sublimation of snow/graupel follows Srivastava & Coen (1992) + if (L_qs(k)) then + C_snow = C_sqrd + (tempc+1.5)*(C_cube-C_sqrd)/(-30.+1.5) + C_snow = MAX(C_sqrd, MIN(C_snow, C_cube)) + prs_sde(k) = C_snow*t1_subl*diffu(k)*ssati(k)*rvs & + * (t1_qs_sd*smo1(k) & + + t2_qs_sd*rhof2(k)*vsc2(k)*smof(k)) + if (prs_sde(k).lt. 0.) then + prs_sde(k) = MAX(DBLE(-rs(k)*odts), prs_sde(k), DBLE(rate_max)) + else + prs_sde(k) = MIN(prs_sde(k), DBLE(rate_max)) + endif + endif + + if (L_qg(k) .and. ssati(k).lt. -eps) then + prg_gde(k) = C_cube*t1_subl*diffu(k)*ssati(k)*rvs & + * N0_g(k) * (t1_qg_sd*ilamg(k)**cge(10) & + + t2_qg_sd*vsc2(k)*rhof2(k)*ilamg(k)**cge(11)) + if (prg_gde(k).lt. 0.) then + prg_gde(k) = MAX(DBLE(-rg(k)*odts), prg_gde(k), DBLE(rate_max)) + else + prg_gde(k) = MIN(prg_gde(k), DBLE(rate_max)) + endif + endif + +!> - A portion of rimed snow converts to graupel but some remains snow. +!! Interp from 15 to 95% as riming factor increases from 5.0 to 30.0 +!! 0.028 came from (.75-.15)/(30.-5.). This remains ad-hoc and should +!! be revisited. + if (prs_scw(k).gt.5.0*prs_sde(k) .and. & + prs_sde(k).gt.eps) then + r_frac = MIN(30.0D0, prs_scw(k)/prs_sde(k)) + g_frac = MIN(0.75, 0.15 + (r_frac-5.)*.028) + vts_boost(k) = MIN(1.5, 1.1 + (r_frac-5.)*.016) + prg_scw(k) = g_frac*prs_scw(k) + prs_scw(k) = (1. - g_frac)*prs_scw(k) + endif + + endif + !+---+-----------------------------------------------------------------+ !> - Next IF block handles only those processes below 0C. !+---+-----------------------------------------------------------------+ if (temp(k).lt.T_0) then - vts_boost(k) = 1.0 rate_max = (qv(k)-qvsi(k))*rho(k)*odts*0.999 !+---+---------------- BEGIN NEW ICE NUCLEATION -----------------------+ -!> - Begin NEW ICE NUCLEATION: Freezing of supercooled water (rain or cloud) is influenced by dust +!> - Freezing of supercooled water (rain or cloud) is influenced by dust !! but still using Bigg 1953 with a temperature adjustment of a few !! degrees depending on dust concentration. A default value by way !! of idx_IN is 1.0 per Liter of air is used when dustyIce flag is @@ -2475,7 +2860,6 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & pnr_rfz(k) = MIN(DBLE(nr(k)*odts), pnr_rfz(k)) elseif (rr(k).gt. R1 .and. temp(k).lt.HGFR) then pri_rfz(k) = rr(k)*odts - pnr_rfz(k) = nr(k)*odts ! RAIN2M pni_rfz(k) = pnr_rfz(k) endif @@ -2496,7 +2880,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & .and. temp(k).lt.253.15) ) then if (dustyIce .AND. is_aerosol_aware) then xnc = iceDeMott(tempc,qv(k),qvs(k),qvsi(k),rho(k),nifa(k)) - xnc = xnc*(1.0 + 3.*rand3) + xnc = xnc*(1.0 + 50.*rand3) else xnc = MIN(250.E3, TNO*EXP(ATO*(T_0-temp(k)))) endif @@ -2508,7 +2892,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & !> - Freezing of aqueous aerosols based on Koop et al (2001, Nature) xni = smo0(k)+ni(k) + (pni_rfz(k)+pni_wfz(k)+pni_inu(k))*dtsave - if (is_aerosol_aware .AND. homogIce .AND. (xni.le.500.E3) & + if (is_aerosol_aware .AND. homogIce .AND. (xni.le.999.E3) & & .AND.(temp(k).lt.238).AND.(ssati(k).ge.0.4) ) then xnc = iceKoop(temp(k),qv(k),qvs(k),nwfa(k), dtsave) pni_iha(k) = xnc*odts @@ -2554,32 +2938,6 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & endif endif -!> - Deposition/sublimation of snow/graupel follows Srivastava & Coen -!! (1992). - if (L_qs(k)) then - C_snow = C_sqrd + (tempc+1.5)*(C_cube-C_sqrd)/(-30.+1.5) - C_snow = MAX(C_sqrd, MIN(C_snow, C_cube)) - prs_sde(k) = C_snow*t1_subl*diffu(k)*ssati(k)*rvs & - * (t1_qs_sd*smo1(k) & - + t2_qs_sd*rhof2(k)*vsc2(k)*smof(k)) - if (prs_sde(k).lt. 0.) then - prs_sde(k) = MAX(DBLE(-rs(k)*odts), prs_sde(k), DBLE(rate_max)) - else - prs_sde(k) = MIN(prs_sde(k), DBLE(rate_max)) - endif - endif - - if (L_qg(k) .and. ssati(k).lt. -eps) then - prg_gde(k) = C_cube*t1_subl*diffu(k)*ssati(k)*rvs & - * N0_g(k) * (t1_qg_sd*ilamg(k)**cge(10) & - + t2_qg_sd*vsc2(k)*rhof2(k)*ilamg(k)**cge(11)) - if (prg_gde(k).lt. 0.) then - prg_gde(k) = MAX(DBLE(-rg(k)*odts), prg_gde(k), DBLE(rate_max)) - else - prg_gde(k) = MIN(prg_gde(k), DBLE(rate_max)) - endif - endif - !> - Snow collecting cloud ice. In CE, assume Di< - A portion of rimed snow converts to graupel but some remains snow. -!! Interp from 15 to 95% as riming factor increases from 2.0 to 30.0 -!! 0.028 came from (.95-.15)/(30.-2.). This remains ad-hoc and should -!! be revisited. - if (prs_scw(k).gt.2.0*prs_sde(k) .and. & - prs_sde(k).gt.eps) then - r_frac = MIN(30.0D0, prs_scw(k)/prs_sde(k)) - g_frac = MIN(0.95, 0.15 + (r_frac-2.)*.028) - vts_boost(k) = MIN(1.5, 1.1 + (r_frac-2.)*.016) - prg_scw(k) = g_frac*prs_scw(k) - prs_scw(k) = (1. - g_frac)*prs_scw(k) - endif - else !> - Melt snow and graupel and enhance from collisions with liquid. @@ -2643,12 +2988,13 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & if (L_qs(k)) then prr_sml(k) = (tempc*tcond(k)-lvap0*diffu(k)*delQvs(k)) & * (t1_qs_me*smo1(k) + t2_qs_me*rhof2(k)*vsc2(k)*smof(k)) - prr_sml(k) = prr_sml(k) + 4218.*olfus*tempc & - * (prr_rcs(k)+prs_scw(k)) + if (prr_sml(k) .gt. 0.) then + prr_sml(k) = prr_sml(k) + 4218.*olfus*tempc & + * (prr_rcs(k)+prs_scw(k)) + endif prr_sml(k) = MIN(DBLE(rs(k)*odts), MAX(0.D0, prr_sml(k))) pnr_sml(k) = smo0(k)/rs(k)*prr_sml(k) * 10.0**(-0.25*tempc) ! RAIN2M pnr_sml(k) = MIN(DBLE(smo0(k)*odts), pnr_sml(k)) -! if (tempc.gt.3.5 .or. rs(k).lt.0.005E-3) pnr_sml(k)=0.0 if (ssati(k).lt. 0.) then prs_sde(k) = C_cube*t1_subl*diffu(k)*ssati(k)*rvs & @@ -2667,7 +3013,6 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & prr_gml(k) = MIN(DBLE(rg(k)*odts), MAX(0.D0, prr_gml(k))) pnr_gml(k) = N0_g(k)*cgg(2)*ilamg(k)**cge(2) / rg(k) & ! RAIN2M * prr_gml(k) * 10.0**(-0.5*tempc) -! if (tempc.gt.7.5 .or. rg(k).lt.0.005E-3) pnr_gml(k)=0.0 if (ssati(k).lt. 0.) then prg_gde(k) = C_cube*t1_subl*diffu(k)*ssati(k)*rvs & @@ -2677,7 +3022,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & endif endif -!> - This change will be required if users run adaptive time step that +!> - This change will be required if users run adaptive time step that !! results in delta-t that is generally too long to allow cloud water !! collection by snow/graupel above melting temperature. !! Credit to Bjorn-Egil Nygaard for discovering. @@ -2835,8 +3180,10 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & xrc=MAX(R1, (qc1d(k) + qcten(k)*dtsave)*rho(k)) xnc=MAX(2., (nc1d(k) + ncten(k)*dtsave)*rho(k)) if (xrc .gt. R1) then - if (rand2 .eq. 0.0) then - nu_c = MIN(15, NINT(1000.E6/xnc) + 2) + if (xnc.gt.10000.E6) then + nu_c = 2 + elseif (xnc.lt.100.) then + nu_c = 15 else nu_c = NINT(1000.E6/xnc) + 2 nu_c = MAX(2, MIN(nu_c+NINT(rand2), 15)) @@ -2881,7 +3228,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & xDi = (bm_i + mu_i + 1.) * ilami if (xDi.lt. 5.E-6) then lami = cie(2)/5.E-6 - xni = MIN(499.D3, cig(1)*oig2*xri/am_i*lami**bm_i) + xni = MIN(9999.D3, cig(1)*oig2*xri/am_i*lami**bm_i) niten(k) = (xni-ni1d(k)*rho(k))*odts*orho elseif (xDi.gt. 300.E-6) then lami = cie(2)/300.E-6 @@ -2892,8 +3239,8 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & niten(k) = -ni1d(k)*odts endif xni=MAX(0.,(ni1d(k) + niten(k)*dtsave)*rho(k)) - if (xni.gt.499.E3) & - niten(k) = (499.E3-ni1d(k)*rho(k))*odts*orho + if (xni.gt.9999.E3) & + niten(k) = (9999.E3-ni1d(k)*rho(k))*odts*orho !> - Rain tendency qrten(k) = qrten(k) + (prr_wau(k) + prr_rcw(k) & @@ -2905,7 +3252,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & !> - Rain number tendency nrten(k) = nrten(k) + (pnr_wau(k) + pnr_sml(k) + pnr_gml(k) & - (pnr_rfz(k) + pnr_rcr(k) + pnr_rcg(k) & - + pnr_rcs(k) + pnr_rci(k)) ) & + + pnr_rcs(k) + pnr_rci(k) + pni_rfz(k)) ) & * orho !> - Rain mass/number balance; keep median volume diameter between @@ -2992,8 +3339,10 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & ocp(k) = 1./(Cp*(1.+0.887*qv(k))) lvt2(k)=lvap(k)*lvap(k)*ocp(k)*oRv*otemp*otemp - nwfa(k) = MAX(11.1E6, (nwfa1d(k) + nwfaten(k)*DT)*rho(k)) + nwfa(k) = MAX(11.1E6*rho(k), (nwfa1d(k) + nwfaten(k)*DT)*rho(k)) + enddo + do k = kts, kte if ((qc1d(k) + qcten(k)*DT) .gt. R1) then rc(k) = (qc1d(k) + qcten(k)*DT)*rho(k) nc(k) = MAX(2., MIN((nc1d(k)+ncten(k)*DT)*rho(k), Nt_c_max)) @@ -3118,26 +3467,11 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & !+---+-----------------------------------------------------------------+ !> - Calculate y-intercept, slope values for graupel. !+---+-----------------------------------------------------------------+ - N0_min = gonv_max - k_0 = kts do k = kte, kts, -1 - if (temp(k).ge.270.65) k_0 = MAX(k_0, k) - enddo - do k = kte, kts, -1 - if (k.gt.k_0 .and. L_qr(k) .and. mvd_r(k).gt.100.E-6) then - xslw1 = 4.01 + alog10(mvd_r(k)) - else - xslw1 = 0.01 - endif - ygra1 = 4.31 + alog10(max(5.E-5, rg(k))) - zans1 = (3.1 + (100./(300.*xslw1*ygra1/(10./xslw1+1.+0.25*ygra1)+30.+10.*ygra1))) + rand1 - if (rand1 .ne. 0.0) then - zans1 = MAX(2., MIN(zans1, 7.)) - endif + ygra1 = alog10(max(1.E-9, rg(k))) + zans1 = 3.0 + 2./7.*(ygra1+8.) + rand1 N0_exp = 10.**(zans1) N0_exp = MAX(DBLE(gonv_min), MIN(N0_exp, DBLE(gonv_max))) - N0_min = MIN(N0_exp, N0_min) - N0_exp = N0_min lam_exp = (N0_exp*am_g*cgg(1)/rg(k))**oge1 lamg = lam_exp * (cgg(3)*ogg2*ogg1)**obmg ilamg(k) = 1./lamg @@ -3313,11 +3647,11 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & !..TEST: G. Thompson 10 May 2013 !> - Reduce the rain evaporation in same places as melting graupel occurs. -!Rationale: falling and simultaneous melting graupel in subsaturated -!regions will not melt as fast because particle temperature stays -!..at 0C. Also not much shedding of the water from the graupel so -!..likely that the water-coated graupel evaporating much slower than -!..if the water was immediately shed off. +!! Rationale: falling and simultaneous melting graupel in subsaturated +!! regions will not melt as fast because particle temperature stays +!! at 0C. Also not much shedding of the water from the graupel so +!! likely that the water-coated graupel evaporating much slower than +!! if the water was immediately shed off. IF (prr_gml(k).gt.0.0) THEN eva_factor = MIN(1.0, 0.01+(0.99-0.01)*(tempc/20.0)) prv_rev(k) = prv_rev(k)*eva_factor @@ -3420,8 +3754,10 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & do k = ksed1(5), kts, -1 vtc = 0. if (rc(k) .gt. R1 .and. w1d(k) .lt. 1.E-1) then - if (rand2 .eq. 0.0) then - nu_c = MIN(15, NINT(1000.E6/nc(k)) + 2) + if (nc(k).gt.10000.E6) then + nu_c = 2 + elseif (nc(k).lt.100.) then + nu_c = 15 else nu_c = NINT(1000.E6/nc(k)) + 2 nu_c = MAX(2, MIN(nu_c+NINT(rand2), 15)) @@ -3476,6 +3812,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & nstep = 0 do k = kte, kts, -1 vts = 0. + !vtsk1(k)=0. if (rs(k).gt. R1) then xDs = smoc(k) / smob(k) @@ -3490,18 +3827,18 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & t4_vts = Kap1*Mrat**mu_s*csg(7)*ils2**cse(7) vts = rhof(k)*av_s * (t1_vts+t2_vts)/(t3_vts+t4_vts) if (temp(k).gt. (T_0+0.1)) then - vtsk(k) = MAX(vts*vts_boost(k), & - & vts*((vtrk(k)-vts*vts_boost(k))/(temp(k)-T_0))) ! -! DH* The version below is supposed to be a better formulation, -! but gave worse results in RAPv5/HRRRv4 than the line above. - ! this formulation for RAPv5/HRRRv4, reverted 20 Feb 2020 - ! SR = rs(k)/(rs(k)+rr(k)) ! bug fix from G. Thompson, 10 May 2019 - ! vtsk(k) = vts*SR + (1.-SR)*vtrk(k) +! vtsk(k) = MAX(vts*vts_boost(k), & +! & vts*((vtrk(k)-vts*vts_boost(k))/(temp(k)-T_0))) + SR = rs(k)/(rs(k)+rr(k)) + vtsk(k) = vts*SR + (1.-SR)*vtrk(k) + !vtsk1(k)=vtsk(k) else vtsk(k) = vts*vts_boost(k) + !vtsk1(k)=vtsk(k) endif else vtsk(k) = vtsk(k+1) + !vtsk1(k)=0 endif if (vtsk(k) .gt. 1.E-3) then @@ -3547,10 +3884,6 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & !> - Sedimentation of mixing ratio is the integral of v(D)*m(D)*N(D)*dD, !! whereas neglect m(D) term for number concentration. Therefore, !! cloud ice has proper differential sedimentation. -!.. New in v3.0+ is computing separate for rain, ice, snow, and -!.. graupel species thus making code faster with credit to J. Schmidt. -!.. Bug fix, 2013Nov01 to tendencies using rho(k+1) correction thanks to -!.. Eric Skyllingstad. !+---+-----------------------------------------------------------------+ if (ANY(L_qr .eqv. .true.)) then @@ -3580,11 +3913,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & *odzq*DT*onstep(1)) enddo -#if 1 if (rr(kts).gt.R1*10.) & -#else - if (rr(kts).gt.R1*1000.) & -#endif pptrain = pptrain + sed_r(kts)*DT*onstep(1) enddo endif @@ -3635,11 +3964,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & *odzq*DT*onstep(2)) enddo -#if 1 if (ri(kts).gt.R1*10.) & -#else - if (ri(kts).gt.R1*1000.) & -#endif pptice = pptice + sed_i(kts)*DT*onstep(2) enddo endif @@ -3666,11 +3991,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & *odzq*DT*onstep(3)) enddo -#if 1 if (rs(kts).gt.R1*10.) & -#else - if (rs(kts).gt.R1*1000.) & -#endif pptsnow = pptsnow + sed_s(kts)*DT*onstep(3) enddo endif @@ -3697,11 +4018,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & *odzq*DT*onstep(4)) enddo -#if 1 if (rg(kts).gt.R1*10.) & -#else - if (rg(kts).gt.R1*1000.) & -#endif pptgraul = pptgraul + sed_g(kts)*DT*onstep(4) enddo endif @@ -3719,6 +4036,8 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & qiten(k) = qiten(k) - xri*odt niten(k) = -ni1d(k)*odt tten(k) = tten(k) - lfus*ocp(k)*xri*odt*(1-IFDRY) +!diag + !txri1(k) = lfus*ocp(k)*xri*odt*(1-IFDRY) endif xrc = MAX(0.0, qc1d(k) + qcten(k)*DT) @@ -3730,6 +4049,8 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & qcten(k) = qcten(k) - xrc*odt ncten(k) = ncten(k) - xnc*odt tten(k) = tten(k) + lfus2*ocp(k)*xrc*odt*(1-IFDRY) +!diag + !txrc1(k) = lfus2*ocp(k)*xrc*odt*(1-IFDRY)*DT endif enddo endif @@ -3742,19 +4063,21 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & qv1d(k) = MAX(1.E-10, qv1d(k) + qvten(k)*DT) qc1d(k) = qc1d(k) + qcten(k)*DT nc1d(k) = MAX(2./rho(k), MIN(nc1d(k) + ncten(k)*DT, Nt_c_max)) - nwfa1d(k) = MAX(11.1E6/rho(k), MIN(9999.E6/rho(k), & + nwfa1d(k) = MAX(11.1E6, MIN(9999.E6, & (nwfa1d(k)+nwfaten(k)*DT))) - nifa1d(k) = MAX(naIN1*0.01, MIN(9999.E6/rho(k), & + nifa1d(k) = MAX(naIN1*0.01, MIN(9999.E6, & (nifa1d(k)+nifaten(k)*DT))) if (qc1d(k) .le. R1) then qc1d(k) = 0.0 nc1d(k) = 0.0 else - if (rand2 .eq. 0.0) then - nu_c = MIN(15, NINT(1000.E6/(nc1d(k)*rho(k))) + 2) + if (nc1d(k)*rho(k).gt.10000.E6) then + nu_c = 2 + elseif (nc1d(k)*rho(k).lt.100.) then + nu_c = 15 else - nu_c = NINT(1000.E6/(nc1d(k)*rho(k))) + 2 - nu_c = MAX(2, MIN(nu_c+NINT(rand2), 15)) + nu_c = NINT(1000.E6/(nc1d(k)*rho(k))) + 2 + nu_c = MAX(2, MIN(nu_c+NINT(rand2), 15)) endif lamc = (am_r*ccg(2,nu_c)*ocg1(nu_c)*nc1d(k)/qc1d(k))**obmr xDc = (bm_r + nu_c + 1.) / lamc @@ -3782,7 +4105,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & lami = cie(2)/300.E-6 endif ni1d(k) = MIN(cig(1)*oig2*qi1d(k)/am_i*lami**bm_i, & - 499.D3/rho(k)) + 9999.D3/rho(k)) endif qr1d(k) = qr1d(k) + qrten(k)*DT nr1d(k) = MAX(R2/rho(k), nr1d(k) + nrten(k)*DT) @@ -3806,6 +4129,89 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & if (qg1d(k) .le. R1) qg1d(k) = 0.0 enddo +! Diagnostics + calculate_extended_diagnostics: if (ext_diag) then + do k = kts, kte + if(prw_vcd(k).gt.0)then + prw_vcdc1(k) = prw_vcd(k)*dt + elseif(prw_vcd(k).lt.0)then + prw_vcde1(k) = -1*prw_vcd(k)*dt + endif +!heating/cooling diagnostics + tpri_inu1(k) = pri_inu(k)*lsub*ocp(k)*orho * (1-IFDRY)*DT + + if(pri_ide(k).gt.0)then + tpri_ide1_d(k) = pri_ide(k)*lsub*ocp(k)*orho * (1-IFDRY)*DT + else + tpri_ide1_s(k) = -pri_ide(k)*lsub*ocp(k)*orho * (1-IFDRY)*DT + endif + + if(temp(k).lt.T_0)then + tprs_ide1(k) = prs_ide(k)*lsub*ocp(k)*orho * (1-IFDRY)*DT + endif + + if(prs_sde(k).gt.0)then + tprs_sde1_d(k) = prs_sde(k)*lsub*ocp(k)*orho * (1-IFDRY)*DT + else + tprs_sde1_s(k) = -prs_sde(k)*lsub*ocp(k)*orho * (1-IFDRY)*DT + endif + + if(prg_gde(k).gt.0)then + tprg_gde1_d(k) = prg_gde(k)*lsub*ocp(k)*orho * (1-IFDRY)*DT + else + tprg_gde1_s(k) = -prg_gde(k)*lsub*ocp(k)*orho * (1-IFDRY)*DT + endif + + tpri_iha1(k) = pri_iha(k)*lsub*ocp(k)*orho * (1-IFDRY)*DT + tpri_wfz1(k) = pri_wfz(k)*lfus2*ocp(k)*orho * (1-IFDRY)*DT + tpri_rfz1(k) = pri_rfz(k)*lfus2*ocp(k)*orho * (1-IFDRY)*DT + tprg_rfz1(k) = prg_rfz(k)*lfus2*ocp(k)*orho * (1-IFDRY)*DT + tprs_scw1(k) = prs_scw(k)*lfus2*ocp(k)*orho * (1-IFDRY)*DT + tprg_scw1(k) = prg_scw(k)*lfus2*ocp(k)*orho * (1-IFDRY)*DT + tprg_rcs1(k) = prg_rcs(k)*lfus2*ocp(k)*orho * (1-IFDRY)*DT + + if(temp(k).lt.T_0)then + tprs_rcs1(k) = prs_rcs(k)*lfus2*ocp(k)*orho * (1-IFDRY)*DT + endif + + tprr_rci1(k) = prr_rci(k)*lfus2*ocp(k)*orho * (1-IFDRY)*DT + + if(temp(k).lt.T_0)then + tprg_rcg1(k) = prg_rcg(k)*lfus2*ocp(k)*orho * (1-IFDRY)*DT + endif + + if(prw_vcd(k).gt.0)then + tprw_vcd1_c(k) = lvap(k)*ocp(k)*prw_vcd(k)*(1-IFDRY)*DT + else + tprw_vcd1_e(k) = -lvap(k)*ocp(k)*prw_vcd(k)*(1-IFDRY)*DT + endif + +! cooling terms + tprr_sml1(k) = prr_sml(k)*lfus*ocp(k)*orho * (1-IFDRY)*DT + tprr_gml1(k) = prr_gml(k)*lfus*ocp(k)*orho * (1-IFDRY)*DT + + if(temp(k).ge.T_0)then + tprr_rcg1(k) = -prr_rcg(k)*lfus*ocp(k)*orho * (1-IFDRY)*DT + endif + + if(temp(k).ge.T_0)then + tprr_rcs1(k) = -prr_rcs(k)*lfus*ocp(k)*orho * (1-IFDRY)*DT + endif + + tprv_rev1(k) = lvap(k)*ocp(k)*prv_rev(k)*(1-IFDRY)*DT + tten1(k) = tten(k)*DT + qvten1(k) = qvten(k)*DT + qiten1(k) = qiten(k)*DT + qrten1(k) = qrten(k)*DT + qsten1(k) = qsten(k)*DT + qgten1(k) = qgten(k)*DT + niten1(k) = niten(k)*DT + nrten1(k) = nrten(k)*DT + ncten1(k) = ncten(k)*DT + qcten1(k) = qcten(k)*DT + enddo + endif calculate_extended_diagnostics + end subroutine mp_thompson !>@} @@ -3837,13 +4243,12 @@ subroutine qr_acr_qg good = 0 - INQUIRE(FILE="qr_acr_qg.dat",EXIST=lexist) + INQUIRE(FILE=qr_acr_qg_file, EXIST=lexist) #ifdef MPI call MPI_BARRIER(mpi_communicator,ierr) #endif IF ( lexist ) THEN - !write(0,*) "ThompMP: read qr_acr_qg.dat instead of computing" - OPEN(63,file="qr_acr_qg.dat",form="unformatted",err=1234) + OPEN(63,file=qr_acr_qg_file,form="unformatted",err=1234) !sms$serial begin READ(63,err=1234) tcg_racg READ(63,err=1234) tmr_racg @@ -3858,13 +4263,13 @@ subroutine qr_acr_qg INQUIRE(63,opened=lopen) IF (lopen) THEN IF( force_read_thompson ) THEN - write(0,*) "Error reading qr_acr_qg.dat. Aborting because force_read_thompson is .true." + write(0,*) "Error reading "//qr_acr_qg_file//" Aborting because force_read_thompson is .true." return ENDIF CLOSE(63) ELSE IF( force_read_thompson ) THEN - write(0,*) "Error opening qr_acr_qg.dat. Aborting because force_read_thompson is .true." + write(0,*) "Error opening "//qr_acr_qg_file//" Aborting because force_read_thompson is .true." return ENDIF ENDIF @@ -3876,16 +4281,16 @@ subroutine qr_acr_qg ENDIF ELSE IF( force_read_thompson ) THEN - write(0,*) "Non-existent qr_acr_qg.dat. Aborting because force_read_thompson is .true." + write(0,*) "Non-existent "//qr_acr_qg_file//" Aborting because force_read_thompson is .true." return ENDIF ENDIF IF (.NOT. good .EQ. 1 ) THEN -#ifndef SION - if (thompson_table_writer) write_thompson_tables = .true. -#endif - write(0,*) "ThompMP: computing qr_acr_qg" + if (thompson_table_writer) then + write_thompson_tables = .true. + write(0,*) "ThompMP: computing qr_acr_qg" + endif do n2 = 1, nbr ! vr(n2) = av_r*Dr(n2)**bv_r * DEXP(-fv_r*Dr(n2)) vr(n2) = -0.1021 + 4.932E3*Dr(n2) - 0.9551E6*Dr(n2)*Dr(n2) & @@ -3959,7 +4364,7 @@ subroutine qr_acr_qg tcg_racg(i,j,k,m) = t1 tmr_racg(i,j,k,m) = DMIN1(z1, r_r(m)*1.0d0) tcr_gacr(i,j,k,m) = t2 - tmg_gacr(i,j,k,m) = z2 + tmg_gacr(i,j,k,m) = DMIN1(z2, r_g(j)*1.0d0) tnr_racg(i,j,k,m) = y1 tnr_gacr(i,j,k,m) = y2 enddo @@ -3967,8 +4372,8 @@ subroutine qr_acr_qg enddo IF ( write_thompson_tables ) THEN - write(0,*) "Writing qr_acr_qg.dat in Thompson MP init" - OPEN(63,file="qr_acr_qg.dat",form="unformatted",err=9234) + write(0,*) "Writing "//qr_acr_qg_file//" in Thompson MP init" + OPEN(63,file=qr_acr_qg_file,form="unformatted",err=9234) WRITE(63,err=9234) tcg_racg WRITE(63,err=9234) tmr_racg WRITE(63,err=9234) tcr_gacr @@ -3978,7 +4383,7 @@ subroutine qr_acr_qg CLOSE(63) RETURN ! ----- RETURN 9234 CONTINUE - write(0,*) "Error writing qr_acr_qg.dat" + write(0,*) "Error writing "//qr_acr_qg_file return ENDIF ENDIF @@ -4013,13 +4418,13 @@ subroutine qr_acr_qs write_thompson_tables = .false. good = 0 - INQUIRE(FILE="qr_acr_qs.dat",EXIST=lexist) + INQUIRE(FILE=qr_acr_qs_file, EXIST=lexist) #ifdef MPI call MPI_BARRIER(mpi_communicator,ierr) #endif IF ( lexist ) THEN - !write(0,*) "ThompMP: read qr_acr_qs.dat instead of computing" - OPEN(63,file="qr_acr_qs.dat",form="unformatted",err=1234) + !write(0,*) "ThompMP: read "//qr_acr_qs_file//" instead of computing" + OPEN(63,file=qr_acr_qs_file,form="unformatted",err=1234) !sms$serial begin READ(63,err=1234)tcs_racs1 READ(63,err=1234)tmr_racs1 @@ -4040,13 +4445,13 @@ subroutine qr_acr_qs INQUIRE(63,opened=lopen) IF (lopen) THEN IF( force_read_thompson ) THEN - write(0,*) "Error reading qr_acr_qs.dat. Aborting because force_read_thompson is .true." + write(0,*) "Error reading "//qr_acr_qs_file//" Aborting because force_read_thompson is .true." return ENDIF CLOSE(63) ELSE IF( force_read_thompson ) THEN - write(0,*) "Error opening qr_acr_qs.dat. Aborting because force_read_thompson is .true." + write(0,*) "Error opening "//qr_acr_qs_file//" Aborting because force_read_thompson is .true." return ENDIF ENDIF @@ -4058,16 +4463,16 @@ subroutine qr_acr_qs ENDIF ELSE IF( force_read_thompson ) THEN - write(0,*) "Non-existent qr_acr_qs.dat. Aborting because force_read_thompson is .true." + write(0,*) "Non-existent "//qr_acr_qs_file//" Aborting because force_read_thompson is .true." return ENDIF ENDIF IF (.NOT. good .EQ. 1 ) THEN -#ifndef SION - if (thompson_table_writer) write_thompson_tables = .true. -#endif - write(0,*) "ThompMP: computing qr_acr_qs" + if (thompson_table_writer) then + write_thompson_tables = .true. + write(0,*) "ThompMP: computing qr_acr_qs" + endif do n2 = 1, nbr ! vr(n2) = av_r*Dr(n2)**bv_r * DEXP(-fv_r*Dr(n2)) vr(n2) = -0.1021 + 4.932E3*Dr(n2) - 0.9551E6*Dr(n2)*Dr(n2) & @@ -4219,8 +4624,8 @@ subroutine qr_acr_qs enddo IF ( write_thompson_tables ) THEN - write(0,*) "Writing qr_acr_qs.dat in Thompson MP init" - OPEN(63,file="qr_acr_qs.dat",form="unformatted",err=9234) + write(0,*) "Writing "//qr_acr_qs_file//" in Thompson MP init" + OPEN(63,file=qr_acr_qs_file,form="unformatted",err=9234) WRITE(63,err=9234)tcs_racs1 WRITE(63,err=9234)tmr_racs1 WRITE(63,err=9234)tcs_racs2 @@ -4236,7 +4641,7 @@ subroutine qr_acr_qs CLOSE(63) RETURN ! ----- RETURN 9234 CONTINUE - write(0,*) "Error writing qr_acr_qs.dat" + write(0,*) "Error writing "//qr_acr_qs_file ENDIF ENDIF @@ -4274,13 +4679,13 @@ subroutine freezeH2O(threads) write_thompson_tables = .false. good = 0 - INQUIRE(FILE="freezeH2O.dat",EXIST=lexist) + INQUIRE(FILE=freeze_h2o_file,EXIST=lexist) #ifdef MPI call MPI_BARRIER(mpi_communicator,ierr) #endif IF ( lexist ) THEN - !write(0,*) "ThompMP: read freezeH2O.dat instead of computing" - OPEN(63,file="freezeH2O.dat",form="unformatted",err=1234) + !write(0,*) "ThompMP: read "//freeze_h2o_file//" instead of computing" + OPEN(63,file=freeze_h2o_file,form="unformatted",err=1234) !sms$serial begin READ(63,err=1234)tpi_qrfz READ(63,err=1234)tni_qrfz @@ -4295,13 +4700,13 @@ subroutine freezeH2O(threads) INQUIRE(63,opened=lopen) IF (lopen) THEN IF( force_read_thompson ) THEN - write(0,*) "Error reading freezeH2O.dat. Aborting because force_read_thompson is .true." + write(0,*) "Error reading "//freeze_h2o_file//" Aborting because force_read_thompson is .true." return ENDIF CLOSE(63) ELSE IF( force_read_thompson ) THEN - write(0,*) "Error opening freezeH2O.dat. Aborting because force_read_thompson is .true." + write(0,*) "Error opening "//freeze_h2o_file//" Aborting because force_read_thompson is .true." return ENDIF ENDIF @@ -4313,16 +4718,16 @@ subroutine freezeH2O(threads) ENDIF ELSE IF( force_read_thompson ) THEN - write(0,*) "Non-existent freezeH2O.dat. Aborting because force_read_thompson is .true." + write(0,*) "Non-existent "//freeze_h2o_file//" Aborting because force_read_thompson is .true." return ENDIF ENDIF IF (.NOT. good .EQ. 1 ) THEN -#ifndef SION - if (thompson_table_writer) write_thompson_tables = .true. -#endif - write(0,*) "ThompMP: computing freezeH2O" + if (thompson_table_writer) then + write_thompson_tables = .true. + write(0,*) "ThompMP: computing freezeH2O" + endif orho_w = 1./rho_w @@ -4397,8 +4802,8 @@ subroutine freezeH2O(threads) enddo IF ( write_thompson_tables ) THEN - write(0,*) "Writing freezeH2O.dat in Thompson MP init" - OPEN(63,file="freezeH2O.dat",form="unformatted",err=9234) + write(0,*) "Writing "//freeze_h2o_file//" in Thompson MP init" + OPEN(63,file=freeze_h2o_file,form="unformatted",err=9234) WRITE(63,err=9234)tpi_qrfz WRITE(63,err=9234)tni_qrfz WRITE(63,err=9234)tpg_qrfz @@ -4408,7 +4813,7 @@ subroutine freezeH2O(threads) CLOSE(63) RETURN ! ----- RETURN 9234 CONTINUE - write(0,*) "Error writing freezeH2O.dat" + write(0,*) "Error writing "//freeze_h2o_file return ENDIF ENDIF @@ -5120,7 +5525,7 @@ real function iceDeMott(tempc, qv, qvs, qvsi, rho, nifa) ! mux = hx*p_alpha*n_in*rho ! xni = mux*((6700.*nifa)-200.)/((6700.*5.E5)-200.) ! elseif (satw.ge.0.985 .and. tempc.gt.HGFR-273.15) then - nifa_cc = nifa*RHO_NOT0*1.E-6/rho + nifa_cc = MAX(0.5, nifa*RHO_NOT0*1.E-6/rho) ! xni = 3.*nifa_cc**(1.25)*exp((0.46*(-tempc))-11.6) ! [DeMott, 2015] xni = (5.94e-5*(-tempc)**3.33) & ! [DeMott, 2010] * (nifa_cc**((-0.0264*(tempc))+0.0033)) @@ -5233,22 +5638,9 @@ subroutine calc_effectRad (t1d, p1d, qv1d, qc1d, nc1d, qi1d, ni1d, qs1d, & has_qi = .false. has_qs = .false. -! DH* 2020-06-08 Moved the initial values and bounds from -! the calling routines into calc_effectRad (to prevent -! multiple definitions that may be inconsistent). The -! initial values and bounds from the calling routines were -! -! re_cloud(i,k) = MAX(2.49, MIN(re_cloud(i,k)*1.e6, 50.)) -! re_ice(i,k) = MAX(4.99, MIN(re_ice(i,k)*1.e6, 125.)) -! re_snow(i,k) = MAX(9.99, MIN(re_snow(i,k)*1.e6, 999.)) -! -! independent of the version of Thompson MP. These values -! are consistent with the WRFv3.8.1 settings, but inconsistent -! with the WRFv4+ settings. In order to apply the same bounds -! as before this change, use the WRF v3.8.1 settings throughout. - re_qc1d(:) = 2.50E-6 ! 2.49E-6 - re_qi1d(:) = 5.00E-6 ! 4.99E-6 - re_qs1d(:) = 1.00E-5 ! 9.99E-6 + re_qc1d(:) = 0.0D0 + re_qi1d(:) = 0.0D0 + re_qs1d(:) = 0.0D0 do k = kts, kte rho(k) = 0.622*p1d(k)/(R*t1d(k)*(qv1d(k)+0.622)) @@ -5274,7 +5666,7 @@ subroutine calc_effectRad (t1d, p1d, qv1d, qc1d, nc1d, qi1d, ni1d, qs1d, & inu_c = MIN(15, NINT(1000.E6/nc(k)) + 2) endif lamc = (nc(k)*am_r*g_ratio(inu_c)/rc(k))**obmr - re_qc1d(k) = MAX(2.51E-6, MIN(SNGL(0.5D0 * DBLE(3.+inu_c)/lamc), 50.E-6)) + re_qc1d(k) = SNGL(0.5D0 * DBLE(3.+inu_c)/lamc) enddo endif @@ -5282,7 +5674,7 @@ subroutine calc_effectRad (t1d, p1d, qv1d, qc1d, nc1d, qi1d, ni1d, qs1d, & do k = kts, kte if (ri(k).le.R1 .or. ni(k).le.R2) CYCLE lami = (am_i*cig(2)*oig1*ni(k)/ri(k))**obmi - re_qi1d(k) = MAX(5.01E-6, MIN(SNGL(0.5D0 * DBLE(3.+mu_i)/lami), 125.E-6)) + re_qi1d(k) = SNGL(0.5D0 * DBLE(3.+mu_i)/lami) enddo endif @@ -5322,7 +5714,7 @@ subroutine calc_effectRad (t1d, p1d, qv1d, qc1d, nc1d, qi1d, ni1d, qs1d, & & + sb(7)*tc0*tc0*cse(1) + sb(8)*tc0*cse(1)*cse(1) & & + sb(9)*tc0*tc0*tc0 + sb(10)*cse(1)*cse(1)*cse(1) smoc = a_ * smo2**b_ - re_qs1d(k) = MAX(1.01E-5, MIN(0.5*(smoc/smob), 999.E-6)) + re_qs1d(k) = 0.5*(smoc/smob) enddo endif @@ -5441,8 +5833,15 @@ subroutine calc_refl10cm (qv1d, qc1d, qr1d, nr1d, qs1d, qg1d, & !+---+-----------------------------------------------------------------+ !..Calculate y-intercept, slope, and useful moments for snow. !+---+-----------------------------------------------------------------+ + do k = kts, kte + smo2(k) = 0. + smob(k) = 0. + smoc(k) = 0. + smoz(k) = 0. + enddo if (ANY(L_qs .eqv. .true.)) then do k = kts, kte + if (.not. L_qs(k)) CYCLE tc0 = MIN(-0.1, temp(k)-273.15) smob(k) = rs(k)*oams @@ -5498,26 +5897,11 @@ subroutine calc_refl10cm (qv1d, qc1d, qr1d, nr1d, qs1d, qg1d, & !+---+-----------------------------------------------------------------+ if (ANY(L_qg .eqv. .true.)) then - N0_min = gonv_max - k_0 = kts - do k = kte, kts, -1 - if (temp(k).ge.270.65) k_0 = MAX(k_0, k) - enddo do k = kte, kts, -1 - if (k.gt.k_0 .and. L_qr(k) .and. mvd_r(k).gt.100.E-6) then - xslw1 = 4.01 + alog10(mvd_r(k)) - else - xslw1 = 0.01 - endif - ygra1 = 4.31 + alog10(max(5.E-5, rg(k))) - zans1 = (3.1 + (100./(300.*xslw1*ygra1/(10./xslw1+1.+0.25*ygra1)+30.+10.*ygra1))) + rand1 - if (rand1 .ne. 0.0) then - zans1 = MAX(2., MIN(zans1, 7.)) - endif + ygra1 = alog10(max(1.E-9, rg(k))) + zans1 = 3.0 + 2./7.*(ygra1+8.) + rand1 N0_exp = 10.**(zans1) N0_exp = MAX(DBLE(gonv_min), MIN(N0_exp, DBLE(gonv_max))) - N0_min = MIN(N0_exp, N0_min) - N0_exp = N0_min lam_exp = (N0_exp*am_g*cgg(1)/rg(k))**oge1 lamg = lam_exp * (cgg(3)*ogg2*ogg1)**obmg ilamg(k) = 1./lamg @@ -5663,300 +6047,6 @@ subroutine calc_refl10cm (qv1d, qc1d, qr1d, nr1d, qs1d, qg1d, & end subroutine calc_refl10cm ! - -#ifdef SION -!>\ingroup aathompson - subroutine readwrite_tables(mode, mpicomm, mpirank, mpiroot, ierr) - -#ifdef MPI - use mpi -#endif - use sion_f90 - - implicit none - - ! Interface variables - character(len=*), intent(in) :: mode - integer, intent(in) :: mpicomm - integer, intent(in) :: mpirank - integer, intent(in) :: mpiroot - integer, intent(out) :: ierr - -#ifdef MPI - ! MPI variables - integer :: mpierr -#endif - - ! SIONlib variables - integer :: SIONLIB_fsblksize - integer :: SIONLIB_numfiles - character*2 :: SIONLIB_filemode - ! - integer :: nprocs - integer, dimension(:), allocatable :: procs - integer*8, dimension(:), allocatable :: chunksizes - ! - integer*8 :: brw - integer :: sid - integer :: f_endian, s_endian - logical :: exists - integer*8 :: tables_size - real*8 :: checksum - character(len=*), parameter :: filename = 'thompson_tables_precomp.sl' - - integer :: i - - continue - - ierr = 0 - - ! Test if SIONlib file containing pre-computed tables exists - inquire(file=trim(filename), exist=exists) - if (trim(mode)=="read") then - SIONLIB_filemode = "rb" - if (.not.exists) then - if (mpirank==mpiroot) write(0,*) "SIONlib file " // trim(filename) // & - " with precomputed Thompson MP tables not found" - ierr = 1 - return - end if - else if (trim(mode)=="write") then - SIONLIB_filemode = "wb" - SIONLIB_numfiles = 1 - if (exists) then - if (mpirank==mpiroot) write(0,*) "SIONlib file " // trim(filename) // & - " with precomputed Thompson MP tables already exists" - ierr = 1 - return - end if - end if - -#ifdef MPI - ! To avoid that MPI master task creates the file before - ! other tasks pass the inquire test above - call MPI_BARRIER(mpicomm, mpierr) -#endif - - mpi_master_io_only: if (mpirank==mpiroot) then - tables_size = sizeof(tcg_racg) - tables_size = tables_size + sizeof(tmr_racg) - tables_size = tables_size + sizeof(tcr_gacr) - tables_size = tables_size + sizeof(tmg_gacr) - tables_size = tables_size + sizeof(tnr_racg) - tables_size = tables_size + sizeof(tnr_gacr) - tables_size = tables_size + sizeof(tcs_racs1) - tables_size = tables_size + sizeof(tmr_racs1) - tables_size = tables_size + sizeof(tcs_racs2) - tables_size = tables_size + sizeof(tmr_racs2) - tables_size = tables_size + sizeof(tcr_sacr1) - tables_size = tables_size + sizeof(tms_sacr1) - tables_size = tables_size + sizeof(tcr_sacr2) - tables_size = tables_size + sizeof(tms_sacr2) - tables_size = tables_size + sizeof(tnr_racs1) - tables_size = tables_size + sizeof(tnr_racs2) - tables_size = tables_size + sizeof(tnr_sacr1) - tables_size = tables_size + sizeof(tnr_sacr2) - tables_size = tables_size + sizeof(tpi_qcfz) - tables_size = tables_size + sizeof(tni_qcfz) - tables_size = tables_size + sizeof(tpi_qrfz) - tables_size = tables_size + sizeof(tpg_qrfz) - tables_size = tables_size + sizeof(tni_qrfz) - tables_size = tables_size + sizeof(tnr_qrfz) - tables_size = tables_size + sizeof(tps_iaus) - tables_size = tables_size + sizeof(tni_iaus) - tables_size = tables_size + sizeof(tpi_ide) - tables_size = tables_size + sizeof(t_Efrw) - tables_size = tables_size + sizeof(t_Efsw) - tables_size = tables_size + sizeof(tnr_rev) - tables_size = tables_size + sizeof(tpc_wev) - tables_size = tables_size + sizeof(tnc_wev) - tables_size = tables_size + sizeof(tnccn_act) - - ! Autodetect SIONlib filesystem block size - SIONLIB_fsblksize = -1 - - nprocs = 1 - allocate (procs(1:nprocs)) - allocate (chunksizes(1:nprocs)) - do i=1,nprocs - procs(i) = i - chunksizes(i) = sizeof(checksum) + tables_size - end do - - write(0,'(a)') "Opening file " // trim(filename) - call fsion_open(trim(filename), SIONLIB_filemode, nprocs, SIONLIB_numfiles, chunksizes(1), SIONLIB_fsblksize, procs(1), sid) - if (sid<0) write(0,'(a)') "Error opening " // trim(filename) // " in " // trim(mode) // " mode" - - call fsion_seek(sid, mpirank, SION_CURRENT_BLK, SION_CURRENT_POS, ierr) - ! fsion_seek returns ierr=1 if cursor could be positioned as requested and 0 otherwise - if (ierr==1) ierr=0 - - if (trim(mode)=="read") then - ! Check that file endianness is identical to system endianness - call fsion_get_file_endianness(sid, f_endian) - call fsion_get_endianess(s_endian) - if (f_endian .ne. s_endian) then - write(0,'(a)') "Error, endianness of SIONlib file " // trim(filename) // " differs " // & - "from filesystem endianness; please delete file and recalculate tables!" - ierr = 1 - end if - if (ierr==0) then - ! Read checksum - call fsion_read(checksum, int(kind(checksum),8), int(1,8), sid, brw) - ! Read arrays tcg_racg through tnccn_act - call fsion_read(tcg_racg(1,1,1,1), int(kind(tcg_racg(1,1,1,1)),8), int(size(tcg_racg),8), sid, brw) - call fsion_read(tmr_racg(1,1,1,1), int(kind(tmr_racg(1,1,1,1)),8), int(size(tmr_racg),8), sid, brw) - call fsion_read(tcr_gacr(1,1,1,1), int(kind(tcr_gacr(1,1,1,1)),8), int(size(tcr_gacr),8), sid, brw) - call fsion_read(tmg_gacr(1,1,1,1), int(kind(tmg_gacr(1,1,1,1)),8), int(size(tmg_gacr),8), sid, brw) - call fsion_read(tnr_racg(1,1,1,1), int(kind(tnr_racg(1,1,1,1)),8), int(size(tnr_racg),8), sid, brw) - call fsion_read(tnr_gacr(1,1,1,1), int(kind(tnr_gacr(1,1,1,1)),8), int(size(tnr_gacr),8), sid, brw) - call fsion_read(tcs_racs1(1,1,1,1), int(kind(tcs_racs1(1,1,1,1)),8), int(size(tcs_racs1),8), sid, brw) - call fsion_read(tmr_racs1(1,1,1,1), int(kind(tmr_racs1(1,1,1,1)),8), int(size(tmr_racs1),8), sid, brw) - call fsion_read(tcs_racs2(1,1,1,1), int(kind(tcs_racs2(1,1,1,1)),8), int(size(tcs_racs2),8), sid, brw) - call fsion_read(tmr_racs2(1,1,1,1), int(kind(tmr_racs2(1,1,1,1)),8), int(size(tmr_racs2),8), sid, brw) - call fsion_read(tcr_sacr1(1,1,1,1), int(kind(tcr_sacr1(1,1,1,1)),8), int(size(tcr_sacr1),8), sid, brw) - call fsion_read(tms_sacr1(1,1,1,1), int(kind(tms_sacr1(1,1,1,1)),8), int(size(tms_sacr1),8), sid, brw) - call fsion_read(tcr_sacr2(1,1,1,1), int(kind(tcr_sacr2(1,1,1,1)),8), int(size(tcr_sacr2),8), sid, brw) - call fsion_read(tms_sacr2(1,1,1,1), int(kind(tms_sacr2(1,1,1,1)),8), int(size(tms_sacr2),8), sid, brw) - call fsion_read(tnr_racs1(1,1,1,1), int(kind(tnr_racs1(1,1,1,1)),8), int(size(tnr_racs1),8), sid, brw) - call fsion_read(tnr_racs2(1,1,1,1), int(kind(tnr_racs2(1,1,1,1)),8), int(size(tnr_racs2),8), sid, brw) - call fsion_read(tnr_sacr1(1,1,1,1), int(kind(tnr_sacr1(1,1,1,1)),8), int(size(tnr_sacr1),8), sid, brw) - call fsion_read(tnr_sacr2(1,1,1,1), int(kind(tnr_sacr2(1,1,1,1)),8), int(size(tnr_sacr2),8), sid, brw) - call fsion_read(tpi_qcfz(1,1,1,1), int(kind(tpi_qcfz(1,1,1,1)),8), int(size(tpi_qcfz),8), sid, brw) - call fsion_read(tni_qcfz(1,1,1,1), int(kind(tni_qcfz(1,1,1,1)),8), int(size(tni_qcfz),8), sid, brw) - call fsion_read(tpi_qrfz(1,1,1,1), int(kind(tpi_qrfz(1,1,1,1)),8), int(size(tpi_qrfz),8), sid, brw) - call fsion_read(tpg_qrfz(1,1,1,1), int(kind(tpg_qrfz(1,1,1,1)),8), int(size(tpg_qrfz),8), sid, brw) - call fsion_read(tni_qrfz(1,1,1,1), int(kind(tni_qrfz(1,1,1,1)),8), int(size(tni_qrfz),8), sid, brw) - call fsion_read(tnr_qrfz(1,1,1,1), int(kind(tnr_qrfz(1,1,1,1)),8), int(size(tnr_qrfz),8), sid, brw) - call fsion_read(tps_iaus(1,1), int(kind(tps_iaus(1,1)),8), int(size(tps_iaus),8), sid, brw) - call fsion_read(tni_iaus(1,1), int(kind(tni_iaus(1,1)),8), int(size(tni_iaus),8), sid, brw) - call fsion_read(tpi_ide(1,1), int(kind(tpi_ide(1,1)),8), int(size(tpi_ide),8), sid, brw) - call fsion_read(t_Efrw(1,1), int(kind(t_Efrw(1,1)),8), int(size(t_Efrw),8), sid, brw) - call fsion_read(t_Efsw(1,1), int(kind(t_Efsw(1,1)),8), int(size(t_Efsw),8), sid, brw) - call fsion_read(tnr_rev(1,1,1), int(kind(tnr_rev(1,1,1)),8), int(size(tnr_rev),8), sid, brw) - call fsion_read(tpc_wev(1,1,1), int(kind(tpc_wev(1,1,1)),8), int(size(tpc_wev),8), sid, brw) - call fsion_read(tnc_wev(1,1,1), int(kind(tnc_wev (1,1,1)),8), int(size(tnc_wev),8), sid, brw) - call fsion_read(tnccn_act(1,1,1,1,1), int(kind(tnccn_act(1,1,1,1,1)),8), int(size(tnccn_act),8), sid, brw) - else - ! Wrong endianness (ierr/=0) will force checksum match to fail - checksum = -1 - end if - else if (trim(mode)=="write") then - ! Calculate and write checksum - checksum = calculate_checksum() - call fsion_write(checksum, int(kind(checksum),8), int(1,8), sid, brw) - ! Write arrays tcg_racg through tnccn_act - call fsion_write(tcg_racg(1,1,1,1), int(kind(tcg_racg(1,1,1,1)),8), int(size(tcg_racg),8), sid, brw) - call fsion_write(tmr_racg(1,1,1,1), int(kind(tmr_racg(1,1,1,1)),8), int(size(tmr_racg),8), sid, brw) - call fsion_write(tcr_gacr(1,1,1,1), int(kind(tcr_gacr(1,1,1,1)),8), int(size(tcr_gacr),8), sid, brw) - call fsion_write(tmg_gacr(1,1,1,1), int(kind(tmg_gacr(1,1,1,1)),8), int(size(tmg_gacr),8), sid, brw) - call fsion_write(tnr_racg(1,1,1,1), int(kind(tnr_racg(1,1,1,1)),8), int(size(tnr_racg),8), sid, brw) - call fsion_write(tnr_gacr(1,1,1,1), int(kind(tnr_gacr(1,1,1,1)),8), int(size(tnr_gacr),8), sid, brw) - call fsion_write(tcs_racs1(1,1,1,1), int(kind(tcs_racs1(1,1,1,1)),8), int(size(tcs_racs1),8), sid, brw) - call fsion_write(tmr_racs1(1,1,1,1), int(kind(tmr_racs1(1,1,1,1)),8), int(size(tmr_racs1),8), sid, brw) - call fsion_write(tcs_racs2(1,1,1,1), int(kind(tcs_racs2(1,1,1,1)),8), int(size(tcs_racs2),8), sid, brw) - call fsion_write(tmr_racs2(1,1,1,1), int(kind(tmr_racs2(1,1,1,1)),8), int(size(tmr_racs2),8), sid, brw) - call fsion_write(tcr_sacr1(1,1,1,1), int(kind(tcr_sacr1(1,1,1,1)),8), int(size(tcr_sacr1),8), sid, brw) - call fsion_write(tms_sacr1(1,1,1,1), int(kind(tms_sacr1(1,1,1,1)),8), int(size(tms_sacr1),8), sid, brw) - call fsion_write(tcr_sacr2(1,1,1,1), int(kind(tcr_sacr2(1,1,1,1)),8), int(size(tcr_sacr2),8), sid, brw) - call fsion_write(tms_sacr2(1,1,1,1), int(kind(tms_sacr2(1,1,1,1)),8), int(size(tms_sacr2),8), sid, brw) - call fsion_write(tnr_racs1(1,1,1,1), int(kind(tnr_racs1(1,1,1,1)),8), int(size(tnr_racs1),8), sid, brw) - call fsion_write(tnr_racs2(1,1,1,1), int(kind(tnr_racs2(1,1,1,1)),8), int(size(tnr_racs2),8), sid, brw) - call fsion_write(tnr_sacr1(1,1,1,1), int(kind(tnr_sacr1(1,1,1,1)),8), int(size(tnr_sacr1),8), sid, brw) - call fsion_write(tnr_sacr2(1,1,1,1), int(kind(tnr_sacr2(1,1,1,1)),8), int(size(tnr_sacr2),8), sid, brw) - call fsion_write(tpi_qcfz(1,1,1,1), int(kind(tpi_qcfz(1,1,1,1)),8), int(size(tpi_qcfz),8), sid, brw) - call fsion_write(tni_qcfz(1,1,1,1), int(kind(tni_qcfz(1,1,1,1)),8), int(size(tni_qcfz),8), sid, brw) - call fsion_write(tpi_qrfz(1,1,1,1), int(kind(tpi_qrfz(1,1,1,1)),8), int(size(tpi_qrfz),8), sid, brw) - call fsion_write(tpg_qrfz(1,1,1,1), int(kind(tpg_qrfz(1,1,1,1)),8), int(size(tpg_qrfz),8), sid, brw) - call fsion_write(tni_qrfz(1,1,1,1), int(kind(tni_qrfz(1,1,1,1)),8), int(size(tni_qrfz),8), sid, brw) - call fsion_write(tnr_qrfz(1,1,1,1), int(kind(tnr_qrfz(1,1,1,1)),8), int(size(tnr_qrfz),8), sid, brw) - call fsion_write(tps_iaus(1,1), int(kind(tps_iaus(1,1)),8), int(size(tps_iaus),8), sid, brw) - call fsion_write(tni_iaus(1,1), int(kind(tni_iaus(1,1)),8), int(size(tni_iaus),8), sid, brw) - call fsion_write(tpi_ide(1,1), int(kind(tpi_ide(1,1)),8), int(size(tpi_ide),8), sid, brw) - call fsion_write(t_Efrw(1,1), int(kind(t_Efrw(1,1)),8), int(size(t_Efrw),8), sid, brw) - call fsion_write(t_Efsw(1,1), int(kind(t_Efsw(1,1)),8), int(size(t_Efsw),8), sid, brw) - call fsion_write(tnr_rev(1,1,1), int(kind(tnr_rev(1,1,1)),8), int(size(tnr_rev),8), sid, brw) - call fsion_write(tpc_wev(1,1,1), int(kind(tpc_wev(1,1,1)),8), int(size(tpc_wev),8), sid, brw) - call fsion_write(tnc_wev(1,1,1), int(kind(tnc_wev (1,1,1)),8), int(size(tnc_wev),8), sid, brw) - call fsion_write(tnccn_act(1,1,1,1,1), int(kind(tnccn_act(1,1,1,1,1)),8), int(size(tnccn_act),8), sid, brw) - end if - - write(0,'(a)') "Closing file " // trim(filename) - call fsion_close(sid, ierr) - - ierr = 0 - ! Test if checksum matches, this fails if wrong endianness (checksum=-1, see above) - if (trim(mode)=="read" .and. checksum/=calculate_checksum()) then - write(0,'(2(a,e20.9))') "Checksum mismatch, expected", calculate_checksum(), " but got", checksum - call system('rm -f ' // trim(filename)) - ierr = 1 - end if - - deallocate (procs) - deallocate (chunksizes) - - else - - ierr = 0 - - end if mpi_master_io_only - -#ifdef MPI - if (trim(mode)=="read") then - ! After reading the tables, broadcast the information to all MPI tasks. - ! First, broadcast the current error code from MPI master (0 = success) - call MPI_BCAST(ierr, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - if (ierr/=0) return - call MPI_BCAST(tcg_racg, size(tcg_racg), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(tmr_racg, size(tmr_racg), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(tcr_gacr, size(tcr_gacr), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(tmg_gacr, size(tmg_gacr), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(tnr_racg, size(tnr_racg), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(tnr_gacr, size(tnr_gacr), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(tcs_racs1, size(tcs_racs1), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(tmr_racs1, size(tmr_racs1), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(tcs_racs2, size(tcs_racs2), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(tmr_racs2, size(tmr_racs2), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(tcr_sacr1, size(tcr_sacr1), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(tms_sacr1, size(tms_sacr1), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(tcr_sacr2, size(tcr_sacr2), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(tms_sacr2, size(tms_sacr2), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(tnr_racs1, size(tnr_racs1), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(tnr_racs2, size(tnr_racs2), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(tnr_sacr1, size(tnr_sacr1), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(tnr_sacr2, size(tnr_sacr2), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(tpi_qcfz, size(tpi_qcfz), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(tni_qcfz, size(tni_qcfz), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(tpi_qrfz, size(tpi_qrfz), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(tpg_qrfz, size(tpg_qrfz), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(tni_qrfz, size(tni_qrfz), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(tnr_qrfz, size(tnr_qrfz), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(tps_iaus, size(tps_iaus), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(tni_iaus, size(tni_iaus), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(tpi_ide, size(tpi_ide), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(t_Efrw, size(t_Efrw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(t_Efsw, size(t_Efsw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(tnr_rev, size(tnr_rev), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(tpc_wev, size(tpc_wev), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(tnc_wev, size(tnc_wev), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(tnccn_act, size(tnccn_act), MPI_REAL, mpiroot, mpicomm, mpierr) - else if (trim(mode)=="write") then - call MPI_BARRIER(mpicomm, mpierr) - end if -#endif - - return - - contains - - function calculate_checksum() result(checksum) - real*8 :: checksum - checksum = real(tables_size,8)*sum(tcg_racg) - end function calculate_checksum - - end subroutine readwrite_tables -#endif - !+---+-----------------------------------------------------------------+ !+---+-----------------------------------------------------------------+ END MODULE module_mp_thompson diff --git a/physics/module_nst_parameters.f90 b/physics/module_nst_parameters.f90 index 502ef976a..6d8c8794b 100644 --- a/physics/module_nst_parameters.f90 +++ b/physics/module_nst_parameters.f90 @@ -6,6 +6,8 @@ !! \ingroup gfs_nst_main !! This module contains constants and parameters used in GFS !! near surface sea temperature scheme. +!! history: +!! 20210305: X.Li, reduce z_w_max from 30 m to 20 m module module_nst_parameters use machine, only : kind_phys & ,kind_rad ! for astronomy (date) calculations @@ -42,7 +44,7 @@ module module_nst_parameters ,eps_z_w=0.01 & !< criteria to finish iterations for z_w ,eps_conv=0.01 & !< criteria to finish iterations for d_conv ,eps_sfs=0.01 & !< criteria to finish iterations for d_sfs - ,z_w_max=30.0 & !< max warm layer thickness + ,z_w_max=20.0 & !< max warm layer thickness ,z_w_min=0.2 & !< min warm layer thickness ,z_w_ini=0.2 & !< initial warm layer thickness in dtl_onset ,z_c_max=0.01 & !< maximum of sub-layer thickness (m) diff --git a/physics/module_sf_exchcoef.f90 b/physics/module_sf_exchcoef.f90 old mode 100755 new mode 100644 diff --git a/physics/module_sf_mynn.F90 b/physics/module_sf_mynn.F90 index ebbc3dcf9..fc987b627 100644 --- a/physics/module_sf_mynn.F90 +++ b/physics/module_sf_mynn.F90 @@ -2,7 +2,7 @@ !! This file contains !WRF:MODEL_LAYER:PHYSICS ! -!>\ingroup gsd_mynn_sfc +!>\ingroup mynn_sfc !>\defgroup module_sf_mynn_mod GSD MYNN SFC Module MODULE module_sf_mynn @@ -109,7 +109,7 @@ MODULE module_sf_mynn REAL, PARAMETER :: COARE_OPT=3.0 ! 3.0 or 3.5 !For debugging purposes: INTEGER, PARAMETER :: debug_code = 0 !0: no extra ouput - !1: some step-by-step output + !1: check input !2: everything - heavy I/O LOGICAL, PARAMETER :: compute_diag = .false. LOGICAL, PARAMETER :: compute_flux = .false. !shouldn't need compute @@ -122,25 +122,8 @@ MODULE module_sf_mynn CONTAINS !------------------------------------------------------------------- -!>\ingroup module_sf_mynn_mod -!> Fill the PSIM and PSIH tables. The subroutine "psi_init" was leveraged from -!! module_sf_sfclayrev.F, leveraging the work from Pedro Jimenez. -!! This subroutine returns a blended form from Dyer and Hicks (1974) -!! and Grachev et al (2000) for unstable conditions and the form -!! from Cheng and Brutsaert (2005) for stable conditions. - - SUBROUTINE mynn_sf_init_driver(allowed_to_read,psi_opt) - - LOGICAL, INTENT(in) :: allowed_to_read - INTEGER, INTENT(IN) :: psi_opt - - !CALL psi_init - CALL psi_init(psi_opt) - - END SUBROUTINE mynn_sf_init_driver - !------------------------------------------------------------------- -!>\ingroup module_sf_mynn_mod +!>\ingroup mynn_sfc !! This subroutine SUBROUTINE SFCLAY_mynn( & U3D,V3D,T3D,QV3D,P3D,dz8w, & !in @@ -149,27 +132,27 @@ SUBROUTINE SFCLAY_mynn( & CP,G,ROVCP,R,XLV, & !in SVP1,SVP2,SVP3,SVPT0,EP1,EP2,KARMAN, & !in ISFFLX,isftcflx,lsm,iz0tlnd,psi_opt, & !in - & sigmaf,vegtype,shdmax,ivegsrc, & !intent(in) + & sigmaf,vegtype,shdmax,ivegsrc, & !intent(in) & z0pert,ztpert, & !intent(in) & redrag,sfc_z0_type, & !intent(in) itimestep,iter, & !in wet, dry, icy, & !intent(in) - tskin_ocn, tskin_lnd, tskin_ice, & !intent(in) - tsurf_ocn, tsurf_lnd, tsurf_ice, & !intent(in) - qsfc_ocn, qsfc_lnd, qsfc_ice, & !intent(in) - snowh_ocn, snowh_lnd, snowh_ice, & !intent(in) - ZNT_ocn, ZNT_lnd, ZNT_ice, & !intent(inout) - UST_ocn, UST_lnd, UST_ice, & !intent(inout) - cm_ocn, cm_lnd, cm_ice, & !intent(inout) - ch_ocn, ch_lnd, ch_ice, & !intent(inout) - rb_ocn, rb_lnd, rb_ice, & !intent(inout) - stress_ocn,stress_lnd,stress_ice, & !intent(inout) - fm_ocn, fm_lnd, fm_ice, & !intent(inout) - fh_ocn, fh_lnd, fh_ice, & !intent(inout) - fm10_ocn, fm10_lnd, fm10_ice, & !intent(inout) - fh2_ocn, fh2_lnd, fh2_ice, & !intent(inout) - HFLX_ocn, HFLX_lnd, HFLX_ice, & - QFLX_ocn, QFLX_lnd, QFLX_ice, & + tskin_wat, tskin_lnd, tskin_ice, & !intent(in) + tsurf_wat, tsurf_lnd, tsurf_ice, & !intent(in) + qsfc_wat, qsfc_lnd, qsfc_ice, & !intent(in) + snowh_wat, snowh_lnd, snowh_ice, & !intent(in) + ZNT_wat, ZNT_lnd, ZNT_ice, & !intent(inout) + UST_wat, UST_lnd, UST_ice, & !intent(inout) + cm_wat, cm_lnd, cm_ice, & !intent(inout) + ch_wat, ch_lnd, ch_ice, & !intent(inout) + rb_wat, rb_lnd, rb_ice, & !intent(inout) + stress_wat,stress_lnd,stress_ice, & !intent(inout) + fm_wat, fm_lnd, fm_ice, & !intent(inout) + fh_wat, fh_lnd, fh_ice, & !intent(inout) + fm10_wat, fm10_lnd, fm10_ice, & !intent(inout) + fh2_wat, fh2_lnd, fh2_ice, & !intent(inout) + HFLX_wat, HFLX_lnd, HFLX_ice, & + QFLX_wat, QFLX_lnd, QFLX_ice, & CH,CHS,CHS2,CQS2,CPM, & ZNT,USTM,ZOL,MOL,RMOL, & PSIM,PSIH, & @@ -349,25 +332,25 @@ SUBROUTINE SFCLAY_mynn( & & wet, dry, icy REAL, DIMENSION( ims:ime ), INTENT(IN) :: & - & tskin_ocn, tskin_lnd, tskin_ice, & - & tsurf_ocn, tsurf_lnd, tsurf_ice, & - & snowh_ocn, snowh_lnd, snowh_ice + & tskin_wat, tskin_lnd, tskin_ice, & + & tsurf_wat, tsurf_lnd, tsurf_ice, & + & snowh_wat, snowh_lnd, snowh_ice, & + & qsfc_ruc REAL, DIMENSION( ims:ime), INTENT(INOUT) :: & - & ZNT_ocn, ZNT_lnd, ZNT_ice, & - & UST_ocn, UST_lnd, UST_ice, & - & cm_ocn, cm_lnd, cm_ice, & - & ch_ocn, ch_lnd, ch_ice, & - & rb_ocn, rb_lnd, rb_ice, & - & stress_ocn,stress_lnd,stress_ice, & - & fm_ocn, fm_lnd, fm_ice, & - & fh_ocn, fh_lnd, fh_ice, & - & fm10_ocn, fm10_lnd, fm10_ice, & - & fh2_ocn, fh2_lnd, fh2_ice, & - & HFLX_ocn, HFLX_lnd, HFLX_ice, & - & QFLX_ocn, QFLX_lnd, QFLX_ice, & - & qsfc_ocn, qsfc_lnd, qsfc_ice, & - & qsfc_ruc + & ZNT_wat, ZNT_lnd, ZNT_ice, & + & UST_wat, UST_lnd, UST_ice, & + & cm_wat, cm_lnd, cm_ice, & + & ch_wat, ch_lnd, ch_ice, & + & rb_wat, rb_lnd, rb_ice, & + & stress_wat,stress_lnd,stress_ice, & + & fm_wat, fm_lnd, fm_ice, & + & fh_wat, fh_lnd, fh_ice, & + & fm10_wat, fm10_lnd, fm10_ice, & + & fh2_wat, fh2_lnd, fh2_ice, & + & HFLX_wat, HFLX_lnd, HFLX_ice, & + & QFLX_wat, QFLX_lnd, QFLX_ice, & + & qsfc_wat, qsfc_lnd, qsfc_ice !ADDITIONAL OUTPUT !JOE-begin @@ -423,12 +406,12 @@ SUBROUTINE SFCLAY_mynn( & IF (itimestep==1 .AND. iter==1) THEN DO i=its,ite !Everything here is used before calculated - UST_OCN(i)=MAX(0.04*SQRT(U1D(i)*U1D(i) + V1D(i)*V1D(i)),0.001) + UST_WAT(i)=MAX(0.04*SQRT(U1D(i)*U1D(i) + V1D(i)*V1D(i)),0.001) UST_LND(i)=MAX(0.04*SQRT(U1D(i)*U1D(i) + V1D(i)*V1D(i)),0.001) UST_ICE(i)=MAX(0.04*SQRT(U1D(i)*U1D(i) + V1D(i)*V1D(i)),0.001) MOL(i)=0.0 QSFC(i)=QV3D(i,kts)/(1.+QV3D(i,kts)) - QSFC_OCN(i)=QSFC(i) + QSFC_WAT(i)=QSFC(i) QSFC_LND(i)=QSFC(i) QSFC_ICE(i)=QSFC(i) qstar(i)=0.0 @@ -457,22 +440,22 @@ SUBROUTINE SFCLAY_mynn( & redrag,sfc_z0_type, & !intent(in) itimestep,iter, & wet, dry, icy, & !intent(in) - tskin_ocn, tskin_lnd, tskin_ice, & !intent(in) - tsurf_ocn, tsurf_lnd, tsurf_ice, & !intent(in) - qsfc_ocn, qsfc_lnd, qsfc_ice, & !intent(in) - snowh_ocn, snowh_lnd, snowh_ice, & !intent(in) - ZNT_ocn, ZNT_lnd, ZNT_ice, & !intent(inout) - UST_ocn, UST_lnd, UST_ice, & !intent(inout) - cm_ocn, cm_lnd, cm_ice, & !intent(inout) - ch_ocn, ch_lnd, ch_ice, & !intent(inout) - rb_ocn, rb_lnd, rb_ice, & !intent(inout) - stress_ocn, stress_lnd, stress_ice, & !intent(inout) - fm_ocn, fm_lnd, fm_ice, & !intent(inout) - fh_ocn, fh_lnd, fh_ice, & !intent(inout) - fm10_ocn, fm10_lnd, fm10_ice, & !intent(inout) - fh2_ocn, fh2_lnd, fh2_ice, & - HFLX_ocn, HFLX_lnd, HFLX_ice, & - QFLX_ocn, QFLX_lnd, QFLX_ice, & + tskin_wat, tskin_lnd, tskin_ice, & !intent(in) + tsurf_wat, tsurf_lnd, tsurf_ice, & !intent(in) + qsfc_wat, qsfc_lnd, qsfc_ice, & !intent(in) + snowh_wat, snowh_lnd, snowh_ice, & !intent(in) + ZNT_wat, ZNT_lnd, ZNT_ice, & !intent(inout) + UST_wat, UST_lnd, UST_ice, & !intent(inout) + cm_wat, cm_lnd, cm_ice, & !intent(inout) + ch_wat, ch_lnd, ch_ice, & !intent(inout) + rb_wat, rb_lnd, rb_ice, & !intent(inout) + stress_wat, stress_lnd, stress_ice, & !intent(inout) + fm_wat, fm_lnd, fm_ice, & !intent(inout) + fh_wat, fh_lnd, fh_ice, & !intent(inout) + fm10_wat, fm10_lnd, fm10_ice, & !intent(inout) + fh2_wat, fh2_lnd, fh2_ice, & + HFLX_wat, HFLX_lnd, HFLX_ice, & + QFLX_wat, QFLX_lnd, QFLX_ice, & ch,CHS,CHS2,CQS2,CPM, & ZNT,USTM,ZOL,MOL,RMOL, & PSIM,PSIH, & @@ -488,7 +471,7 @@ SUBROUTINE SFCLAY_mynn( & END SUBROUTINE SFCLAY_MYNN !------------------------------------------------------------------- -!>\ingroup module_sf_mynn_mod +!>\ingroup mynn_sfc !! This subroutine calculates u*, z/L, and the exchange coefficients !! which are passed to subsequent scheme to calculate the fluxes. !! This scheme has options to calculate the fluxes and near-surface @@ -504,22 +487,22 @@ SUBROUTINE SFCLAY1D_mynn( & redrag,sfc_z0_type, & !intent(in) itimestep,iter, & wet, dry, icy, & !intent(in) - tskin_ocn, tskin_lnd, tskin_ice, & !intent(in) - tsurf_ocn, tsurf_lnd, tsurf_ice, & !intent(in) - qsfc_ocn, qsfc_lnd, qsfc_ice, & !intent(in) - snowh_ocn, snowh_lnd, snowh_ice, & !intent(in) - ZNT_ocn, ZNT_lnd, ZNT_ice, & !intent(inout) - UST_ocn, UST_lnd, UST_ice, & !intent(inout) - cm_ocn, cm_lnd, cm_ice, & !intent(inout) - ch_ocn, ch_lnd, ch_ice, & !intent(inout) - rb_ocn, rb_lnd, rb_ice, & !intent(inout) - stress_ocn, stress_lnd, stress_ice, & !intent(inout) - psix_ocn, psix_lnd, psix_ice, & !=fm, intent(inout) - psit_ocn, psit_lnd, psit_ice, & !=fh, intent(inout) - psix10_ocn, psix10_lnd, psix10_ice, & !=fm10, intent(inout) - psit2_ocn, psit2_lnd, psit2_ice, & !=fh2, intent(inout) - HFLX_ocn, HFLX_lnd, HFLX_ice, & - QFLX_ocn, QFLX_lnd, QFLX_ice, & + tskin_wat, tskin_lnd, tskin_ice, & !intent(in) + tsurf_wat, tsurf_lnd, tsurf_ice, & !intent(in) + qsfc_wat, qsfc_lnd, qsfc_ice, & !intent(in) + snowh_wat, snowh_lnd, snowh_ice, & !intent(in) + ZNT_wat, ZNT_lnd, ZNT_ice, & !intent(inout) + UST_wat, UST_lnd, UST_ice, & !intent(inout) + cm_wat, cm_lnd, cm_ice, & !intent(inout) + ch_wat, ch_lnd, ch_ice, & !intent(inout) + rb_wat, rb_lnd, rb_ice, & !intent(inout) + stress_wat, stress_lnd, stress_ice, & !intent(inout) + psix_wat, psix_lnd, psix_ice, & !=fm, intent(inout) + psit_wat, psit_lnd, psit_ice, & !=fh, intent(inout) + psix10_wat, psix10_lnd, psix10_ice, & !=fm10, intent(inout) + psit2_wat, psit2_lnd, psit2_ice, & !=fh2, intent(inout) + HFLX_wat, HFLX_lnd, HFLX_ice, & + QFLX_wat, QFLX_lnd, QFLX_ice, & ch,CHS,CHS2,CQS2,CPM, & ZNT,USTM,ZOL,MOL,RMOL, & PSIM,PSIH, & @@ -545,6 +528,7 @@ SUBROUTINE SFCLAY1D_mynn( & REAL, PARAMETER :: XKA=2.4E-5 !molecular diffusivity REAL, PARAMETER :: PRT=1. !prandlt number + REAL, PARAMETER :: snowh_thresh = 50. !mm REAL, INTENT(IN) :: SVP1,SVP2,SVP3,SVPT0,EP1,EP2 REAL, INTENT(IN) :: KARMAN,CP,G,ROVCP,R,XLV !,DX @@ -599,24 +583,24 @@ SUBROUTINE SFCLAY1D_mynn( & & wet, dry, icy REAL, DIMENSION( ims:ime ), INTENT(in) :: & - & tskin_ocn, tskin_lnd, tskin_ice, & - & tsurf_ocn, tsurf_lnd, tsurf_ice, & - & snowh_ocn, snowh_lnd, snowh_ice + & tskin_wat, tskin_lnd, tskin_ice, & + & tsurf_wat, tsurf_lnd, tsurf_ice, & + & snowh_wat, snowh_lnd, snowh_ice REAL, DIMENSION( ims:ime ), INTENT(inout) :: & - & ZNT_ocn, ZNT_lnd, ZNT_ice, & - & UST_ocn, UST_lnd, UST_ice, & - & cm_ocn, cm_lnd, cm_ice, & - & ch_ocn, ch_lnd, ch_ice, & - & rb_ocn, rb_lnd, rb_ice, & - & stress_ocn,stress_lnd,stress_ice, & - & psix_ocn, psix_lnd, psix_ice, & - & psit_ocn, psit_lnd, psit_ice, & - & psix10_ocn,psix10_lnd,psix10_ice, & - & psit2_ocn, psit2_lnd, psit2_ice, & - & HFLX_ocn, HFLX_lnd, HFLX_ice, & - & QFLX_ocn, QFLX_lnd, QFLX_ice, & - & qsfc_ocn, qsfc_lnd, qsfc_ice + & ZNT_wat, ZNT_lnd, ZNT_ice, & + & UST_wat, UST_lnd, UST_ice, & + & cm_wat, cm_lnd, cm_ice, & + & ch_wat, ch_lnd, ch_ice, & + & rb_wat, rb_lnd, rb_ice, & + & stress_wat,stress_lnd,stress_ice, & + & psix_wat, psix_lnd, psix_ice, & + & psit_wat, psit_lnd, psit_ice, & + & psix10_wat,psix10_lnd,psix10_ice, & + & psit2_wat, psit2_lnd, psit2_ice, & + & HFLX_wat, HFLX_lnd, HFLX_ice, & + & QFLX_wat, QFLX_lnd, QFLX_ice, & + & qsfc_wat, qsfc_lnd, qsfc_ice REAL, DIMENSION( its:ite ), INTENT(IN) :: rstoch1D @@ -648,27 +632,27 @@ SUBROUTINE SFCLAY1D_mynn( & PSFC, & !press at surface (Pa/1000) QSFCMR, & !qv at surface (mixing ratio, kg/kg) THCON, & !conversion from temp to theta - zratio_lnd, zratio_ice, zratio_ocn, & !z0/zt - TSK_lnd, TSK_ice, TSK_ocn, & !absolute temperature - THSK_lnd, THSK_ice, THSK_ocn, & !theta - THVSK_lnd, THVSK_ice, THVSK_ocn, & !theta-v - GZ1OZ0_lnd, GZ1OZ0_ice, GZ1OZ0_ocn, & !LOG((ZA(I)+ZNT(i))/ZNT(i)) - GZ1OZt_lnd, GZ1OZt_ice, GZ1OZt_ocn, & !LOG((ZA(I)+ZT(i))/ZT(i)) - GZ2OZ0_lnd, GZ2OZ0_ice, GZ2OZ0_ocn, & !LOG((2.0+ZNT(I))/ZNT(I)) - GZ2OZt_lnd, GZ2OZt_ice, GZ2OZt_ocn, & !LOG((2.0+ZT(I))/ZT(I)) - GZ10OZ0_lnd, GZ10OZ0_ice, GZ10OZ0_ocn, & !LOG((10.+ZNT(I))/ZNT(I)) - GZ10OZt_lnd, GZ10OZt_ice, GZ10OZt_ocn, & !LOG((10.+ZT(I))/ZT(I)) - ZNTstoch_lnd, ZNTstoch_ice, ZNTstoch_ocn, & - ZT_lnd, ZT_ice, ZT_ocn, & - ZQ_lnd, ZQ_ice, ZQ_ocn, & - PSIQ_lnd, PSIQ_ice, PSIQ_ocn, & - PSIQ2_lnd, PSIQ2_ice, PSIQ2_ocn, & - QSFCMR_lnd, QSFCMR_ice, QSFCMR_ocn + zratio_lnd, zratio_ice, zratio_wat, & !z0/zt + TSK_lnd, TSK_ice, TSK_wat, & !absolute temperature + THSK_lnd, THSK_ice, THSK_wat, & !theta + THVSK_lnd, THVSK_ice, THVSK_wat, & !theta-v + GZ1OZ0_lnd, GZ1OZ0_ice, GZ1OZ0_wat, & !LOG((ZA(I)+ZNT(i))/ZNT(i)) + GZ1OZt_lnd, GZ1OZt_ice, GZ1OZt_wat, & !LOG((ZA(I)+ZT(i))/ZT(i)) + GZ2OZ0_lnd, GZ2OZ0_ice, GZ2OZ0_wat, & !LOG((2.0+ZNT(I))/ZNT(I)) + GZ2OZt_lnd, GZ2OZt_ice, GZ2OZt_wat, & !LOG((2.0+ZT(I))/ZT(I)) + GZ10OZ0_lnd, GZ10OZ0_ice, GZ10OZ0_wat, & !LOG((10.+ZNT(I))/ZNT(I)) + GZ10OZt_lnd, GZ10OZt_ice, GZ10OZt_wat, & !LOG((10.+ZT(I))/ZT(I)) + ZNTstoch_lnd, ZNTstoch_ice, ZNTstoch_wat, & + ZT_lnd, ZT_ice, ZT_wat, & + ZQ_lnd, ZQ_ice, ZQ_wat, & + PSIQ_lnd, PSIQ_ice, PSIQ_wat, & + PSIQ2_lnd, PSIQ2_ice, PSIQ2_wat, & + QSFCMR_lnd, QSFCMR_ice, QSFCMR_wat INTEGER :: N,I,K,L,yesno REAL :: PL,E1,TABS - REAL :: WSPD_lnd, WSPD_ice, WSPD_ocn + REAL :: WSPD_lnd, WSPD_ice, WSPD_wat REAL :: DTHVDZ,DTHVM,VCONV,ZOL2,ZOL10,ZOLZA,ZOLZ0,ZOLZT REAL :: DTG,DTTHX,PSIQ,PSIQ2,PSIQ10,PSIT10 REAL :: FLUXC,VSGD @@ -678,11 +662,11 @@ SUBROUTINE SFCLAY1D_mynn( & IF (debug_code >= 1) THEN write(0,*)"ITIMESTEP=",ITIMESTEP," iter=",iter DO I=its,ite - write(0,*)"=== imortant input to mynnsfclayer, i:", i + write(0,*)"=== important input to mynnsfclayer, i:", i IF (dry(i)) THEN write(0,*)"dry=",dry(i)," pblh=",pblh(i)," tsk=", tskin_lnd(i),& " tsurf=", tsurf_lnd(i)," qsfc=", qsfc_lnd(i)," znt=", znt_lnd(i),& - " ust=", ust_lnd(i)," snowh=", snowh_lnd(i),"psfcpa=",PSFCPA(i), & + " ust=", ust_lnd(i)," snowh=", snowh_lnd(i)," psfcpa=",PSFCPA(i), & " dz=",dz8w1d(i)," qflx=",qflx(i)," hflx=",hflx(i)," hpbl=",pblh(i) ENDIF IF (icy(i)) THEN @@ -692,9 +676,9 @@ SUBROUTINE SFCLAY1D_mynn( & " dz=",dz8w1d(i)," qflx=",qflx(i)," hflx=",hflx(i)," hpbl=",pblh(i) ENDIF IF (wet(i)) THEN - write(0,*)"wet=",wet(i)," pblh=",pblh(i)," tsk=", tskin_ocn(i),& - " tsurf=", tsurf_ocn(i)," qsfc=", qsfc_ocn(i)," znt=", znt_ocn(i),& - " ust=", ust_ocn(i)," snowh=", snowh_ocn(i),"psfcpa=",PSFCPA(i), & + write(0,*)"wet=",wet(i)," pblh=",pblh(i)," tsk=", tskin_wat(i),& + " tsurf=", tsurf_wat(i)," qsfc=", qsfc_wat(i)," znt=", znt_wat(i),& + " ust=", ust_wat(i)," snowh=", snowh_wat(i),"psfcpa=",PSFCPA(i), & " dz=",dz8w1d(i)," qflx=",qflx(i)," hflx=",hflx(i)," hpbl=",pblh(i) ENDIF ENDDO @@ -706,7 +690,7 @@ SUBROUTINE SFCLAY1D_mynn( & ! DEFINE SKIN TEMPERATURES FOR LAND/WATER/ICE TSK_lnd(I) = 0.5 * (tsurf_lnd(i)+tskin_lnd(i)) TSK_ice(I) = 0.5 * (tsurf_ice(i)+tskin_ice(i)) - TSK_ocn(I) = 0.5 * (tsurf_ocn(i)+tskin_ocn(i)) + TSK_wat(I) = 0.5 * (tsurf_wat(i)+tskin_wat(i)) QVSH(I)=QV1D(I)/(1.+QV1D(I)) !CONVERT TO SPEC HUM (kg/kg) THCON(I)=(100000./PSFCPA(I))**ROVCP ENDDO @@ -715,14 +699,14 @@ SUBROUTINE SFCLAY1D_mynn( & ! CONVERT SKIN TEMPERATURES TO POTENTIAL TEMPERATURE: THSK_lnd(I) = TSK_lnd(I)*THCON(I) !(K) THSK_ice(I) = TSK_ice(I)*THCON(I) !(K) - THSK_ocn(I) = TSK_ocn(I)*THCON(I) !(K) + THSK_wat(I) = TSK_wat(I)*THCON(I) !(K) ENDDO DO I=its,ite ! CONVERT SKIN POTENTIAL TEMPERATURES TO VIRTUAL POTENTIAL TEMPERATURE: THVSK_lnd(I) = THSK_lnd(I)*(1.+EP1*QVSH(I)) !(K) THVSK_ice(I) = THSK_ice(I)*(1.+EP1*QVSH(I)) !(K) - THVSK_ocn(I) = THSK_ocn(I)*(1.+EP1*QVSH(I)) !(K) + THVSK_wat(I) = THSK_wat(I)*(1.+EP1*QVSH(I)) !(K) ENDDO DO I=its,ite @@ -755,8 +739,8 @@ SUBROUTINE SFCLAY1D_mynn( & write(*,*)"=== derived quantities in mynn sfc layer, i:", i write(*,*)" land, ice, water" write(*,*)"dry=",dry(i)," icy=",icy(i)," wet=",wet(i) - write(*,*)"tsk=", tsk_lnd(i),tsk_ice(i),tsk_ocn(i) - write(*,*)"thvsk=", thvsk_lnd(i),thvsk_ice(i),thvsk_ocn(i) + write(*,*)"tsk=", tsk_lnd(i),tsk_ice(i),tsk_wat(i) + write(*,*)"thvsk=", thvsk_lnd(i),thvsk_ice(i),thvsk_wat(i) write(*,*)"THV1D=", THV1D(i)," TV1D=",TV1D(i) write(*,*)"RHO1D=", RHO1D(i)," GOVRTH=",GOVRTH(i) ENDDO @@ -766,16 +750,16 @@ SUBROUTINE SFCLAY1D_mynn( & IF (ITIMESTEP == 1) THEN IF (wet(i)) THEN - IF (TSK_ocn(I) .LT. 273.15) THEN + IF (TSK_wat(I) .LT. 273.15) THEN !SATURATION VAPOR PRESSURE WRT ICE (SVP1=.6112; 10*mb) - E1=SVP1*EXP(4648*(1./273.15 - 1./TSK_ocn(I)) - & - & 11.64*LOG(273.15/TSK_ocn(I)) + 0.02265*(273.15 - TSK_ocn(I))) + E1=SVP1*EXP(4648*(1./273.15 - 1./TSK_wat(I)) - & + & 11.64*LOG(273.15/TSK_wat(I)) + 0.02265*(273.15 - TSK_wat(I))) ELSE !SATURATION VAPOR PRESSURE WRT WATER (Bolton 1980) - E1=SVP1*EXP(SVP2*(TSK_ocn(I)-SVPT0)/(TSK_ocn(i)-SVP3)) + E1=SVP1*EXP(SVP2*(TSK_wat(I)-SVPT0)/(TSK_wat(i)-SVP3)) ENDIF - QSFC_ocn(I)=EP2*E1/(PSFC(I)-ep_3*E1) !specific humidity - QSFCMR_ocn(I)=EP2*E1/(PSFC(I)-E1) !mixing ratio + QSFC_wat(I)=EP2*E1/(PSFC(I)-ep_3*E1) !specific humidity + QSFCMR_wat(I)=EP2*E1/(PSFC(I)-E1) !mixing ratio ENDIF IF (dry(i)) THEN TABS = 0.5*(TSK_lnd(I) + T1D(I)) @@ -807,7 +791,7 @@ SUBROUTINE SFCLAY1D_mynn( & ELSE ! Use what comes out of the LSM, NST, and CICE - IF (wet(i)) QSFCMR_ocn(I)=QSFC_ocn(I)/(1.-QSFC_ocn(I)) + IF (wet(i)) QSFCMR_wat(I)=QSFC_wat(I)/(1.-QSFC_wat(I)) IF (dry(i)) QSFCMR_lnd(I)=QSFC_lnd(I)/(1.-QSFC_lnd(I)) IF (icy(i)) QSFCMR_ice(I)=QSFC_ice(I)/(1.-QSFC_ice(I)) @@ -834,7 +818,7 @@ SUBROUTINE SFCLAY1D_mynn( & DO I=its,ite if (wet(i)) then write(*,*)"==== q-bombs, i:",i," wet" - write(*,*)"QSFC_ocn=", QSFC_ocn(I)," QSFCMR_ocn=", QSFCMR_ocn(I)," QGH=",QGH(I) + write(*,*)"QSFC_wat=", QSFC_wat(I)," QSFCMR_wat=", QSFCMR_wat(I)," QGH=",QGH(I) endif if(dry(i)) then write(*,*)"==== q-bombs, i:",i," dry" @@ -853,54 +837,54 @@ SUBROUTINE SFCLAY1D_mynn( & ! by every user, the bug manifests itself in the resulting wind speed WSPD(I) ! being -99.0 despite the assignments in lines 932 and 933. *DH WSPD(I)=SQRT(U1D(I)*U1D(I)+V1D(I)*V1D(I)) - WSPD_ocn = -99. + WSPD_wat = -99. WSPD_ice = -99. WSPD_lnd = -99. IF (wet(i)) THEN - DTHVDZ=(THV1D(I)-THVSK_ocn(I)) + DTHVDZ=(THV1D(I)-THVSK_wat(I)) !-------------------------------------------------------- - ! Calculate the convective velocity scale (WSTAR) and - ! subgrid-scale velocity (VSGD) following Beljaars (1995, QJRMS) - ! and Mahrt and Sun (1995, MWR), respectively + ! Calculate the convective velocity scale (WSTAR) and + ! subgrid-scale velocity (VSGD) following Beljaars (1995, QJRMS) + ! and Mahrt and Sun (1995, MWR), respectively !------------------------------------------------------- fluxc = max(hfx(i)/RHO1D(i)/cp & - & + ep1*THVSK_ocn(I)*qfx(i)/RHO1D(i),0.) + & + ep1*THVSK_wat(I)*qfx(i)/RHO1D(i),0.) !WSTAR(I) = vconvc*(g/TSK(i)*pblh(i)*fluxc)**onethird - WSTAR(I) = vconvc*(g/TSK_ocn(i)*pblh(i)*fluxc)**onethird + WSTAR(I) = vconvc*(g/TSK_wat(i)*pblh(i)*fluxc)**onethird !-------------------------------------------------------- ! Mahrt and Sun low-res correction - modified for water points (halved) ! (for 13 km ~ 0.18 m/s; for 3 km == 0 m/s) !-------------------------------------------------------- VSGD = MIN( 0.25 * (max(dx(i)/5000.-1.,0.))**onethird , 0.5) - WSPD_ocn=SQRT(WSPD(I)*WSPD(I)+WSTAR(I)*WSTAR(I)+vsgd*vsgd) - WSPD_ocn=MAX(WSPD_ocn,wmin) + WSPD_wat=SQRT(WSPD(I)*WSPD(I)+WSTAR(I)*WSTAR(I)+vsgd*vsgd) + WSPD_wat=MAX(WSPD_wat,wmin) !-------------------------------------------------------- ! CALCULATE THE BULK RICHARDSON NUMBER OF SURFACE LAYER, ! ACCORDING TO AKB(1976), EQ(12). !-------------------------------------------------------- - rb_ocn(I)=GOVRTH(I)*ZA(I)*DTHVDZ/(WSPD_ocn*WSPD_ocn) + rb_wat(I)=GOVRTH(I)*ZA(I)*DTHVDZ/(WSPD_wat*WSPD_wat) IF (ITIMESTEP == 1) THEN - rb_ocn(I)=MAX(rb_ocn(I),-2.0) - rb_ocn(I)=MIN(rb_ocn(I), 2.0) + rb_wat(I)=MAX(rb_wat(I),-2.0) + rb_wat(I)=MIN(rb_wat(I), 2.0) ELSE - rb_ocn(I)=MAX(rb_ocn(I),-10.0) - rb_ocn(I)=MIN(rb_ocn(I), 10.0) + rb_wat(I)=MAX(rb_wat(I),-4.0) + rb_wat(I)=MIN(rb_wat(I), 4.0) ENDIF ENDIF ! end water point IF (dry(i)) THEN DTHVDZ=(THV1D(I)-THVSK_lnd(I)) !-------------------------------------------------------- - ! Calculate the convective velocity scale (WSTAR) and - ! subgrid-scale velocity (VSGD) following Beljaars (1995, QJRMS) - ! and Mahrt and Sun (1995, MWR), respectively + ! Calculate the convective velocity scale (WSTAR) and + ! subgrid-scale velocity (VSGD) following Beljaars (1995, QJRMS) + ! and Mahrt and Sun (1995, MWR), respectively !------------------------------------------------------- fluxc = max(hfx(i)/RHO1D(i)/cp & & + ep1*THVSK_lnd(I)*qfx(i)/RHO1D(i),0.) - !WSTAR(I) = vconvc*(g/TSK(i)*pblh(i)*fluxc)**onethird - !increase height scale, assuming that the non-local transoport - !from the mass-flux (plume) mixing exceedsd the PBLH. + ! WSTAR(I) = vconvc*(g/TSK(i)*pblh(i)*fluxc)**onethird + ! increase height scale, assuming that the non-local transoport + ! from the mass-flux (plume) mixing exceedsd the PBLH. WSTAR(I) = vconvc*(g/TSK_lnd(i)*MIN(1.5*pblh(i),4000.)*fluxc)**onethird !-------------------------------------------------------- ! Mahrt and Sun low-res correction @@ -924,23 +908,23 @@ SUBROUTINE SFCLAY1D_mynn( & rb_lnd(I)=MAX(rb_lnd(I),-2.0) rb_lnd(I)=MIN(rb_lnd(I), 2.0) ELSE - rb_lnd(I)=MAX(rb_lnd(I),-10.0) - rb_lnd(I)=MIN(rb_lnd(I), 10.0) + rb_lnd(I)=MAX(rb_lnd(I),-4.0) + rb_lnd(I)=MIN(rb_lnd(I), 4.0) ENDIF ENDIF ! end land point IF (icy(i)) THEN DTHVDZ=(THV1D(I)-THVSK_ice(I)) !-------------------------------------------------------- - ! Calculate the convective velocity scale (WSTAR) and - ! subgrid-scale velocity (VSGD) following Beljaars (1995, QJRMS) - ! and Mahrt and Sun (1995, MWR), respectively + ! Calculate the convective velocity scale (WSTAR) and + ! subgrid-scale velocity (VSGD) following Beljaars (1995, QJRMS) + ! and Mahrt and Sun (1995, MWR), respectively !------------------------------------------------------- fluxc = max(hfx(i)/RHO1D(i)/cp & & + ep1*THVSK_ice(I)*qfx(i)/RHO1D(i),0.) - !WSTAR(I) = vconvc*(g/TSK(i)*pblh(i)*fluxc)**onethird - !increase height scale, assuming that the non-local transport - !from the mass-flux (plume) mixing exceedsd the PBLH. + ! WSTAR(I) = vconvc*(g/TSK(i)*pblh(i)*fluxc)**onethird + ! increase height scale, assuming that the non-local transport + ! from the mass-flux (plume) mixing exceedsd the PBLH. WSTAR(I) = vconvc*(g/TSK_ice(i)*MIN(1.5*pblh(i),4000.)*fluxc)**onethird !-------------------------------------------------------- ! Mahrt and Sun low-res correction @@ -958,21 +942,21 @@ SUBROUTINE SFCLAY1D_mynn( & rb_ice(I)=MAX(rb_ice(I),-2.0) rb_ice(I)=MIN(rb_ice(I), 2.0) ELSE - rb_ice(I)=MAX(rb_ice(I),-10.0) - rb_ice(I)=MIN(rb_ice(I), 10.0) + rb_ice(I)=MAX(rb_ice(I),-4.0) + rb_ice(I)=MIN(rb_ice(I), 4.0) ENDIF - ENDIF ! end ice point + ENDIF ! end ice point !NOW CONDENSE THE POSSIBLE WSPD VALUES BY TAKING THE MAXIMUM - WSPD(I) = MAX(WSPD_ice,WSPD_ocn) + WSPD(I) = MAX(WSPD_ice,WSPD_wat) WSPD(I) = MAX(WSPD_lnd,WSPD(I)) - IF (debug_code >= 1) THEN + IF (debug_code == 2) THEN write(*,*)"===== After rb calc in mynn sfc layer:" write(*,*)"ITIMESTEP=",ITIMESTEP write(*,*)"WSPD=", WSPD(I)," WSTAR=", WSTAR(I)," vsgd=",vsgd IF (icy(i))write(*,*)"rb_ice=", rb_ice(I)," DTHVDZ=",DTHVDZ - IF (wet(i))write(*,*)"rb_ocn=", rb_ocn(I)," DTHVDZ=",DTHVDZ + IF (wet(i))write(*,*)"rb_wat=", rb_wat(I)," DTHVDZ=",DTHVDZ IF (dry(i))write(*,*)"rb_lnd=", rb_lnd(I)," DTHVDZ=",DTHVDZ ENDIF @@ -1006,120 +990,120 @@ SUBROUTINE SFCLAY1D_mynn( & if (sfc_z0_type >= 0) then ! Avoid calculation is using wave model ! CALCULATE z0 (znt) !-------------------------------------- - IF (debug_code >= 1) THEN + IF (debug_code == 2) THEN write(*,*)"=============Input to ZNT over water:" - write(*,*)"u*:",UST_ocn(i)," wspd=",WSPD(i)," visc=",visc," za=",ZA(I) + write(*,*)"u*:",UST_wat(i)," wspd=",WSPD(i)," visc=",visc," za=",ZA(I) ENDIF IF ( PRESENT(ISFTCFLX) ) THEN IF ( ISFTCFLX .EQ. 0 ) THEN IF (COARE_OPT .EQ. 3.0) THEN !COARE 3.0 (MISLEADING SUBROUTINE NAME) - CALL charnock_1955(ZNT_ocn(i),UST_ocn(i),WSPD(i),visc,ZA(I)) + CALL charnock_1955(ZNT_wat(i),UST_wat(i),WSPD(i),visc,ZA(I)) ELSE !COARE 3.5 - CALL edson_etal_2013(ZNT_ocn(i),UST_ocn(i),WSPD(i),visc,ZA(I)) + CALL edson_etal_2013(ZNT_wat(i),UST_wat(i),WSPD(i),visc,ZA(I)) ENDIF ELSEIF ( ISFTCFLX .EQ. 1 .OR. ISFTCFLX .EQ. 2 ) THEN - CALL davis_etal_2008(ZNT_ocn(i),UST_ocn(i)) + CALL davis_etal_2008(ZNT_wat(i),UST_wat(i)) ELSEIF ( ISFTCFLX .EQ. 3 ) THEN - CALL Taylor_Yelland_2001(ZNT_ocn(i),UST_ocn(i),WSPD(i)) + CALL Taylor_Yelland_2001(ZNT_wat(i),UST_wat(i),WSPD(i)) ELSEIF ( ISFTCFLX .EQ. 4 ) THEN !GFS surface layer scheme - CALL GFS_z0_ocn(ZNT_ocn(i),UST_ocn(i),WSPD(i),ZA(I),sfc_z0_type,redrag) + CALL GFS_z0_wat(ZNT_wat(i),UST_wat(i),WSPD(i),ZA(I),sfc_z0_type,redrag) ENDIF ELSE !DEFAULT TO COARE 3.0/3.5 IF (COARE_OPT .EQ. 3.0) THEN !COARE 3.0 - CALL charnock_1955(ZNT_ocn(i),UST_ocn(i),WSPD(i),visc,ZA(I)) + CALL charnock_1955(ZNT_wat(i),UST_wat(i),WSPD(i),visc,ZA(I)) ELSE !COARE 3.5 - CALL edson_etal_2013(ZNT_ocn(i),UST_ocn(i),WSPD(i),visc,ZA(I)) + CALL edson_etal_2013(ZNT_wat(i),UST_wat(i),WSPD(i),visc,ZA(I)) ENDIF ENDIF endif !-end wave model check ! add stochastic perturbation of ZNT if (spp_pbl==1) then - ZNTstoch_ocn(I) = MAX(ZNT_ocn(I) + ZNT_ocn(I)*1.0*rstoch1D(i), 1e-6) + ZNTstoch_wat(I) = MAX(ZNT_wat(I) + ZNT_wat(I)*1.0*rstoch1D(i), 1e-6) else - ZNTstoch_ocn(I) = ZNT_ocn(I) + ZNTstoch_wat(I) = ZNT_wat(I) endif - IF (debug_code >= 1) THEN + IF (debug_code > 1) THEN write(*,*)"==========Output ZNT over water:" - write(*,*)"ZNT:",ZNTstoch_ocn(i) + write(*,*)"ZNT:",ZNTstoch_wat(i) ENDIF !COMPUTE ROUGHNESS REYNOLDS NUMBER (restar) USING NEW ZNT ! AHW: Garrattt formula: Calculate roughness Reynolds number ! Kinematic viscosity of air (linear approx to ! temp dependence at sea level) - restar=MAX(ust_ocn(i)*ZNTstoch_ocn(i)/visc, 0.1) + restar=MAX(ust_wat(i)*ZNTstoch_wat(i)/visc, 0.1) !-------------------------------------- !CALCULATE z_t and z_q !-------------------------------------- - IF (debug_code >= 1) THEN + IF (debug_code > 1) THEN write(*,*)"=============Input to ZT over water:" - write(*,*)"u*:",UST_ocn(i)," restar=",restar," visc=",visc + write(*,*)"u*:",UST_wat(i)," restar=",restar," visc=",visc ENDIF IF ( PRESENT(ISFTCFLX) ) THEN IF ( ISFTCFLX .EQ. 0 ) THEN IF (COARE_OPT .EQ. 3.0) THEN - CALL fairall_etal_2003(ZT_ocn(i),ZQ_ocn(i),restar,UST_ocn(i),visc,& + CALL fairall_etal_2003(ZT_wat(i),ZQ_wat(i),restar,UST_wat(i),visc,& rstoch1D(i),spp_pbl) ELSE !presumably, this will be published soon, but hasn't yet - CALL fairall_etal_2014(ZT_ocn(i),ZQ_ocn(i),restar,UST_ocn(i),visc,& + CALL fairall_etal_2014(ZT_wat(i),ZQ_wat(i),restar,UST_wat(i),visc,& rstoch1D(i),spp_pbl) ENDIF ELSEIF ( ISFTCFLX .EQ. 1 ) THEN IF (COARE_OPT .EQ. 3.0) THEN - CALL fairall_etal_2003(ZT_ocn(i),ZQ_ocn(i),restar,UST_ocn(i),visc,& + CALL fairall_etal_2003(ZT_wat(i),ZQ_wat(i),restar,UST_wat(i),visc,& rstoch1D(i),spp_pbl) ELSE - CALL fairall_etal_2014(ZT_ocn(i),ZQ_ocn(i),restar,UST_ocn(i),visc,& + CALL fairall_etal_2014(ZT_wat(i),ZQ_wat(i),restar,UST_wat(i),visc,& rstoch1D(i),spp_pbl) ENDIF ELSEIF ( ISFTCFLX .EQ. 2 ) THEN - CALL garratt_1992(ZT_ocn(i),ZQ_ocn(i),ZNTstoch_ocn(i),restar,2.0) + CALL garratt_1992(ZT_wat(i),ZQ_wat(i),ZNTstoch_wat(i),restar,2.0) ELSEIF ( ISFTCFLX .EQ. 3 ) THEN IF (COARE_OPT .EQ. 3.0) THEN - CALL fairall_etal_2003(ZT_ocn(i),ZQ_ocn(i),restar,UST_ocn(i),visc,& + CALL fairall_etal_2003(ZT_wat(i),ZQ_wat(i),restar,UST_wat(i),visc,& rstoch1D(i),spp_pbl) ELSE - CALL fairall_etal_2014(ZT_ocn(i),ZQ_ocn(i),restar,UST_ocn(i),visc,& + CALL fairall_etal_2014(ZT_wat(i),ZQ_wat(i),restar,UST_wat(i),visc,& rstoch1D(i),spp_pbl) ENDIF ELSEIF ( ISFTCFLX .EQ. 4 ) THEN !GFS zt formulation - CALL GFS_zt_ocn(ZT_ocn(i),ZNTstoch_ocn(i),restar,WSPD(i),ZA(i),sfc_z0_type) - ZQ_ocn(i)=ZT_ocn(i) + CALL GFS_zt_wat(ZT_wat(i),ZNTstoch_wat(i),restar,WSPD(i),ZA(i),sfc_z0_type) + ZQ_wat(i)=ZT_wat(i) ENDIF ELSE !DEFAULT TO COARE 3.0/3.5 IF (COARE_OPT .EQ. 3.0) THEN - CALL fairall_etal_2003(ZT_ocn(i),ZQ_ocn(i),restar,UST_ocn(i),visc,& + CALL fairall_etal_2003(ZT_wat(i),ZQ_wat(i),restar,UST_wat(i),visc,& rstoch1D(i),spp_pbl) ELSE - CALL fairall_etal_2014(ZT_ocn(i),ZQ_ocn(i),restar,UST_ocn(i),visc,& + CALL fairall_etal_2014(ZT_wat(i),ZQ_wat(i),restar,UST_wat(i),visc,& rstoch1D(i),spp_pbl) ENDIF ENDIF - IF (debug_code >= 1) THEN + IF (debug_code > 1) THEN write(*,*)"=============Output ZT & ZQ over water:" - write(*,*)"ZT:",ZT_ocn(i)," ZQ:",ZQ_ocn(i) + write(*,*)"ZT:",ZT_wat(i)," ZQ:",ZQ_wat(i) ENDIF - GZ1OZ0_ocn(I)= LOG((ZA(I)+ZNTstoch_ocn(I))/ZNTstoch_ocn(I)) - GZ1OZt_ocn(I)= LOG((ZA(I)+ZNTstoch_ocn(i))/ZT_ocn(i)) - GZ2OZ0_ocn(I)= LOG((2.0+ZNTstoch_ocn(I))/ZNTstoch_ocn(I)) - GZ2OZt_ocn(I)= LOG((2.0+ZNTstoch_ocn(i))/ZT_ocn(i)) - GZ10OZ0_ocn(I)=LOG((10.+ZNTstoch_ocn(I))/ZNTstoch_ocn(I)) - GZ10OZt_ocn(I)=LOG((10.+ZNTstoch_ocn(i))/ZT_ocn(i)) - zratio_ocn(i)=ZNTstoch_ocn(I)/ZT_ocn(I) !need estimate for Li et al. + GZ1OZ0_wat(I)= LOG((ZA(I)+ZNTstoch_wat(I))/ZNTstoch_wat(I)) + GZ1OZt_wat(I)= LOG((ZA(I)+ZNTstoch_wat(i))/ZT_wat(i)) + GZ2OZ0_wat(I)= LOG((2.0+ZNTstoch_wat(I))/ZNTstoch_wat(I)) + GZ2OZt_wat(I)= LOG((2.0+ZNTstoch_wat(i))/ZT_wat(i)) + GZ10OZ0_wat(I)=LOG((10.+ZNTstoch_wat(I))/ZNTstoch_wat(I)) + GZ10OZt_wat(I)=LOG((10.+ZNTstoch_wat(i))/ZT_wat(i)) + zratio_wat(i)=ZNTstoch_wat(I)/ZT_wat(I) !need estimate for Li et al. ENDIF !end water point @@ -1180,7 +1164,7 @@ SUBROUTINE SFCLAY1D_mynn( & ENDIF !end land point - IF (icy(I) .OR. snowh_lnd(i) > 50.) THEN + IF (icy(I)) THEN ! add stochastic perturbaction of ZNT if (spp_pbl==1) then @@ -1213,7 +1197,7 @@ SUBROUTINE SFCLAY1D_mynn( & IF (dry(i)) THEN ZNT(i)=ZNTstoch_lnd(I) ELSEIF (wet(i)) THEN - ZNT(i)=ZNTstoch_ocn(I) + ZNT(i)=ZNTstoch_wat(I) ELSEIF (icy(i)) THEN ZNT(i)=ZNTstoch_ice(I) ENDIF @@ -1224,43 +1208,43 @@ SUBROUTINE SFCLAY1D_mynn( & !-------------------------------------------------------------------- IF (wet(i)) THEN - IF (rb_ocn(I) .GT. 0.0) THEN + IF (rb_wat(I) .GT. 0.0) THEN !COMPUTE z/L first guess: - CALL Li_etal_2010(ZOL(I),rb_ocn(I),ZA(I)/ZNTstoch_ocn(I),zratio_ocn(I)) - !ZOL(I)=ZA(I)*KARMAN*G*MOL(I)/(TH1D(I)*MAX(UST_ocn(I)*UST_ocn(I),0.0001)) + CALL Li_etal_2010(ZOL(I),rb_wat(I),ZA(I)/ZNTstoch_wat(I),zratio_wat(I)) + !ZOL(I)=ZA(I)*KARMAN*G*MOL(I)/(TH1D(I)*MAX(UST_wat(I)*UST_wat(I),0.0001)) ZOL(I)=MAX(ZOL(I),0.0) ZOL(I)=MIN(ZOL(I),20.) IF (debug_code >= 1) THEN - IF (ZNTstoch_ocn(i) < 1E-8 .OR. Zt_ocn(i) < 1E-10) THEN + IF (ZNTstoch_wat(i) < 1E-8 .OR. Zt_wat(i) < 1E-10) THEN write(0,*)"===(wet) capture bad input in mynn sfc layer, i=:",i - write(0,*)"rb=", rb_ocn(I)," ZNT=", ZNTstoch_ocn(i)," ZT=",Zt_ocn(i) - write(0,*)" tsk=", tskin_ocn(i)," prev z/L=",ZOL(I),& - " tsurf=", tsurf_ocn(i)," qsfc=", qsfc_ocn(i)," znt=", znt_ocn(i),& - " ust=", ust_ocn(i)," snowh=", snowh_ocn(i),"psfcpa=",PSFCPA(i), & + write(0,*)"rb=", rb_wat(I)," ZNT=", ZNTstoch_wat(i)," ZT=",Zt_wat(i) + write(0,*)" tsk=", tskin_wat(i)," prev z/L=",ZOL(I),& + " tsurf=", tsurf_wat(i)," qsfc=", qsfc_wat(i)," znt=", znt_wat(i),& + " ust=", ust_wat(i)," snowh=", snowh_wat(i),"psfcpa=",PSFCPA(i), & " dz=",dz8w1d(i)," qflx=",qflx(i)," hflx=",hflx(i)," hpbl=",pblh(i) ENDIF ENDIF !Use Pedros iterative function to find z/L - !zol(I)=zolri(rb_ocn(I),ZA(I),ZNTstoch_ocn(I),ZT_ocn(I),ZOL(I),psi_opt) + !zol(I)=zolri(rb_wat(I),ZA(I),ZNTstoch_wat(I),ZT_wat(I),ZOL(I),psi_opt) !Use brute-force method - zol(I)=zolrib(rb_ocn(I),ZA(I),ZNTstoch_ocn(I),zt_ocn(I),GZ1OZ0_ocn(I),GZ1OZt_ocn(I),ZOL(I),psi_opt) + zol(I)=zolrib(rb_wat(I),ZA(I),ZNTstoch_wat(I),zt_wat(I),GZ1OZ0_wat(I),GZ1OZt_wat(I),ZOL(I),psi_opt) ZOL(I)=MAX(ZOL(I),0.0) - ZOL(I)=MIN(ZOL(I),50.) + ZOL(I)=MIN(ZOL(I),20.) - zolzt = zol(I)*zt_ocn(I)/ZA(I) ! zt/L - zolz0 = zol(I)*ZNTstoch_ocn(I)/ZA(I) ! z0/L - zolza = zol(I)*(za(I)+ZNTstoch_ocn(I))/za(I) ! (z+z0/L - zol10 = zol(I)*(10.+ZNTstoch_ocn(I))/za(I) ! (10+z0)/L - zol2 = zol(I)*(2.+ZNTstoch_ocn(I))/za(I) ! (2+z0)/L + zolzt = zol(I)*zt_wat(I)/ZA(I) ! zt/L + zolz0 = zol(I)*ZNTstoch_wat(I)/ZA(I) ! z0/L + zolza = zol(I)*(za(I)+ZNTstoch_wat(I))/za(I) ! (z+z0/L + zol10 = zol(I)*(10.+ZNTstoch_wat(I))/za(I) ! (10+z0)/L + zol2 = zol(I)*(2.+ZNTstoch_wat(I))/za(I) ! (2+z0)/L !COMPUTE PSIM and PSIH !CALL PSI_Suselj_Sood_2010(PSIM(I),PSIH(I),ZOL(I)) !CALL PSI_Beljaars_Holtslag_1991(PSIM(I),PSIH(I),ZOL(I)) !CALL PSI_Businger_1971(PSIM(I),PSIH(I),ZOL(I)) - !CALL PSI_DyerHicks(PSIM(I),PSIH(I),ZOL(I),ZT_ocn(I),ZNTstoch_ocn(I),ZA(I)) + !CALL PSI_DyerHicks(PSIM(I),PSIH(I),ZOL(I),ZT_wat(I),ZNTstoch_wat(I),ZA(I)) !CALL PSI_CB2005(PSIM(I),PSIH(I),zolza,zolz0) ! or use tables psim(I)=psim_stable(zolza,psi_opt)-psim_stable(zolz0,psi_opt) @@ -1272,7 +1256,7 @@ SUBROUTINE SFCLAY1D_mynn( & ! 1.0 over Monin-Obukhov length RMOL(I)= ZOL(I)/ZA(I) - ELSEIF(rb_ocn(I) .EQ. 0.) THEN + ELSEIF(rb_wat(I) .EQ. 0.) THEN !========================================================= !-----CLASS 3; FORCED CONVECTION/NEUTRAL: !========================================================= @@ -1286,46 +1270,46 @@ SUBROUTINE SFCLAY1D_mynn( & ZOL(I) =0. RMOL(I) =0. - ELSEIF(rb_ocn(I) .LT. 0.)THEN + ELSEIF(rb_wat(I) .LT. 0.)THEN !========================================================== !-----CLASS 4; FREE CONVECTION: !========================================================== !COMPUTE z/L first guess: - CALL Li_etal_2010(ZOL(I),rb_ocn(I),ZA(I)/ZNTstoch_ocn(I),zratio_ocn(I)) - !ZOL(I)=ZA(I)*KARMAN*G*MOL(I)/(TH1D(I)*MAX(UST_ocn(I)*UST_ocn(I),0.001)) + CALL Li_etal_2010(ZOL(I),rb_wat(I),ZA(I)/ZNTstoch_wat(I),zratio_wat(I)) + !ZOL(I)=ZA(I)*KARMAN*G*MOL(I)/(TH1D(I)*MAX(UST_wat(I)*UST_wat(I),0.001)) ZOL(I)=MAX(ZOL(I),-20.0) ZOL(I)=MIN(ZOL(I),0.0) IF (debug_code >= 1) THEN - IF (ZNTstoch_ocn(i) < 1E-8 .OR. Zt_ocn(i) < 1E-10) THEN + IF (ZNTstoch_wat(i) < 1E-8 .OR. Zt_wat(i) < 1E-10) THEN write(0,*)"===(wet) capture bad input in mynn sfc layer, i=:",i - write(0,*)"rb=", rb_ocn(I)," ZNT=", ZNTstoch_ocn(i)," ZT=",Zt_ocn(i) - write(0,*)" tsk=", tskin_ocn(i)," wstar=",wstar(i)," prev z/L=",ZOL(I),& - " tsurf=", tsurf_ocn(i)," qsfc=", qsfc_ocn(i)," znt=", znt_ocn(i),& - " ust=", ust_ocn(i)," snowh=", snowh_ocn(i),"psfcpa=",PSFCPA(i), & + write(0,*)"rb=", rb_wat(I)," ZNT=", ZNTstoch_wat(i)," ZT=",Zt_wat(i) + write(0,*)" tsk=", tskin_wat(i)," wstar=",wstar(i)," prev z/L=",ZOL(I),& + " tsurf=", tsurf_wat(i)," qsfc=", qsfc_wat(i)," znt=", znt_wat(i),& + " ust=", ust_wat(i)," snowh=", snowh_wat(i),"psfcpa=",PSFCPA(i), & " dz=",dz8w1d(i)," qflx=",qflx(i)," hflx=",hflx(i)," hpbl=",pblh(i) ENDIF ENDIF !Use Pedros iterative function to find z/L - !zol(I)=zolri(rb_ocn(I),ZA(I),ZNTstoch_ocn(I),ZT_ocn(I),ZOL(I),psi_opt) + !zol(I)=zolri(rb_wat(I),ZA(I),ZNTstoch_wat(I),ZT_wat(I),ZOL(I),psi_opt) !Use brute-force method - zol(I)=zolrib(rb_ocn(I),ZA(I),ZNTstoch_ocn(I),zt_ocn(I),GZ1OZ0_ocn(I),GZ1OZt_ocn(I),ZOL(I),psi_opt) + zol(I)=zolrib(rb_wat(I),ZA(I),ZNTstoch_wat(I),zt_wat(I),GZ1OZ0_wat(I),GZ1OZt_wat(I),ZOL(I),psi_opt) ZOL(I)=MAX(ZOL(I),-20.0) ZOL(I)=MIN(ZOL(I),0.0) - zolzt = zol(I)*zt_ocn(I)/ZA(I) ! zt/L - zolz0 = zol(I)*ZNTstoch_ocn(I)/ZA(I) ! z0/L - zolza = zol(I)*(za(I)+ZNTstoch_ocn(I))/za(I) ! (z+z0/L - zol10 = zol(I)*(10.+ZNTstoch_ocn(I))/za(I) ! (10+z0)/L - zol2 = zol(I)*(2.+ZNTstoch_ocn(I))/za(I) ! (2+z0)/L + zolzt = zol(I)*zt_wat(I)/ZA(I) ! zt/L + zolz0 = zol(I)*ZNTstoch_wat(I)/ZA(I) ! z0/L + zolza = zol(I)*(za(I)+ZNTstoch_wat(I))/za(I) ! (z+z0/L + zol10 = zol(I)*(10.+ZNTstoch_wat(I))/za(I) ! (10+z0)/L + zol2 = zol(I)*(2.+ZNTstoch_wat(I))/za(I) ! (2+z0)/L !COMPUTE PSIM and PSIH !CALL PSI_Suselj_Sood_2010(PSIM(I),PSIH(I),ZOL(I)) - !CALL PSI_Hogstrom_1996(PSIM(I),PSIH(I),ZOL(I), ZT_ocn(I), ZNTstoch_ocn(I), ZA(I)) + !CALL PSI_Hogstrom_1996(PSIM(I),PSIH(I),ZOL(I), ZT_wat(I), ZNTstoch_wat(I), ZA(I)) !CALL PSI_Businger_1971(PSIM(I),PSIH(I),ZOL(I)) - !CALL PSI_DyerHicks(PSIM(I),PSIH(I),ZOL(I),ZT_ocn(I),ZNTstoch_ocn(I),ZA(I)) + !CALL PSI_DyerHicks(PSIM(I),PSIH(I),ZOL(I),ZT_wat(I),ZNTstoch_wat(I),ZA(I)) ! use tables psim(I)=psim_unstable(zolza,psi_opt)-psim_unstable(zolz0,psi_opt) psih(I)=psih_unstable(zolza,psi_opt)-psih_unstable(zolzt,psi_opt) @@ -1336,23 +1320,23 @@ SUBROUTINE SFCLAY1D_mynn( & !---LIMIT PSIH AND PSIM IN THE CASE OF THIN LAYERS AND !---HIGH ROUGHNESS. THIS PREVENTS DENOMINATOR IN FLUXES !---FROM GETTING TOO SMALL - PSIH(I)=MIN(PSIH(I),0.9*GZ1OZt_ocn(I)) - PSIM(I)=MIN(PSIM(I),0.9*GZ1OZ0_ocn(I)) - PSIH2(I)=MIN(PSIH2(I),0.9*GZ2OZt_ocn(I)) - PSIM10(I)=MIN(PSIM10(I),0.9*GZ10OZ0_ocn(I)) - PSIH10(I)=MIN(PSIH10(I),0.9*GZ10OZt_ocn(I)) + PSIH(I)=MIN(PSIH(I),0.9*GZ1OZt_wat(I)) + PSIM(I)=MIN(PSIM(I),0.9*GZ1OZ0_wat(I)) + PSIH2(I)=MIN(PSIH2(I),0.9*GZ2OZt_wat(I)) + PSIM10(I)=MIN(PSIM10(I),0.9*GZ10OZ0_wat(I)) + PSIH10(I)=MIN(PSIH10(I),0.9*GZ10OZt_wat(I)) RMOL(I) = ZOL(I)/ZA(I) ENDIF ! CALCULATE THE RESISTANCE: - PSIX_ocn(I) =MAX(GZ1OZ0_ocn(I)-PSIM(I) , 1.0) ! = fm - PSIX10_ocn(I)=MAX(GZ10OZ0_ocn(I)-PSIM10(I), 1.0) ! = fm10 - PSIT_ocn(I) =MAX(GZ1OZt_ocn(I)-PSIH(I) , 1.0) ! = fh - PSIT2_ocn(I) =MAX(GZ2OZt_ocn(I)-PSIH2(I) , 1.0) ! = fh2 - PSIQ_ocn(I) =MAX(LOG((ZA(I)+ZQ_ocn(i))/ZQ_ocn(I))-PSIH(I) ,1.0) - PSIQ2_ocn(I) =MAX(LOG((2.0+ZQ_ocn(i))/ZQ_ocn(I))-PSIH2(I) ,1.0) + PSIX_wat(I) =MAX(GZ1OZ0_wat(I)-PSIM(I) , 1.0) ! = fm + PSIX10_wat(I)=MAX(GZ10OZ0_wat(I)-PSIM10(I), 1.0) ! = fm10 + PSIT_wat(I) =MAX(GZ1OZt_wat(I)-PSIH(I) , 1.0) ! = fh + PSIT2_wat(I) =MAX(GZ2OZt_wat(I)-PSIH2(I) , 1.0) ! = fh2 + PSIQ_wat(I) =MAX(LOG((ZA(I)+ZQ_wat(i))/ZQ_wat(I))-PSIH(I) ,1.0) + PSIQ2_wat(I) =MAX(LOG((2.0+ZQ_wat(i))/ZQ_wat(I))-PSIH2(I) ,1.0) ENDIF ! end water points @@ -1363,7 +1347,7 @@ SUBROUTINE SFCLAY1D_mynn( & CALL Li_etal_2010(ZOL(I),rb_lnd(I),ZA(I)/ZNTstoch_lnd(I),zratio_lnd(I)) !ZOL(I)=ZA(I)*KARMAN*G*MOL(I)/(TH1D(I)*MAX(UST_lnd(I)*UST_lnd(I),0.0001)) ZOL(I)=MAX(ZOL(I),0.0) - ZOL(I)=MIN(ZOL(I),50.) + ZOL(I)=MIN(ZOL(I),20.) IF (debug_code >= 1) THEN IF (ZNTstoch_lnd(i) < 1E-8 .OR. Zt_lnd(i) < 1E-10) THEN @@ -1381,7 +1365,7 @@ SUBROUTINE SFCLAY1D_mynn( & !Use brute-force method zol(I)=zolrib(rb_lnd(I),ZA(I),ZNTstoch_lnd(I),zt_lnd(I),GZ1OZ0_lnd(I),GZ1OZt_lnd(I),ZOL(I),psi_opt) ZOL(I)=MAX(ZOL(I),0.0) - ZOL(I)=MIN(ZOL(I),50.) + ZOL(I)=MIN(ZOL(I),20.) zolzt = zol(I)*zt_lnd(I)/ZA(I) ! zt/L zolz0 = zol(I)*ZNTstoch_lnd(I)/ZA(I) ! z0/L @@ -1494,7 +1478,7 @@ SUBROUTINE SFCLAY1D_mynn( & CALL Li_etal_2010(ZOL(I),rb_ice(I),ZA(I)/ZNTstoch_ice(I),zratio_ice(I)) !ZOL(I)=ZA(I)*KARMAN*G*MOL(I)/(TH1D(I)*MAX(UST_ice(I)*UST_ice(I),0.0001)) ZOL(I)=MAX(ZOL(I),0.0) - ZOL(I)=MIN(ZOL(I),50.) + ZOL(I)=MIN(ZOL(I),20.) IF (debug_code >= 1) THEN IF (ZNTstoch_ice(i) < 1E-8 .OR. Zt_ice(i) < 1E-10) THEN @@ -1512,7 +1496,7 @@ SUBROUTINE SFCLAY1D_mynn( & !Use brute-force method zol(I)=zolrib(rb_ice(I),ZA(I),ZNTstoch_ice(I),zt_ice(I),GZ1OZ0_ice(I),GZ1OZt_ice(I),ZOL(I),psi_opt) ZOL(I)=MAX(ZOL(I),0.0) - ZOL(I)=MIN(ZOL(I),50.) + ZOL(I)=MIN(ZOL(I),20.) zolzt = zol(I)*zt_ice(I)/ZA(I) ! zt/L zolz0 = zol(I)*ZNTstoch_ice(I)/ZA(I) ! z0/L @@ -1624,16 +1608,18 @@ SUBROUTINE SFCLAY1D_mynn( & IF (wet(I)) THEN ! TO PREVENT OSCILLATIONS AVERAGE WITH OLD VALUE - OLDUST = UST_ocn(I) - UST_ocn(I)=0.5*UST_ocn(I)+0.5*KARMAN*WSPD(I)/PSIX_ocn(I) + OLDUST = UST_wat(I) + UST_wat(I)=0.5*UST_wat(I)+0.5*KARMAN*WSPD(I)/PSIX_wat(I) !NON-AVERAGED: - !UST_ocn(I)=KARMAN*WSPD(I)/PSIX_ocn(I) - stress_ocn(i)=ust_ocn(i)**2 + !UST_wat(I)=KARMAN*WSPD(I)/PSIX_wat(I) + stress_wat(i)=ust_wat(i)**2 ! Compute u* without vconv for use in HFX calc when isftcflx > 0 WSPDI(I)=MAX(SQRT(U1D(I)*U1D(I)+V1D(I)*V1D(I)), wmin) - USTM(I)=0.5*USTM(I)+0.5*KARMAN*WSPDI(I)/PSIX_ocn(I) + USTM(I)=0.5*USTM(I)+0.5*KARMAN*WSPDI(I)/PSIX_wat(I) + ! for possible future changes in sea-ice fraction from 0 to >0: + if (.not. icy(i)) ust_ice(i)=ust_wat(i) ENDIF ! end water points IF (dry(I)) THEN @@ -1666,6 +1652,9 @@ SUBROUTINE SFCLAY1D_mynn( & !Set ustm = ust over ice. USTM(I)=UST_ice(I) + + ! for possible future changes in sea-ice fraction from 1 to <1: + if (.not. wet(i)) ust_wat(i)=ust_ice(i) ENDIF ! end ice points !---------------------------------------------------- @@ -1674,14 +1663,14 @@ SUBROUTINE SFCLAY1D_mynn( & !---------------------------------------------------- IF (wet(I)) THEN - DTG=THV1D(I)-THVSK_ocn(I) + DTG=THV1D(I)-THVSK_wat(I) OLDTST=MOL(I) - MOL(I)=KARMAN*DTG/PSIT_ocn(I)/PRT + MOL(I)=KARMAN*DTG/PSIT_wat(I)/PRT !t_star(I) = -HFX(I)/(UST(I)*CPM(I)*RHO1D(I)) !t_star(I) = MOL(I) !---------------------------------------------------- - DQG=(QVSH(i)-qsfc_ocn(i))*1000. !(kg/kg -> g/kg) - qstar(I)=KARMAN*DQG/PSIQ_ocn(I)/PRT + DQG=(QVSH(i)-qsfc_wat(i))*1000. !(kg/kg -> g/kg) + qstar(I)=KARMAN*DQG/PSIQ_wat(I)/PRT ENDIF IF (dry(I)) THEN @@ -1715,13 +1704,13 @@ SUBROUTINE SFCLAY1D_mynn( & IF(icy(i))write(*,*)"==== AT END OF MAIN LOOP, i=",i, "(ice)" write(*,*)"z/L:",ZOL(I)," wspd:",wspd(I)," Tstar:",MOL(I) IF(wet(i))write(*,*)"PSIM:",PSIM(I)," PSIH:",PSIH(I)," W*:",WSTAR(I),& - " DTHV:",THV1D(I)-THVSK_ocn(I) + " DTHV:",THV1D(I)-THVSK_wat(I) IF(dry(i))write(*,*)"PSIM:",PSIM(I)," PSIH:",PSIH(I)," W*:",WSTAR(I),& " DTHV:",THV1D(I)-THVSK_lnd(I) IF(icy(i))write(*,*)"PSIM:",PSIM(I)," PSIH:",PSIH(I)," W*:",WSTAR(I),& " DTHV:",THV1D(I)-THVSK_ice(i) write(*,*)"CPM:",CPM(I)," RHO1D:",RHO1D(I)," q*:",qstar(I)," T*:",MOL(I) - IF(wet(i))write(*,*)"U*:",UST_ocn(I)," Z0:",ZNTstoch_ocn(I)," Zt:",zt_ocn(I) + IF(wet(i))write(*,*)"U*:",UST_wat(I)," Z0:",ZNTstoch_wat(I)," Zt:",zt_wat(I) IF(dry(i))write(*,*)"U*:",UST_lnd(I)," Z0:",ZNTstoch_lnd(I)," Zt:",zt_lnd(I) IF(icy(i))write(*,*)"U*:",UST_ice(I)," Z0:",ZNTstoch_ice(I)," Zt:",zt_ice(I) write(*,*)"hfx:",HFX(I)," MAVAIL:",MAVAIL(I)," QVSH(I):",QVSH(I) @@ -1746,8 +1735,8 @@ SUBROUTINE SFCLAY1D_mynn( & CH(I) = 0. CHS2(i) = 0. CQS2(i) = 0. - ch_ocn(I)= 0. - cm_ocn(I)= 0. + ch_wat(I)= 0. + cm_wat(I)= 0. ch_lnd(I)= 0. cm_lnd(I)= 0. ch_ice(I)= 0. @@ -1803,25 +1792,25 @@ SUBROUTINE SFCLAY1D_mynn( & ! CALCULATE THE EXCHANGE COEFFICIENTS FOR HEAT (FLHC) ! AND MOISTURE (FLQC) !------------------------------------------ - FLQC(I)=RHO1D(I)*MAVAIL(I)*UST_ocn(I)*KARMAN/PSIQ_ocn(i) - FLHC(I)=RHO1D(I)*CPM(I)*UST_ocn(I)*KARMAN/PSIT_ocn(I) + FLQC(I)=RHO1D(I)*MAVAIL(I)*UST_wat(I)*KARMAN/PSIQ_wat(i) + FLHC(I)=RHO1D(I)*CPM(I)*UST_wat(I)*KARMAN/PSIT_wat(I) IF (compute_flux) THEN !---------------------------------- ! COMPUTE SURFACE MOISTURE FLUX: !---------------------------------- - !QFX(I)=FLQC(I)*(QSFCMR_ocn(I)-QV1D(I)) - QFX(I)=FLQC(I)*(QSFC_ocn(I)-QV1D(I)) + !QFX(I)=FLQC(I)*(QSFCMR_wat(I)-QV1D(I)) + QFX(I)=FLQC(I)*(QSFC_wat(I)-QV1D(I)) QFX(I)=MAX(QFX(I),-0.02) !allows small neg QFX LH(I)=XLV*QFX(I) ! BWG, 2020-06-17: Mod next 2 lines for fractional - QFLX_ocn(i)=QFX(i)/RHO1D(i) - QFLX(i)=QFLX_ocn(i) + QFLX_wat(i)=QFX(i)/RHO1D(i) + QFLX(i)=QFLX_wat(i) !---------------------------------- ! COMPUTE SURFACE HEAT FLUX: !---------------------------------- - HFX(I)=FLHC(I)*(THSK_ocn(I)-TH1D(I)) + HFX(I)=FLHC(I)*(THSK_wat(I)-TH1D(I)) IF ( PRESENT(ISFTCFLX) ) THEN IF ( ISFTCFLX.NE.0 ) THEN ! AHW: add dissipative heating term @@ -1829,20 +1818,20 @@ SUBROUTINE SFCLAY1D_mynn( & ENDIF ENDIF ! BWG, 2020-06-17: Mod next 2 lines for fractional - HFLX_ocn(I)=HFX(I)/(RHO1D(I)*cpm(I)) - HFLX(I)=HFLX_ocn(I) + HFLX_wat(I)=HFX(I)/(RHO1D(I)*cpm(I)) + HFLX(I)=HFLX_wat(I) ENDIF !TRANSFER COEFF FOR SOME LSMs: !CHS(I)=UST(I)*KARMAN/(ALOG(KARMAN*UST(I)*ZA(I) & ! /XKA+ZA(I)/ZL)-PSIH(I)) - CHS(I)=UST_ocn(I)*KARMAN/PSIT_ocn(I) + CHS(I)=UST_wat(I)*KARMAN/PSIT_wat(I) !THESE ARE USED FOR 2-M DIAGNOSTICS ONLY - CQS2(I)=UST_ocn(I)*KARMAN/PSIQ2_ocn(i) - CHS2(I)=UST_ocn(I)*KARMAN/PSIT2_ocn(I) + CQS2(I)=UST_wat(I)*KARMAN/PSIQ2_wat(i) + CHS2(I)=UST_wat(I)*KARMAN/PSIT2_wat(I) - QSFC(I)=QSFC_ocn(I) + QSFC(I)=QSFC_wat(I) ELSEIF (icy(i)) THEN @@ -1888,11 +1877,11 @@ SUBROUTINE SFCLAY1D_mynn( & ENDIF - IF (debug_code >= 1) THEN + IF (debug_code > 1) THEN write(*,*)"QFX=",QFX(I),"FLQC=",FLQC(I) if(icy(i))write(*,*)"ice, MAVAIL:",MAVAIL(I)," u*=",UST_ice(I)," psiq=",PSIQ_ice(i) if(dry(i))write(*,*)"lnd, MAVAIL:",MAVAIL(I)," u*=",UST_lnd(I)," psiq=",PSIQ_lnd(i) - if(wet(i))write(*,*)"ocn, MAVAIL:",MAVAIL(I)," u*=",UST_ocn(I)," psiq=",PSIQ_ocn(i) + if(wet(i))write(*,*)"ocn, MAVAIL:",MAVAIL(I)," u*=",UST_wat(I)," psiq=",PSIQ_wat(i) ENDIF ! The exchange coefficient for cloud water is assumed to be the @@ -1903,8 +1892,8 @@ SUBROUTINE SFCLAY1D_mynn( & !--- COMPUTE EXCHANGE COEFFICIENTS FOR FV3 !----------------------------------------- IF (wet(i)) THEN - ch_ocn(I)=(karman/psix_ocn(I))*(karman/psit_ocn(i)) - cm_ocn(I)=(karman/psix_ocn(I))*(karman/psix_ocn(I)) + ch_wat(I)=(karman/psix_wat(I))*(karman/psit_wat(i)) + cm_wat(I)=(karman/psix_wat(I))*(karman/psix_wat(I)) ENDIF IF (dry(i)) THEN ch_lnd(I)=(karman/psix_lnd(I))*(karman/psit_lnd(i)) @@ -1941,8 +1930,8 @@ SUBROUTINE SFCLAY1D_mynn( & U10(I)=U1D(I)*log(10./ZNTstoch_lnd(I))/log(ZA(I)/ZNTstoch_lnd(I)) V10(I)=V1D(I)*log(10./ZNTstoch_lnd(I))/log(ZA(I)/ZNTstoch_lnd(I)) ELSEIF (wet(i)) THEN - U10(I)=U1D(I)*log(10./ZNTstoch_ocn(I))/log(ZA(I)/ZNTstoch_ocn(I)) - V10(I)=V1D(I)*log(10./ZNTstoch_ocn(I))/log(ZA(I)/ZNTstoch_ocn(I)) + U10(I)=U1D(I)*log(10./ZNTstoch_wat(I))/log(ZA(I)/ZNTstoch_wat(I)) + V10(I)=V1D(I)*log(10./ZNTstoch_wat(I))/log(ZA(I)/ZNTstoch_wat(I)) ELSEIF (icy(i)) THEN U10(I)=U1D(I)*log(10./ZNTstoch_ice(I))/log(ZA(I)/ZNTstoch_ice(I)) V10(I)=V1D(I)*log(10./ZNTstoch_ice(I))/log(ZA(I)/ZNTstoch_ice(I)) @@ -1957,8 +1946,8 @@ SUBROUTINE SFCLAY1D_mynn( & U10(I)=U1D(I)*log(10./ZNTstoch_lnd(I))/log(ZA(I)/ZNTstoch_lnd(I)) V10(I)=V1D(I)*log(10./ZNTstoch_lnd(I))/log(ZA(I)/ZNTstoch_lnd(I)) ELSEIF (wet(i)) THEN - U10(I)=U1D(I)*log(10./ZNTstoch_ocn(I))/log(ZA(I)/ZNTstoch_ocn(I)) - V10(I)=V1D(I)*log(10./ZNTstoch_ocn(I))/log(ZA(I)/ZNTstoch_ocn(I)) + U10(I)=U1D(I)*log(10./ZNTstoch_wat(I))/log(ZA(I)/ZNTstoch_wat(I)) + V10(I)=V1D(I)*log(10./ZNTstoch_wat(I))/log(ZA(I)/ZNTstoch_wat(I)) ELSEIF (icy(i)) THEN U10(I)=U1D(I)*log(10./ZNTstoch_ice(I))/log(ZA(I)/ZNTstoch_ice(I)) V10(I)=V1D(I)*log(10./ZNTstoch_ice(I))/log(ZA(I)/ZNTstoch_ice(I)) @@ -1969,8 +1958,8 @@ SUBROUTINE SFCLAY1D_mynn( & U10(I)=U1D(I)*PSIX10_lnd(I)/PSIX_lnd(I) V10(I)=V1D(I)*PSIX10_lnd(I)/PSIX_lnd(I) ELSEIF (wet(i)) THEN - U10(I)=U1D(I)*PSIX10_ocn(I)/PSIX_ocn(I) - V10(I)=V1D(I)*PSIX10_ocn(I)/PSIX_ocn(I) + U10(I)=U1D(I)*PSIX10_wat(I)/PSIX_wat(I) + V10(I)=V1D(I)*PSIX10_wat(I)/PSIX_wat(I) ELSEIF (icy(i)) THEN U10(I)=U1D(I)*PSIX10_ice(I)/PSIX_ice(I) V10(I)=V1D(I)*PSIX10_ice(I)/PSIX_ice(I) @@ -1996,18 +1985,18 @@ SUBROUTINE SFCLAY1D_mynn( & Q2(I)= MAX(Q2(I), MIN(QSFC_lnd(I), QV1D(I))) Q2(I)= MIN(Q2(I), 1.05*QV1D(I)) ELSEIF (wet(i)) THEN - DTG=TH1D(I)-THSK_ocn(I) - TH2(I)=THSK_ocn(I)+DTG*PSIT2_ocn(I)/PSIT_ocn(I) + DTG=TH1D(I)-THSK_wat(I) + TH2(I)=THSK_wat(I)+DTG*PSIT2_wat(I)/PSIT_wat(I) !*** BE CERTAIN THAT THE 2-M THETA IS BRACKETED BY !*** THE VALUES AT THE SURFACE AND LOWEST MODEL LEVEL. - IF ((TH1D(I)>THSK_ocn(I) .AND. (TH2(I)TH1D(I))) .OR. & - (TH1D(I)THSK_ocn(I) .OR. TH2(I)THSK_wat(I) .AND. (TH2(I)TH1D(I))) .OR. & + (TH1D(I)THSK_wat(I) .OR. TH2(I) 4.0 )THEN + IF (UST_wat(I) < 0.0 .OR. UST_wat(I) > 4.0 )THEN print*,"SUSPICIOUS VALUES IN MYNN SFCLAYER",& - I,J, "UST_ocn: ",UST_ocn(I) + I,J, "UST_wat: ",UST_wat(I) yesno = 1 ENDIF ENDIF @@ -2092,15 +2081,15 @@ SUBROUTINE SFCLAY1D_mynn( & IF (yesno == 1) THEN IF (wet(i)) THEN print*," OTHER INFO over water:" - print*,"z/L:",ZOL(I)," U*:",UST_ocn(I)," Tstar:",MOL(I) + print*,"z/L:",ZOL(I)," U*:",UST_wat(I)," Tstar:",MOL(I) print*,"PSIM:",PSIM(I)," PSIH:",PSIH(I)," W*:",WSTAR(I),& - " DTHV:",THV1D(I)-THVSK_ocn(I) + " DTHV:",THV1D(I)-THVSK_wat(I) print*,"CPM:",CPM(I)," RHO1D:",RHO1D(I)," L:",& - ZOL(I)/ZA(I)," DTH:",TH1D(I)-THSK_ocn(I) - print*," Z0:",ZNTstoch_ocn(I)," Zt:",ZT_ocn(I)," za:",za(I) - print*,"MAVAIL:",MAVAIL(I)," QSFC_ocn(I):",& - QSFC_ocn(I)," QVSH(I):",QVSH(I) - print*,"PSIX=",PSIX_ocn(I)," T1D(i):",T1D(i) + ZOL(I)/ZA(I)," DTH:",TH1D(I)-THSK_wat(I) + print*," Z0:",ZNTstoch_wat(I)," Zt:",ZT_wat(I)," za:",za(I) + print*,"MAVAIL:",MAVAIL(I)," QSFC_wat(I):",& + QSFC_wat(I)," QVSH(I):",QVSH(I) + print*,"PSIX=",PSIX_wat(I)," T1D(i):",T1D(i) write(*,*)"=============================================" ENDIF IF (dry(i)) THEN @@ -2137,7 +2126,7 @@ SUBROUTINE SFCLAY1D_mynn( & END SUBROUTINE SFCLAY1D_mynn !------------------------------------------------------------------- -!>\ingroup module_sf_mynn_mod +!>\ingroup mynn_sfc !> This subroutine returns the thermal and moisture roughness lengths !! from Zilitinkevich (1995) and Zilitinkevich et al. (2001) over !! land and water, respectively. @@ -2209,6 +2198,7 @@ SUBROUTINE zilitinkevich_1995(Z_0,Zt,Zq,restar,ustar,KARMAN,& END SUBROUTINE zilitinkevich_1995 !-------------------------------------------------------------------- +!>\ingroup mynn_sfc SUBROUTINE davis_etal_2008(Z_0,ustar) !a.k.a. : Donelan et al. (2004) @@ -2239,7 +2229,7 @@ SUBROUTINE davis_etal_2008(Z_0,ustar) END SUBROUTINE davis_etal_2008 !-------------------------------------------------------------------- -!>\ingroup module_sf_mynn_mod +!>\ingroup mynn_sfc !>This formulation for roughness length was designed account for. !!wave steepness. SUBROUTINE Taylor_Yelland_2001(Z_0,ustar,wsp10) @@ -2265,7 +2255,7 @@ SUBROUTINE Taylor_Yelland_2001(Z_0,ustar,wsp10) END SUBROUTINE Taylor_Yelland_2001 !-------------------------------------------------------------------- -!>\ingroup module_sf_mynn_mod +!>\ingroup mynn_sfc !>This version of Charnock's relation employs a varying !! Charnock parameter, similar to COARE3.0 [Fairall et al. (2003)]. !! The Charnock parameter CZC is varied from .011 to .018. @@ -2290,7 +2280,7 @@ SUBROUTINE charnock_1955(Z_0,ustar,wsp10,visc,zu) END SUBROUTINE charnock_1955 !-------------------------------------------------------------------- -!>\ingroup module_sf_mynn_mod +!>\ingroup mynn_sfc !> This version of Charnock's relation employs a varying !!Charnock parameter, taken from COARE 3.5 [Edson et al. (2001, JPO)]. !!The Charnock parameter CZC is varied from about .005 to .028 @@ -2318,7 +2308,7 @@ SUBROUTINE edson_etal_2013(Z_0,ustar,wsp10,visc,zu) END SUBROUTINE edson_etal_2013 !-------------------------------------------------------------------- -!>\ingroup module_sf_mynn_mod +!>\ingroup mynn_sfc !> This formulation for the thermal and moisture roughness lengths !! (Zt and Zq) relates them to Z0 via the roughness Reynolds number (Ren). !!This formula comes from Fairall et al. (2003). It is modified from @@ -2351,7 +2341,7 @@ SUBROUTINE garratt_1992(Zt,Zq,Z_0,Ren,landsea) END SUBROUTINE garratt_1992 !-------------------------------------------------------------------- -!>\ingroup module_sf_mynn_mod +!>\ingroup mynn_sfc !>This formulation for thermal and moisture roughness length (Zt and Zq) !! as a function of the roughness Reynolds number (Ren) comes from the !! COARE3.0 formulation, empirically derived from COARE and HEXMAX data @@ -2399,7 +2389,7 @@ SUBROUTINE fairall_etal_2003(Zt,Zq,Ren,ustar,visc,rstoch,spp_pbl) END SUBROUTINE fairall_etal_2003 !-------------------------------------------------------------------- -!>\ingroup module_sf_mynn_mod +!>\ingroup mynn_sfc !> This formulation for thermal and moisture roughness length (Zt and Zq) !! as a function of the roughness Reynolds number (Ren) comes from the !! COARE 3.5/4.0 formulation, empirically derived from COARE and HEXMAX data @@ -2428,7 +2418,7 @@ SUBROUTINE fairall_etal_2014(Zt,Zq,Ren,ustar,visc,rstoch,spp_pbl) END SUBROUTINE fairall_etal_2014 !-------------------------------------------------------------------- -!>\ingroup module_sf_mynn_mod +!>\ingroup mynn_sfc !> This is a modified version of Yang et al (2002 QJRMS, 2008 JAMC) !! and Chen et al (2010, J of Hydromet). Although it was originally !! designed for arid regions with bare soil, it is modified @@ -2486,6 +2476,7 @@ SUBROUTINE Yang_2008(Z_0,Zt,Zq,ustar,tstar,qst,Ren,visc) END SUBROUTINE Yang_2008 !-------------------------------------------------------------------- ! Taken from the GFS (sfc_diff.f) for comparison +!>\ingroup mynn_sfc SUBROUTINE GFS_z0_lnd(z0max,shdmax,z1,vegtype,ivegsrc,z0pert) REAL, INTENT(OUT) :: z0max @@ -2545,10 +2536,7 @@ SUBROUTINE GFS_z0_lnd(z0max,shdmax,z1,vegtype,ivegsrc,z0pert) END SUBROUTINE GFS_z0_lnd !-------------------------------------------------------------------- ! Taken from the GFS (sfc_diff.f) for comparison -! This formulation comes from Zheng et al. (2012, JGR), which is a -! modified form of the Zilitinkevich thermal roughness length but it adds -! the dependence on vegetation fraction. -! +!>\ingroup mynn_sfc SUBROUTINE GFS_zt_lnd(ztmax,z0max,sigmaf,ztpert,ustar_lnd) REAL, INTENT(OUT) :: ztmax @@ -2576,27 +2564,28 @@ SUBROUTINE GFS_zt_lnd(ztmax,z0max,sigmaf,ztpert,ustar_lnd) END SUBROUTINE GFS_zt_lnd !-------------------------------------------------------------------- - SUBROUTINE GFS_z0_ocn(z0rl_ocn,ustar_ocn,WSPD,z1,sfc_z0_type,redrag) +!>\ingroup mynn_sfc + SUBROUTINE GFS_z0_wat(z0rl_wat,ustar_wat,WSPD,z1,sfc_z0_type,redrag) - REAL, INTENT(OUT) :: z0rl_ocn - REAL, INTENT(INOUT):: ustar_ocn + REAL, INTENT(OUT) :: z0rl_wat + REAL, INTENT(INOUT):: ustar_wat REAL, INTENT(IN) :: wspd,z1 LOGICAL, INTENT(IN):: redrag INTEGER, INTENT(IN):: sfc_z0_type REAL :: z0,z0max,wind10m REAL, PARAMETER :: charnock = 0.014, z0s_max=.317e-2 -! z0 = 0.01 * z0rl_ocn +! z0 = 0.01 * z0rl_wat !Already converted to meters in the wrapper - z0 = z0rl_ocn + z0 = z0rl_wat z0max = max(1.0e-6, min(z0,z1)) - ustar_ocn = sqrt(g * z0 / charnock) + ustar_wat = sqrt(g * z0 / charnock) wind10m = wspd*log(10./1e-4)/log(z1/1e-4) !wind10m = sqrt(u10m(i)*u10m(i)+v10m(i)*v10m(i)) ! if (sfc_z0_type >= 0) then if (sfc_z0_type == 0) then - z0 = (charnock / g) * ustar_ocn * ustar_ocn + z0 = (charnock / g) * ustar_wat * ustar_wat ! mbek -- toga-coare flux algorithm ! z0 = (charnock / g) * ustar(i)*ustar(i) + arnu/ustar(i) @@ -2607,47 +2596,48 @@ SUBROUTINE GFS_z0_ocn(z0rl_ocn,ustar_ocn,WSPD,z1,sfc_z0_type,redrag) ! z0 = arnu / (ustar(i) * ff ** pp) if (redrag) then - !z0rl_ocn = 100.0 * max(min(z0, z0s_max), 1.e-7) - z0rl_ocn = max(min(z0, z0s_max), 1.e-7) + !z0rl_wat = 100.0 * max(min(z0, z0s_max), 1.e-7) + z0rl_wat = max(min(z0, z0s_max), 1.e-7) else - !z0rl_ocn = 100.0 * max(min(z0,.1), 1.e-7) - z0rl_ocn = max(min(z0,.1), 1.e-7) + !z0rl_wat = 100.0 * max(min(z0,.1), 1.e-7) + z0rl_wat = max(min(z0,.1), 1.e-7) endif elseif (sfc_z0_type == 6) then ! wang call znot_m_v6(wind10m, z0) ! wind, m/s, z0, m - !z0rl_ocn = 100.0 * z0 ! cm + !z0rl_wat = 100.0 * z0 ! cm elseif (sfc_z0_type == 7) then ! wang call znot_m_v7(wind10m, z0) ! wind, m/s, z0, m - !z0rl_ocn = 100.0 * z0 ! cm + !z0rl_wat = 100.0 * z0 ! cm else - z0rl_ocn = 1.0e-6 + z0rl_wat = 1.0e-6 endif endif - END SUBROUTINE GFS_z0_ocn + END SUBROUTINE GFS_z0_wat !-------------------------------------------------------------------- - SUBROUTINE GFS_zt_ocn(ztmax,z0rl_ocn,restar,WSPD,z1,sfc_z0_type) +!>\ingroup mynn_sfc + SUBROUTINE GFS_zt_wat(ztmax,z0rl_wat,restar,WSPD,z1,sfc_z0_type) REAL, INTENT(OUT) :: ztmax - REAL, INTENT(IN) :: wspd,z1,z0rl_ocn,restar + REAL, INTENT(IN) :: wspd,z1,z0rl_wat,restar INTEGER, INTENT(IN):: sfc_z0_type - REAL :: z0,z0max,wind10m,rat,ustar_ocn + REAL :: z0,z0max,wind10m,rat,ustar_wat REAL, PARAMETER :: charnock = 0.014, z0s_max=.317e-2 -! z0 = 0.01 * z0rl_ocn +! z0 = 0.01 * z0rl_wat !Already converted to meters in the wrapper - z0 = z0rl_ocn + z0 = z0rl_wat z0max = max(1.0e-6, min(z0,z1)) - ustar_ocn = sqrt(g * z0 / charnock) + ustar_wat = sqrt(g * z0 / charnock) wind10m = wspd*log(10./1e-4)/log(z1/1e-4) !** test xubin's new z0 ! ztmax = z0max -!input restar = max(ustar_ocn(i)*z0max*visi, 0.000001) +!input restar = max(ustar_wat(i)*z0max*visi, 0.000001) ! restar = log(restar) ! restar = min(restar,5.) @@ -2668,8 +2658,9 @@ SUBROUTINE GFS_zt_ocn(ztmax,z0rl_ocn,restar,WSPD,z1,sfc_z0_type) stop endif - END SUBROUTINE GFS_zt_ocn + END SUBROUTINE GFS_zt_wat !-------------------------------------------------------------------- +!>\ingroup mynn_sfc !! add fitted z0,zt curves for hurricane application (used in HWRF/HMON) !! Weiguo Wang, 2019-0425 @@ -2719,6 +2710,7 @@ SUBROUTINE znot_m_v6(uref, znotm) END SUBROUTINE znot_m_v6 !-------------------------------------------------------------------- +!>\ingroup mynn_sfc SUBROUTINE znot_t_v6(uref, znott) IMPLICIT NONE @@ -2783,7 +2775,7 @@ SUBROUTINE znot_t_v6(uref, znott) END SUBROUTINE znot_t_v6 !------------------------------------------------------------------- - +!>\ingroup mynn_sfc SUBROUTINE znot_m_v7(uref, znotm) IMPLICIT NONE @@ -2831,6 +2823,7 @@ SUBROUTINE znot_m_v7(uref, znotm) END SUBROUTINE znot_m_v7 !-------------------------------------------------------------------- +!>\ingroup mynn_sfc SUBROUTINE znot_t_v7(uref, znott) IMPLICIT NONE @@ -2897,7 +2890,7 @@ SUBROUTINE znot_t_v7(uref, znott) END SUBROUTINE znot_t_v7 !-------------------------------------------------------------------- -!>\ingroup module_sf_mynn_mod +!>\ingroup mynn_sfc !> This is taken from Andreas (2002; J. of Hydromet) and !! Andreas et al. (2005; BLM). !! @@ -2948,7 +2941,7 @@ SUBROUTINE Andreas_2002(Z_0,bvisc,ustar,Zt,Zq) END SUBROUTINE Andreas_2002 !-------------------------------------------------------------------- -!>\ingroup module_sf_mynn_mod +!>\ingroup mynn_sfc !> This subroutine returns the stability functions based off !! of Hogstrom (1996). SUBROUTINE PSI_Hogstrom_1996(psi_m, psi_h, zL, Zt, Z_0, Za) @@ -2984,7 +2977,7 @@ SUBROUTINE PSI_Hogstrom_1996(psi_m, psi_h, zL, Zt, Z_0, Za) END SUBROUTINE PSI_Hogstrom_1996 !-------------------------------------------------------------------- -!> \ingroup module_sf_mynn_mod +!> \ingroup mynn_sfc !> This subroutine returns the stability functions based off !! of Hogstrom (1996), but with different constants compatible !! with Dyer and Hicks (1970/74?). This formulation is used for @@ -3023,7 +3016,7 @@ SUBROUTINE PSI_DyerHicks(psi_m, psi_h, zL, Zt, Z_0, Za) END SUBROUTINE PSI_DyerHicks !-------------------------------------------------------------------- -!>\ingroup module_sf_mynn_mod +!>\ingroup mynn_sfc !> This subroutine returns the stability functions based off !! of Beljaar and Holtslag 1991, which is an extension of Holtslag !! and Debruin 1989. @@ -3054,7 +3047,7 @@ SUBROUTINE PSI_Beljaars_Holtslag_1991(psi_m, psi_h, zL) END SUBROUTINE PSI_Beljaars_Holtslag_1991 !-------------------------------------------------------------------- -!>\ingroup module_sf_mynn_mod +!>\ingroup mynn_sfc !> This subroutine returns the stability functions come from !! Zilitinkevich and Esau (2007, BM), which are formulatioed from the !! "generalized similarity theory" and tuned to the LES DATABASE64 @@ -3085,7 +3078,7 @@ SUBROUTINE PSI_Zilitinkevich_Esau_2007(psi_m, psi_h, zL) END SUBROUTINE PSI_Zilitinkevich_Esau_2007 !-------------------------------------------------------------------- -!>\ingroup module_sf_mynn_mod +!>\ingroup mynn_sfc !> This subroutine returns the flux-profile relationships !! of Businger el al. 1971. SUBROUTINE PSI_Businger_1971(psi_m, psi_h, zL) @@ -3117,7 +3110,7 @@ SUBROUTINE PSI_Businger_1971(psi_m, psi_h, zL) END SUBROUTINE PSI_Businger_1971 !-------------------------------------------------------------------- -!>\ingroup module_sf_mynn_mod +!>\ingroup mynn_sfc !> This subroutine returns flux-profile relatioships based off !!of Lobocki (1993), which is derived from the MY-level 2 model. !!Suselj and Sood (2010) applied the surface layer length scales @@ -3150,12 +3143,12 @@ SUBROUTINE PSI_Suselj_Sood_2010(psi_m, psi_h, zL) END SUBROUTINE PSI_Suselj_Sood_2010 !-------------------------------------------------------------------- +!>\ingroup mynn_sfc +!! This subroutine returns the stability functions based off +!! of Cheng and Brutseart (2005, BLM), for use in stable conditions only. +!! The returned values are the combination of psi((za+zo)/L) - psi(z0/L) SUBROUTINE PSI_CB2005(psim1,psih1,zL,z0L) - ! This subroutine returns the stability functions based off - ! of Cheng and Brutseart (2005, BLM), for use in stable conditions only. - ! The returned values are the combination of psi((za+zo)/L) - psi(z0/L) - IMPLICIT NONE REAL, INTENT(IN) :: zL,z0L REAL, INTENT(OUT) :: psim1,psih1 @@ -3169,12 +3162,12 @@ SUBROUTINE PSI_CB2005(psim1,psih1,zL,z0L) END SUBROUTINE PSI_CB2005 !-------------------------------------------------------------------- +!>\ingroup mynn_sfc +!! This subroutine returns a more robust z/L that best matches +!! the z/L from Hogstrom (1996) for unstable conditions and Beljaars +!! and Holtslag (1991) for stable conditions. SUBROUTINE Li_etal_2010(zL, Rib, zaz0, z0zt) - !This subroutine returns a more robust z/L that best matches - !the z/L from Hogstrom (1996) for unstable conditions and Beljaars - !and Holtslag (1991) for stable conditions. - IMPLICIT NONE REAL, INTENT(OUT) :: zL REAL, INTENT(IN) :: Rib, zaz0, z0zt @@ -3235,7 +3228,7 @@ REAL function zolri(ri,za,z0,zt,zol1,psi_opt) ! This iterative algorithm was taken from the revised surface layer ! scheme in WRF-ARW, written by Pedro Jimenez and Jimy Dudhia and ! summarized in Jimenez et al. (2012, MWR). This function was adapted - ! to input the thermal roughness length, zt, (as well as z0) and use initial + ! to input the thermal roughness length, zt, (as well as z0) and use initial ! estimate of z/L. IMPLICIT NONE @@ -3403,10 +3396,12 @@ REAL function zolrib(ri,za,z0,zt,logz0,logzt,zol1,psi_opt) end function !==================================================================== - SUBROUTINE psi_init(psi_opt) + SUBROUTINE psi_init(psi_opt,errmsg,errflg) - INTEGER :: N,psi_opt - REAL :: zolf + integer :: N,psi_opt + real :: zolf + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg if (psi_opt == 0) then DO N=0,1000 @@ -3434,10 +3429,21 @@ SUBROUTINE psi_init(psi_opt) ENDDO endif + !Simple test to see if initialization worked: + if (psim_stab(1) < 0. .AND. psih_stab(1) < 0. .AND. & + psim_unstab(1) > 0. .AND. psih_unstab(1) > 0.) then + errmsg = 'In MYNN SFC, Psi tables have been initialized' + errflg = 0 + else + errmsg = 'Error in MYNN SFC: Problem initializing psi tables' + errflg = 1 + endif + END SUBROUTINE psi_init ! ================================================================== ! ... integrated similarity functions from MYNN... ! +!>\ingroup mynn_sfc REAL function psim_stable_full(zolf) REAL :: zolf @@ -3447,6 +3453,7 @@ REAL function psim_stable_full(zolf) return end function +!>\ingroup mynn_sfc REAL function psih_stable_full(zolf) REAL :: zolf @@ -3456,6 +3463,7 @@ REAL function psih_stable_full(zolf) return end function +!>\ingroup mynn_sfc REAL function psim_unstable_full(zolf) REAL :: zolf,x,ym,psimc,psimk @@ -3472,6 +3480,7 @@ REAL function psim_unstable_full(zolf) return end function +!>\ingroup mynn_sfc REAL function psih_unstable_full(zolf) REAL :: zolf,y,yh,psihc,psihk @@ -3558,7 +3567,7 @@ REAL function psim_stable(zolf,psi_opt) nzol = int(zolf*100.) rzol = zolf*100. - nzol - if(nzol+1 .le. 1000)then + if(nzol+1 .lt. 1000)then psim_stable = psim_stab(nzol) + rzol*(psim_stab(nzol+1)-psim_stab(nzol)) else if (psi_opt == 0) then @@ -3577,7 +3586,7 @@ REAL function psih_stable(zolf,psi_opt) nzol = int(zolf*100.) rzol = zolf*100. - nzol - if(nzol+1 .le. 1000)then + if(nzol+1 .lt. 1000)then psih_stable = psih_stab(nzol) + rzol*(psih_stab(nzol+1)-psih_stab(nzol)) else if (psi_opt == 0) then @@ -3596,7 +3605,7 @@ REAL function psim_unstable(zolf,psi_opt) nzol = int(-zolf*100.) rzol = -zolf*100. - nzol - if(nzol+1 .le. 1000)then + if(nzol+1 .lt. 1000)then psim_unstable = psim_unstab(nzol) + rzol*(psim_unstab(nzol+1)-psim_unstab(nzol)) else if (psi_opt == 0) then @@ -3615,7 +3624,7 @@ REAL function psih_unstable(zolf,psi_opt) nzol = int(-zolf*100.) rzol = -zolf*100. - nzol - if(nzol+1 .le. 1000)then + if(nzol+1 .lt. 1000)then psih_unstable = psih_unstab(nzol) + rzol*(psih_unstab(nzol+1)-psih_unstab(nzol)) else if (psi_opt == 0) then diff --git a/physics/module_sf_noahmp_glacier.f90 b/physics/module_sf_noahmp_glacier.f90 index f3e0531f5..be24381f4 100644 --- a/physics/module_sf_noahmp_glacier.f90 +++ b/physics/module_sf_noahmp_glacier.f90 @@ -1,9 +1,11 @@ +#define CCPP !> \file module_sf_noahmp_glacier.f90 !! This file contains the NoahMP Glacier scheme. !>\ingroup NoahMP_LSM module noahmp_glacier_globals + use machine , only : kind_phys implicit none ! ================================================================================================== @@ -11,103 +13,58 @@ module noahmp_glacier_globals ! physical constants: ! !------------------------------------------------------------------------------------------! - real, parameter :: grav = 9.80616 !acceleration due to gravity (m/s2) - real, parameter :: sb = 5.67e-08 !stefan-boltzmann constant (w/m2/k4) - real, parameter :: vkc = 0.40 !von karman constant - real, parameter :: tfrz = 273.16 !freezing/melting point (k) - real, parameter :: hsub = 2.8440e06 !latent heat of sublimation (j/kg) - real, parameter :: hvap = 2.5104e06 !latent heat of vaporization (j/kg) - real, parameter :: hfus = 0.3336e06 !latent heat of fusion (j/kg) - real, parameter :: cwat = 4.188e06 !specific heat capacity of water (j/m3/k) - real, parameter :: cice = 2.094e06 !specific heat capacity of ice (j/m3/k) - real, parameter :: cpair = 1004.64 !heat capacity dry air at const pres (j/kg/k) - real, parameter :: tkwat = 0.6 !thermal conductivity of water (w/m/k) - real, parameter :: tkice = 2.2 !thermal conductivity of ice (w/m/k) - real, parameter :: tkair = 0.023 !thermal conductivity of air (w/m/k) - real, parameter :: rair = 287.04 !gas constant for dry air (j/kg/k) - real, parameter :: rw = 461.269 !gas constant for water vapor (j/kg/k) - real, parameter :: denh2o = 1000. !density of water (kg/m3) - real, parameter :: denice = 917. !density of ice (kg/m3) + real (kind=kind_phys), parameter :: grav = 9.80616 !< acceleration due to gravity (m/s2) + real (kind=kind_phys), parameter :: sb = 5.67e-08 !< stefan-boltzmann constant (w/m2/k4) + real (kind=kind_phys), parameter :: vkc = 0.40 !< von karman constant + real (kind=kind_phys), parameter :: tfrz = 273.16 !< freezing/melting point (k) + real (kind=kind_phys), parameter :: hsub = 2.8440e06 !< latent heat of sublimation (j/kg) + real (kind=kind_phys), parameter :: hvap = 2.5104e06 !< latent heat of vaporization (j/kg) + real (kind=kind_phys), parameter :: hfus = 0.3336e06 !< latent heat of fusion (j/kg) + real (kind=kind_phys), parameter :: cwat = 4.188e06 !< specific heat capacity of water (j/m3/k) + real (kind=kind_phys), parameter :: cice = 2.094e06 !< specific heat capacity of ice (j/m3/k) + real (kind=kind_phys), parameter :: cpair = 1004.64 !< heat capacity dry air at const pres (j/kg/k) + real (kind=kind_phys), parameter :: tkwat = 0.6 !< thermal conductivity of water (w/m/k) + real (kind=kind_phys), parameter :: tkice = 2.2 !< thermal conductivity of ice (w/m/k) + real (kind=kind_phys), parameter :: tkair = 0.023 !< thermal conductivity of air (w/m/k) + real (kind=kind_phys), parameter :: rair = 287.04 !< gas constant for dry air (j/kg/k) + real (kind=kind_phys), parameter :: rw = 461.269 !< gas constant for water vapor (j/kg/k) + real (kind=kind_phys), parameter :: denh2o = 1000. !< density of water (kg/m3) + real (kind=kind_phys), parameter :: denice = 917. !< density of ice (kg/m3) ! =====================================options for different schemes================================ -! options for dynamic vegetation: -! 1 -> off (use table lai; use fveg = shdfac from input) -! 2 -> on (together with opt_crs = 1) -! 3 -> off (use table lai; calculate fveg) -! 4 -> off (use table lai; use maximum vegetation fraction) - integer :: dveg != 2 ! +!> options for ground snow surface albedo +!! 1-> BATS; 2 -> CLASS -! options for canopy stomatal resistance -! 1-> ball-berry; 2->jarvis + INTEGER :: OPT_ALB != 2 !(suggested 2) - integer :: opt_crs != 1 !(must 1 when dveg = 2) +!> options for partitioning precipitation into rainfall & snowfall +!! 1 -> Jordan (1991); 2 -> BATS: when SFCTMP SFCTMP noah (soil moisture) -! 2-> clm (matric potential) -! 3-> ssib (matric potential) + INTEGER :: OPT_SNF != 1 !(suggested 1) - integer :: opt_btr != 1 !(suggested 1) +!> options for lower boundary condition of soil temperature +!! 1 -> zero heat flux from bottom (ZBOT and TBOT not used) +!! 2 -> TBOT at ZBOT (8m) read from a file (original Noah) -! options for runoff and groundwater -! 1 -> topmodel with groundwater (niu et al. 2007 jgr) ; -! 2 -> topmodel with an equilibrium water table (niu et al. 2005 jgr) ; -! 3 -> original surface and subsurface runoff (free drainage) -! 4 -> bats surface and subsurface runoff (free drainage) + INTEGER :: OPT_TBOT != 2 !(suggested 2) - integer :: opt_run != 1 !(suggested 1) +!> options for snow/soil temperature time scheme (only layer 1) +!! 1 -> semi-implicit; 2 -> full implicit (original Noah) -! options for surface layer drag coeff (ch & cm) -! 1->m-o ; 2->original noah (chen97); 3->myj consistent; 4->ysu consistent. + INTEGER :: OPT_STC != 1 !(suggested 1) - integer :: opt_sfc != 1 !(1 or 2 or 3 or 4) +!> options for glacier treatment +!! 1 -> include phase change of ice; 2 -> ice treatment more like original Noah -! options for supercooled liquid water (or ice fraction) -! 1-> no iteration (niu and yang, 2006 jhm); 2: koren's iteration - - integer :: opt_frz != 1 !(1 or 2) - -! options for frozen soil permeability -! 1 -> linear effects, more permeable (niu and yang, 2006, jhm) -! 2 -> nonlinear effects, less permeable (old) - - integer :: opt_inf != 1 !(suggested 1) - -! options for radiation transfer -! 1 -> modified two-stream (gap = f(solar angle, 3d structure ...)<1-fveg) -! 2 -> two-stream applied to grid-cell (gap = 0) -! 3 -> two-stream applied to vegetated fraction (gap=1-fveg) - - integer :: opt_rad != 1 !(suggested 1) - -! options for ground snow surface albedo -! 1-> bats; 2 -> class - - integer :: opt_alb != 2 !(suggested 2) - -! options for partitioning precipitation into rainfall & snowfall -! 1 -> jordan (1991); 2 -> bats: when sfctmp sfctmp zero heat flux from bottom (zbot and tbot not used) -! 2 -> tbot at zbot (8m) read from a file (original noah) - - integer :: opt_tbot != 2 !(suggested 2) - -! options for snow/soil temperature time scheme (only layer 1) -! 1 -> semi-implicit; 2 -> full implicit (original noah) - - integer :: opt_stc != 1 !(suggested 1) + INTEGER :: OPT_GLA != 1 !(suggested 1) ! adjustable parameters for snow processes - real, parameter :: z0sno = 0.002 !snow surface roughness length (m) (0.002) - real, parameter :: ssi = 0.03 !liquid water holding capacity for snowpack (m3/m3) (0.03) - real, parameter :: swemx = 1.00 !new snow mass to fully cover old snow (mm) - !equivalent to 10mm depth (density = 100 kg/m3) + REAL, PARAMETER :: Z0SNO = 0.002 !< snow surface roughness length (m) (0.002) + REAL, PARAMETER :: SSI = 0.03 !< liquid water holding capacity for snowpack (m3/m3) (0.03) + REAL, PARAMETER :: SWEMX = 1.00 !< new snow mass to fully cover old snow (mm) + !< equivalent to 10mm depth (density = 100 kg/m3) !------------------------------------------------------------------------------------------! end module noahmp_glacier_globals @@ -167,9 +124,10 @@ subroutine noahmp_glacier (& trad ,edir ,runsrf ,runsub ,sag ,albedo , & ! out : qsnbot ,ponding ,ponding1,ponding2,t2m ,q2e , & ! out : #ifdef CCPP - emissi, fpice ,ch2b , esnow, errmsg, errflg) + emissi, fpice ,ch2b , esnow, albsnd, albsni , & + errmsg, errflg) #else - emissi, fpice ,ch2b , esnow) + emissi, fpice ,ch2b , esnow, albsnd, albsni) #endif @@ -180,70 +138,73 @@ subroutine noahmp_glacier (& implicit none ! -------------------------------------------------------------------------------------------------- ! input - integer , intent(in) :: iloc !grid index - integer , intent(in) :: jloc !grid index - real , intent(in) :: cosz !cosine solar zenith angle [0-1] - integer , intent(in) :: nsnow !maximum no. of snow layers - integer , intent(in) :: nsoil !no. of soil layers - real , intent(in) :: dt !time step [sec] - real , intent(in) :: sfctmp !surface air temperature [k] - real , intent(in) :: sfcprs !pressure (pa) - real , intent(in) :: uu !wind speed in eastward dir (m/s) - real , intent(in) :: vv !wind speed in northward dir (m/s) - real , intent(in) :: q2 !mixing ratio (kg/kg) lowest model layer - real , intent(in) :: soldn !downward shortwave radiation (w/m2) - real , intent(in) :: prcp !precipitation rate (kg m-2 s-1) - real , intent(in) :: lwdn !downward longwave radiation (w/m2) - real , intent(in) :: tbot !bottom condition for soil temp. [k] - real , intent(in) :: zlvl !reference height (m) - real, dimension(-nsnow+1: 0), intent(in) :: ficeold!ice fraction at last timestep - real, dimension( 1:nsoil), intent(in) :: zsoil !layer-bottom depth from soil surf (m) + integer , intent(in) :: iloc !< grid index + integer , intent(in) :: jloc !< grid index + real (kind=kind_phys) , intent(in) :: cosz !< cosine solar zenith angle [0-1] + integer , intent(in) :: nsnow !< maximum no. of snow layers + integer , intent(in) :: nsoil !< no. of soil layers + real (kind=kind_phys) , intent(in) :: dt !< time step [sec] + real (kind=kind_phys) , intent(in) :: sfctmp !< surface air temperature [k] + real (kind=kind_phys) , intent(in) :: sfcprs !< pressure (pa) + real (kind=kind_phys) , intent(in) :: uu !< wind speed in eastward dir (m/s) + real (kind=kind_phys) , intent(in) :: vv !< wind speed in northward dir (m/s) + real (kind=kind_phys) , intent(in) :: q2 !< mixing ratio (kg/kg) lowest model layer + real (kind=kind_phys) , intent(in) :: soldn !< downward shortwave radiation (w/m2) + real (kind=kind_phys) , intent(in) :: prcp !< precipitation rate (kg m-2 s-1) + real (kind=kind_phys) , intent(in) :: lwdn !< downward longwave radiation (w/m2) + real (kind=kind_phys) , intent(in) :: tbot !< bottom condition for soil temp. [k] + real (kind=kind_phys) , intent(in) :: zlvl !< reference height (m) + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: ficeold!< ice fraction at last timestep + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: zsoil !< layer-bottom depth from soil surf (m) ! input/output : need arbitary intial values - real , intent(inout) :: qsnow !snowfall [mm/s] - real , intent(inout) :: sneqvo !snow mass at last time step (mm) - real , intent(inout) :: albold !snow albedo at last time step (class type) - real , intent(inout) :: cm !momentum drag coefficient - real , intent(inout) :: ch !sensible heat exchange coefficient + real (kind=kind_phys) , intent(inout) :: qsnow !< snowfall [mm/s] + real (kind=kind_phys) , intent(inout) :: sneqvo !< snow mass at last time step (mm) + real (kind=kind_phys) , intent(inout) :: albold !< snow albedo at last time step (class type) + real (kind=kind_phys) , intent(inout) :: cm !< momentum drag coefficient + real (kind=kind_phys) , intent(inout) :: ch !< sensible heat exchange coefficient ! prognostic variables - integer , intent(inout) :: isnow !actual no. of snow layers [-] - real , intent(inout) :: sneqv !snow water eqv. [mm] - real, dimension( 1:nsoil), intent(inout) :: smc !soil moisture (ice + liq.) [m3/m3] - real, dimension(-nsnow+1:nsoil), intent(inout) :: zsnso !layer-bottom depth from snow surf [m] - real , intent(inout) :: snowh !snow height [m] - real, dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] - real, dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] - real , intent(inout) :: tg !ground temperature (k) - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow/soil temperature [k] - real, dimension( 1:nsoil), intent(inout) :: sh2o !liquid soil moisture [m3/m3] - real , intent(inout) :: tauss !non-dimensional snow age - real , intent(inout) :: qsfc !mixing ratio at lowest model layer + integer , intent(inout) :: isnow !< actual no. of snow layers [-] + real (kind=kind_phys) , intent(inout) :: sneqv !< snow water eqv. [mm] + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: smc !< soil moisture (ice + liq.) [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: zsnso !< layer-bottom depth from snow surf [m] + real (kind=kind_phys) , intent(inout) :: snowh !< snow height [m] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snice !< snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snliq !< snow layer liquid water [mm] + real (kind=kind_phys) , intent(inout) :: tg !< ground temperature (k) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !< snow/soil temperature [k] + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sh2o !< liquid soil moisture [m3/m3] + real (kind=kind_phys) , intent(inout) :: tauss !< non-dimensional snow age + real (kind=kind_phys) , intent(inout) :: qsfc !< mixing ratio at lowest model layer ! output - real , intent(out) :: fsa !total absorbed solar radiation (w/m2) - real , intent(out) :: fsr !total reflected solar radiation (w/m2) - real , intent(out) :: fira !total net lw rad (w/m2) [+ to atm] - real , intent(out) :: fsh !total sensible heat (w/m2) [+ to atm] - real , intent(out) :: fgev !ground evap heat (w/m2) [+ to atm] - real , intent(out) :: ssoil !ground heat flux (w/m2) [+ to soil] - real , intent(out) :: trad !surface radiative temperature (k) - real , intent(out) :: edir !soil surface evaporation rate (mm/s] - real , intent(out) :: runsrf !surface runoff [mm/s] - real , intent(out) :: runsub !baseflow (saturation excess) [mm/s] - real , intent(out) :: sag !solar rad absorbed by ground (w/m2) - real , intent(out) :: albedo !surface albedo [-] - real , intent(out) :: qsnbot !snowmelt [mm/s] - real , intent(out) :: ponding!surface ponding [mm] - real , intent(out) :: ponding1!surface ponding [mm] - real , intent(out) :: ponding2!surface ponding [mm] - real , intent(out) :: t2m !2-m air temperature over bare ground part [k] - real , intent(out) :: q2e - real , intent(out) :: emissi - real , intent(out) :: fpice - real , intent(out) :: ch2b - real , intent(out) :: esnow + real (kind=kind_phys) , intent(out) :: fsa !< total absorbed solar radiation (w/m2) + real (kind=kind_phys) , intent(out) :: fsr !< total reflected solar radiation (w/m2) + real (kind=kind_phys) , intent(out) :: fira !< total net lw rad (w/m2) [+ to atm] + real (kind=kind_phys) , intent(out) :: fsh !< total sensible heat (w/m2) [+ to atm] + real (kind=kind_phys) , intent(out) :: fgev !< ground evap heat (w/m2) [+ to atm] + real (kind=kind_phys) , intent(out) :: ssoil !< ground heat flux (w/m2) [+ to soil] + real (kind=kind_phys) , intent(out) :: trad !< surface radiative temperature (k) + real (kind=kind_phys) , intent(out) :: edir !< soil surface evaporation rate (mm/s] + real (kind=kind_phys) , intent(out) :: runsrf !< surface runoff [mm/s] + real (kind=kind_phys) , intent(out) :: runsub !< baseflow (saturation excess) [mm/s] + real (kind=kind_phys) , intent(out) :: sag !< solar rad absorbed by ground (w/m2) + real (kind=kind_phys) , intent(out) :: albedo !< surface albedo [-] + real (kind=kind_phys) , intent(out) :: qsnbot !< snowmelt [mm/s] + real (kind=kind_phys) , intent(out) :: ponding!< surface ponding [mm] + real (kind=kind_phys) , intent(out) :: ponding1!< surface ponding [mm] + real (kind=kind_phys) , intent(out) :: ponding2!< surface ponding [mm] + real (kind=kind_phys) , intent(out) :: t2m !< 2-m air temperature over bare ground part [k] + real (kind=kind_phys) , intent(out) :: q2e + real (kind=kind_phys) , intent(out) :: emissi + real (kind=kind_phys) , intent(out) :: fpice + real (kind=kind_phys) , intent(out) :: ch2b + real (kind=kind_phys) , intent(out) :: esnow + real (kind=kind_phys), dimension(1:2) , intent(out) :: albsnd !< snow albedo (direct) + real (kind=kind_phys), dimension(1:2) , intent(out) :: albsni !< snow albedo (diffuse) + #ifdef CCPP character(len=*), intent(inout) :: errmsg @@ -251,26 +212,26 @@ subroutine noahmp_glacier (& #endif ! local - integer :: iz !do-loop index - integer, dimension(-nsnow+1:nsoil) :: imelt !phase change index [1-melt; 2-freeze] - real :: rhoair !density air (kg/m3) - real, dimension(-nsnow+1:nsoil) :: dzsnso !snow/soil layer thickness [m] - real :: thair !potential temperature (k) - real :: qair !specific humidity (kg/kg) (q2/(1+q2)) - real :: eair !vapor pressure air (pa) - real, dimension( 1: 2) :: solad !incoming direct solar rad (w/m2) - real, dimension( 1: 2) :: solai !incoming diffuse solar rad (w/m2) - real, dimension( 1:nsoil) :: sice !soil ice content (m3/m3) - real, dimension(-nsnow+1: 0) :: snicev !partial volume ice of snow [m3/m3] - real, dimension(-nsnow+1: 0) :: snliqv !partial volume liq of snow [m3/m3] - real, dimension(-nsnow+1: 0) :: epore !effective porosity [m3/m3] - real :: qdew !ground surface dew rate [mm/s] - real :: qvap !ground surface evap. rate [mm/s] - real :: lathea !latent heat [j/kg] - real :: qmelt !internal pack melt - real :: swdown !downward solar [w/m2] - real :: beg_wb !beginning water for error check - real :: zbot = -8.0 + integer :: iz !< do-loop index + integer, dimension(-nsnow+1:nsoil) :: imelt !< phase change index [1-melt; 2-freeze] + real (kind=kind_phys) :: rhoair !< density air (kg/m3) + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: dzsnso !< snow/soil layer thickness [m] + real (kind=kind_phys) :: thair !< potential temperature (k) + real (kind=kind_phys) :: qair !< specific humidity (kg/kg) (q2/(1+q2)) + real (kind=kind_phys) :: eair !< vapor pressure air (pa) + real (kind=kind_phys), dimension( 1: 2) :: solad !< incoming direct solar rad (w/m2) + real (kind=kind_phys), dimension( 1: 2) :: solai !< incoming diffuse solar rad (w/m2) + real (kind=kind_phys), dimension( 1:nsoil) :: sice !< soil ice content (m3/m3) + real (kind=kind_phys), dimension(-nsnow+1: 0) :: snicev !< partial volume ice of snow [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1: 0) :: snliqv !< partial volume liq of snow [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1: 0) :: epore !< effective porosity [m3/m3] + real (kind=kind_phys) :: qdew !< ground surface dew rate [mm/s] + real (kind=kind_phys) :: qvap !< ground surface evap. rate [mm/s] + real (kind=kind_phys) :: lathea !< latent heat [j/kg] + real (kind=kind_phys) :: qmelt !< internal pack melt + real (kind=kind_phys) :: swdown !< downward solar [w/m2] + real (kind=kind_phys) :: beg_wb !< beginning water for error check + real (kind=kind_phys) :: zbot = -8.0 character*256 message @@ -307,7 +268,8 @@ subroutine noahmp_glacier (& #endif imelt ,snicev ,snliqv ,epore ,qmelt ,ponding, & !out sag ,fsa ,fsr ,fira ,fsh ,fgev , & !out - trad ,t2m ,ssoil ,lathea ,q2e ,emissi, ch2b ) !out + trad ,t2m ,ssoil ,lathea ,q2e ,emissi, & !out + ch2b ,albsnd ,albsni ) !out #ifdef CCPP if (errflg /= 0) return @@ -325,10 +287,15 @@ subroutine noahmp_glacier (& call water_glacier (nsnow ,nsoil ,imelt ,dt ,prcp ,sfctmp , & !in qvap ,qdew ,ficeold,zsoil , & !in isnow ,snowh ,sneqv ,snice ,snliq ,stc , & !inout - dzsnso ,sh2o ,sice ,ponding,zsnso , & !inout + dzsnso ,sh2o ,sice ,ponding,zsnso ,fsh , & !inout runsrf ,runsub ,qsnow ,ponding1 ,ponding2,qsnbot,fpice,esnow & !out ) + if(opt_gla == 2) then + edir = qvap - qdew + fgev = edir * lathea + end if + ! if(maxval(sice) < 0.0001) then ! write(message,*) "glacier has melted at:",iloc,jloc," are you sure this should be a glacier point?" ! call wrf_debug(10,trim(message)) @@ -363,6 +330,7 @@ subroutine noahmp_glacier (& end subroutine noahmp_glacier ! ================================================================================================== !>\ingroup NoahMP_LSM +!! re-process atmospheric forcing subroutine atm_glacier (sfcprs ,sfctmp ,q2 ,soldn ,cosz ,thair , & qair ,eair ,rhoair ,solad ,solai , & swdown ) @@ -373,25 +341,25 @@ subroutine atm_glacier (sfcprs ,sfctmp ,q2 ,soldn ,cosz ,thair , & ! -------------------------------------------------------------------------------------------------- ! inputs - real , intent(in) :: sfcprs !pressure (pa) - real , intent(in) :: sfctmp !surface air temperature [k] - real , intent(in) :: q2 !mixing ratio (kg/kg) - real , intent(in) :: soldn !downward shortwave radiation (w/m2) - real , intent(in) :: cosz !cosine solar zenith angle [0-1] + real (kind=kind_phys) , intent(in) :: sfcprs !< pressure (pa) + real (kind=kind_phys) , intent(in) :: sfctmp !< surface air temperature [k] + real (kind=kind_phys) , intent(in) :: q2 !< mixing ratio (kg/kg) + real (kind=kind_phys) , intent(in) :: soldn !< downward shortwave radiation (w/m2) + real (kind=kind_phys) , intent(in) :: cosz !< cosine solar zenith angle [0-1] ! outputs - real , intent(out) :: thair !potential temperature (k) - real , intent(out) :: qair !specific humidity (kg/kg) (q2/(1+q2)) - real , intent(out) :: eair !vapor pressure air (pa) - real, dimension( 1: 2), intent(out) :: solad !incoming direct solar radiation (w/m2) - real, dimension( 1: 2), intent(out) :: solai !incoming diffuse solar radiation (w/m2) - real , intent(out) :: rhoair !density air (kg/m3) - real , intent(out) :: swdown !downward solar filtered by sun angle [w/m2] + real (kind=kind_phys) , intent(out) :: thair !< potential temperature (k) + real (kind=kind_phys) , intent(out) :: qair !< specific humidity (kg/kg) (q2/(1+q2)) + real (kind=kind_phys) , intent(out) :: eair !< vapor pressure air (pa) + real (kind=kind_phys), dimension( 1: 2), intent(out) :: solad !< incoming direct solar radiation (w/m2) + real (kind=kind_phys), dimension( 1: 2), intent(out) :: solai !< incoming diffuse solar radiation (w/m2) + real (kind=kind_phys) , intent(out) :: rhoair !< density air (kg/m3) + real (kind=kind_phys) , intent(out) :: swdown !< downward solar filtered by sun angle [w/m2] !locals - real :: pair !atm bottom level pressure (pa) + real (kind=kind_phys) :: pair !< atm bottom level pressure (pa) ! -------------------------------------------------------------------------------------------------- pair = sfcprs ! atm bottom level pressure (pa) @@ -430,7 +398,8 @@ subroutine energy_glacier (nsnow ,nsoil ,isnow ,dt ,qsnow ,rhoair , & !i #endif imelt ,snicev ,snliqv ,epore ,qmelt ,ponding, & !out sag ,fsa ,fsr ,fira ,fsh ,fgev , & !out - trad ,t2m ,ssoil ,lathea ,q2e ,emissi, ch2b ) !out + trad ,t2m ,ssoil ,lathea ,q2e ,emissi, & !out + ch2b ,albsnd ,albsni ) !out ! -------------------------------------------------------------------------------------------------- ! -------------------------------------------------------------------------------------------------- @@ -440,43 +409,43 @@ subroutine energy_glacier (nsnow ,nsoil ,isnow ,dt ,qsnow ,rhoair , & !i implicit none ! -------------------------------------------------------------------------------------------------- ! inputs - integer , intent(in) :: nsnow !maximum no. of snow layers - integer , intent(in) :: nsoil !number of soil layers - integer , intent(in) :: isnow !actual no. of snow layers - real , intent(in) :: dt !time step [sec] - real , intent(in) :: qsnow !snowfall on the ground (mm/s) - real , intent(in) :: rhoair !density air (kg/m3) - real , intent(in) :: eair !vapor pressure air (pa) - real , intent(in) :: sfcprs !pressure (pa) - real , intent(in) :: qair !specific humidity (kg/kg) - real , intent(in) :: sfctmp !air temperature (k) - real , intent(in) :: lwdn !downward longwave radiation (w/m2) - real , intent(in) :: uu !wind speed in e-w dir (m/s) - real , intent(in) :: vv !wind speed in n-s dir (m/s) - real , dimension( 1: 2), intent(in) :: solad !incoming direct solar rad. (w/m2) - real , dimension( 1: 2), intent(in) :: solai !incoming diffuse solar rad. (w/m2) - real , intent(in) :: cosz !cosine solar zenith angle (0-1) - real , intent(in) :: zref !reference height (m) - real , intent(in) :: tbot !bottom condition for soil temp. (k) - real , intent(in) :: zbot !depth for tbot [m] - real , dimension(-nsnow+1:nsoil), intent(in) :: zsnso !layer-bottom depth from snow surf [m] - real , dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !depth of snow & soil layer-bottom [m] + integer , intent(in) :: nsnow !< maximum no. of snow layers + integer , intent(in) :: nsoil !< number of soil layers + integer , intent(in) :: isnow !< actual no. of snow layers + real (kind=kind_phys) , intent(in) :: dt !< time step [sec] + real (kind=kind_phys) , intent(in) :: qsnow !< snowfall on the ground (mm/s) + real (kind=kind_phys) , intent(in) :: rhoair !< density air (kg/m3) + real (kind=kind_phys) , intent(in) :: eair !< vapor pressure air (pa) + real (kind=kind_phys) , intent(in) :: sfcprs !< pressure (pa) + real (kind=kind_phys) , intent(in) :: qair !< specific humidity (kg/kg) + real (kind=kind_phys) , intent(in) :: sfctmp !< air temperature (k) + real (kind=kind_phys) , intent(in) :: lwdn !< downward longwave radiation (w/m2) + real (kind=kind_phys) , intent(in) :: uu !< wind speed in e-w dir (m/s) + real (kind=kind_phys) , intent(in) :: vv !< wind speed in n-s dir (m/s) + real (kind=kind_phys) , dimension( 1: 2), intent(in) :: solad !< incoming direct solar rad. (w/m2) + real (kind=kind_phys) , dimension( 1: 2), intent(in) :: solai !< incoming diffuse solar rad. (w/m2) + real (kind=kind_phys) , intent(in) :: cosz !< cosine solar zenith angle (0-1) + real (kind=kind_phys) , intent(in) :: zref !< reference height (m) + real (kind=kind_phys) , intent(in) :: tbot !< bottom condition for soil temp. (k) + real (kind=kind_phys) , intent(in) :: zbot !< depth for tbot [m] + real (kind=kind_phys) , dimension(-nsnow+1:nsoil), intent(in) :: zsnso !< layer-bottom depth from snow surf [m] + real (kind=kind_phys) , dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !< depth of snow & soil layer-bottom [m] ! input & output - real , intent(inout) :: tg !ground temperature (k) - real , dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow/soil temperature [k] - real , intent(inout) :: snowh !snow height [m] - real , intent(inout) :: sneqv !snow mass (mm) - real , intent(inout) :: sneqvo !snow mass at last time step (mm) - real , dimension( 1:nsoil), intent(inout) :: sh2o !liquid soil moisture [m3/m3] - real , dimension( 1:nsoil), intent(inout) :: smc !soil moisture (ice + liq.) [m3/m3] - real , dimension(-nsnow+1: 0), intent(inout) :: snice !snow ice mass (kg/m2) - real , dimension(-nsnow+1: 0), intent(inout) :: snliq !snow liq mass (kg/m2) - real , intent(inout) :: albold !snow albedo at last time step(class type) - real , intent(inout) :: cm !momentum drag coefficient - real , intent(inout) :: ch !sensible heat exchange coefficient - real , intent(inout) :: tauss !snow aging factor - real , intent(inout) :: qsfc !mixing ratio at lowest model layer + real (kind=kind_phys) , intent(inout) :: tg !< ground temperature (k) + real (kind=kind_phys) , dimension(-nsnow+1:nsoil), intent(inout) :: stc !< snow/soil temperature [k] + real (kind=kind_phys) , intent(inout) :: snowh !< snow height [m] + real (kind=kind_phys) , intent(inout) :: sneqv !< snow mass (mm) + real (kind=kind_phys) , intent(inout) :: sneqvo !< snow mass at last time step (mm) + real (kind=kind_phys) , dimension( 1:nsoil), intent(inout) :: sh2o !< liquid soil moisture [m3/m3] + real (kind=kind_phys) , dimension( 1:nsoil), intent(inout) :: smc !< soil moisture (ice + liq.) [m3/m3] + real (kind=kind_phys) , dimension(-nsnow+1: 0), intent(inout) :: snice !< snow ice mass (kg/m2) + real (kind=kind_phys) , dimension(-nsnow+1: 0), intent(inout) :: snliq !< snow liq mass (kg/m2) + real (kind=kind_phys) , intent(inout) :: albold !< snow albedo at last time step(class type) + real (kind=kind_phys) , intent(inout) :: cm !< momentum drag coefficient + real (kind=kind_phys) , intent(inout) :: ch !< sensible heat exchange coefficient + real (kind=kind_phys) , intent(inout) :: tauss !< snow aging factor + real (kind=kind_phys) , intent(inout) :: qsfc !< mixing ratio at lowest model layer #ifdef CCPP character(len=*) , intent(inout) :: errmsg @@ -484,40 +453,42 @@ subroutine energy_glacier (nsnow ,nsoil ,isnow ,dt ,qsnow ,rhoair , & !i #endif ! outputs - integer, dimension(-nsnow+1:nsoil), intent(out) :: imelt !phase change index [1-melt; 2-freeze] - real , dimension(-nsnow+1: 0), intent(out) :: snicev !partial volume ice [m3/m3] - real , dimension(-nsnow+1: 0), intent(out) :: snliqv !partial volume liq. water [m3/m3] - real , dimension(-nsnow+1: 0), intent(out) :: epore !effective porosity [m3/m3] - real , intent(out) :: qmelt !snowmelt [mm/s] - real , intent(out) :: ponding!pounding at ground [mm] - real , intent(out) :: sag !solar rad. absorbed by ground (w/m2) - real , intent(out) :: fsa !tot. absorbed solar radiation (w/m2) - real , intent(out) :: fsr !tot. reflected solar radiation (w/m2) - real , intent(out) :: fira !total net lw. rad (w/m2) [+ to atm] - real , intent(out) :: fsh !total sensible heat (w/m2) [+ to atm] - real , intent(out) :: fgev !ground evaporation (w/m2) [+ to atm] - real , intent(out) :: trad !radiative temperature (k) - real , intent(out) :: t2m !2 m height air temperature (k) - real , intent(out) :: ssoil !ground heat flux (w/m2) [+ to soil] - real , intent(out) :: lathea !latent heat vap./sublimation (j/kg) - real , intent(out) :: q2e - real , intent(out) :: emissi - real , intent(out) :: ch2b !sensible heat conductance, canopy air to zlvl air (m/s) + integer, dimension(-nsnow+1:nsoil), intent(out) :: imelt !< phase change index [1-melt; 2-freeze] + real (kind=kind_phys) , dimension(-nsnow+1: 0), intent(out) :: snicev !< partial volume ice [m3/m3] + real (kind=kind_phys) , dimension(-nsnow+1: 0), intent(out) :: snliqv !< partial volume liq. water [m3/m3] + real (kind=kind_phys) , dimension(-nsnow+1: 0), intent(out) :: epore !< effective porosity [m3/m3] + real (kind=kind_phys) , intent(out) :: qmelt !< snowmelt [mm/s] + real (kind=kind_phys) , intent(out) :: ponding!< pounding at ground [mm] + real (kind=kind_phys) , intent(out) :: sag !< solar rad. absorbed by ground (w/m2) + real (kind=kind_phys) , intent(out) :: fsa !< tot. absorbed solar radiation (w/m2) + real (kind=kind_phys) , intent(out) :: fsr !< tot. reflected solar radiation (w/m2) + real (kind=kind_phys) , intent(out) :: fira !< total net lw. rad (w/m2) [+ to atm] + real (kind=kind_phys) , intent(out) :: fsh !< total sensible heat (w/m2) [+ to atm] + real (kind=kind_phys) , intent(out) :: fgev !< ground evaporation (w/m2) [+ to atm] + real (kind=kind_phys) , intent(out) :: trad !< radiative temperature (k) + real (kind=kind_phys) , intent(out) :: t2m !< 2 m height air temperature (k) + real (kind=kind_phys) , intent(out) :: ssoil !< ground heat flux (w/m2) [+ to soil] + real (kind=kind_phys) , intent(out) :: lathea !< latent heat vap./sublimation (j/kg) + real (kind=kind_phys) , intent(out) :: q2e + real (kind=kind_phys) , intent(out) :: emissi + real (kind=kind_phys) , intent(out) :: ch2b !< sensible heat conductance, canopy air to zlvl air (m/s) + real (kind=kind_phys), dimension(1:2) , intent(out) :: albsnd !< snow albedo (direct) + real (kind=kind_phys), dimension(1:2) , intent(out) :: albsni !< snow albedo (diffuse) ! local - real :: ur !wind speed at height zlvl (m/s) - real :: zlvl !reference height (m) - real :: rsurf !ground surface resistance (s/m) - real :: zpd !zero plane displacement (m) - real :: z0mg !z0 momentum, ground (m) - real :: emg !ground emissivity - real :: fire !emitted ir (w/m2) - real, dimension(-nsnow+1:nsoil) :: fact !temporary used in phase change - real, dimension(-nsnow+1:nsoil) :: df !thermal conductivity [w/m/k] - real, dimension(-nsnow+1:nsoil) :: hcpct !heat capacity [j/m3/k] - real :: gamma !psychrometric constant (pa/k) - real :: rhsur !raltive humidity in surface soil/snow air space (-) + real (kind=kind_phys) :: ur !< wind speed at height zlvl (m/s) + real (kind=kind_phys) :: zlvl !< reference height (m) + real (kind=kind_phys) :: rsurf !< ground surface resistance (s/m) + real (kind=kind_phys) :: zpd !< zero plane displacement (m) + real (kind=kind_phys) :: z0mg !< z0 momentum, ground (m) + real (kind=kind_phys) :: emg !< ground emissivity + real (kind=kind_phys) :: fire !< emitted ir (w/m2) + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: fact !< temporary used in phase change + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: df !< thermal conductivity [w/m/k] + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: hcpct !< heat capacity [j/m3/k] + real (kind=kind_phys) :: gamma !< psychrometric constant (pa/k) + real (kind=kind_phys) :: rhsur !< raltive humidity in surface soil/snow air space (-) ! --------------------------------------------------------------------------------------------------- @@ -544,7 +515,7 @@ subroutine energy_glacier (nsnow ,nsoil ,isnow ,dt ,qsnow ,rhoair , & !i call radiation_glacier (dt ,tg ,sneqvo ,sneqv ,cosz , & !in qsnow ,solad ,solai , & !in albold ,tauss , & !inout - sag ,fsr ,fsa) !out + sag ,fsr ,fsa , albsnd ,albsni) !out ! vegetation and ground emissivity @@ -609,7 +580,7 @@ subroutine energy_glacier (nsnow ,nsoil ,isnow ,dt ,qsnow ,rhoair , & !i if (snowh > 0.05 .and. tg > tfrz) tg = tfrz end if -! energy released or consumed by snow & frozen soil +! energy released or consumed by snow & ice call phasechange_glacier (nsnow ,nsoil ,isnow ,dt ,fact , & !in dzsnso , & !in @@ -630,29 +601,29 @@ subroutine thermoprop_glacier (nsoil ,nsnow ,isnow ,dzsnso , & !in implicit none ! -------------------------------------------------------------------------------------------------- ! inputs - integer , intent(in) :: nsoil !number of soil layers - integer , intent(in) :: nsnow !maximum no. of snow layers - integer , intent(in) :: isnow !actual no. of snow layers - real , intent(in) :: dt !time step [s] - real, dimension(-nsnow+1: 0), intent(in) :: snice !snow ice mass (kg/m2) - real, dimension(-nsnow+1: 0), intent(in) :: snliq !snow liq mass (kg/m2) - real, dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !thickness of snow/soil layers [m] - real , intent(in) :: snowh !snow height [m] + integer , intent(in) :: nsoil !< number of soil layers + integer , intent(in) :: nsnow !< maximum no. of snow layers + integer , intent(in) :: isnow !< actual no. of snow layers + real (kind=kind_phys) , intent(in) :: dt !< time step [s] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: snice !< snow ice mass (kg/m2) + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: snliq !< snow liq mass (kg/m2) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !< thickness of snow/soil layers [m] + real (kind=kind_phys) , intent(in) :: snowh !< snow height [m] ! outputs - real, dimension(-nsnow+1:nsoil), intent(out) :: df !thermal conductivity [w/m/k] - real, dimension(-nsnow+1:nsoil), intent(out) :: hcpct !heat capacity [j/m3/k] - real, dimension(-nsnow+1: 0), intent(out) :: snicev !partial volume of ice [m3/m3] - real, dimension(-nsnow+1: 0), intent(out) :: snliqv !partial volume of liquid water [m3/m3] - real, dimension(-nsnow+1: 0), intent(out) :: epore !effective porosity [m3/m3] - real, dimension(-nsnow+1:nsoil), intent(out) :: fact !computing energy for phase change + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(out) :: df !< thermal conductivity [w/m/k] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(out) :: hcpct !< heat capacity [j/m3/k] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(out) :: snicev !< partial volume of ice [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(out) :: snliqv !< partial volume of liquid water [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(out) :: epore !< effective porosity [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(out) :: fact !< computing energy for phase change ! -------------------------------------------------------------------------------------------------- ! locals integer :: iz, iz2 - real, dimension(-nsnow+1: 0) :: cvsno !volumetric specific heat (j/m3/k) - real, dimension(-nsnow+1: 0) :: tksno !snow thermal conductivity (j/m3/k) - real :: zmid !mid-point soil depth + real (kind=kind_phys), dimension(-nsnow+1: 0) :: cvsno !< volumetric specific heat (j/m3/k) + real (kind=kind_phys), dimension(-nsnow+1: 0) :: tksno !< snow thermal conductivity (j/m3/k) + real (kind=kind_phys) :: zmid !< mid-point soil depth ! -------------------------------------------------------------------------------------------------- ! compute snow thermal conductivity and heat capacity @@ -695,6 +666,7 @@ end subroutine thermoprop_glacier ! ================================================================================================== ! -------------------------------------------------------------------------------------------------- !>\ingroup NoahMP_LSM +!! snow bulk density, volumetric capacity, and thermal conductivity subroutine csnow_glacier (isnow ,nsnow ,nsoil ,snice ,snliq ,dzsnso , & !in tksno ,cvsno ,snicev ,snliqv ,epore ) !out ! -------------------------------------------------------------------------------------------------- @@ -704,25 +676,25 @@ subroutine csnow_glacier (isnow ,nsnow ,nsoil ,snice ,snliq ,dzsnso , !--------------------------------------------------------------------------------------------------- ! inputs - integer, intent(in) :: isnow !number of snow layers (-) - integer , intent(in) :: nsnow !maximum no. of snow layers - integer , intent(in) :: nsoil !number of soil layers - real, dimension(-nsnow+1: 0), intent(in) :: snice !snow ice mass (kg/m2) - real, dimension(-nsnow+1: 0), intent(in) :: snliq !snow liq mass (kg/m2) - real, dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer thickness [m] + integer, intent(in) :: isnow !< number of snow layers (-) + integer , intent(in) :: nsnow !< maximum no. of snow layers + integer , intent(in) :: nsoil !< number of soil layers + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: snice !< snow ice mass (kg/m2) + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: snliq !< snow liq mass (kg/m2) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !< snow/soil layer thickness [m] ! outputs - real, dimension(-nsnow+1: 0), intent(out) :: cvsno !volumetric specific heat (j/m3/k) - real, dimension(-nsnow+1: 0), intent(out) :: tksno !thermal conductivity (w/m/k) - real, dimension(-nsnow+1: 0), intent(out) :: snicev !partial volume of ice [m3/m3] - real, dimension(-nsnow+1: 0), intent(out) :: snliqv !partial volume of liquid water [m3/m3] - real, dimension(-nsnow+1: 0), intent(out) :: epore !effective porosity [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(out) :: cvsno !< volumetric specific heat (j/m3/k) + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(out) :: tksno !< thermal conductivity (w/m/k) + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(out) :: snicev !< partial volume of ice [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(out) :: snliqv !< partial volume of liquid water [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(out) :: epore !< effective porosity [m3/m3] ! locals integer :: iz - real, dimension(-nsnow+1: 0) :: bdsnoi !bulk density of snow(kg/m3) + real (kind=kind_phys), dimension(-nsnow+1: 0) :: bdsnoi !< bulk density of snow(kg/m3) !--------------------------------------------------------------------------------------------------- ! thermal capacity of snow @@ -755,42 +727,42 @@ end subroutine csnow_glacier subroutine radiation_glacier (dt ,tg ,sneqvo ,sneqv ,cosz , & !in qsnow ,solad ,solai , & !in albold ,tauss , & !inout - sag ,fsr ,fsa) !out + sag ,fsr ,fsa,albsnd ,albsni) !out ! -------------------------------------------------------------------------------------------------- implicit none ! -------------------------------------------------------------------------------------------------- ! input - real, intent(in) :: dt !time step [s] - real, intent(in) :: tg !ground temperature (k) - real, intent(in) :: sneqvo !snow mass at last time step(mm) - real, intent(in) :: sneqv !snow mass (mm) - real, intent(in) :: cosz !cosine solar zenith angle (0-1) - real, intent(in) :: qsnow !snowfall (mm/s) - real, dimension(1:2) , intent(in) :: solad !incoming direct solar radiation (w/m2) - real, dimension(1:2) , intent(in) :: solai !incoming diffuse solar radiation (w/m2) + real (kind=kind_phys), intent(in) :: dt !< time step [s] + real (kind=kind_phys), intent(in) :: tg !< ground temperature (k) + real (kind=kind_phys), intent(in) :: sneqvo !< snow mass at last time step(mm) + real (kind=kind_phys), intent(in) :: sneqv !< snow mass (mm) + real (kind=kind_phys), intent(in) :: cosz !< cosine solar zenith angle (0-1) + real (kind=kind_phys), intent(in) :: qsnow !< snowfall (mm/s) + real (kind=kind_phys), dimension(1:2) , intent(in) :: solad !< incoming direct solar radiation (w/m2) + real (kind=kind_phys), dimension(1:2) , intent(in) :: solai !< incoming diffuse solar radiation (w/m2) ! inout - real, intent(inout) :: albold !snow albedo at last time step (class type) - real, intent(inout) :: tauss !non-dimensional snow age + real (kind=kind_phys), intent(inout) :: albold !< snow albedo at last time step (class type) + real (kind=kind_phys), intent(inout) :: tauss !< non-dimensional snow age + real (kind=kind_phys), dimension(1:2) :: albsnd !< snow albedo (direct) + real (kind=kind_phys), dimension(1:2) :: albsni !< snow albedo (diffuse) ! output - real, intent(out) :: sag !solar radiation absorbed by ground (w/m2) - real, intent(out) :: fsr !total reflected solar radiation (w/m2) - real, intent(out) :: fsa !total absorbed solar radiation (w/m2) + real (kind=kind_phys), intent(out) :: sag !< solar radiation absorbed by ground (w/m2) + real (kind=kind_phys), intent(out) :: fsr !< total reflected solar radiation (w/m2) + real (kind=kind_phys), intent(out) :: fsa !< total absorbed solar radiation (w/m2) ! local - integer :: ib !number of radiation bands - integer :: nband !number of radiation bands - real :: fage !snow age function (0 - new snow) - real, dimension(1:2) :: albsnd !snow albedo (direct) - real, dimension(1:2) :: albsni !snow albedo (diffuse) - real :: alb !current class albedo - real :: abs !temporary absorbed rad - real :: ref !temporary reflected rad - real :: fsno !snow-cover fraction, = 1 if any snow - real, dimension(1:2) :: albice !albedo land ice: 1=vis, 2=nir - - real,parameter :: mpe = 1.e-6 + integer :: ib !< number of radiation bands + integer :: nband !< number of radiation bands + real (kind=kind_phys) :: fage !< snow age function (0 - new snow) + real (kind=kind_phys) :: alb !< current class albedo + real (kind=kind_phys) :: abs !< temporary absorbed rad + real (kind=kind_phys) :: ref !< temporary reflected rad + real (kind=kind_phys) :: fsno !< snow-cover fraction, = 1 if any snow + real (kind=kind_phys), dimension(1:2) :: albice !< albedo land ice: 1=vis, 2=nir + + real (kind=kind_phys),parameter :: mpe = 1.e-6 ! -------------------------------------------------------------------------------------------------- @@ -850,27 +822,27 @@ subroutine snow_age_glacier (dt,tg,sneqvo,sneqv,tauss,fage) ! from bats ! ------------------------ input/output variables -------------------------------------------------- !input - real, intent(in) :: dt !main time step (s) - real, intent(in) :: tg !ground temperature (k) - real, intent(in) :: sneqvo !snow mass at last time step(mm) - real, intent(in) :: sneqv !snow water per unit ground area (mm) + real (kind=kind_phys), intent(in) :: dt !< main time step (s) + real (kind=kind_phys), intent(in) :: tg !< ground temperature (k) + real (kind=kind_phys), intent(in) :: sneqvo !< snow mass at last time step(mm) + real (kind=kind_phys), intent(in) :: sneqv !< snow water per unit ground area (mm) ! inout - real, intent(inout) :: tauss !non-dimensional snow age + real (kind=kind_phys), intent(inout) :: tauss !< non-dimensional snow age !output - real, intent(out) :: fage !snow age + real (kind=kind_phys), intent(out) :: fage !< snow age !local - real :: tage !total aging effects - real :: age1 !effects of grain growth due to vapor diffusion - real :: age2 !effects of grain growth at freezing of melt water - real :: age3 !effects of soot - real :: dela !temporary variable - real :: sge !temporary variable - real :: dels !temporary variable - real :: dela0 !temporary variable - real :: arg !temporary variable + real (kind=kind_phys) :: tage !< total aging effects + real (kind=kind_phys) :: age1 !< effects of grain growth due to vapor diffusion + real (kind=kind_phys) :: age2 !< effects of grain growth at freezing of melt water + real (kind=kind_phys) :: age3 !< effects of soot + real (kind=kind_phys) :: dela !< temporary variable + real (kind=kind_phys) :: sge !< temporary variable + real (kind=kind_phys) :: dels !< temporary variable + real (kind=kind_phys) :: dela0 !< temporary variable + real (kind=kind_phys) :: arg !< temporary variable ! see yang et al. (1997) j.of climate for detail. !--------------------------------------------------------------------------------------------------- @@ -904,26 +876,26 @@ subroutine snowalb_bats_glacier (nband,cosz,fage,albsnd,albsni) ! -------------------------------------------------------------------------------------------------- ! input - integer,intent(in) :: nband !number of waveband classes + integer,intent(in) :: nband !< number of waveband classes - real,intent(in) :: cosz !cosine solar zenith angle - real,intent(in) :: fage !snow age correction + real (kind=kind_phys),intent(in) :: cosz !< cosine solar zenith angle + real (kind=kind_phys),intent(in) :: fage !< snow age correction ! output - real, dimension(1:2),intent(out) :: albsnd !snow albedo for direct(1=vis, 2=nir) - real, dimension(1:2),intent(out) :: albsni !snow albedo for diffuse + real (kind=kind_phys), dimension(1:2),intent(out) :: albsnd !< snow albedo for direct(1=vis, 2=nir) + real (kind=kind_phys), dimension(1:2),intent(out) :: albsni !< snow albedo for diffuse ! --------------------------------------------------------------------------------------------- - real :: fzen !zenith angle correction - real :: cf1 !temperary variable - real :: sl2 !2.*sl - real :: sl1 !1/sl - real :: sl !adjustable parameter - real, parameter :: c1 = 0.2 !default in bats - real, parameter :: c2 = 0.5 !default in bats -! real, parameter :: c1 = 0.2 * 2. ! double the default to match sleepers river's -! real, parameter :: c2 = 0.5 * 2. ! snow surface albedo (double aging effects) + real (kind=kind_phys) :: fzen !< zenith angle correction + real (kind=kind_phys) :: cf1 !< temperary variable + real (kind=kind_phys) :: sl2 !< 2.*sl + real (kind=kind_phys) :: sl1 !< 1/sl + real (kind=kind_phys) :: sl !< adjustable parameter + real (kind=kind_phys), parameter :: c1 = 0.2 !< default in bats + real (kind=kind_phys), parameter :: c2 = 0.5 !< default in bats +! real (kind=kind_phys), parameter :: c1 = 0.2 * 2. !< double the default to match sleepers river's +! real (kind=kind_phys), parameter :: c2 = 0.5 * 2. !< snow surface albedo (double aging effects) ! --------------------------------------------------------------------------------------------- ! zero albedos for all points @@ -954,19 +926,19 @@ subroutine snowalb_class_glacier (nband,qsnow,dt,alb,albold,albsnd,albsni) ! -------------------------------------------------------------------------------------------------- ! input - integer,intent(in) :: nband !number of waveband classes + integer,intent(in) :: nband !< number of waveband classes - real,intent(in) :: qsnow !snowfall (mm/s) - real,intent(in) :: dt !time step (sec) - real,intent(in) :: albold !snow albedo at last time step + real (kind=kind_phys),intent(in) :: qsnow !< snowfall (mm/s) + real (kind=kind_phys),intent(in) :: dt !< time step (sec) + real (kind=kind_phys),intent(in) :: albold !< snow albedo at last time step ! in & out - real, intent(inout) :: alb ! + real (kind=kind_phys), intent(inout) :: alb ! ! output - real, dimension(1:2),intent(out) :: albsnd !snow albedo for direct(1=vis, 2=nir) - real, dimension(1:2),intent(out) :: albsni !snow albedo for diffuse + real (kind=kind_phys), dimension(1:2),intent(out) :: albsnd !< snow albedo for direct(1=vis, 2=nir) + real (kind=kind_phys), dimension(1:2),intent(out) :: albsni !< snow albedo for diffuse ! --------------------------------------------------------------------------------------------- ! --------------------------------------------------------------------------------------------- @@ -994,6 +966,8 @@ subroutine snowalb_class_glacier (nband,qsnow,dt,alb,albold,albsnd,albsni) end subroutine snowalb_class_glacier ! ================================================================================================== !>\ingroup NoahMP_LSM +!! use newton-raphson iteration to solve ground (tg) temperature +!! that balances the surface energy budgets for glacier. subroutine glacier_flux (nsoil ,nsnow ,emg ,isnow ,df ,dzsnso ,z0m , & !in zlvl ,zpd ,qair ,sfctmp ,rhoair ,sfcprs , & !in ur ,gamma ,rsurf ,lwdn ,rhsur ,smc , & !in @@ -1018,37 +992,37 @@ subroutine glacier_flux (nsoil ,nsnow ,emg ,isnow ,df ,dzsnso ,z implicit none ! ---------------------------------------------------------------------- ! input - integer, intent(in) :: nsnow !maximum no. of snow layers - integer, intent(in) :: nsoil !number of soil layers - real, intent(in) :: emg !ground emissivity - integer, intent(in) :: isnow !actual no. of snow layers - real, dimension(-nsnow+1:nsoil), intent(in) :: df !thermal conductivity of snow/soil (w/m/k) - real, dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !thickness of snow/soil layers (m) - real, intent(in) :: z0m !roughness length, momentum, ground (m) - real, intent(in) :: zlvl !reference height (m) - real, intent(in) :: zpd !zero plane displacement (m) - real, intent(in) :: qair !specific humidity at height zlvl (kg/kg) - real, intent(in) :: sfctmp !air temperature at reference height (k) - real, intent(in) :: rhoair !density air (kg/m3) - real, intent(in) :: sfcprs !density air (kg/m3) - real, intent(in) :: ur !wind speed at height zlvl (m/s) - real, intent(in) :: gamma !psychrometric constant (pa/k) - real, intent(in) :: rsurf !ground surface resistance (s/m) - real, intent(in) :: lwdn !atmospheric longwave radiation (w/m2) - real, intent(in) :: rhsur !raltive humidity in surface soil/snow air space (-) - real, intent(in) :: eair !vapor pressure air at height (pa) - real, dimension(-nsnow+1:nsoil), intent(in) :: stc !soil/snow temperature (k) - real, dimension( 1:nsoil), intent(in) :: smc !soil moisture - real, dimension( 1:nsoil), intent(in) :: sh2o !soil liquid water - real, intent(in) :: sag !solar radiation absorbed by ground (w/m2) - real, intent(in) :: snowh !actual snow depth [m] - real, intent(in) :: lathea !latent heat of vaporization/subli (j/kg) + integer, intent(in) :: nsnow !< maximum no. of snow layers + integer, intent(in) :: nsoil !< number of soil layers + real (kind=kind_phys), intent(in) :: emg !< ground emissivity + integer, intent(in) :: isnow !< actual no. of snow layers + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: df !< thermal conductivity of snow/soil (w/m/k) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !< thickness of snow/soil layers (m) + real (kind=kind_phys), intent(in) :: z0m !< roughness length, momentum, ground (m) + real (kind=kind_phys), intent(in) :: zlvl !< reference height (m) + real (kind=kind_phys), intent(in) :: zpd !< zero plane displacement (m) + real (kind=kind_phys), intent(in) :: qair !< specific humidity at height zlvl (kg/kg) + real (kind=kind_phys), intent(in) :: sfctmp !< air temperature at reference height (k) + real (kind=kind_phys), intent(in) :: rhoair !< density air (kg/m3) + real (kind=kind_phys), intent(in) :: sfcprs !< density air (kg/m3) + real (kind=kind_phys), intent(in) :: ur !< wind speed at height zlvl (m/s) + real (kind=kind_phys), intent(in) :: gamma !< psychrometric constant (pa/k) + real (kind=kind_phys), intent(in) :: rsurf !< ground surface resistance (s/m) + real (kind=kind_phys), intent(in) :: lwdn !< atmospheric longwave radiation (w/m2) + real (kind=kind_phys), intent(in) :: rhsur !< raltive humidity in surface soil/snow air space (-) + real (kind=kind_phys), intent(in) :: eair !< vapor pressure air at height (pa) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: stc !< soil/snow temperature (k) + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: smc !< soil moisture + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: sh2o !< soil liquid water + real (kind=kind_phys), intent(in) :: sag !< solar radiation absorbed by ground (w/m2) + real (kind=kind_phys), intent(in) :: snowh !< actual snow depth [m] + real (kind=kind_phys), intent(in) :: lathea !< latent heat of vaporization/subli (j/kg) ! input/output - real, intent(inout) :: cm !momentum drag coefficient - real, intent(inout) :: ch !sensible heat exchange coefficient - real, intent(inout) :: tgb !ground temperature (k) - real, intent(inout) :: qsfc !mixing ratio at lowest model layer + real (kind=kind_phys), intent(inout) :: cm !< momentum drag coefficient + real (kind=kind_phys), intent(inout) :: ch !< sensible heat exchange coefficient + real (kind=kind_phys), intent(inout) :: tgb !< ground temperature (k) + real (kind=kind_phys), intent(inout) :: qsfc !< mixing ratio at lowest model layer #ifdef CCPP character(len=*), intent(inout) :: errmsg @@ -1057,49 +1031,49 @@ subroutine glacier_flux (nsoil ,nsnow ,emg ,isnow ,df ,dzsnso ,z ! output ! -sab + irb[tg] + shb[tg] + evb[tg] + ghb[tg] = 0 - real, intent(out) :: irb !net longwave rad (w/m2) [+ to atm] - real, intent(out) :: shb !sensible heat flux (w/m2) [+ to atm] - real, intent(out) :: evb !latent heat flux (w/m2) [+ to atm] - real, intent(out) :: ghb !ground heat flux (w/m2) [+ to soil] - real, intent(out) :: t2mb !2 m height air temperature (k) - real, intent(out) :: q2b !bare ground heat conductance - real, intent(out) :: ehb2 !sensible heat conductance for diagnostics + real (kind=kind_phys), intent(out) :: irb !< net longwave rad (w/m2) [+ to atm] + real (kind=kind_phys), intent(out) :: shb !< sensible heat flux (w/m2) [+ to atm] + real (kind=kind_phys), intent(out) :: evb !< latent heat flux (w/m2) [+ to atm] + real (kind=kind_phys), intent(out) :: ghb !< ground heat flux (w/m2) [+ to soil] + real (kind=kind_phys), intent(out) :: t2mb !< 2 m height air temperature (k) + real (kind=kind_phys), intent(out) :: q2b !< bare ground heat conductance + real (kind=kind_phys), intent(out) :: ehb2 !< sensible heat conductance for diagnostics ! local variables - integer :: niterb !number of iterations for surface temperature - real :: mpe !prevents overflow error if division by zero - real :: dtg !change in tg, last iteration (k) - integer :: mozsgn !number of times moz changes sign - real :: mozold !monin-obukhov stability parameter from prior iteration - real :: fm2 !monin-obukhov momentum adjustment at 2m - real :: fh2 !monin-obukhov heat adjustment at 2m - real :: ch2 !surface exchange at 2m - real :: h !temporary sensible heat flux (w/m2) - real :: fv !friction velocity (m/s) - real :: cir !coefficients for ir as function of ts**4 - real :: cgh !coefficients for st as function of ts - real :: csh !coefficients for sh as function of ts - real :: cev !coefficients for ev as function of esat[ts] - real :: cq2b ! - integer :: iter !iteration index - real :: z0h !roughness length, sensible heat, ground (m) - real :: moz !monin-obukhov stability parameter - real :: fm !momentum stability correction, weighted by prior iters - real :: fh !sen heat stability correction, weighted by prior iters - real :: ramb !aerodynamic resistance for momentum (s/m) - real :: rahb !aerodynamic resistance for sensible heat (s/m) - real :: rawb !aerodynamic resistance for water vapor (s/m) - real :: estg !saturation vapor pressure at tg (pa) - real :: destg !d(es)/dt at tg (pa/k) - real :: esatw !es for water - real :: esati !es for ice - real :: dsatw !d(es)/dt at tg (pa/k) for water - real :: dsati !d(es)/dt at tg (pa/k) for ice - real :: a !temporary calculation - real :: b !temporary calculation - real :: t, tdc !kelvin to degree celsius with limit -50 to +50 - real, dimension( 1:nsoil) :: sice !soil ice + integer :: niterb !< number of iterations for surface temperature + real (kind=kind_phys) :: mpe !< prevents overflow error if division by zero + real (kind=kind_phys) :: dtg !< change in tg, last iteration (k) + integer :: mozsgn !< number of times moz changes sign + real (kind=kind_phys) :: mozold !< monin-obukhov stability parameter from prior iteration + real (kind=kind_phys) :: fm2 !< monin-obukhov momentum adjustment at 2m + real (kind=kind_phys) :: fh2 !< monin-obukhov heat adjustment at 2m + real (kind=kind_phys) :: ch2 !< surface exchange at 2m + real (kind=kind_phys) :: h !< temporary sensible heat flux (w/m2) + real (kind=kind_phys) :: fv !< friction velocity (m/s) + real (kind=kind_phys) :: cir !< coefficients for ir as function of ts**4 + real (kind=kind_phys) :: cgh !< coefficients for st as function of ts + real (kind=kind_phys) :: csh !< coefficients for sh as function of ts + real (kind=kind_phys) :: cev !< coefficients for ev as function of esat[ts] + real (kind=kind_phys) :: cq2b !< + integer :: iter !< iteration index + real (kind=kind_phys) :: z0h !< roughness length, sensible heat, ground (m) + real (kind=kind_phys) :: moz !< monin-obukhov stability parameter + real (kind=kind_phys) :: fm !< momentum stability correction, weighted by prior iters + real (kind=kind_phys) :: fh !< sen heat stability correction, weighted by prior iters + real (kind=kind_phys) :: ramb !< aerodynamic resistance for momentum (s/m) + real (kind=kind_phys) :: rahb !< aerodynamic resistance for sensible heat (s/m) + real (kind=kind_phys) :: rawb !< aerodynamic resistance for water vapor (s/m) + real (kind=kind_phys) :: estg !< saturation vapor pressure at tg (pa) + real (kind=kind_phys) :: destg !< d(es)/dt at tg (pa/k) + real (kind=kind_phys) :: esatw !< es for water + real (kind=kind_phys) :: esati !< es for ice + real (kind=kind_phys) :: dsatw !< d(es)/dt at tg (pa/k) for water + real (kind=kind_phys) :: dsati !< d(es)/dt at tg (pa/k) for ice + real (kind=kind_phys) :: a !< temporary calculation + real (kind=kind_phys) :: b !< temporary calculation + real (kind=kind_phys) :: t, tdc !< kelvin to degree celsius with limit -50 to +50 + real (kind=kind_phys), dimension( 1:nsoil) :: sice !< soil ice tdc(t) = min( 50., max(-50.,(t-tfrz)) ) @@ -1155,7 +1129,11 @@ subroutine glacier_flux (nsoil ,nsnow ,emg ,isnow ,df ,dzsnso ,z end if csh = rhoair*cpair/rahb - cev = rhoair*cpair/gamma/(rsurf+rawb) + if(snowh > 0.0 .or. opt_gla == 1) then + cev = rhoair*cpair/gamma/(rsurf+rawb) + else + cev = 0.0 ! don't allow any sublimation of glacier in opt_gla=2 + end if ! surface fluxes and dtg @@ -1194,9 +1172,13 @@ subroutine glacier_flux (nsoil ,nsnow ,emg ,isnow ,df ,dzsnso ,z ! if snow on ground and tg > tfrz: reset tg = tfrz. reevaluate ground fluxes. sice = smc - sh2o - if(opt_stc == 1) then - if ((maxval(sice) > 0.0 .or. snowh > 0.0) .and. tgb > tfrz) then + if(opt_stc == 1 .or. opt_stc ==3) then + if ((maxval(sice) > 0.0 .or. snowh > 0.0) .and. tgb > tfrz .and. opt_gla == 1) then tgb = tfrz + t = tdc(tgb) ! mb: recalculate estg + call esat(t, esatw, esati, dsatw, dsati) + estg = esati + qsfc = 0.622*(estg*rhsur)/(sfcprs-0.378*(estg*rhsur)) irb = cir * tgb**4 - emg*lwdn shb = csh * (tgb - sfctmp) evb = cev * (estg*rhsur - eair ) !estg reevaluate ? @@ -1223,27 +1205,27 @@ end subroutine glacier_flux !>\ingroup NoahMP_LSM subroutine esat(t, esw, esi, desw, desi) !--------------------------------------------------------------------------------------------------- -! use polynomials to calculate saturation vapor pressure and derivative with -! respect to temperature: over water when t > 0 c and over ice when t <= 0 c +!> use polynomials to calculate saturation vapor pressure and derivative with +!! respect to temperature: over water when t > 0 c and over ice when t <= 0 c implicit none !--------------------------------------------------------------------------------------------------- ! in - real, intent(in) :: t !temperature + real (kind=kind_phys), intent(in) :: t !< temperature !out - real, intent(out) :: esw !saturation vapor pressure over water (pa) - real, intent(out) :: esi !saturation vapor pressure over ice (pa) - real, intent(out) :: desw !d(esat)/dt over water (pa/k) - real, intent(out) :: desi !d(esat)/dt over ice (pa/k) + real (kind=kind_phys), intent(out) :: esw !< saturation vapor pressure over water (pa) + real (kind=kind_phys), intent(out) :: esi !< saturation vapor pressure over ice (pa) + real (kind=kind_phys), intent(out) :: desw !< d(esat)/dt over water (pa/k) + real (kind=kind_phys), intent(out) :: desi !< d(esat)/dt over ice (pa/k) ! local - real :: a0,a1,a2,a3,a4,a5,a6 !coefficients for esat over water - real :: b0,b1,b2,b3,b4,b5,b6 !coefficients for esat over ice - real :: c0,c1,c2,c3,c4,c5,c6 !coefficients for dsat over water - real :: d0,d1,d2,d3,d4,d5,d6 !coefficients for dsat over ice + real (kind=kind_phys) :: a0,a1,a2,a3,a4,a5,a6 !< coefficients for esat over water + real (kind=kind_phys) :: b0,b1,b2,b3,b4,b5,b6 !< coefficients for esat over ice + real (kind=kind_phys) :: c0,c1,c2,c3,c4,c5,c6 !< coefficients for dsat over water + real (kind=kind_phys) :: d0,d1,d2,d3,d4,d5,d6 !< coefficients for dsat over ice parameter (a0=6.107799961 , a1=4.436518521e-01, & a2=1.428945805e-02, a3=2.650648471e-04, & @@ -1273,6 +1255,7 @@ subroutine esat(t, esw, esi, desw, desi) end subroutine esat ! ================================================================================================== !>\ingroup NoahMP_LSM +!! compute surface drag coefficient cm for momentum and ch for heat subroutine sfcdif1_glacier(iter ,zlvl ,zpd ,z0h ,z0m , & !in qair ,sfctmp ,h ,rhoair ,mpe ,ur , & !in #ifdef CCPP @@ -1287,25 +1270,25 @@ subroutine sfcdif1_glacier(iter ,zlvl ,zpd ,z0h ,z0m , & !in implicit none ! ------------------------------------------------------------------------------------------------- ! inputs - integer, intent(in) :: iter !iteration index - real, intent(in) :: zlvl !reference height (m) - real, intent(in) :: zpd !zero plane displacement (m) - real, intent(in) :: z0h !roughness length, sensible heat, ground (m) - real, intent(in) :: z0m !roughness length, momentum, ground (m) - real, intent(in) :: qair !specific humidity at reference height (kg/kg) - real, intent(in) :: sfctmp !temperature at reference height (k) - real, intent(in) :: h !sensible heat flux (w/m2) [+ to atm] - real, intent(in) :: rhoair !density air (kg/m**3) - real, intent(in) :: mpe !prevents overflow error if division by zero - real, intent(in) :: ur !wind speed (m/s) + integer, intent(in) :: iter !< iteration index + real (kind=kind_phys), intent(in) :: zlvl !< reference height (m) + real (kind=kind_phys), intent(in) :: zpd !< zero plane displacement (m) + real (kind=kind_phys), intent(in) :: z0h !< roughness length, sensible heat, ground (m) + real (kind=kind_phys), intent(in) :: z0m !< roughness length, momentum, ground (m) + real (kind=kind_phys), intent(in) :: qair !< specific humidity at reference height (kg/kg) + real (kind=kind_phys), intent(in) :: sfctmp !< temperature at reference height (k) + real (kind=kind_phys), intent(in) :: h !< sensible heat flux (w/m2) [+ to atm] + real (kind=kind_phys), intent(in) :: rhoair !< density air (kg/m**3) + real (kind=kind_phys), intent(in) :: mpe !< prevents overflow error if division by zero + real (kind=kind_phys), intent(in) :: ur !< wind speed (m/s) ! in & out - real, intent(inout) :: moz !monin-obukhov stability (z/l) - integer, intent(inout) :: mozsgn !number of times moz changes sign - real, intent(inout) :: fm !momentum stability correction, weighted by prior iters - real, intent(inout) :: fh !sen heat stability correction, weighted by prior iters - real, intent(inout) :: fm2 !sen heat stability correction, weighted by prior iters - real, intent(inout) :: fh2 !sen heat stability correction, weighted by prior iters + real (kind=kind_phys), intent(inout) :: moz !< monin-obukhov stability (z/l) + integer, intent(inout) :: mozsgn !< number of times moz changes sign + real (kind=kind_phys), intent(inout) :: fm !< momentum stability correction, weighted by prior iters + real (kind=kind_phys), intent(inout) :: fh !< sen heat stability correction, weighted by prior iters + real (kind=kind_phys), intent(inout) :: fm2 !< sen heat stability correction, weighted by prior iters + real (kind=kind_phys), intent(inout) :: fh2 !< sen heat stability correction, weighted by prior iters #ifdef CCPP character(len=*), intent(inout) :: errmsg @@ -1313,28 +1296,28 @@ subroutine sfcdif1_glacier(iter ,zlvl ,zpd ,z0h ,z0m , & !in #endif ! outputs - real, intent(out) :: fv !friction velocity (m/s) - real, intent(out) :: cm !drag coefficient for momentum - real, intent(out) :: ch !drag coefficient for heat - real, intent(out) :: ch2 !drag coefficient for heat + real (kind=kind_phys), intent(out) :: fv !< friction velocity (m/s) + real (kind=kind_phys), intent(out) :: cm !< drag coefficient for momentum + real (kind=kind_phys), intent(out) :: ch !< drag coefficient for heat + real (kind=kind_phys), intent(out) :: ch2 !< drag coefficient for heat ! locals - real :: mozold !monin-obukhov stability parameter from prior iteration - real :: tmpcm !temporary calculation for cm - real :: tmpch !temporary calculation for ch - real :: mol !monin-obukhov length (m) - real :: tvir !temporary virtual temperature (k) - real :: tmp1,tmp2,tmp3 !temporary calculation - real :: fmnew !stability correction factor, momentum, for current moz - real :: fhnew !stability correction factor, sen heat, for current moz - real :: moz2 !2/l - real :: tmpcm2 !temporary calculation for cm2 - real :: tmpch2 !temporary calculation for ch2 - real :: fm2new !stability correction factor, momentum, for current moz - real :: fh2new !stability correction factor, sen heat, for current moz - real :: tmp12,tmp22,tmp32 !temporary calculation - - real :: cmfm, chfh, cm2fm2, ch2fh2 + real (kind=kind_phys) :: mozold !< monin-obukhov stability parameter from prior iteration + real (kind=kind_phys) :: tmpcm !< temporary calculation for cm + real (kind=kind_phys) :: tmpch !< temporary calculation for ch + real (kind=kind_phys) :: mol !< monin-obukhov length (m) + real (kind=kind_phys) :: tvir !< temporary virtual temperature (k) + real (kind=kind_phys) :: tmp1,tmp2,tmp3 !< temporary calculation + real (kind=kind_phys) :: fmnew !< stability correction factor, momentum, for current moz + real (kind=kind_phys) :: fhnew !< stability correction factor, sen heat, for current moz + real (kind=kind_phys) :: moz2 !< 2/l + real (kind=kind_phys) :: tmpcm2 !< temporary calculation for cm2 + real (kind=kind_phys) :: tmpch2 !< temporary calculation for ch2 + real (kind=kind_phys) :: fm2new !< stability correction factor, momentum, for current moz + real (kind=kind_phys) :: fh2new !< stability correction factor, sen heat, for current moz + real (kind=kind_phys) :: tmp12,tmp22,tmp32 !< temporary calculation + + real (kind=kind_phys) :: cmfm, chfh, cm2fm2, ch2fh2 ! ------------------------------------------------------------------------------------------------- @@ -1452,38 +1435,38 @@ subroutine tsnosoi_glacier (nsoil ,nsnow ,isnow ,dt ,tbot , & !in hcpct , & !in stc ) !inout ! -------------------------------------------------------------------------------------------------- -! compute snow (up to 3l) and soil (4l) temperature. note that snow temperatures -! during melting season may exceed melting point (tfrz) but later in phasechange -! subroutine the snow temperatures are reset to tfrz for melting snow. +!> compute snow (up to 3l) and soil (4l) temperature. note that snow temperatures +!! during melting season may exceed melting point (tfrz) but later in phasechange +!! subroutine the snow temperatures are reset to tfrz for melting snow. ! -------------------------------------------------------------------------------------------------- implicit none ! -------------------------------------------------------------------------------------------------- !input - integer, intent(in) :: nsoil !no of soil layers (4) - integer, intent(in) :: nsnow !maximum no of snow layers (3) - integer, intent(in) :: isnow !actual no of snow layers + integer, intent(in) :: nsoil !< no of soil layers (4) + integer, intent(in) :: nsnow !< maximum no of snow layers (3) + integer, intent(in) :: isnow !< actual no of snow layers - real, intent(in) :: dt !time step (s) - real, intent(in) :: tbot ! - real, intent(in) :: ssoil !ground heat flux (w/m2) - real, intent(in) :: snowh !snow depth (m) - real, intent(in) :: zbot !from soil surface (m) - real, dimension(-nsnow+1:nsoil), intent(in) :: zsnso !layer-bot. depth from snow surf.(m) - real, dimension(-nsnow+1:nsoil), intent(in) :: df !thermal conductivity - real, dimension(-nsnow+1:nsoil), intent(in) :: hcpct !heat capacity (j/m3/k) + real (kind=kind_phys), intent(in) :: dt !< time step (s) + real (kind=kind_phys), intent(in) :: tbot !< + real (kind=kind_phys), intent(in) :: ssoil !< ground heat flux (w/m2) + real (kind=kind_phys), intent(in) :: snowh !< snow depth (m) + real (kind=kind_phys), intent(in) :: zbot !< from soil surface (m) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: zsnso !< layer-bot. depth from snow surf.(m) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: df !< thermal conductivity + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: hcpct !< heat capacity (j/m3/k) !input and output - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !local integer :: iz - real :: zbotsno !zbot from snow surface - real, dimension(-nsnow+1:nsoil) :: ai, bi, ci, rhsts - real :: eflxb !energy influx from soil bottom (w/m2) - real, dimension(-nsnow+1:nsoil) :: phi !light through water (w/m2) + real (kind=kind_phys) :: zbotsno !< zbot from snow surface + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: ai, bi, ci, rhsts + real (kind=kind_phys) :: eflxb !< energy influx from soil bottom (w/m2) + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: phi !< light through water (w/m2) ! ---------------------------------------------------------------------- @@ -1518,43 +1501,43 @@ subroutine hrt_glacier (nsnow ,nsoil ,isnow ,zsnso , & !in botflx ) !out ! ---------------------------------------------------------------------- ! ---------------------------------------------------------------------- -! calculate the right hand side of the time tendency term of the soil -! thermal diffusion equation. also to compute ( prepare ) the matrix -! coefficients for the tri-diagonal matrix of the implicit time scheme. +!> calculate the right hand side of the time tendency term of the soil +!! thermal diffusion equation. also to compute ( prepare ) the matrix +!! coefficients for the tri-diagonal matrix of the implicit time scheme. ! ---------------------------------------------------------------------- implicit none ! ---------------------------------------------------------------------- ! input - integer, intent(in) :: nsoil !no of soil layers (4) - integer, intent(in) :: nsnow !maximum no of snow layers (3) - integer, intent(in) :: isnow !actual no of snow layers - real, intent(in) :: tbot !bottom soil temp. at zbot (k) - real, intent(in) :: zbot !depth of lower boundary condition (m) - !from soil surface not snow surface - real, intent(in) :: ssoil !ground heat flux (w/m2) - real, dimension(-nsnow+1:nsoil), intent(in) :: zsnso !depth of layer-bottom of snow/soil (m) - real, dimension(-nsnow+1:nsoil), intent(in) :: stc !snow/soil temperature (k) - real, dimension(-nsnow+1:nsoil), intent(in) :: df !thermal conductivity [w/m/k] - real, dimension(-nsnow+1:nsoil), intent(in) :: hcpct !heat capacity [j/m3/k] - real, dimension(-nsnow+1:nsoil), intent(in) :: phi !light through water (w/m2) + integer, intent(in) :: nsoil !< no of soil layers (4) + integer, intent(in) :: nsnow !< maximum no of snow layers (3) + integer, intent(in) :: isnow !< actual no of snow layers + real (kind=kind_phys), intent(in) :: tbot !< bottom soil temp. at zbot (k) + real (kind=kind_phys), intent(in) :: zbot !< depth of lower boundary condition (m) + !! from soil surface not snow surface + real (kind=kind_phys), intent(in) :: ssoil !< ground heat flux (w/m2) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: zsnso !< depth of layer-bottom of snow/soil (m) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: stc !< snow/soil temperature (k) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: df !< thermal conductivity [w/m/k] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: hcpct !< heat capacity [j/m3/k] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: phi !< light through water (w/m2) ! output - real, dimension(-nsnow+1:nsoil), intent(out) :: rhsts !right-hand side of the matrix - real, dimension(-nsnow+1:nsoil), intent(out) :: ai !left-hand side coefficient - real, dimension(-nsnow+1:nsoil), intent(out) :: bi !left-hand side coefficient - real, dimension(-nsnow+1:nsoil), intent(out) :: ci !left-hand side coefficient - real, intent(out) :: botflx !energy influx from soil bottom (w/m2) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(out) :: rhsts !< right-hand side of the matrix + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(out) :: ai !< left-hand side coefficient + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(out) :: bi !< left-hand side coefficient + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(out) :: ci !< left-hand side coefficient + real (kind=kind_phys), intent(out) :: botflx !< energy influx from soil bottom (w/m2) ! local integer :: k - real, dimension(-nsnow+1:nsoil) :: ddz - real, dimension(-nsnow+1:nsoil) :: denom - real, dimension(-nsnow+1:nsoil) :: dtsdz - real, dimension(-nsnow+1:nsoil) :: eflux - real :: temp1 + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: ddz + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: denom + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: dtsdz + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: eflux + real (kind=kind_phys) :: temp1 ! ---------------------------------------------------------------------- do k = isnow+1, nsoil @@ -1588,7 +1571,7 @@ subroutine hrt_glacier (nsnow ,nsoil ,isnow ,zsnso , & !in if (k == isnow+1) then ai(k) = 0.0 ci(k) = - df(k) * ddz(k) / denom(k) - if (opt_stc == 1) then + if (opt_stc == 1 .or. opt_stc == 3) then bi(k) = - ci(k) end if if (opt_stc == 2) then @@ -1614,7 +1597,7 @@ subroutine hstep_glacier (nsnow ,nsoil ,isnow ,dt , & !in ai ,bi ,ci ,rhsts , & !inout stc ) !inout ! ---------------------------------------------------------------------- -! calculate/update the soil temperature field. +!> calculate/update the soil temperature field. ! ---------------------------------------------------------------------- implicit none ! ---------------------------------------------------------------------- @@ -1623,19 +1606,19 @@ subroutine hstep_glacier (nsnow ,nsoil ,isnow ,dt , & !in integer, intent(in) :: nsoil integer, intent(in) :: nsnow integer, intent(in) :: isnow - real, intent(in) :: dt + real (kind=kind_phys), intent(in) :: dt ! output & input - real, dimension(-nsnow+1:nsoil), intent(inout) :: ai - real, dimension(-nsnow+1:nsoil), intent(inout) :: bi - real, dimension(-nsnow+1:nsoil), intent(inout) :: ci - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc - real, dimension(-nsnow+1:nsoil), intent(inout) :: rhsts + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: ai + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: bi + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: ci + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: rhsts ! local integer :: k - real, dimension(-nsnow+1:nsoil) :: rhstsin - real, dimension(-nsnow+1:nsoil) :: ciin + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: rhstsin + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: ciin ! ---------------------------------------------------------------------- do k = isnow+1,nsoil @@ -1690,8 +1673,8 @@ subroutine rosr12_glacier (p,a,b,c,d,delta,ntop,nsoil,nsnow) integer, intent(in) :: nsoil,nsnow integer :: k, kk - real, dimension(-nsnow+1:nsoil),intent(in):: a, b, d - real, dimension(-nsnow+1:nsoil),intent(inout):: c,p,delta + real (kind=kind_phys), dimension(-nsnow+1:nsoil),intent(in):: a, b, d + real (kind=kind_phys), dimension(-nsnow+1:nsoil),intent(inout):: c,p,delta ! ---------------------------------------------------------------------- ! initialize eqn coef c for the lowest soil layer @@ -1732,48 +1715,48 @@ subroutine phasechange_glacier (nsnow ,nsoil ,isnow ,dt ,fact , & smc ,sh2o , & !inout qmelt ,imelt ,ponding ) !out ! ---------------------------------------------------------------------- -! melting/freezing of snow water and soil water +!> melting/freezing of snow water and soil water ! ---------------------------------------------------------------------- implicit none ! ---------------------------------------------------------------------- ! inputs - integer, intent(in) :: nsnow !maximum no. of snow layers [=3] - integer, intent(in) :: nsoil !no. of soil layers [=4] - integer, intent(in) :: isnow !actual no. of snow layers [<=3] - real, intent(in) :: dt !land model time step (sec) - real, dimension(-nsnow+1:nsoil), intent(in) :: fact !temporary - real, dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer thickness [m] + integer, intent(in) :: nsnow !< maximum no. of snow layers [=3] + integer, intent(in) :: nsoil !< no. of soil layers [=4] + integer, intent(in) :: isnow !< actual no. of snow layers [<=3] + real (kind=kind_phys), intent(in) :: dt !< land model time step (sec) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: fact !< temporary + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !< snow/soil layer thickness [m] ! inputs/outputs - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow/soil layer temperature [k] - real, dimension(-nsnow+1:0) , intent(inout) :: snice !snow layer ice [mm] - real, dimension(-nsnow+1:0) , intent(inout) :: snliq !snow layer liquid water [mm] - real, intent(inout) :: sneqv - real, intent(inout) :: snowh - real, dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid water [m3/m3] - real, dimension( 1:nsoil), intent(inout) :: smc !total soil water [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !< snow/soil layer temperature [k] + real (kind=kind_phys), dimension(-nsnow+1:0) , intent(inout) :: snice !< snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1:0) , intent(inout) :: snliq !< snow layer liquid water [mm] + real (kind=kind_phys), intent(inout) :: sneqv !< + real (kind=kind_phys), intent(inout) :: snowh !< + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sh2o !< soil liquid water [m3/m3] + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: smc !< total soil water [m3/m3] ! outputs - real, intent(out) :: qmelt !snowmelt rate [mm/s] - integer, dimension(-nsnow+1:nsoil), intent(out) :: imelt !phase change index - real, intent(out) :: ponding!snowmelt when snow has no layer [mm] + real (kind=kind_phys), intent(out) :: qmelt !< snowmelt rate [mm/s] + integer, dimension(-nsnow+1:nsoil), intent(out) :: imelt !< phase change index + real (kind=kind_phys), intent(out) :: ponding!< snowmelt when snow has no layer [mm] ! local - integer :: j,k !do loop index - real, dimension(-nsnow+1:nsoil) :: hm !energy residual [w/m2] - real, dimension(-nsnow+1:nsoil) :: xm !melting or freezing water [kg/m2] - real, dimension(-nsnow+1:nsoil) :: wmass0 - real, dimension(-nsnow+1:nsoil) :: wice0 - real, dimension(-nsnow+1:nsoil) :: wliq0 - real, dimension(-nsnow+1:nsoil) :: mice !soil/snow ice mass [mm] - real, dimension(-nsnow+1:nsoil) :: mliq !soil/snow liquid water mass [mm] - real, dimension(-nsnow+1:nsoil) :: heatr !energy residual or loss after melting/freezing - real :: temp1 !temporary variables [kg/m2] - real :: propor - real :: xmf !total latent heat of phase change + integer :: j,k !< do loop index + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: hm !< energy residual [w/m2] + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: xm !< melting or freezing water [kg/m2] + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: wmass0 !< + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: wice0 !< + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: wliq0 !< + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: mice !< soil/snow ice mass [mm] + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: mliq !< soil/snow liquid water mass [mm] + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: heatr !< energy residual or loss after melting/freezing + real (kind=kind_phys) :: temp1 !< temporary variables [kg/m2] + real (kind=kind_phys) :: propor !< + real (kind=kind_phys) :: xmf !< total latent heat of phase change ! ---------------------------------------------------------------------- ! initialization @@ -1787,12 +1770,106 @@ subroutine phasechange_glacier (nsnow ,nsoil ,isnow ,dt ,fact , & mliq(j) = snliq(j) end do + do j = isnow+1,0 ! all snow layers; do ice later + imelt(j) = 0 + hm(j) = 0. + xm(j) = 0. + wice0(j) = mice(j) + wliq0(j) = mliq(j) + wmass0(j) = mice(j) + mliq(j) + enddo + + do j = isnow+1,0 + if (mice(j) > 0. .and. stc(j) >= tfrz) then ! melting + imelt(j) = 1 + endif + if (mliq(j) > 0. .and. stc(j) < tfrz) then ! freezing + imelt(j) = 2 + endif + + enddo + +! calculate the energy surplus and loss for melting and freezing + + do j = isnow+1,0 + if (imelt(j) > 0) then + hm(j) = (stc(j)-tfrz)/fact(j) + stc(j) = tfrz + endif + + if (imelt(j) == 1 .and. hm(j) < 0.) then + hm(j) = 0. + imelt(j) = 0 + endif + if (imelt(j) == 2 .and. hm(j) > 0.) then + hm(j) = 0. + imelt(j) = 0 + endif + xm(j) = hm(j)*dt/hfus + enddo + +! the rate of melting and freezing for snow without a layer, opt_gla==1 treated below + +if (opt_gla == 2) then + + if (isnow == 0 .and. sneqv > 0. .and. stc(1) >= tfrz) then + hm(1) = (stc(1)-tfrz)/fact(1) ! available heat + stc(1) = tfrz ! set t to freezing + xm(1) = hm(1)*dt/hfus ! total snow melt possible + + temp1 = sneqv + sneqv = max(0.,temp1-xm(1)) ! snow remaining + propor = sneqv/temp1 ! fraction melted + snowh = max(0.,propor * snowh) ! new snow height + heatr(1) = hm(1) - hfus*(temp1-sneqv)/dt ! excess heat + if (heatr(1) > 0.) then + xm(1) = heatr(1)*dt/hfus + stc(1) = stc(1) + fact(1)*heatr(1) ! re-heat ice + else + xm(1) = 0. ! heat used up + hm(1) = 0. + endif + qmelt = max(0.,(temp1-sneqv))/dt ! melted snow rate + xmf = hfus*qmelt ! melted snow energy + ponding = temp1-sneqv ! melt water + endif + +end if ! opt_gla == 2 + +! the rate of melting and freezing for snow + + do j = isnow+1,0 + if (imelt(j) > 0 .and. abs(hm(j)) > 0.) then + + heatr(j) = 0. + if (xm(j) > 0.) then + mice(j) = max(0., wice0(j)-xm(j)) + heatr(j) = hm(j) - hfus*(wice0(j)-mice(j))/dt + else if (xm(j) < 0.) then + mice(j) = min(wmass0(j), wice0(j)-xm(j)) + heatr(j) = hm(j) - hfus*(wice0(j)-mice(j))/dt + endif + + mliq(j) = max(0.,wmass0(j)-mice(j)) + + if (abs(heatr(j)) > 0.) then + stc(j) = stc(j) + fact(j)*heatr(j) + if (mliq(j)*mice(j)>0.) stc(j) = tfrz + endif + + qmelt = qmelt + max(0.,(wice0(j)-mice(j)))/dt + + endif + enddo + +if (opt_gla == 1) then ! operate on the ice layers + do j = 1, nsoil ! all soil layers mliq(j) = sh2o(j) * dzsnso(j) * 1000. mice(j) = (smc(j) - sh2o(j)) * dzsnso(j) * 1000. end do - do j = isnow+1,nsoil ! all layers + do j = 1,nsoil ! all layers imelt(j) = 0 hm(j) = 0. xm(j) = 0. @@ -1801,7 +1878,7 @@ subroutine phasechange_glacier (nsnow ,nsoil ,isnow ,dt ,fact , & wmass0(j) = mice(j) + mliq(j) enddo - do j = isnow+1,nsoil + do j = 1,nsoil if (mice(j) > 0. .and. stc(j) >= tfrz) then ! melting imelt(j) = 1 endif @@ -1819,7 +1896,7 @@ subroutine phasechange_glacier (nsnow ,nsoil ,isnow ,dt ,fact , & ! calculate the energy surplus and loss for melting and freezing - do j = isnow+1,nsoil + do j = 1,nsoil if (imelt(j) > 0) then hm(j) = (stc(j)-tfrz)/fact(j) stc(j) = tfrz @@ -1858,9 +1935,9 @@ subroutine phasechange_glacier (nsnow ,nsoil ,isnow ,dt ,fact , & ponding = temp1-sneqv endif -! the rate of melting and freezing for snow and soil +! the rate of melting and freezing for soil - do j = isnow+1,nsoil + do j = 1,nsoil if (imelt(j) > 0 .and. abs(hm(j)) > 0.) then heatr(j) = 0. @@ -2000,6 +2077,8 @@ subroutine phasechange_glacier (nsnow ,nsoil ,isnow ,dt ,fact , & end if end do end if + +end if ! opt_gla == 1 do j = isnow+1,0 ! snow snliq(j) = mliq(j) @@ -2007,10 +2086,14 @@ subroutine phasechange_glacier (nsnow ,nsoil ,isnow ,dt ,fact , & end do do j = 1, nsoil ! soil + if(opt_gla == 1) then sh2o(j) = mliq(j) / (1000. * dzsnso(j)) sh2o(j) = max(0.0,min(1.0,sh2o(j))) ! smc(j) = (mliq(j) + mice(j)) / (1000. * dzsnso(j)) - smc(j) = 1.0 + elseif(opt_gla == 2) then + sh2o(j) = 0.0 ! ice, assume all frozen...forever + end if + smc(j) = 1.0 end do end subroutine phasechange_glacier @@ -2019,7 +2102,7 @@ end subroutine phasechange_glacier subroutine water_glacier (nsnow ,nsoil ,imelt ,dt ,prcp ,sfctmp , & !in qvap ,qdew ,ficeold,zsoil , & !in isnow ,snowh ,sneqv ,snice ,snliq ,stc , & !inout - dzsnso ,sh2o ,sice ,ponding,zsnso , & !inout + dzsnso ,sh2o ,sice ,ponding,zsnso ,fsh , & !inout runsrf ,runsub ,qsnow ,ponding1 ,ponding2,qsnbot,fpice,esnow & !out ) !out ! ---------------------------------------------------------------------- @@ -2029,52 +2112,53 @@ subroutine water_glacier (nsnow ,nsoil ,imelt ,dt ,prcp ,sfctmp , & !in implicit none ! ---------------------------------------------------------------------- ! input - integer, intent(in) :: nsnow !maximum no. of snow layers - integer, intent(in) :: nsoil !no. of soil layers - integer, dimension(-nsnow+1:0) , intent(in) :: imelt !melting state index [1-melt; 2-freeze] - real, intent(in) :: dt !main time step (s) - real, intent(in) :: prcp !precipitation (mm/s) - real, intent(in) :: sfctmp !surface air temperature [k] - real, intent(in) :: qvap !soil surface evaporation rate[mm/s] - real, intent(in) :: qdew !soil surface dew rate[mm/s] - real, dimension(-nsnow+1: 0), intent(in) :: ficeold !ice fraction at last timestep - real, dimension( 1:nsoil), intent(in) :: zsoil !layer-bottom depth from soil surf (m) + integer, intent(in) :: nsnow !< maximum no. of snow layers + integer, intent(in) :: nsoil !< no. of soil layers + integer, dimension(-nsnow+1:0) , intent(in) :: imelt !< melting state index [1-melt; 2-freeze] + real (kind=kind_phys), intent(in) :: dt !< main time step (s) + real (kind=kind_phys), intent(in) :: prcp !< precipitation (mm/s) + real (kind=kind_phys), intent(in) :: sfctmp !< surface air temperature [k] + real (kind=kind_phys), intent(inout) :: qvap !< soil surface evaporation rate[mm/s] + real (kind=kind_phys), intent(inout) :: qdew !< soil surface dew rate[mm/s] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: ficeold !< ice fraction at last timestep + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: zsoil !< layer-bottom depth from soil surf (m) ! input/output - integer, intent(inout) :: isnow !actual no. of snow layers - real, intent(inout) :: snowh !snow height [m] - real, intent(inout) :: sneqv !snow water eqv. [mm] - real, dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] - real, dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow/soil layer temperature [k] - real, dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso !snow/soil layer thickness [m] - real, dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid water content [m3/m3] - real, dimension( 1:nsoil), intent(inout) :: sice !soil ice content [m3/m3] - real , intent(inout) :: ponding ![mm] - real, dimension(-nsnow+1:nsoil), intent(inout) :: zsnso !layer-bottom depth from snow surf [m] + integer, intent(inout) :: isnow !< actual no. of snow layers + real (kind=kind_phys), intent(inout) :: snowh !< snow height [m] + real (kind=kind_phys), intent(inout) :: sneqv !< snow water eqv. [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snice !< snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snliq !< snow layer liquid water [mm] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !< snow/soil layer temperature [k] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso !< snow/soil layer thickness [m] + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sh2o !< soil liquid water content [m3/m3] + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sice !< soil ice content [m3/m3] + real (kind=kind_phys) , intent(inout) :: ponding !< [mm] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: zsnso !< layer-bottom depth from snow surf [m] + real (kind=kind_phys) , intent(inout) :: fsh !< total sensible heat (w/m2) [+ to atm] ! output - real, intent(out) :: runsrf !surface runoff [mm/s] - real, intent(out) :: runsub !baseflow (sturation excess) [mm/s] - real, intent(out) :: qsnow !snow at ground srf (mm/s) [+] - real, intent(out) :: ponding1 - real, intent(out) :: ponding2 - real, intent(out) :: qsnbot !melting water out of snow bottom [mm/s] - real, intent(out) :: fpice !precipitation frozen fraction - real, intent(out) :: esnow ! + real (kind=kind_phys), intent(out) :: runsrf !< surface runoff [mm/s] + real (kind=kind_phys), intent(out) :: runsub !< baseflow (sturation excess) [mm/s] + real (kind=kind_phys), intent(out) :: qsnow !< snow at ground srf (mm/s) [+] + real (kind=kind_phys), intent(out) :: ponding1!< + real (kind=kind_phys), intent(out) :: ponding2!< + real (kind=kind_phys), intent(out) :: qsnbot !< melting water out of snow bottom [mm/s] + real (kind=kind_phys), intent(out) :: fpice !< precipitation frozen fraction + real (kind=kind_phys), intent(out) :: esnow !< ! local - real :: qrain !rain at ground srf (mm) [+] - real :: qseva !soil surface evap rate [mm/s] - real :: qsdew !soil surface dew rate [mm/s] - real :: qsnfro !snow surface frost rate[mm/s] - real :: qsnsub !snow surface sublimation rate [mm/s] - real :: snowhin !snow depth increasing rate (m/s) - real :: snoflow !glacier flow [mm/s] - real :: bdfall !density of new snow (mm water/m snow) - real :: replace !replacement water due to sublimation of glacier - real, dimension( 1:nsoil) :: sice_save !soil ice content [m3/m3] - real, dimension( 1:nsoil) :: sh2o_save !soil liquid water content [m3/m3] + real (kind=kind_phys) :: qrain !< rain at ground srf (mm) [+] + real (kind=kind_phys) :: qseva !< soil surface evap rate [mm/s] + real (kind=kind_phys) :: qsdew !< soil surface dew rate [mm/s] + real (kind=kind_phys) :: qsnfro !< snow surface frost rate[mm/s] + real (kind=kind_phys) :: qsnsub !< snow surface sublimation rate [mm/s] + real (kind=kind_phys) :: snowhin !< snow depth increasing rate (m/s) + real (kind=kind_phys) :: snoflow !< glacier flow [mm/s] + real (kind=kind_phys) :: bdfall !< density of new snow (mm water/m snow) + real (kind=kind_phys) :: replace !< replacement water due to sublimation of glacier + real (kind=kind_phys), dimension( 1:nsoil) :: sice_save !< soil ice content [m3/m3] + real (kind=kind_phys), dimension( 1:nsoil) :: sh2o_save !< soil liquid water content [m3/m3] integer :: ilev @@ -2135,38 +2219,17 @@ subroutine water_glacier (nsnow ,nsoil ,imelt ,dt ,prcp ,sfctmp , & !in ! sublimation, frost, evaporation, and dew -! qsnsub = 0. -! if (sneqv > 0.) then -! qsnsub = min(qvap, sneqv/dt) -! endif -! qseva = qvap-qsnsub - -! qsnfro = 0. -! if (sneqv > 0.) then -! qsnfro = qdew -! endif -! qsdew = qdew - qsnfro - qsnsub = qvap ! send total sublimation/frost to snowwater and deal with it there qsnfro = qdew esnow = qsnsub*2.83e+6 - -! print *, 'qvap',qvap,qvap*dt -! print *, 'qsnsub',qsnsub,qsnsub*dt -! print *, 'qseva',qseva,qseva*dt -! print *, 'qsnfro',qsnfro,qsnfro*dt -! print *, 'qdew',qdew,qdew*dt -! print *, 'qsdew',qsdew,qsdew*dt -!print *, 'before snowwater', sneqv,snowh,snice,snliq,sh2o,sice call snowwater_glacier (nsnow ,nsoil ,imelt ,dt ,sfctmp , & !in snowhin,qsnow ,qsnfro ,qsnsub ,qrain , & !in ficeold,zsoil , & !in isnow ,snowh ,sneqv ,snice ,snliq , & !inout sh2o ,sice ,stc ,dzsnso ,zsnso , & !inout + fsh , & !inout qsnbot ,snoflow,ponding1 ,ponding2) !out -!print *, 'after snowwater', sneqv,snowh,snice,snliq,sh2o,sice -!print *, 'ponding', ponding,ponding1,ponding2 !ponding: melting water from snow when there is no layer @@ -2179,20 +2242,29 @@ subroutine water_glacier (nsnow ,nsoil ,imelt ,dt ,prcp ,sfctmp , & !in endif - replace = 0.0 - do ilev = 1,nsoil + if(opt_gla == 1) then + replace = 0.0 + do ilev = 1,nsoil replace = replace + dzsnso(ilev)*(sice(ilev) - sice_save(ilev) + sh2o(ilev) - sh2o_save(ilev)) - end do - replace = replace * 1000.0 / dt ! convert to [mm/s] + end do + replace = replace * 1000.0 / dt ! convert to [mm/s] - sice = min(1.0,sice_save) + sice = min(1.0,sice_save) + elseif(opt_gla == 2) then + sice = 1.0 + end if sh2o = 1.0 - sice -!print *, 'replace', replace ! use runsub as a water balancer, snoflow is snow that disappears, replace is ! water from below that replaces glacier loss - runsub = snoflow + replace + if(opt_gla == 1) then + runsub = snoflow + replace + elseif(opt_gla == 2) then + runsub = snoflow + qvap = qsnsub + qdew = qsnfro + end if end subroutine water_glacier ! ================================================================================================== @@ -2203,45 +2275,47 @@ subroutine snowwater_glacier (nsnow ,nsoil ,imelt ,dt ,sfctmp , & !in ficeold,zsoil , & !in isnow ,snowh ,sneqv ,snice ,snliq , & !inout sh2o ,sice ,stc ,dzsnso ,zsnso , & !inout + fsh , & !inout qsnbot ,snoflow,ponding1 ,ponding2) !out ! ---------------------------------------------------------------------- implicit none ! ---------------------------------------------------------------------- ! input - integer, intent(in) :: nsnow !maximum no. of snow layers - integer, intent(in) :: nsoil !no. of soil layers - integer, dimension(-nsnow+1:0) , intent(in) :: imelt !melting state index [0-no melt;1-melt] - real, intent(in) :: dt !time step (s) - real, intent(in) :: sfctmp !surface air temperature [k] - real, intent(in) :: snowhin!snow depth increasing rate (m/s) - real, intent(in) :: qsnow !snow at ground srf (mm/s) [+] - real, intent(in) :: qsnfro !snow surface frost rate[mm/s] - real, intent(in) :: qsnsub !snow surface sublimation rate[mm/s] - real, intent(in) :: qrain !snow surface rain rate[mm/s] - real, dimension(-nsnow+1:0) , intent(in) :: ficeold!ice fraction at last timestep - real, dimension( 1:nsoil), intent(in) :: zsoil !layer-bottom depth from soil surf (m) + integer, intent(in) :: nsnow !< maximum no. of snow layers + integer, intent(in) :: nsoil !< no. of soil layers + integer, dimension(-nsnow+1:0) , intent(in) :: imelt !< melting state index [0-no melt;1-melt] + real (kind=kind_phys), intent(in) :: dt !< time step (s) + real (kind=kind_phys), intent(in) :: sfctmp !< surface air temperature [k] + real (kind=kind_phys), intent(in) :: snowhin!< snow depth increasing rate (m/s) + real (kind=kind_phys), intent(in) :: qsnow !< snow at ground srf (mm/s) [+] + real (kind=kind_phys), intent(inout) :: qsnfro !< snow surface frost rate[mm/s] + real (kind=kind_phys), intent(inout) :: qsnsub !< snow surface sublimation rate[mm/s] + real (kind=kind_phys), intent(in) :: qrain !< snow surface rain rate[mm/s] + real (kind=kind_phys), dimension(-nsnow+1:0) , intent(in) :: ficeold!< ice fraction at last timestep + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: zsoil !< layer-bottom depth from soil surf (m) ! input & output - integer, intent(inout) :: isnow !actual no. of snow layers - real, intent(inout) :: snowh !snow height [m] - real, intent(inout) :: sneqv !snow water eqv. [mm] - real, dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] - real, dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] - real, dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid moisture (m3/m3) - real, dimension( 1:nsoil), intent(inout) :: sice !soil ice moisture (m3/m3) - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] - real, dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso !snow/soil layer thickness [m] - real, dimension(-nsnow+1:nsoil), intent(inout) :: zsnso !layer-bottom depth from snow surf [m] + integer, intent(inout) :: isnow !< actual no. of snow layers + real (kind=kind_phys), intent(inout) :: snowh !< snow height [m] + real (kind=kind_phys), intent(inout) :: sneqv !< snow water eqv. [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snice !< snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snliq !< snow layer liquid water [mm] + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sh2o !< soil liquid moisture (m3/m3) + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sice !< soil ice moisture (m3/m3) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !< snow layer temperature [k] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso !< snow/soil layer thickness [m] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: zsnso !< layer-bottom depth from snow surf [m] + real (kind=kind_phys), intent(inout) :: fsh !< total sensible heat (w/m2) [+ to atm] ! output - real, intent(out) :: qsnbot !melting water out of snow bottom [mm/s] - real, intent(out) :: snoflow!glacier flow [mm] - real, intent(out) :: ponding1 - real, intent(out) :: ponding2 + real (kind=kind_phys), intent(out) :: qsnbot !< melting water out of snow bottom [mm/s] + real (kind=kind_phys), intent(out) :: snoflow!< glacier flow [mm] + real (kind=kind_phys), intent(out) :: ponding1 !< + real (kind=kind_phys), intent(out) :: ponding2 !< ! local integer :: iz - real :: bdsnow !bulk density of snow (kg/m3) + real (kind=kind_phys) :: bdsnow !< bulk density of snow (kg/m3) ! ---------------------------------------------------------------------- snoflow = 0.0 ponding1 = 0.0 @@ -2280,7 +2354,7 @@ subroutine snowwater_glacier (nsnow ,nsoil ,imelt ,dt ,sfctmp , & !in qrain , & !in isnow ,dzsnso ,snowh ,sneqv ,snice , & !inout snliq ,sh2o ,sice ,stc , & !inout - ponding1 ,ponding2 , & !inout + ponding1 ,ponding2 ,fsh , & !inout qsnbot ) !out !to obtain equilibrium state of snow in glacier region @@ -2330,33 +2404,33 @@ subroutine snowfall_glacier (nsoil ,nsnow ,dt ,qsnow ,snowhin , & !in isnow ,snowh ,dzsnso ,stc ,snice , & !inout snliq ,sneqv ) !inout ! ---------------------------------------------------------------------- -! snow depth and density to account for the new snowfall. -! new values of snow depth & density returned. +!> snow depth and density to account for the new snowfall. +!! new values of snow depth & density returned. ! ---------------------------------------------------------------------- implicit none ! ---------------------------------------------------------------------- ! input - integer, intent(in) :: nsoil !no. of soil layers - integer, intent(in) :: nsnow !maximum no. of snow layers - real, intent(in) :: dt !main time step (s) - real, intent(in) :: qsnow !snow at ground srf (mm/s) [+] - real, intent(in) :: snowhin!snow depth increasing rate (m/s) - real, intent(in) :: sfctmp !surface air temperature [k] + integer, intent(in) :: nsoil !< no. of soil layers + integer, intent(in) :: nsnow !< maximum no. of snow layers + real (kind=kind_phys), intent(in) :: dt !< main time step (s) + real (kind=kind_phys), intent(in) :: qsnow !< snow at ground srf (mm/s) [+] + real (kind=kind_phys), intent(in) :: snowhin!< snow depth increasing rate (m/s) + real (kind=kind_phys), intent(in) :: sfctmp !< surface air temperature [k] ! input and output - integer, intent(inout) :: isnow !actual no. of snow layers - real, intent(inout) :: snowh !snow depth [m] - real, intent(inout) :: sneqv !swow water equivalent [m] - real, dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso !thickness of snow/soil layers (m) - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] - real, dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] - real, dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] + integer, intent(inout) :: isnow !< actual no. of snow layers + real (kind=kind_phys), intent(inout) :: snowh !< snow depth [m] + real (kind=kind_phys), intent(inout) :: sneqv !< swow water equivalent [m] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso !< thickness of snow/soil layers (m) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !< snow layer temperature [k] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snice !< snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snliq !< snow layer liquid water [mm] ! local - integer :: newnode ! 0-no new layers, 1-creating new layers + integer :: newnode !< 0-no new layers, 1-creating new layers ! ---------------------------------------------------------------------- newnode = 0 @@ -2399,38 +2473,38 @@ subroutine compact_glacier (nsnow ,nsoil ,dt ,stc ,snice , & !in implicit none ! ---------------------------------------------------------------------- ! input - integer, intent(in) :: nsoil !no. of soil layers [ =4] - integer, intent(in) :: nsnow !maximum no. of snow layers [ =3] - integer, dimension(-nsnow+1:0) , intent(in) :: imelt !melting state index [0-no melt;1-melt] - real, intent(in) :: dt !time step (sec) - real, dimension(-nsnow+1:nsoil), intent(in) :: stc !snow layer temperature [k] - real, dimension(-nsnow+1: 0), intent(in) :: snice !snow layer ice [mm] - real, dimension(-nsnow+1: 0), intent(in) :: snliq !snow layer liquid water [mm] - real, dimension(-nsnow+1: 0), intent(in) :: ficeold!ice fraction at last timestep + integer, intent(in) :: nsoil !< no. of soil layers [ =4] + integer, intent(in) :: nsnow !< maximum no. of snow layers [ =3] + integer, dimension(-nsnow+1:0) , intent(in) :: imelt !< melting state index [0-no melt;1-melt] + real (kind=kind_phys), intent(in) :: dt !< time step (sec) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: stc !< snow layer temperature [k] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: snice !< snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: snliq !< snow layer liquid water [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: ficeold!< ice fraction at last timestep ! input and output - integer, intent(inout) :: isnow ! actual no. of snow layers - real, dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso ! snow layer thickness [m] + integer, intent(inout) :: isnow !< actual no. of snow layers + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso !< snow layer thickness [m] ! local - real, parameter :: c2 = 21.e-3 ![m3/kg] ! default 21.e-3 - real, parameter :: c3 = 2.5e-6 ![1/s] - real, parameter :: c4 = 0.04 ![1/k] - real, parameter :: c5 = 2.0 ! - real, parameter :: dm = 100.0 !upper limit on destructive metamorphism compaction [kg/m3] - real, parameter :: eta0 = 0.8e+6 !viscosity coefficient [kg-s/m2] + real (kind=kind_phys), parameter :: c2 = 21.e-3 !< [m3/kg] ! default 21.e-3 + real (kind=kind_phys), parameter :: c3 = 2.5e-6 !< [1/s] + real (kind=kind_phys), parameter :: c4 = 0.04 !< [1/k] + real (kind=kind_phys), parameter :: c5 = 2.0 !< + real (kind=kind_phys), parameter :: dm = 100.0 !< upper limit on destructive metamorphism compaction [kg/m3] + real (kind=kind_phys), parameter :: eta0 = 0.8e+6 !< viscosity coefficient [kg-s/m2] !according to anderson, it is between 0.52e6~1.38e6 - real :: burden !pressure of overlying snow [kg/m2] - real :: ddz1 !rate of settling of snow pack due to destructive metamorphism. - real :: ddz2 !rate of compaction of snow pack due to overburden. - real :: ddz3 !rate of compaction of snow pack due to melt [1/s] - real :: dexpf !expf=exp(-c4*(273.15-stc)). - real :: td !stc - tfrz [k] - real :: pdzdtc !nodal rate of change in fractional-thickness due to compaction [fraction/s] - real :: void !void (1 - snice - snliq) - real :: wx !water mass (ice + liquid) [kg/m2] - real :: bi !partial density of ice [kg/m3] - real, dimension(-nsnow+1:0) :: fice !fraction of ice at current time step + real (kind=kind_phys) :: burden !< pressure of overlying snow [kg/m2] + real (kind=kind_phys) :: ddz1 !< rate of settling of snow pack due to destructive metamorphism. + real (kind=kind_phys) :: ddz2 !< rate of compaction of snow pack due to overburden. + real (kind=kind_phys) :: ddz3 !< rate of compaction of snow pack due to melt [1/s] + real (kind=kind_phys) :: dexpf !< expf=exp(-c4*(273.15-stc)). + real (kind=kind_phys) :: td !< stc - tfrz [k] + real (kind=kind_phys) :: pdzdtc !< nodal rate of change in fractional-thickness due to compaction [fraction/s] + real (kind=kind_phys) :: void !< void (1 - snice - snliq) + real (kind=kind_phys) :: wx !< water mass (ice + liquid) [kg/m2] + real (kind=kind_phys) :: bi !< partial density of ice [kg/m3] + real (kind=kind_phys), dimension(-nsnow+1:0) :: fice !< fraction of ice at current time step integer :: j @@ -2500,32 +2574,32 @@ subroutine combine_glacier (nsnow ,nsoil , & !in ! ---------------------------------------------------------------------- ! input - integer, intent(in) :: nsnow !maximum no. of snow layers - integer, intent(in) :: nsoil !no. of soil layers + integer, intent(in) :: nsnow !< maximum no. of snow layers + integer, intent(in) :: nsoil !< no. of soil layers ! input and output - integer, intent(inout) :: isnow !actual no. of snow layers - real, dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid moisture (m3/m3) - real, dimension( 1:nsoil), intent(inout) :: sice !soil ice moisture (m3/m3) - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] - real, dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] - real, dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] - real, dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso!snow layer depth [m] - real, intent(inout) :: sneqv !snow water equivalent [m] - real, intent(inout) :: snowh !snow depth [m] - real, intent(inout) :: ponding1 - real, intent(inout) :: ponding2 + integer, intent(inout) :: isnow !< actual no. of snow layers + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sh2o !< soil liquid moisture (m3/m3) + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sice !< soil ice moisture (m3/m3) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !< snow layer temperature [k] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snice !< snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snliq !< snow layer liquid water [mm] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso!< snow layer depth [m] + real (kind=kind_phys), intent(inout) :: sneqv !< snow water equivalent [m] + real (kind=kind_phys), intent(inout) :: snowh !< snow depth [m] + real (kind=kind_phys), intent(inout) :: ponding1 !< + real (kind=kind_phys), intent(inout) :: ponding2 !< ! local variables: - integer :: i,j,k,l ! node indices - integer :: isnow_old ! number of top snow layer - integer :: mssi ! node index - integer :: neibor ! adjacent node selected for combination - real :: zwice ! total ice mass in snow - real :: zwliq ! total liquid water in snow - real :: dzmin(3) ! minimum of top snow layer + integer :: i,j,k,l !< node indices + integer :: isnow_old !< number of top snow layer + integer :: mssi !< node index + integer :: neibor !< adjacent node selected for combination + real (kind=kind_phys) :: zwice !< total ice mass in snow + real (kind=kind_phys) :: zwliq !< total liquid water in snow + real (kind=kind_phys) :: dzmin(3) !< minimum of top snow layer data dzmin /0.045, 0.05, 0.2/ ! data dzmin /0.025, 0.025, 0.1/ ! mb: change limit !----------------------------------------------------------------------- @@ -2672,24 +2746,24 @@ subroutine combo_glacier(dz, wliq, wice, t, dz2, wliq2, wice2, t2) ! ----------------------------------------------------------------------s ! input - real, intent(in) :: dz2 !nodal thickness of 2 elements being combined [m] - real, intent(in) :: wliq2 !liquid water of element 2 [kg/m2] - real, intent(in) :: wice2 !ice of element 2 [kg/m2] - real, intent(in) :: t2 !nodal temperature of element 2 [k] - real, intent(inout) :: dz !nodal thickness of 1 elements being combined [m] - real, intent(inout) :: wliq !liquid water of element 1 - real, intent(inout) :: wice !ice of element 1 [kg/m2] - real, intent(inout) :: t !node temperature of element 1 [k] + real (kind=kind_phys), intent(in) :: dz2 !< nodal thickness of 2 elements being combined [m] + real (kind=kind_phys), intent(in) :: wliq2 !< liquid water of element 2 [kg/m2] + real (kind=kind_phys), intent(in) :: wice2 !< ice of element 2 [kg/m2] + real (kind=kind_phys), intent(in) :: t2 !< nodal temperature of element 2 [k] + real (kind=kind_phys), intent(inout) :: dz !< nodal thickness of 1 elements being combined [m] + real (kind=kind_phys), intent(inout) :: wliq !< liquid water of element 1 + real (kind=kind_phys), intent(inout) :: wice !< ice of element 1 [kg/m2] + real (kind=kind_phys), intent(inout) :: t !< node temperature of element 1 [k] ! local - real :: dzc !total thickness of nodes 1 and 2 (dzc=dz+dz2). - real :: wliqc !combined liquid water [kg/m2] - real :: wicec !combined ice [kg/m2] - real :: tc !combined node temperature [k] - real :: h !enthalpy of element 1 [j/m2] - real :: h2 !enthalpy of element 2 [j/m2] - real :: hc !temporary + real (kind=kind_phys) :: dzc !< total thickness of nodes 1 and 2 (dzc=dz+dz2). + real (kind=kind_phys) :: wliqc !< combined liquid water [kg/m2] + real (kind=kind_phys) :: wicec !< combined ice [kg/m2] + real (kind=kind_phys) :: tc !< combined node temperature [k] + real (kind=kind_phys) :: h !< enthalpy of element 1 [j/m2] + real (kind=kind_phys) :: h2 !< enthalpy of element 2 [j/m2] + real (kind=kind_phys) :: hc !< temporary !----------------------------------------------------------------------- @@ -2723,30 +2797,30 @@ subroutine divide_glacier (nsnow ,nsoil , & !in ! ---------------------------------------------------------------------- ! input - integer, intent(in) :: nsnow !maximum no. of snow layers [ =3] - integer, intent(in) :: nsoil !no. of soil layers [ =4] + integer, intent(in) :: nsnow !< maximum no. of snow layers [ =3] + integer, intent(in) :: nsoil !< no. of soil layers [ =4] ! input and output - integer , intent(inout) :: isnow !actual no. of snow layers - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] - real, dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] - real, dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] - real, dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso!snow layer depth [m] + integer , intent(inout) :: isnow !< actual no. of snow layers + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !< snow layer temperature [k] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snice !< snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snliq !< snow layer liquid water [mm] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso!< snow layer depth [m] ! local variables: - integer :: j !indices - integer :: msno !number of layer (top) to msno (bot) - real :: drr !thickness of the combined [m] - real, dimension( 1:nsnow) :: dz !snow layer thickness [m] - real, dimension( 1:nsnow) :: swice !partial volume of ice [m3/m3] - real, dimension( 1:nsnow) :: swliq !partial volume of liquid water [m3/m3] - real, dimension( 1:nsnow) :: tsno !node temperature [k] - real :: zwice !temporary - real :: zwliq !temporary - real :: propor!temporary - real :: dtdz !temporary + integer :: j !< indices + integer :: msno !< number of layer (top) to msno (bot) + real (kind=kind_phys) :: drr !< thickness of the combined [m] + real (kind=kind_phys), dimension( 1:nsnow) :: dz !< snow layer thickness [m] + real (kind=kind_phys), dimension( 1:nsnow) :: swice !< partial volume of ice [m3/m3] + real (kind=kind_phys), dimension( 1:nsnow) :: swliq !< partial volume of liquid water [m3/m3] + real (kind=kind_phys), dimension( 1:nsnow) :: tsno !< node temperature [k] + real (kind=kind_phys) :: zwice !< temporary + real (kind=kind_phys) :: zwliq !< temporary + real (kind=kind_phys) :: propor!< temporary + real (kind=kind_phys) :: dtdz !< temporary ! ---------------------------------------------------------------------- do j = 1,nsnow @@ -2846,57 +2920,64 @@ subroutine snowh2o_glacier (nsnow ,nsoil ,dt ,qsnfro ,qsnsub , & !in qrain , & !in isnow ,dzsnso ,snowh ,sneqv ,snice , & !inout snliq ,sh2o ,sice ,stc , & !inout - ponding1 ,ponding2 , & !inout + ponding1 ,ponding2 ,fsh , & !inout qsnbot ) !out ! ---------------------------------------------------------------------- -! renew the mass of ice lens (snice) and liquid (snliq) of the -! surface snow layer resulting from sublimation (frost) / evaporation (dew) +!> renew the mass of ice lens (snice) and liquid (snliq) of the +!! surface snow layer resulting from sublimation (frost) / evaporation (dew) ! ---------------------------------------------------------------------- implicit none ! ---------------------------------------------------------------------- ! input - integer, intent(in) :: nsnow !maximum no. of snow layers[=3] - integer, intent(in) :: nsoil !no. of soil layers[=4] - real, intent(in) :: dt !time step - real, intent(in) :: qsnfro !snow surface frost rate[mm/s] - real, intent(in) :: qsnsub !snow surface sublimation rate[mm/s] - real, intent(in) :: qrain !snow surface rain rate[mm/s] + integer, intent(in) :: nsnow !< maximum no. of snow layers[=3] + integer, intent(in) :: nsoil !< no. of soil layers[=4] + real (kind=kind_phys), intent(in) :: dt !< time step + real (kind=kind_phys), intent(inout) :: qsnfro !< snow surface frost rate[mm/s] + real (kind=kind_phys), intent(inout) :: qsnsub !< snow surface sublimation rate[mm/s] + real (kind=kind_phys), intent(in) :: qrain !< snow surface rain rate[mm/s] ! output - real, intent(out) :: qsnbot !melting water out of snow bottom [mm/s] + real (kind=kind_phys), intent(out) :: qsnbot !< melting water out of snow bottom [mm/s] ! input and output - integer, intent(inout) :: isnow !actual no. of snow layers - real, dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso ! snow layer depth [m] - real, intent(inout) :: snowh !snow height [m] - real, intent(inout) :: sneqv !snow water eqv. [mm] - real, dimension(-nsnow+1:0), intent(inout) :: snice !snow layer ice [mm] - real, dimension(-nsnow+1:0), intent(inout) :: snliq !snow layer liquid water [mm] - real, dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid moisture (m3/m3) - real, dimension( 1:nsoil), intent(inout) :: sice !soil ice moisture (m3/m3) - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] - real, intent(inout) :: ponding1 - real, intent(inout) :: ponding2 + integer, intent(inout) :: isnow !< actual no. of snow layers + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso !< snow layer depth [m] + real (kind=kind_phys), intent(inout) :: snowh !< snow height [m] + real (kind=kind_phys), intent(inout) :: sneqv !< snow water eqv. [mm] + real (kind=kind_phys), dimension(-nsnow+1:0), intent(inout) :: snice !< snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1:0), intent(inout) :: snliq !< snow layer liquid water [mm] + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sh2o !< soil liquid moisture (m3/m3) + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sice !< soil ice moisture (m3/m3) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !< snow layer temperature [k] + real (kind=kind_phys), intent(inout) :: ponding1 + real (kind=kind_phys), intent(inout) :: ponding2 + real (kind=kind_phys), intent(inout) :: fsh !< total sensible heat (w/m2) [+ to atm] ! local variables: - integer :: j !do loop/array indices - real :: qin !water flow into the element (mm/s) - real :: qout !water flow out of the element (mm/s) - real :: wgdif !ice mass after minus sublimation - real, dimension(-nsnow+1:0) :: vol_liq !partial volume of liquid water in layer - real, dimension(-nsnow+1:0) :: vol_ice !partial volume of ice lens in layer - real, dimension(-nsnow+1:0) :: epore !effective porosity = porosity - vol_ice - real :: propor, temp + integer :: j !< do loop/array indices + real (kind=kind_phys) :: qin !< water flow into the element (mm/s) + real (kind=kind_phys) :: qout !< water flow out of the element (mm/s) + real (kind=kind_phys) :: wgdif !< ice mass after minus sublimation + real (kind=kind_phys), dimension(-nsnow+1:0) :: vol_liq !< partial volume of liquid water in layer + real (kind=kind_phys), dimension(-nsnow+1:0) :: vol_ice !< partial volume of ice lens in layer + real (kind=kind_phys), dimension(-nsnow+1:0) :: epore !< effective porosity = porosity - vol_ice + real (kind=kind_phys) :: propor, temp ! ---------------------------------------------------------------------- !for the case when sneqv becomes '0' after 'combine' if(sneqv == 0.) then - sice(1) = sice(1) + (qsnfro-qsnsub)*dt/(dzsnso(1)*1000.) + if(opt_gla == 1) then + sice(1) = sice(1) + (qsnfro-qsnsub)*dt/(dzsnso(1)*1000.) + elseif(opt_gla == 2) then + fsh = fsh - (qsnfro-qsnsub)*hsub + qsnfro = 0.0 + qsnsub = 0.0 + end if end if ! for shallow snow without a layer @@ -2905,10 +2986,16 @@ subroutine snowh2o_glacier (nsnow ,nsoil ,dt ,qsnfro ,qsnsub , & !in ! to aviod this problem. if(isnow == 0 .and. sneqv > 0.) then - temp = sneqv - sneqv = sneqv - qsnsub*dt + qsnfro*dt - propor = sneqv/temp - snowh = max(0.,propor * snowh) + if(opt_gla == 1) then + temp = sneqv + sneqv = sneqv - qsnsub*dt + qsnfro*dt + propor = sneqv/temp + snowh = max(0.,propor * snowh) + elseif(opt_gla == 2) then + fsh = fsh - (qsnfro-qsnsub)*hsub + qsnfro = 0.0 + qsnsub = 0.0 + end if if(sneqv < 0.) then sice(1) = sice(1) + sneqv/(dzsnso(1)*1000.) @@ -2998,39 +3085,39 @@ subroutine error_glacier (iloc ,jloc ,swdown ,fsa ,fsr ,fira , & runsrf ,runsub ,sneqv ,dt ,beg_wb ) #endif ! -------------------------------------------------------------------------------------------------- -! check surface energy balance and water balance +!> check surface energy balance and water balance ! -------------------------------------------------------------------------------------------------- implicit none ! -------------------------------------------------------------------------------------------------- ! inputs - integer , intent(in) :: iloc !grid index - integer , intent(in) :: jloc !grid index - real , intent(in) :: swdown !downward solar filtered by sun angle [w/m2] - real , intent(in) :: fsa !total absorbed solar radiation (w/m2) - real , intent(in) :: fsr !total reflected solar radiation (w/m2) - real , intent(in) :: fira !total net longwave rad (w/m2) [+ to atm] - real , intent(in) :: fsh !total sensible heat (w/m2) [+ to atm] - real , intent(in) :: fgev !ground evaporation heat (w/m2) [+ to atm] - real , intent(in) :: ssoil !ground heat flux (w/m2) [+ to soil] - real , intent(in) :: sag - - real , intent(in) :: prcp !precipitation rate (kg m-2 s-1) - real , intent(in) :: edir !soil surface evaporation rate[mm/s] - real , intent(in) :: runsrf !surface runoff [mm/s] - real , intent(in) :: runsub !baseflow (saturation excess) [mm/s] - real , intent(in) :: sneqv !snow water eqv. [mm] - real , intent(in) :: dt !time step [sec] - real , intent(in) :: beg_wb !water storage at begin of a timesetp [mm] + integer , intent(in) :: iloc !< grid index + integer , intent(in) :: jloc !< grid index + real (kind=kind_phys) , intent(in) :: swdown !< downward solar filtered by sun angle [w/m2] + real (kind=kind_phys) , intent(in) :: fsa !< total absorbed solar radiation (w/m2) + real (kind=kind_phys) , intent(in) :: fsr !< total reflected solar radiation (w/m2) + real (kind=kind_phys) , intent(in) :: fira !< total net longwave rad (w/m2) [+ to atm] + real (kind=kind_phys) , intent(in) :: fsh !< total sensible heat (w/m2) [+ to atm] + real (kind=kind_phys) , intent(in) :: fgev !< ground evaporation heat (w/m2) [+ to atm] + real (kind=kind_phys) , intent(in) :: ssoil !< ground heat flux (w/m2) [+ to soil] + real (kind=kind_phys) , intent(in) :: sag + + real (kind=kind_phys) , intent(in) :: prcp !< precipitation rate (kg m-2 s-1) + real (kind=kind_phys) , intent(in) :: edir !< soil surface evaporation rate[mm/s] + real (kind=kind_phys) , intent(in) :: runsrf !< surface runoff [mm/s] + real (kind=kind_phys) , intent(in) :: runsub !< baseflow (saturation excess) [mm/s] + real (kind=kind_phys) , intent(in) :: sneqv !< snow water eqv. [mm] + real (kind=kind_phys) , intent(in) :: dt !< time step [sec] + real (kind=kind_phys) , intent(in) :: beg_wb !< water storage at begin of a timesetp [mm] #ifdef CCPP character(len=*) , intent(inout) :: errmsg integer , intent(inout) :: errflg #endif - real :: end_wb !water storage at end of a timestep [mm] - real :: errwat !error in water balance [mm/timestep] - real :: erreng !error in surface energy balance [w/m2] - real :: errsw !error in shortwave radiation balance [w/m2] + real (kind=kind_phys) :: end_wb !< water storage at end of a timestep [mm] + real (kind=kind_phys) :: errwat !< error in water balance [mm/timestep] + real (kind=kind_phys) :: erreng !< error in surface energy balance [w/m2] + real (kind=kind_phys) :: errsw !< error in shortwave radiation balance [w/m2] character(len=256) :: message ! -------------------------------------------------------------------------------------------------- errsw = swdown - (fsa + fsr) @@ -3076,41 +3163,24 @@ end subroutine error_glacier ! ================================================================================================== !>\ingroup NoahMP_LSM - subroutine noahmp_options_glacier(idveg ,iopt_crs ,iopt_btr ,iopt_run ,iopt_sfc ,iopt_frz , & - iopt_inf ,iopt_rad ,iopt_alb ,iopt_snf ,iopt_tbot, iopt_stc ) + subroutine noahmp_options_glacier(iopt_alb ,iopt_snf ,iopt_tbot, iopt_stc, iopt_gla ) implicit none - integer, intent(in) :: idveg !dynamic vegetation (1 -> off ; 2 -> on) with opt_crs = 1 - integer, intent(in) :: iopt_crs !canopy stomatal resistance (1-> ball-berry; 2->jarvis) - integer, intent(in) :: iopt_btr !soil moisture factor for stomatal resistance (1-> noah; 2-> clm; 3-> ssib) - integer, intent(in) :: iopt_run !runoff and groundwater (1->simgm; 2->simtop; 3->schaake96; 4->bats) - integer, intent(in) :: iopt_sfc !surface layer drag coeff (ch & cm) (1->m-o; 2->chen97) - integer, intent(in) :: iopt_frz !supercooled liquid water (1-> ny06; 2->koren99) - integer, intent(in) :: iopt_inf !frozen soil permeability (1-> ny06; 2->koren99) - integer, intent(in) :: iopt_rad !radiation transfer (1->gap=f(3d,cosz); 2->gap=0; 3->gap=1-fveg) - integer, intent(in) :: iopt_alb !snow surface albedo (1->bats; 2->class) - integer, intent(in) :: iopt_snf !rainfall & snowfall (1-jordan91; 2->bats; 3->noah) - integer, intent(in) :: iopt_tbot !lower boundary of soil temperature (1->zero-flux; 2->noah) - - integer, intent(in) :: iopt_stc !snow/soil temperature time scheme (only layer 1) - ! 1 -> semi-implicit; 2 -> full implicit (original noah) + integer, intent(in) :: iopt_alb !< snow surface albedo (1->bats; 2->class) + integer, intent(in) :: iopt_snf !< rainfall & snowfall (1-jordan91; 2->bats; 3->noah) + integer, intent(in) :: iopt_tbot !< lower boundary of soil temperature (1->zero-flux; 2->noah) + integer, intent(in) :: iopt_stc !< snow/soil temperature time scheme (only layer 1) + !! 1 -> semi-implicit; 2 -> full implicit (original noah) + integer, intent(in) :: iopt_gla !< glacier option (1->phase change; 2->simple) ! ------------------------------------------------------------------------------------------------- - dveg = idveg - - opt_crs = iopt_crs - opt_btr = iopt_btr - opt_run = iopt_run - opt_sfc = iopt_sfc - opt_frz = iopt_frz - opt_inf = iopt_inf - opt_rad = iopt_rad opt_alb = iopt_alb opt_snf = iopt_snf opt_tbot = iopt_tbot opt_stc = iopt_stc + opt_gla = iopt_gla end subroutine noahmp_options_glacier diff --git a/physics/module_sf_noahmplsm.f90 b/physics/module_sf_noahmplsm.f90 index 02ea70a6e..9fcb7edf8 100644 --- a/physics/module_sf_noahmplsm.f90 +++ b/physics/module_sf_noahmplsm.f90 @@ -1,3 +1,4 @@ +#define CCPP !> \file module_sf_noahmplsm.f90 !! This file contains the NoahMP land surface model. @@ -6,6 +7,7 @@ module module_sf_noahmplsm #ifndef CCPP use module_wrf_utl #endif +use machine , only : kind_phys implicit none @@ -71,23 +73,28 @@ module module_sf_noahmplsm ! =====================================options for different schemes================================ ! **recommended - integer :: dveg ! options for dynamic vegetation: + integer :: dveg !< options for dynamic vegetation: ! 1 -> off (use table lai; use fveg = shdfac from input) ! 2 -> on (together with opt_crs = 1) ! 3 -> off (use table lai; calculate fveg) ! **4 -> off (use table lai; use maximum vegetation fraction) ! **5 -> on (use maximum vegetation fraction) + ! 6 -> on (use FVEG = SHDFAC from input) + ! 7 -> off (use input LAI; use FVEG = SHDFAC from input) + ! 8 -> off (use input LAI; calculate FVEG) + ! 9 -> off (use input LAI; use maximum vegetation fraction) + ! 10 -> crop model on (use maximum vegetation fraction) - integer :: opt_crs ! options for canopy stomatal resistance + integer :: opt_crs !< options for canopy stomatal resistance ! **1 -> ball-berry ! 2 -> jarvis - integer :: opt_btr ! options for soil moisture factor for stomatal resistance + integer :: opt_btr !< options for soil moisture factor for stomatal resistance ! **1 -> noah (soil moisture) ! 2 -> clm (matric potential) ! 3 -> ssib (matric potential) - integer :: opt_run ! options for runoff and groundwater + integer :: opt_run !< options for runoff and groundwater ! **1 -> topmodel with groundwater (niu et al. 2007 jgr) ; ! 2 -> topmodel with an equilibrium water table (niu et al. 2005 jgr) ; ! 3 -> original surface and subsurface runoff (free drainage) @@ -95,66 +102,87 @@ module module_sf_noahmplsm ! 5 -> miguez-macho&fan groundwater scheme (miguez-macho et al. 2007 jgr; fan et al. 2007 jgr) ! (needs further testing for public use) - integer :: opt_sfc ! options for surface layer drag coeff (ch & cm) + integer :: opt_sfc !< options for surface layer drag coeff (ch & cm) ! **1 -> m-o ! **2 -> original noah (chen97) ! **3 -> myj consistent; 4->ysu consistent. mb: removed in v3.7 for further testing - integer :: opt_frz ! options for supercooled liquid water (or ice fraction) + integer :: opt_frz !< options for supercooled liquid water (or ice fraction) ! **1 -> no iteration (niu and yang, 2006 jhm) ! 2 -> koren's iteration - integer :: opt_inf ! options for frozen soil permeability + integer :: opt_inf !< options for frozen soil permeability ! **1 -> linear effects, more permeable (niu and yang, 2006, jhm) ! 2 -> nonlinear effects, less permeable (old) - integer :: opt_rad ! options for radiation transfer + integer :: opt_rad !< options for radiation transfer ! 1 -> modified two-stream (gap = f(solar angle, 3d structure ...)<1-fveg) ! 2 -> two-stream applied to grid-cell (gap = 0) ! **3 -> two-stream applied to vegetated fraction (gap=1-fveg) - integer :: opt_alb ! options for ground snow surface albedo + integer :: opt_alb !< options for ground snow surface albedo ! 1 -> bats ! **2 -> class - integer :: opt_snf ! options for partitioning precipitation into rainfall & snowfall + integer :: opt_snf !< options for partitioning precipitation into rainfall & snowfall ! **1 -> jordan (1991) ! 2 -> bats: when sfctmp sfctmp < tfrz ! 4 -> use wrf microphysics output - integer :: opt_tbot ! options for lower boundary condition of soil temperature + integer :: opt_tbot !< options for lower boundary condition of soil temperature ! 1 -> zero heat flux from bottom (zbot and tbot not used) ! **2 -> tbot at zbot (8m) read from a file (original noah) - integer :: opt_stc ! options for snow/soil temperature time scheme (only layer 1) + integer :: opt_stc !< options for snow/soil temperature time scheme (only layer 1) ! **1 -> semi-implicit; flux top boundary condition ! 2 -> full implicit (original noah); temperature top boundary condition ! 3 -> same as 1, but fsno for ts calculation (generally improves snow; v3.7) + integer :: opt_rsf !< options for surface resistent to evaporation/sublimation + ! **1 -> sakaguchi and zeng, 2009 + ! 2 -> sellers (1992) + ! 3 -> adjusted sellers to decrease rsurf for wet soil + ! 4 -> option 1 for non-snow; rsurf = rsurf_snow for snow (set in mptable); ad v3.8 + + integer :: opt_soil !< options for defining soil properties + ! **1 -> use input dominant soil texture + ! 2 -> use input soil texture that varies with depth + ! 3 -> use soil composition (sand, clay, orgm) and pedotransfer functions (opt_pedo) + ! 4 -> use input soil properties (bexp_3d, smcmax_3d, etc.) + + integer :: opt_pedo !< options for pedotransfer functions (used when opt_soil = 3) + ! **1 -> saxton and rawls (2006) + + integer :: opt_crop !< options for crop model + ! **0 -> no crop model, will run default dynamic vegetation + ! 1 -> liu, et al. 2016 + !------------------------------------------------------------------------------------------! ! physical constants: ! !------------------------------------------------------------------------------------------! - real, parameter :: grav = 9.80616 !acceleration due to gravity (m/s2) - real, parameter :: sb = 5.67e-08 !stefan-boltzmann constant (w/m2/k4) - real, parameter :: vkc = 0.40 !von karman constant - real, parameter :: tfrz = 273.16 !freezing/melting point (k) - real, parameter :: hsub = 2.8440e06 !latent heat of sublimation (j/kg) - real, parameter :: hvap = 2.5104e06 !latent heat of vaporization (j/kg) - real, parameter :: hfus = 0.3336e06 !latent heat of fusion (j/kg) - real, parameter :: cwat = 4.188e06 !specific heat capacity of water (j/m3/k) - real, parameter :: cice = 2.094e06 !specific heat capacity of ice (j/m3/k) - real, parameter :: cpair = 1004.64 !heat capacity dry air at const pres (j/kg/k) - real, parameter :: tkwat = 0.6 !thermal conductivity of water (w/m/k) - real, parameter :: tkice = 2.2 !thermal conductivity of ice (w/m/k) - real, parameter :: tkair = 0.023 !thermal conductivity of air (w/m/k) (not used mb: 20140718) - real, parameter :: rair = 287.04 !gas constant for dry air (j/kg/k) - real, parameter :: rw = 461.269 !gas constant for water vapor (j/kg/k) - real, parameter :: denh2o = 1000. !density of water (kg/m3) - real, parameter :: denice = 917. !density of ice (kg/m3) + real (kind=kind_phys), parameter :: grav = 9.80616 !< acceleration due to gravity (m/s2) + real (kind=kind_phys), parameter :: sb = 5.67e-08 !< stefan-boltzmann constant (w/m2/k4) + real (kind=kind_phys), parameter :: vkc = 0.40 !< von karman constant + real (kind=kind_phys), parameter :: tfrz = 273.16 !< freezing/melting point (k) + real (kind=kind_phys), parameter :: hsub = 2.8440e06 !< latent heat of sublimation (j/kg) + real (kind=kind_phys), parameter :: hvap = 2.5104e06 !< latent heat of vaporization (j/kg) + real (kind=kind_phys), parameter :: hfus = 0.3336e06 !< latent heat of fusion (j/kg) + real (kind=kind_phys), parameter :: cwat = 4.188e06 !< specific heat capacity of water (j/m3/k) + real (kind=kind_phys), parameter :: cice = 2.094e06 !< specific heat capacity of ice (j/m3/k) + real (kind=kind_phys), parameter :: cpair = 1004.64 !< heat capacity dry air at const pres (j/kg/k) + real (kind=kind_phys), parameter :: tkwat = 0.6 !< thermal conductivity of water (w/m/k) + real (kind=kind_phys), parameter :: tkice = 2.2 !< thermal conductivity of ice (w/m/k) + real (kind=kind_phys), parameter :: tkair = 0.023 !< thermal conductivity of air (w/m/k) (not used mb: 20140718) + real (kind=kind_phys), parameter :: rair = 287.04 !< gas constant for dry air (j/kg/k) + real (kind=kind_phys), parameter :: rw = 461.269 !< gas constant for water vapor (j/kg/k) + real (kind=kind_phys), parameter :: denh2o = 1000. !< density of water (kg/m3) + real (kind=kind_phys), parameter :: denice = 917. !< density of ice (kg/m3) integer, private, parameter :: mband = 2 + integer, private, parameter :: nsoil = 4 + integer, private, parameter :: nstage = 8 type noahmp_parameters ! define a noahmp parameters type @@ -166,114 +194,176 @@ module module_sf_noahmplsm integer :: iswater integer :: isbarren integer :: isice + integer :: iscrop integer :: eblforest - real :: ch2op !maximum intercepted h2o per unit lai+sai (mm) - real :: dleaf !characteristic leaf dimension (m) - real :: z0mvt !momentum roughness length (m) - real :: hvt !top of canopy (m) - real :: hvb !bottom of canopy (m) - real :: den !tree density (no. of trunks per m2) - real :: rc !tree crown radius (m) - real :: mfsno !snowmelt m parameter () - real :: saim(12) !monthly stem area index, one-sided - real :: laim(12) !monthly leaf area index, one-sided - real :: sla !single-side leaf area per kg [m2/kg] - real :: dilefc !coeficient for leaf stress death [1/s] - real :: dilefw !coeficient for leaf stress death [1/s] - real :: fragr !fraction of growth respiration !original was 0.3 - real :: ltovrc !leaf turnover [1/s] - - real :: c3psn !photosynthetic pathway: 0. = c4, 1. = c3 - real :: kc25 !co2 michaelis-menten constant at 25c (pa) - real :: akc !q10 for kc25 - real :: ko25 !o2 michaelis-menten constant at 25c (pa) - real :: ako !q10 for ko25 - real :: vcmx25 !maximum rate of carboxylation at 25c (umol co2/m**2/s) - real :: avcmx !q10 for vcmx25 - real :: bp !minimum leaf conductance (umol/m**2/s) - real :: mp !slope of conductance-to-photosynthesis relationship - real :: qe25 !quantum efficiency at 25c (umol co2 / umol photon) - real :: aqe !q10 for qe25 - real :: rmf25 !leaf maintenance respiration at 25c (umol co2/m**2/s) - real :: rms25 !stem maintenance respiration at 25c (umol co2/kg bio/s) - real :: rmr25 !root maintenance respiration at 25c (umol co2/kg bio/s) - real :: arm !q10 for maintenance respiration - real :: folnmx !foliage nitrogen concentration when f(n)=1 (%) - real :: tmin !minimum temperature for photosynthesis (k) + real (kind=kind_phys) :: ch2op !< maximum intercepted h2o per unit lai+sai (mm) + real (kind=kind_phys) :: dleaf !< characteristic leaf dimension (m) + real (kind=kind_phys) :: z0mvt !< momentum roughness length (m) + real (kind=kind_phys) :: hvt !< top of canopy (m) + real (kind=kind_phys) :: hvb !< bottom of canopy (m) + real (kind=kind_phys) :: den !< tree density (no. of trunks per m2) + real (kind=kind_phys) :: rc !< tree crown radius (m) + real (kind=kind_phys) :: mfsno !< snowmelt m parameter () + real (kind=kind_phys) :: scffac !< snow cover factor (m) + real (kind=kind_phys) :: saim(12) !< monthly stem area index, one-sided + real (kind=kind_phys) :: laim(12) !< monthly leaf area index, one-sided + real (kind=kind_phys) :: sla !< single-side leaf area per kg [m2/kg] + real (kind=kind_phys) :: dilefc !< coeficient for leaf stress death [1/s] + real (kind=kind_phys) :: dilefw !< coeficient for leaf stress death [1/s] + real (kind=kind_phys) :: fragr !< fraction of growth respiration !original was 0.3 + real (kind=kind_phys) :: ltovrc !< leaf turnover [1/s] + + real (kind=kind_phys) :: c3psn !< photosynthetic pathway: 0. = c4, 1. = c3 + real (kind=kind_phys) :: kc25 !< co2 michaelis-menten constant at 25c (pa) + real (kind=kind_phys) :: akc !< q10 for kc25 + real (kind=kind_phys) :: ko25 !< o2 michaelis-menten constant at 25c (pa) + real (kind=kind_phys) :: ako !< q10 for ko25 + real (kind=kind_phys) :: vcmx25 !< maximum rate of carboxylation at 25c (umol co2/m**2/s) + real (kind=kind_phys) :: avcmx !< q10 for vcmx25 + real (kind=kind_phys) :: bp !< minimum leaf conductance (umol/m**2/s) + real (kind=kind_phys) :: mp !< slope of conductance-to-photosynthesis relationship + real (kind=kind_phys) :: qe25 !< quantum efficiency at 25c (umol co2 / umol photon) + real (kind=kind_phys) :: aqe !< q10 for qe25 + real (kind=kind_phys) :: rmf25 !< leaf maintenance respiration at 25c (umol co2/m**2/s) + real (kind=kind_phys) :: rms25 !< stem maintenance respiration at 25c (umol co2/kg bio/s) + real (kind=kind_phys) :: rmr25 !< root maintenance respiration at 25c (umol co2/kg bio/s) + real (kind=kind_phys) :: arm !< q10 for maintenance respiration + real (kind=kind_phys) :: folnmx !< foliage nitrogen concentration when f(n)=1 (%) + real (kind=kind_phys) :: tmin !< minimum temperature for photosynthesis (k) - real :: xl !leaf/stem orientation index - real :: rhol(mband) !leaf reflectance: 1=vis, 2=nir - real :: rhos(mband) !stem reflectance: 1=vis, 2=nir - real :: taul(mband) !leaf transmittance: 1=vis, 2=nir - real :: taus(mband) !stem transmittance: 1=vis, 2=nir + real (kind=kind_phys) :: xl !< leaf/stem orientation index + real (kind=kind_phys) :: rhol(mband) !< leaf reflectance: 1=vis, 2=nir + real (kind=kind_phys) :: rhos(mband) !< stem reflectance: 1=vis, 2=nir + real (kind=kind_phys) :: taul(mband) !< leaf transmittance: 1=vis, 2=nir + real (kind=kind_phys) :: taus(mband) !< stem transmittance: 1=vis, 2=nir - real :: mrp !microbial respiration parameter (umol co2 /kg c/ s) - real :: cwpvt !empirical canopy wind parameter + real (kind=kind_phys) :: mrp !< microbial respiration parameter (umol co2 /kg c/ s) + real (kind=kind_phys) :: cwpvt !< empirical canopy wind parameter - real :: wrrat !wood to non-wood ratio - real :: wdpool !wood pool (switch 1 or 0) depending on woody or not [-] - real :: tdlef !characteristic t for leaf freezing [k] + real (kind=kind_phys) :: wrrat !< wood to non-wood ratio + real (kind=kind_phys) :: wdpool !< wood pool (switch 1 or 0) depending on woody or not [-] + real (kind=kind_phys) :: tdlef !< characteristic t for leaf freezing [k] - integer :: nroot !number of soil layers with root present - real :: rgl !parameter used in radiation stress function - real :: rsmin !minimum stomatal resistance [s m-1] - real :: hs !parameter used in vapor pressure deficit function - real :: topt !optimum transpiration air temperature [k] - real :: rsmax !maximal stomatal resistance [s m-1] + integer :: nroot !< number of soil layers with root present + real (kind=kind_phys) :: rgl !< parameter used in radiation stress function + real (kind=kind_phys) :: rsmin !< minimum stomatal resistance [s m-1] + real (kind=kind_phys) :: hs !< parameter used in vapor pressure deficit function + real (kind=kind_phys) :: topt !< optimum transpiration air temperature [k] + real (kind=kind_phys) :: rsmax !< maximal stomatal resistance [s m-1] - real :: slarea - real :: eps(5) + real (kind=kind_phys) :: slarea + real (kind=kind_phys) :: eps(5) !------------------------------------------------------------------------------------------! ! from the rad section of mptable.tbl !------------------------------------------------------------------------------------------! - real :: albsat(mband) !saturated soil albedos: 1=vis, 2=nir - real :: albdry(mband) !dry soil albedos: 1=vis, 2=nir - real :: albice(mband) !albedo land ice: 1=vis, 2=nir - real :: alblak(mband) !albedo frozen lakes: 1=vis, 2=nir - real :: omegas(mband) !two-stream parameter omega for snow - real :: betads !two-stream parameter betad for snow - real :: betais !two-stream parameter betad for snow - real :: eg(2) !emissivity + real (kind=kind_phys) :: albsat(mband) !< saturated soil albedos: 1=vis, 2=nir + real (kind=kind_phys) :: albdry(mband) !< dry soil albedos: 1=vis, 2=nir + real (kind=kind_phys) :: albice(mband) !< albedo land ice: 1=vis, 2=nir + real (kind=kind_phys) :: alblak(mband) !< albedo frozen lakes: 1=vis, 2=nir + real (kind=kind_phys) :: omegas(mband) !< two-stream parameter omega for snow + real (kind=kind_phys) :: betads !< two-stream parameter betad for snow + real (kind=kind_phys) :: betais !< two-stream parameter betad for snow + real (kind=kind_phys) :: eg(2) !< emissivity !------------------------------------------------------------------------------------------! ! from the globals section of mptable.tbl !------------------------------------------------------------------------------------------! - real :: co2 !co2 partial pressure - real :: o2 !o2 partial pressure - real :: timean !gridcell mean topgraphic index (global mean) - real :: fsatmx !maximum surface saturated fraction (global mean) - real :: z0sno !snow surface roughness length (m) (0.002) - real :: ssi !liquid water holding capacity for snowpack (m3/m3) - real :: swemx !new snow mass to fully cover old snow (mm) + real (kind=kind_phys) :: co2 !< co2 partial pressure + real (kind=kind_phys) :: o2 !< o2 partial pressure + real (kind=kind_phys) :: timean !< gridcell mean topgraphic index (global mean) + real (kind=kind_phys) :: fsatmx !< maximum surface saturated fraction (global mean) + real (kind=kind_phys) :: z0sno !< snow surface roughness length (m) (0.002) + real (kind=kind_phys) :: ssi !< liquid water holding capacity for snowpack (m3/m3) + real (kind=kind_phys) :: snow_ret_fac !< snowpack water release timescale factor (1/s) + real (kind=kind_phys) :: swemx !< new snow mass to fully cover old snow (mm) + real (kind=kind_phys) :: snow_emis !< snow emissivity + real (kind=kind_phys) :: tau0 !< tau0 from yang97 eqn. 10a + real (kind=kind_phys) :: grain_growth !< growth from vapor diffusion yang97 eqn. 10b + real (kind=kind_phys) :: extra_growth !< extra growth near freezing yang97 eqn. 10c + real (kind=kind_phys) :: dirt_soot !< dirt and soot term yang97 eqn. 10d + real (kind=kind_phys) :: bats_cosz !< zenith angle snow albedo adjustment; b in yang97 eqn. 15 + real (kind=kind_phys) :: bats_vis_new !< new snow visible albedo + real (kind=kind_phys) :: bats_nir_new !< new snow nir albedo + real (kind=kind_phys) :: bats_vis_age !< age factor for diffuse visible snow albedo yang97 eqn. 17 + real (kind=kind_phys) :: bats_nir_age !< age factor for diffuse nir snow albedo yang97 eqn. 18 + real (kind=kind_phys) :: bats_vis_dir !< cosz factor for direct visible snow albedo yang97 eqn. 15 + real (kind=kind_phys) :: bats_nir_dir !< cosz factor for direct nir snow albedo yang97 eqn. 16 + real (kind=kind_phys) :: rsurf_snow !< surface resistance for snow(s/m) + real (kind=kind_phys) :: rsurf_exp !< exponent in the shape parameter for soil resistance option 1 + +!------------------------------------------------------------------------------------------! +! from the crop section of mptable.tbl +!------------------------------------------------------------------------------------------! + + integer :: pltday !< planting date + integer :: hsday !< harvest date + real (kind=kind_phys) :: plantpop !< plant density [per ha] - used? + real (kind=kind_phys) :: irri !< irrigation strategy 0= non-irrigation 1=irrigation (no water-stress) + real (kind=kind_phys) :: gddtbase !< base temperature for gdd accumulation [c] + real (kind=kind_phys) :: gddtcut !< upper temperature for gdd accumulation [c] + real (kind=kind_phys) :: gdds1 !< gdd from seeding to emergence + real (kind=kind_phys) :: gdds2 !< gdd from seeding to initial vegetative + real (kind=kind_phys) :: gdds3 !< gdd from seeding to post vegetative + real (kind=kind_phys) :: gdds4 !< gdd from seeding to intial reproductive + real (kind=kind_phys) :: gdds5 !< gdd from seeding to pysical maturity + integer :: c3c4 !< photosynthetic pathway: 1 = c3 2 = c4 + real (kind=kind_phys) :: aref !< reference maximum co2 assimulation rate + real (kind=kind_phys) :: psnrf !< co2 assimulation reduction factor(0-1) (caused by non-modeling part,e.g.pest,weeds) + real (kind=kind_phys) :: i2par !< fraction of incoming solar radiation to photosynthetically active radiation + real (kind=kind_phys) :: tassim0 !< minimum temperature for co2 assimulation [c] + real (kind=kind_phys) :: tassim1 !< co2 assimulation linearly increasing until temperature reaches t1 [c] + real (kind=kind_phys) :: tassim2 !< co2 assmilation rate remain at aref until temperature reaches t2 [c] + real (kind=kind_phys) :: k !< light extinction coefficient + real (kind=kind_phys) :: epsi !< initial light use efficiency + real (kind=kind_phys) :: q10mr !< q10 for maintainance respiration + real (kind=kind_phys) :: foln_mx !< foliage nitrogen concentration when f(n)=1 (%) + real (kind=kind_phys) :: lefreez !< characteristic t for leaf freezing [k] + real (kind=kind_phys) :: dile_fc(nstage) !< coeficient for temperature leaf stress death [1/s] + real (kind=kind_phys) :: dile_fw(nstage) !< coeficient for water leaf stress death [1/s] + real (kind=kind_phys) :: fra_gr !< fraction of growth respiration + real (kind=kind_phys) :: lf_ovrc(nstage) !< fraction of leaf turnover [1/s] + real (kind=kind_phys) :: st_ovrc(nstage) !< fraction of stem turnover [1/s] + real (kind=kind_phys) :: rt_ovrc(nstage) !< fraction of root tunrover [1/s] + real (kind=kind_phys) :: lfmr25 !< leaf maintenance respiration at 25c [umol co2/m**2 /s] + real (kind=kind_phys) :: stmr25 !< stem maintenance respiration at 25c [umol co2/kg bio/s] + real (kind=kind_phys) :: rtmr25 !< root maintenance respiration at 25c [umol co2/kg bio/s] + real (kind=kind_phys) :: grainmr25 !< grain maintenance respiration at 25c [umol co2/kg bio/s] + real (kind=kind_phys) :: lfpt(nstage) !< fraction of carbohydrate flux to leaf + real (kind=kind_phys) :: stpt(nstage) !< fraction of carbohydrate flux to stem + real (kind=kind_phys) :: rtpt(nstage) !< fraction of carbohydrate flux to root + real (kind=kind_phys) :: grainpt(nstage) !< fraction of carbohydrate flux to grain + real (kind=kind_phys) :: bio2lai !< leaf are per living leaf biomass [m^2/kg] !------------------------------------------------------------------------------------------! ! from the soilparm.tbl tables, as functions of soil category. !------------------------------------------------------------------------------------------! - real :: bexp !b parameter - real :: smcdry !dry soil moisture threshold where direct evap from top + real (kind=kind_phys) :: bexp(nsoil) !< b parameter + real (kind=kind_phys) :: smcdry(nsoil) !< dry soil moisture threshold where direct evap from top !layer ends (volumetric) (not used mb: 20140718) - real :: smcwlt !wilting point soil moisture (volumetric) - real :: smcref !reference soil moisture (field capacity) (volumetric) - real :: smcmax !porosity, saturated value of soil moisture (volumetric) - real :: f1 !soil thermal diffusivity/conductivity coef (not used mb: 20140718) - real :: psisat !saturated soil matric potential - real :: dksat !saturated soil hydraulic conductivity - real :: dwsat !saturated soil hydraulic diffusivity - real :: quartz !soil quartz content + real (kind=kind_phys) :: smcwlt(nsoil) !< wilting point soil moisture (volumetric) + real (kind=kind_phys) :: smcref(nsoil) !< reference soil moisture (field capacity) (volumetric) + real (kind=kind_phys) :: smcmax (nsoil) !< porosity, saturated value of soil moisture (volumetric) + real (kind=kind_phys) :: psisat(nsoil) !< saturated soil matric potential + real (kind=kind_phys) :: dksat(nsoil) !< saturated soil hydraulic conductivity + real (kind=kind_phys) :: dwsat(nsoil) !< saturated soil hydraulic diffusivity + real (kind=kind_phys) :: quartz(nsoil) !< soil quartz content + real (kind=kind_phys) :: f1 !< soil thermal diffusivity/conductivity coef (not used mb: 20140718) !------------------------------------------------------------------------------------------! ! from the genparm.tbl file !------------------------------------------------------------------------------------------! - real :: slope !slope index (0 - 1) - real :: csoil !vol. soil heat capacity [j/m3/k] - real :: zbot !depth (m) of lower boundary soil temperature - real :: czil !calculate roughness length of heat + real (kind=kind_phys) :: slope !< slope index (0 - 1) + real (kind=kind_phys) :: csoil !< vol. soil heat capacity [j/m3/k] + real (kind=kind_phys) :: zbot !< depth (m) of lower boundary soil temperature + real (kind=kind_phys) :: czil !< calculate roughness length of heat + real (kind=kind_phys) :: refdk + real (kind=kind_phys) :: refkdt - real :: kdt !used in compute maximum infiltration rate (in infil) - real :: frzx !used in compute maximum infiltration rate (in infil) + real (kind=kind_phys) :: kdt !< used in compute maximum infiltration rate (in infil) + real (kind=kind_phys) :: frzx !< used in compute maximum infiltration rate (in infil) end type noahmp_parameters @@ -285,7 +375,7 @@ module module_sf_noahmplsm subroutine noahmp_sflx (parameters, & iloc , jloc , lat , yearlen , julian , cosz , & ! in : time/space-related dt , dx , dz8w , nsoil , zsoil , nsnow , & ! in : model configuration - shdfac , shdmax , vegtyp , ice , ist , & ! in : vegetation/soil characteristics + shdfac , shdmax , vegtyp , ice , ist , croptype, & ! in : vegetation/soil characteristics smceq , & ! in : vegetation/soil characteristics sfctmp , sfcprs , psfc , uu , vv , q2 , & ! in : forcing qc , soldn , lwdn , & ! in : forcing @@ -293,12 +383,13 @@ subroutine noahmp_sflx (parameters, & tbot , co2air , o2air , foln , ficeold , zlvl , & ! in : forcing albold , sneqvo , & ! in/out : stc , sh2o , smc , tah , eah , fwet , & ! in/out : - canliq , canice , tv , tg , qsfc , qsnow , & ! in/out : + canliq , canice , tv , tg , qsfc, qsnow, qrain, & ! in/out : isnow , zsnso , snowh , sneqv , snice , snliq , & ! in/out : zwt , wa , wt , wslake , lfmass , rtmass , & ! in/out : stmass , wood , stblcp , fastcp , lai , sai , & ! in/out : cm , ch , tauss , & ! in/out : - smcwtd ,deeprech , rech , & ! in/out : + grain , gdd , pgs , & ! in/out + smcwtd ,deeprech , rech , & ! in/out : z0wrf , & fsa , fsr , fira , fsh , ssoil , fcev , & ! out : fgev , fctr , ecan , etran , edir , trad , & ! out : @@ -306,142 +397,154 @@ subroutine noahmp_sflx (parameters, & runsrf , runsub , apar , psn , sav , sag , & ! out : fsno , nee , gpp , npp , fveg , albedo , & ! out : qsnbot , ponding , ponding1, ponding2, rssun , rssha , & ! out : + albd , albi , albsnd , albsni , & ! out : bgap , wgap , chv , chb , emissi , & ! out : shg , shc , shb , evg , evb , ghv , & ! out : ghb , irg , irc , irb , tr , evc , & ! out : chleaf , chuc , chv2 , chb2 , fpice , pahv , & + pahg , pahb , pah , esnow , laisun , laisha , rb & #ifdef CCPP - pahg , pahb , pah , esnow, errmsg, errflg) + ,errmsg, errflg) #else - pahg , pahb , pah , esnow) + ) #endif ! -------------------------------------------------------------------------------------------------- ! initial code: guo-yue niu, oct. 2007 ! -------------------------------------------------------------------------------------------------- + implicit none ! -------------------------------------------------------------------------------------------------- ! input type (noahmp_parameters), intent(in) :: parameters - integer , intent(in) :: ice !ice (ice = 1) - integer , intent(in) :: ist !surface type 1->soil; 2->lake - integer , intent(in) :: vegtyp !vegetation type - integer , intent(in) :: nsnow !maximum no. of snow layers - integer , intent(in) :: nsoil !no. of soil layers - integer , intent(in) :: iloc !grid index - integer , intent(in) :: jloc !grid index - real , intent(in) :: dt !time step [sec] - real, dimension( 1:nsoil), intent(in) :: zsoil !layer-bottom depth from soil surf (m) - real , intent(in) :: q2 !mixing ratio (kg/kg) lowest model layer - real , intent(in) :: sfctmp !surface air temperature [k] - real , intent(in) :: uu !wind speed in eastward dir (m/s) - real , intent(in) :: vv !wind speed in northward dir (m/s) - real , intent(in) :: soldn !downward shortwave radiation (w/m2) - real , intent(in) :: lwdn !downward longwave radiation (w/m2) - real , intent(in) :: sfcprs !pressure (pa) - real , intent(inout) :: zlvl !reference height (m) - real , intent(in) :: cosz !cosine solar zenith angle [0-1] - real , intent(in) :: tbot !bottom condition for soil temp. [k] - real , intent(in) :: foln !foliage nitrogen (%) [1-saturated] - real , intent(in) :: shdfac !green vegetation fraction [0.0-1.0] - integer , intent(in) :: yearlen!number of days in the particular year. - real , intent(in) :: julian !julian day of year (floating point) - real , intent(in) :: lat !latitude (radians) - real, dimension(-nsnow+1: 0), intent(in) :: ficeold!ice fraction at last timestep - real, dimension( 1:nsoil), intent(in) :: smceq !equilibrium soil water content [m3/m3] - real , intent(in) :: prcpconv ! convective precipitation entering [mm/s] ! mb/an : v3.7 - real , intent(in) :: prcpnonc ! non-convective precipitation entering [mm/s] ! mb/an : v3.7 - real , intent(in) :: prcpshcv ! shallow convective precip entering [mm/s] ! mb/an : v3.7 - real , intent(in) :: prcpsnow ! snow entering land model [mm/s] ! mb/an : v3.7 - real , intent(in) :: prcpgrpl ! graupel entering land model [mm/s] ! mb/an : v3.7 - real , intent(in) :: prcphail ! hail entering land model [mm/s] ! mb/an : v3.7 + integer , intent(in) :: ice !< ice (ice = 1) + integer , intent(in) :: ist !< surface type 1->soil; 2->lake + integer , intent(in) :: vegtyp !< vegetation type + INTEGER , INTENT(IN) :: CROPTYPE !< crop type + integer , intent(in) :: nsnow !< maximum no. of snow layers + integer , intent(in) :: nsoil !< no. of soil layers + integer , intent(in) :: iloc !< grid index + integer , intent(in) :: jloc !< grid index + real (kind=kind_phys) , intent(in) :: dt !< time step [sec] + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: zsoil !< layer-bottom depth from soil surf (m) + real (kind=kind_phys) , intent(in) :: q2 !< mixing ratio (kg/kg) lowest model layer + real (kind=kind_phys) , intent(in) :: sfctmp !< surface air temperature [k] + real (kind=kind_phys) , intent(in) :: uu !< wind speed in eastward dir (m/s) + real (kind=kind_phys) , intent(in) :: vv !< wind speed in northward dir (m/s) + real (kind=kind_phys) , intent(in) :: soldn !< downward shortwave radiation (w/m2) + real (kind=kind_phys) , intent(in) :: lwdn !< downward longwave radiation (w/m2) + real (kind=kind_phys) , intent(in) :: sfcprs !< pressure (pa) + real (kind=kind_phys) , intent(inout) :: zlvl !< reference height (m) + real (kind=kind_phys) , intent(in) :: cosz !< cosine solar zenith angle [0-1] + real (kind=kind_phys) , intent(in) :: tbot !< bottom condition for soil temp. [k] + real (kind=kind_phys) , intent(in) :: foln !< foliage nitrogen (%) [1-saturated] + real (kind=kind_phys) , intent(in) :: shdfac !< green vegetation fraction [0.0-1.0] + integer , intent(in) :: yearlen!< number of days in the particular year. + real (kind=kind_phys) , intent(in) :: julian !< julian day of year (floating point) + real (kind=kind_phys) , intent(in) :: lat !< latitude (radians) + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: ficeold!< ice fraction at last timestep + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: smceq !< equilibrium soil water content [m3/m3] + real (kind=kind_phys) , intent(in) :: prcpconv !< convective precipitation entering [mm/s] ! mb/an : v3.7 + real (kind=kind_phys) , intent(in) :: prcpnonc !< non-convective precipitation entering [mm/s] ! mb/an : v3.7 + real (kind=kind_phys) , intent(in) :: prcpshcv !< shallow convective precip entering [mm/s] ! mb/an : v3.7 + real (kind=kind_phys) , intent(in) :: prcpsnow !< snow entering land model [mm/s] ! mb/an : v3.7 + real (kind=kind_phys) , intent(in) :: prcpgrpl !< graupel entering land model [mm/s] ! mb/an : v3.7 + real (kind=kind_phys) , intent(in) :: prcphail !< hail entering land model [mm/s] ! mb/an : v3.7 !jref:start; in - real , intent(in) :: qc !cloud water mixing ratio - real , intent(inout) :: qsfc !mixing ratio at lowest model layer - real , intent(in) :: psfc !pressure at lowest model layer - real , intent(in) :: dz8w !thickness of lowest layer - real , intent(in) :: dx - real , intent(in) :: shdmax !yearly max vegetation fraction + real (kind=kind_phys) , intent(in) :: qc !< cloud water mixing ratio + real (kind=kind_phys) , intent(inout) :: qsfc !< mixing ratio at lowest model layer + real (kind=kind_phys) , intent(in) :: psfc !< pressure at lowest model layer + real (kind=kind_phys) , intent(in) :: dz8w !< thickness of lowest layer + real (kind=kind_phys) , intent(in) :: dx + real (kind=kind_phys) , intent(in) :: shdmax !< yearly max vegetation fraction !jref:end ! input/output : need arbitary intial values - real , intent(inout) :: qsnow !snowfall [mm/s] - real , intent(inout) :: fwet !wetted or snowed fraction of canopy (-) - real , intent(inout) :: sneqvo !snow mass at last time step (mm) - real , intent(inout) :: eah !canopy air vapor pressure (pa) - real , intent(inout) :: tah !canopy air tmeperature (k) - real , intent(inout) :: albold !snow albedo at last time step (class type) - real , intent(inout) :: cm !momentum drag coefficient - real , intent(inout) :: ch !sensible heat exchange coefficient - real , intent(inout) :: tauss !non-dimensional snow age + real (kind=kind_phys) , intent(inout) :: qsnow !< snowfall [mm/s] + REAL (kind=kind_phys) , INTENT(INOUT) :: QRAIN !< rainfall [mm/s] + real (kind=kind_phys) , intent(inout) :: fwet !< wetted or snowed fraction of canopy (-) + real (kind=kind_phys) , intent(inout) :: sneqvo !< snow mass at last time step (mm) + real (kind=kind_phys) , intent(inout) :: eah !< canopy air vapor pressure (pa) + real (kind=kind_phys) , intent(inout) :: tah !< canopy air tmeperature (k) + real (kind=kind_phys) , intent(inout) :: albold !< snow albedo at last time step (class type) + real (kind=kind_phys) , intent(inout) :: cm !< momentum drag coefficient + real (kind=kind_phys) , intent(inout) :: ch !< sensible heat exchange coefficient + real (kind=kind_phys) , intent(inout) :: tauss !< non-dimensional snow age ! prognostic variables - integer , intent(inout) :: isnow !actual no. of snow layers [-] - real , intent(inout) :: canliq !intercepted liquid water (mm) - real , intent(inout) :: canice !intercepted ice mass (mm) - real , intent(inout) :: sneqv !snow water eqv. [mm] - real, dimension( 1:nsoil), intent(inout) :: smc !soil moisture (ice + liq.) [m3/m3] - real, dimension(-nsnow+1:nsoil), intent(inout) :: zsnso !layer-bottom depth from snow surf [m] - real , intent(inout) :: snowh !snow height [m] - real, dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] - real, dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] - real , intent(inout) :: tv !vegetation temperature (k) - real , intent(inout) :: tg !ground temperature (k) - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow/soil temperature [k] - real, dimension( 1:nsoil), intent(inout) :: sh2o !liquid soil moisture [m3/m3] - real , intent(inout) :: zwt !depth to water table [m] - real , intent(inout) :: wa !water storage in aquifer [mm] - real , intent(inout) :: wt !water in aquifer&saturated soil [mm] - real , intent(inout) :: wslake !lake water storage (can be neg.) (mm) - real, intent(inout) :: smcwtd !soil water content between bottom of the soil and water table [m3/m3] - real, intent(inout) :: deeprech !recharge to or from the water table when deep [m] - real, intent(inout) :: rech !recharge to or from the water table when shallow [m] (diagnostic) + integer , intent(inout) :: isnow !< actual no. of snow layers [-] + real (kind=kind_phys) , intent(inout) :: canliq !< intercepted liquid water (mm) + real (kind=kind_phys) , intent(inout) :: canice !< intercepted ice mass (mm) + real (kind=kind_phys) , intent(inout) :: sneqv !< snow water eqv. [mm] + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: smc !< soil moisture (ice + liq.) [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: zsnso !< layer-bottom depth from snow surf [m] + real (kind=kind_phys) , intent(inout) :: snowh !< snow height [m] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snice !< snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snliq !< snow layer liquid water [mm] + real (kind=kind_phys) , intent(inout) :: tv !< vegetation temperature (k) + real (kind=kind_phys) , intent(inout) :: tg !< ground temperature (k) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !< snow/soil temperature [k] + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sh2o !< liquid soil moisture [m3/m3] + real (kind=kind_phys) , intent(inout) :: zwt !< depth to water table [m] + real (kind=kind_phys) , intent(inout) :: wa !< water storage in aquifer [mm] + real (kind=kind_phys) , intent(inout) :: wt !< water in aquifer&saturated soil [mm] + real (kind=kind_phys) , intent(inout) :: wslake !< lake water storage (can be neg.) (mm) + real (kind=kind_phys), intent(inout) :: smcwtd !< soil water content between bottom of the soil and water table [m3/m3] + real (kind=kind_phys), intent(inout) :: deeprech !< recharge to or from the water table when deep [m] + real (kind=kind_phys), intent(inout) :: rech !< recharge to or from the water table when shallow [m] (diagnostic) ! output - real , intent(out) :: z0wrf !combined z0 sent to coupled model - real , intent(out) :: fsa !total absorbed solar radiation (w/m2) - real , intent(out) :: fsr !total reflected solar radiation (w/m2) - real , intent(out) :: fira !total net lw rad (w/m2) [+ to atm] - real , intent(out) :: fsh !total sensible heat (w/m2) [+ to atm] - real , intent(out) :: fcev !canopy evap heat (w/m2) [+ to atm] - real , intent(out) :: fgev !ground evap heat (w/m2) [+ to atm] - real , intent(out) :: fctr !transpiration heat (w/m2) [+ to atm] - real , intent(out) :: ssoil !ground heat flux (w/m2) [+ to soil] - real , intent(out) :: trad !surface radiative temperature (k) - real :: ts !surface temperature (k) - real , intent(out) :: ecan !evaporation of intercepted water (mm/s) - real , intent(out) :: etran !transpiration rate (mm/s) - real , intent(out) :: edir !soil surface evaporation rate (mm/s] - real , intent(out) :: runsrf !surface runoff [mm/s] - real , intent(out) :: runsub !baseflow (saturation excess) [mm/s] - real , intent(out) :: psn !total photosynthesis (umol co2/m2/s) [+] - real , intent(out) :: apar !photosyn active energy by canopy (w/m2) - real , intent(out) :: sav !solar rad absorbed by veg. (w/m2) - real , intent(out) :: sag !solar rad absorbed by ground (w/m2) - real , intent(out) :: fsno !snow cover fraction on the ground (-) - real , intent(out) :: fveg !green vegetation fraction [0.0-1.0] - real , intent(out) :: albedo !surface albedo [-] - real :: errwat !water error [kg m{-2}] - real , intent(out) :: qsnbot !snowmelt out bottom of pack [mm/s] - real , intent(out) :: ponding!surface ponding [mm] - real , intent(out) :: ponding1!surface ponding [mm] - real , intent(out) :: ponding2!surface ponding [mm] - real , intent(out) :: esnow + real (kind=kind_phys) , intent(out) :: z0wrf !< combined z0 sent to coupled model + real (kind=kind_phys) , intent(out) :: fsa !< total absorbed solar radiation (w/m2) + real (kind=kind_phys) , intent(out) :: fsr !< total reflected solar radiation (w/m2) + real (kind=kind_phys) , intent(out) :: fira !< total net lw rad (w/m2) [+ to atm] + real (kind=kind_phys) , intent(out) :: fsh !< total sensible heat (w/m2) [+ to atm] + real (kind=kind_phys) , intent(out) :: fcev !< canopy evap heat (w/m2) [+ to atm] + real (kind=kind_phys) , intent(out) :: fgev !< ground evap heat (w/m2) [+ to atm] + real (kind=kind_phys) , intent(out) :: fctr !< transpiration heat (w/m2) [+ to atm] + real (kind=kind_phys) , intent(out) :: ssoil !< ground heat flux (w/m2) [+ to soil] + real (kind=kind_phys) , intent(out) :: trad !< surface radiative temperature (k) + real (kind=kind_phys) :: ts !< surface temperature (k) + real (kind=kind_phys) , intent(out) :: ecan !< evaporation of intercepted water (mm/s) + real (kind=kind_phys) , intent(out) :: etran !< transpiration rate (mm/s) + real (kind=kind_phys) , intent(out) :: edir !< soil surface evaporation rate (mm/s] + real (kind=kind_phys) , intent(out) :: runsrf !< surface runoff [mm/s] + real (kind=kind_phys) , intent(out) :: runsub !< baseflow (saturation excess) [mm/s] + real (kind=kind_phys) , intent(out) :: psn !< total photosynthesis (umol co2/m2/s) [+] + real (kind=kind_phys) , intent(out) :: apar !< photosyn active energy by canopy (w/m2) + real (kind=kind_phys) , intent(out) :: sav !< solar rad absorbed by veg. (w/m2) + real (kind=kind_phys) , intent(out) :: sag !< solar rad absorbed by ground (w/m2) + real (kind=kind_phys) , intent(out) :: fsno !< snow cover fraction on the ground (-) + real (kind=kind_phys) , intent(out) :: fveg !< green vegetation fraction [0.0-1.0] + real (kind=kind_phys) , intent(out) :: albedo !< surface albedo [-] + real (kind=kind_phys) :: errwat !< water error [kg m{-2}] + real (kind=kind_phys) , intent(out) :: qsnbot !< snowmelt out bottom of pack [mm/s] + real (kind=kind_phys) , intent(out) :: ponding!< surface ponding [mm] + real (kind=kind_phys) , intent(out) :: ponding1!< surface ponding [mm] + real (kind=kind_phys) , intent(out) :: ponding2!< surface ponding [mm] + real (kind=kind_phys) , intent(out) :: esnow + real (kind=kind_phys) , intent(out) :: rb !< leaf boundary layer resistance (s/m) + real (kind=kind_phys) , intent(out) :: laisun !< sunlit leaf area index (m2/m2) + real (kind=kind_phys) , intent(out) :: laisha !< shaded leaf area index (m2/m2) !jref:start; output - real , intent(out) :: t2mv !2-m air temperature over vegetated part [k] - real , intent(out) :: t2mb !2-m air temperature over bare ground part [k] - real, intent(out) :: rssun !sunlit leaf stomatal resistance (s/m) - real, intent(out) :: rssha !shaded leaf stomatal resistance (s/m) - real, intent(out) :: bgap - real, intent(out) :: wgap - real, intent(out) :: tgv - real, intent(out) :: tgb - real :: q1 - real, intent(out) :: emissi + real (kind=kind_phys) , intent(out) :: t2mv !< 2-m air temperature over vegetated part [k] + real (kind=kind_phys) , intent(out) :: t2mb !< 2-m air temperature over bare ground part [k] + real (kind=kind_phys), intent(out) :: rssun !< sunlit leaf stomatal resistance (s/m) + real (kind=kind_phys), intent(out) :: rssha !< shaded leaf stomatal resistance (s/m) + real (kind=kind_phys), intent(out) :: bgap + real (kind=kind_phys), intent(out) :: wgap + real (kind=kind_phys), dimension(1:2) , intent(out) :: albd !< albedo (direct) + real (kind=kind_phys), dimension(1:2) , intent(out) :: albi !< albedo (diffuse) + real (kind=kind_phys), dimension(1:2) , intent(out) :: albsnd !< snow albedo (direct) + real (kind=kind_phys), dimension(1:2) , intent(out) :: albsni !< snow albedo (diffuse) + real (kind=kind_phys), intent(out) :: tgv + real (kind=kind_phys), intent(out) :: tgb + real (kind=kind_phys) :: q1 + real (kind=kind_phys), intent(out) :: emissi !jref:end #ifdef CCPP character(len=*), intent(inout) :: errmsg @@ -449,115 +552,119 @@ subroutine noahmp_sflx (parameters, & #endif ! local - integer :: iz !do-loop index - integer, dimension(-nsnow+1:nsoil) :: imelt !phase change index [1-melt; 2-freeze] - real :: cmc !intercepted water (canice+canliq) (mm) - real :: taux !wind stress: e-w (n/m2) - real :: tauy !wind stress: n-s (n/m2) - real :: rhoair !density air (kg/m3) -! real, dimension( 1: 5) :: vocflx !voc fluxes [ug c m-2 h-1] - real, dimension(-nsnow+1:nsoil) :: dzsnso !snow/soil layer thickness [m] - real :: thair !potential temperature (k) - real :: qair !specific humidity (kg/kg) (q2/(1+q2)) - real :: eair !vapor pressure air (pa) - real, dimension( 1: 2) :: solad !incoming direct solar rad (w/m2) - real, dimension( 1: 2) :: solai !incoming diffuse solar rad (w/m2) - real :: qprecc !convective precipitation (mm/s) - real :: qprecl !large-scale precipitation (mm/s) - real :: igs !growing season index (0=off, 1=on) - real :: elai !leaf area index, after burying by snow - real :: esai !stem area index, after burying by snow - real :: bevap !soil water evaporation factor (0 - 1) - real, dimension( 1:nsoil) :: btrani !soil water transpiration factor (0 - 1) - real :: btran !soil water transpiration factor (0 - 1) - real :: qin !groundwater recharge [mm/s] - real :: qdis !groundwater discharge [mm/s] - real, dimension( 1:nsoil) :: sice !soil ice content (m3/m3) - real, dimension(-nsnow+1: 0) :: snicev !partial volume ice of snow [m3/m3] - real, dimension(-nsnow+1: 0) :: snliqv !partial volume liq of snow [m3/m3] - real, dimension(-nsnow+1: 0) :: epore !effective porosity [m3/m3] - real :: totsc !total soil carbon (g/m2) - real :: totlb !total living carbon (g/m2) - real :: t2m !2-meter air temperature (k) - real :: qdew !ground surface dew rate [mm/s] - real :: qvap !ground surface evap. rate [mm/s] - real :: lathea !latent heat [j/kg] - real :: swdown !downward solar [w/m2] - real :: qmelt !snowmelt [mm/s] - real :: beg_wb !water storage at begin of a step [mm] - real,intent(out) :: irc !canopy net lw rad. [w/m2] [+ to atm] - real,intent(out) :: irg !ground net lw rad. [w/m2] [+ to atm] - real,intent(out) :: shc !canopy sen. heat [w/m2] [+ to atm] - real,intent(out) :: shg !ground sen. heat [w/m2] [+ to atm] - real,intent(out) :: evg !ground evap. heat [w/m2] [+ to atm] - real,intent(out) :: ghv !ground heat flux [w/m2] [+ to soil] - real,intent(out) :: irb !net longwave rad. [w/m2] [+ to atm] - real,intent(out) :: shb !sensible heat [w/m2] [+ to atm] - real,intent(out) :: evb !evaporation heat [w/m2] [+ to atm] - real,intent(out) :: ghb !ground heat flux [w/m2] [+ to soil] - real,intent(out) :: evc !canopy evap. heat [w/m2] [+ to atm] - real,intent(out) :: tr !transpiration heat [w/m2] [+ to atm] - real, intent(out) :: fpice !snow fraction in precipitation - real, intent(out) :: pahv !precipitation advected heat - vegetation net (w/m2) - real, intent(out) :: pahg !precipitation advected heat - under canopy net (w/m2) - real, intent(out) :: pahb !precipitation advected heat - bare ground net (w/m2) - real, intent(out) :: pah !precipitation advected heat - total (w/m2) + integer :: iz !< do-loop index + integer, dimension(-nsnow+1:nsoil) :: imelt !< phase change index [1-melt; 2-freeze] + real (kind=kind_phys) :: cmc !< intercepted water (canice+canliq) (mm) + real (kind=kind_phys) :: taux !< wind stress: e-w (n/m2) + real (kind=kind_phys) :: tauy !< wind stress: n-s (n/m2) + real (kind=kind_phys) :: rhoair !< density air (kg/m3) +! real (kind=kind_phys), dimension( 1: 5) :: vocflx !< voc fluxes [ug c m-2 h-1] + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: dzsnso !< snow/soil layer thickness [m] + real (kind=kind_phys) :: thair !< potential temperature (k) + real (kind=kind_phys) :: qair !< specific humidity (kg/kg) (q2/(1+q2)) + real (kind=kind_phys) :: eair !< vapor pressure air (pa) + real (kind=kind_phys), dimension( 1: 2) :: solad !< incoming direct solar rad (w/m2) + real (kind=kind_phys), dimension( 1: 2) :: solai !< incoming diffuse solar rad (w/m2) + real (kind=kind_phys) :: qprecc !< convective precipitation (mm/s) + real (kind=kind_phys) :: qprecl !< large-scale precipitation (mm/s) + real (kind=kind_phys) :: igs !< growing season index (0=off, 1=on) + real (kind=kind_phys) :: elai !< leaf area index, after burying by snow + real (kind=kind_phys) :: esai !< stem area index, after burying by snow + real (kind=kind_phys) :: bevap !< soil water evaporation factor (0 - 1) + real (kind=kind_phys), dimension( 1:nsoil) :: btrani !< soil water transpiration factor (0 - 1) + real (kind=kind_phys) :: btran !< soil water transpiration factor (0 - 1) + real (kind=kind_phys) :: qin !< groundwater recharge [mm/s] + real (kind=kind_phys) :: qdis !< groundwater discharge [mm/s] + real (kind=kind_phys), dimension( 1:nsoil) :: sice !< soil ice content (m3/m3) + real (kind=kind_phys), dimension(-nsnow+1: 0) :: snicev !< partial volume ice of snow [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1: 0) :: snliqv !< partial volume liq of snow [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1: 0) :: epore !< effective porosity [m3/m3] + real (kind=kind_phys) :: totsc !< total soil carbon (g/m2) + real (kind=kind_phys) :: totlb !< total living carbon (g/m2) + real (kind=kind_phys) :: t2m !< 2-meter air temperature (k) + real (kind=kind_phys) :: qdew !< ground surface dew rate [mm/s] + real (kind=kind_phys) :: qvap !< ground surface evap. rate [mm/s] + real (kind=kind_phys) :: lathea !< latent heat [j/kg] + real (kind=kind_phys) :: swdown !< downward solar [w/m2] + real (kind=kind_phys) :: qmelt !< snowmelt [mm/s] + real (kind=kind_phys) :: beg_wb !< water storage at begin of a step [mm] + real (kind=kind_phys),intent(out) :: irc !< canopy net lw rad. [w/m2] [+ to atm] + real (kind=kind_phys),intent(out) :: irg !< ground net lw rad. [w/m2] [+ to atm] + real (kind=kind_phys),intent(out) :: shc !< canopy sen. heat [w/m2] [+ to atm] + real (kind=kind_phys),intent(out) :: shg !< ground sen. heat [w/m2] [+ to atm] + real (kind=kind_phys),intent(out) :: evg !< ground evap. heat [w/m2] [+ to atm] + real (kind=kind_phys),intent(out) :: ghv !< ground heat flux [w/m2] [+ to soil] + real (kind=kind_phys),intent(out) :: irb !< net longwave rad. [w/m2] [+ to atm] + real (kind=kind_phys),intent(out) :: shb !< sensible heat [w/m2] [+ to atm] + real (kind=kind_phys),intent(out) :: evb !< evaporation heat [w/m2] [+ to atm] + real (kind=kind_phys),intent(out) :: ghb !< ground heat flux [w/m2] [+ to soil] + real (kind=kind_phys),intent(out) :: evc !< canopy evap. heat [w/m2] [+ to atm] + real (kind=kind_phys),intent(out) :: tr !< transpiration heat [w/m2] [+ to atm] + real (kind=kind_phys), intent(out) :: fpice !< snow fraction in precipitation + real (kind=kind_phys), intent(out) :: pahv !< precipitation advected heat - vegetation net (w/m2) + real (kind=kind_phys), intent(out) :: pahg !< precipitation advected heat - under canopy net (w/m2) + real (kind=kind_phys), intent(out) :: pahb !< precipitation advected heat - bare ground net (w/m2) + real (kind=kind_phys), intent(out) :: pah !< precipitation advected heat - total (w/m2) !jref:start - real :: fsrv - real :: fsrg - real,intent(out) :: q2v - real,intent(out) :: q2b - real :: q2e - real :: qfx - real,intent(out) :: chv !sensible heat exchange coefficient over vegetated fraction - real,intent(out) :: chb !sensible heat exchange coefficient over bare-ground - real,intent(out) :: chleaf !leaf exchange coefficient - real,intent(out) :: chuc !under canopy exchange coefficient - real,intent(out) :: chv2 !sensible heat exchange coefficient over vegetated fraction - real,intent(out) :: chb2 !sensible heat exchange coefficient over bare-ground + real (kind=kind_phys) :: fsrv + real (kind=kind_phys) :: fsrg + real (kind=kind_phys),intent(out) :: q2v + real (kind=kind_phys),intent(out) :: q2b + real (kind=kind_phys) :: q2e + real (kind=kind_phys) :: qfx + real (kind=kind_phys),intent(out) :: chv !< sensible heat exchange coefficient over vegetated fraction + real (kind=kind_phys),intent(out) :: chb !< sensible heat exchange coefficient over bare-ground + real (kind=kind_phys),intent(out) :: chleaf !< leaf exchange coefficient + real (kind=kind_phys),intent(out) :: chuc !< under canopy exchange coefficient + real (kind=kind_phys),intent(out) :: chv2 !< sensible heat exchange coefficient over vegetated fraction + real (kind=kind_phys),intent(out) :: chb2 !< sensible heat exchange coefficient over bare-ground !jref:end ! carbon ! inputs - real , intent(in) :: co2air !atmospheric co2 concentration (pa) - real , intent(in) :: o2air !atmospheric o2 concentration (pa) + real (kind=kind_phys) , intent(in) :: co2air !< atmospheric co2 concentration (pa) + real (kind=kind_phys) , intent(in) :: o2air !< atmospheric o2 concentration (pa) ! inputs and outputs : prognostic variables - real , intent(inout) :: lfmass !leaf mass [g/m2] - real , intent(inout) :: rtmass !mass of fine roots [g/m2] - real , intent(inout) :: stmass !stem mass [g/m2] - real , intent(inout) :: wood !mass of wood (incl. woody roots) [g/m2] - real , intent(inout) :: stblcp !stable carbon in deep soil [g/m2] - real , intent(inout) :: fastcp !short-lived carbon, shallow soil [g/m2] - real , intent(inout) :: lai !leaf area index [-] - real , intent(inout) :: sai !stem area index [-] + real (kind=kind_phys) , intent(inout) :: lfmass !< leaf mass [g/m2] + real (kind=kind_phys) , intent(inout) :: rtmass !< mass of fine roots [g/m2] + real (kind=kind_phys) , intent(inout) :: stmass !< stem mass [g/m2] + real (kind=kind_phys) , intent(inout) :: wood !< mass of wood (incl. woody roots) [g/m2] + real (kind=kind_phys) , intent(inout) :: stblcp !< stable carbon in deep soil [g/m2] + real (kind=kind_phys) , intent(inout) :: fastcp !< short-lived carbon, shallow soil [g/m2] + real (kind=kind_phys) , intent(inout) :: lai !< leaf area index [-] + real (kind=kind_phys) , intent(inout) :: sai !< stem area index [-] + real (kind=kind_phys) , intent(inout) :: grain !< grain mass [g/m2] + real (kind=kind_phys) , intent(inout) :: gdd !< growing degree days + integer , intent(inout) :: pgs !< plant growing stage [-] ! outputs - real , intent(out) :: nee !net ecosys exchange (g/m2/s co2) - real , intent(out) :: gpp !net instantaneous assimilation [g/m2/s c] - real , intent(out) :: npp !net primary productivity [g/m2/s c] - real :: autors !net ecosystem respiration (g/m2/s c) - real :: heters !organic respiration (g/m2/s c) - real :: troot !root-zone averaged temperature (k) - real :: bdfall !bulk density of new snow (kg/m3) ! mb/an: v3.7 - real :: rain !rain rate (mm/s) ! mb/an: v3.7 - real :: snow !liquid equivalent snow rate (mm/s) ! mb/an: v3.7 - real :: fp ! mb/an: v3.7 - real :: prcp ! mb/an: v3.7 + real (kind=kind_phys) , intent(out) :: nee !< net ecosys exchange (g/m2/s co2) + real (kind=kind_phys) , intent(out) :: gpp !< net instantaneous assimilation [g/m2/s c] + real (kind=kind_phys) , intent(out) :: npp !< net primary productivity [g/m2/s c] + real (kind=kind_phys) :: autors !< net ecosystem respiration (g/m2/s c) + real (kind=kind_phys) :: heters !< organic respiration (g/m2/s c) + real (kind=kind_phys) :: troot !< root-zone averaged temperature (k) + real (kind=kind_phys) :: bdfall !< bulk density of new snow (kg/m3) ! mb/an: v3.7 + real (kind=kind_phys) :: rain !< rain rate (mm/s) ! mb/an: v3.7 + real (kind=kind_phys) :: snow !< liquid equivalent snow rate (mm/s) ! mb/an: v3.7 + real (kind=kind_phys) :: fp ! mb/an: v3.7 + real (kind=kind_phys) :: prcp ! mb/an: v3.7 !more local variables for precip heat mb - real :: qintr !interception rate for rain (mm/s) - real :: qdripr !drip rate for rain (mm/s) - real :: qthror !throughfall for rain (mm/s) - real :: qints !interception (loading) rate for snowfall (mm/s) - real :: qdrips !drip (unloading) rate for intercepted snow (mm/s) - real :: qthros !throughfall of snowfall (mm/s) - real :: qrain !rain at ground srf (mm/s) [+] - real :: snowhin !snow depth increasing rate (m/s) - real :: latheav !latent heat vap./sublimation (j/kg) - real :: latheag !latent heat vap./sublimation (j/kg) - logical :: frozen_ground ! used to define latent heat pathway - logical :: frozen_canopy ! used to define latent heat pathway + real (kind=kind_phys) :: qintr !< interception rate for rain (mm/s) + real (kind=kind_phys) :: qdripr !< drip rate for rain (mm/s) + real (kind=kind_phys) :: qthror !< throughfall for rain (mm/s) + real (kind=kind_phys) :: qints !< interception (loading) rate for snowfall (mm/s) + real (kind=kind_phys) :: qdrips !< drip (unloading) rate for intercepted snow (mm/s) + real (kind=kind_phys) :: qthros !< throughfall of snowfall (mm/s) + real (kind=kind_phys) :: snowhin !< snow depth increasing rate (m/s) + real (kind=kind_phys) :: latheav !< latent heat vap./sublimation (j/kg) + real (kind=kind_phys) :: latheag !< latent heat vap./sublimation (j/kg) + logical :: frozen_ground !< used to define latent heat pathway + logical :: frozen_canopy !< used to define latent heat pathway + LOGICAL :: dveg_active !< flag to run dynamic vegetation + LOGICAL :: crop_active !< flag to run crop model ! intent (out) variables need to be assigned a value. these normally get assigned values ! only if dveg == 2. @@ -606,17 +713,17 @@ subroutine noahmp_sflx (parameters, & ! vegetation phenology - call phenology (parameters,vegtyp , snowh , tv , lat , yearlen , julian , & !in - lai , sai , troot , elai , esai ,igs) + call phenology (parameters,vegtyp ,croptype, snowh , tv , lat , yearlen , julian , & !in + lai , sai , troot , elai , esai ,igs, pgs) !input gvf should be consistent with lai - if(dveg == 1) then + if(dveg == 1 .or. dveg == 6 .or. dveg == 7) then fveg = shdfac if(fveg <= 0.05) fveg = 0.05 - else if (dveg == 2 .or. dveg == 3) then + else if (dveg == 2 .or. dveg == 3 .or. dveg == 8) then fveg = 1.-exp(-0.52*(lai+sai)) if(fveg <= 0.05) fveg = 0.05 - else if (dveg == 4 .or. dveg == 5) then + else if (dveg == 4 .or. dveg == 5 .or. dveg == 9) then fveg = shdmax if(fveg <= 0.05) fveg = 0.05 else @@ -629,6 +736,10 @@ subroutine noahmp_sflx (parameters, & call wrf_error_fatal("namelist parameter dveg unknown") #endif endif + if(opt_crop > 0 .and. croptype > 0) then + fveg = shdmax + if(fveg <= 0.05) fveg = 0.05 + endif if(parameters%urban_flag .or. vegtyp == parameters%isbarren) fveg = 0.0 if(elai+esai == 0.0) fveg = 0.0 @@ -650,7 +761,7 @@ subroutine noahmp_sflx (parameters, & elai ,esai ,fwet ,foln , & !in fveg ,pahv ,pahg ,pahb , & !in qsnow ,dzsnso ,lat ,canliq ,canice ,iloc, jloc , & !in - z0wrf , & + z0wrf , & imelt ,snicev ,snliqv ,epore ,t2m ,fsno , & !out sav ,sag ,qmelt ,fsa ,fsr ,taux , & !out tauy ,fira ,fsh ,fcev ,fgev ,fctr , & !out @@ -660,17 +771,17 @@ subroutine noahmp_sflx (parameters, & sneqvo ,sneqv ,sh2o ,smc ,snice ,snliq , & !inout albold ,cm ,ch ,dx ,dz8w ,q2 , & !inout #ifdef CCPP - tauss ,errmsg ,errflg , & !inout + tauss ,laisun ,laisha ,rb , errmsg ,errflg , & !inout #else - tauss , & !inout + tauss ,laisun ,laisha ,rb , & !inout #endif !jref:start qc ,qsfc ,psfc , & !in t2mv ,t2mb ,fsrv , & - fsrg ,rssun ,rssha ,bgap ,wgap, tgv,tgb,& + fsrg ,rssun ,rssha ,albd ,albi ,albsnd,albsni, bgap ,wgap, tgv,tgb,& q1 ,q2v ,q2b ,q2e ,chv ,chb , & !out emissi ,pah , & - shg,shc,shb,evg,evb,ghv,ghb,irg,irc,irb,tr,evc,chleaf,chuc,chv2,chb2 ) !out + shg,shc,shb,evg,evb,ghv,ghb,irg,irc,irb,tr,evc,chleaf,chuc,chv2,chb2 ) !out !jref:end #ifdef CCPP if (errflg /= 0) return @@ -702,8 +813,16 @@ subroutine noahmp_sflx (parameters, & ! compute carbon budgets (carbon storages and co2 & bvoc fluxes) - if (dveg == 2 .or. dveg == 5) then - call carbon (parameters,nsnow ,nsoil ,vegtyp ,dt ,zsoil , & !in + crop_active = .false. + dveg_active = .false. + if (dveg == 2 .or. dveg == 5 .or. dveg == 6) dveg_active = .true. + if (opt_crop > 0 .and. croptype > 0) then + crop_active = .true. + dveg_active = .false. + endif + + IF (dveg_active) THEN + call carbon (parameters,nsnow ,nsoil ,vegtyp ,dt ,zsoil , & !in dzsnso ,stc ,smc ,tv ,tg ,psn , & !in foln ,btran ,apar ,fveg ,igs , & !in troot ,ist ,lat ,iloc ,jloc , & !in @@ -712,9 +831,18 @@ subroutine noahmp_sflx (parameters, & totlb ,lai ,sai ) !out end if + if (opt_crop == 1 .and. crop_active) then + call carbon_crop (parameters,nsnow ,nsoil ,vegtyp ,dt ,zsoil ,julian , & !in + dzsnso ,stc ,smc ,tv ,psn ,foln ,btran , & !in + soldn ,t2m , & !in + lfmass ,rtmass ,stmass ,wood ,stblcp ,fastcp ,grain , & !inout + lai ,sai ,gdd , & !inout + gpp ,npp ,nee ,autors ,heters ,totsc ,totlb, pgs ) !out + end if + ! water and energy balance check - call error (parameters,swdown ,fsa ,fsr ,fira ,fsh ,fcev , & !in + call error (parameters,swdown ,fsa ,fsr ,fira ,fsh ,fcev , & !in fgev ,fctr ,ssoil ,beg_wb ,canliq ,canice , & !in sneqv ,wa ,smc ,dzsnso ,prcp ,ecan , & !in etran ,edir ,runsrf ,runsub ,dt ,nsoil , & !in @@ -733,7 +861,7 @@ subroutine noahmp_sflx (parameters, & ! urban - jref qfx = etran + ecan + edir if ( parameters%urban_flag ) then - qsfc = (qfx/rhoair*ch) + qair + qsfc = qfx/(rhoair*ch) + qair q2b = qsfc end if @@ -754,6 +882,7 @@ end subroutine noahmp_sflx !== begin atm ====================================================================================== !>\ingroup NoahMP_LSM +!! re-precess atmospheric forcing. subroutine atm (parameters,sfcprs ,sfctmp ,q2 , & prcpconv,prcpnonc ,prcpshcv,prcpsnow,prcpgrpl,prcphail , & soldn ,cosz ,thair ,qair , & @@ -767,42 +896,42 @@ subroutine atm (parameters,sfcprs ,sfctmp ,q2 , ! inputs type (noahmp_parameters), intent(in) :: parameters - real , intent(in) :: sfcprs !pressure (pa) - real , intent(in) :: sfctmp !surface air temperature [k] - real , intent(in) :: q2 !mixing ratio (kg/kg) - real , intent(in) :: prcpconv ! convective precipitation entering [mm/s] ! mb/an : v3.7 - real , intent(in) :: prcpnonc ! non-convective precipitation entering [mm/s] ! mb/an : v3.7 - real , intent(in) :: prcpshcv ! shallow convective precip entering [mm/s] ! mb/an : v3.7 - real , intent(in) :: prcpsnow ! snow entering land model [mm/s] ! mb/an : v3.7 - real , intent(in) :: prcpgrpl ! graupel entering land model [mm/s] ! mb/an : v3.7 - real , intent(in) :: prcphail ! hail entering land model [mm/s] ! mb/an : v3.7 - real , intent(in) :: soldn !downward shortwave radiation (w/m2) - real , intent(in) :: cosz !cosine solar zenith angle [0-1] + real (kind=kind_phys) , intent(in) :: sfcprs !pressure (pa) + real (kind=kind_phys) , intent(in) :: sfctmp !surface air temperature [k] + real (kind=kind_phys) , intent(in) :: q2 !mixing ratio (kg/kg) + real (kind=kind_phys) , intent(in) :: prcpconv ! convective precipitation entering [mm/s] ! mb/an : v3.7 + real (kind=kind_phys) , intent(in) :: prcpnonc ! non-convective precipitation entering [mm/s] ! mb/an : v3.7 + real (kind=kind_phys) , intent(in) :: prcpshcv ! shallow convective precip entering [mm/s] ! mb/an : v3.7 + real (kind=kind_phys) , intent(in) :: prcpsnow ! snow entering land model [mm/s] ! mb/an : v3.7 + real (kind=kind_phys) , intent(in) :: prcpgrpl ! graupel entering land model [mm/s] ! mb/an : v3.7 + real (kind=kind_phys) , intent(in) :: prcphail ! hail entering land model [mm/s] ! mb/an : v3.7 + real (kind=kind_phys) , intent(in) :: soldn !downward shortwave radiation (w/m2) + real (kind=kind_phys) , intent(in) :: cosz !cosine solar zenith angle [0-1] ! outputs - real , intent(out) :: thair !potential temperature (k) - real , intent(out) :: qair !specific humidity (kg/kg) (q2/(1+q2)) - real , intent(out) :: eair !vapor pressure air (pa) - real , intent(out) :: rhoair !density air (kg/m3) - real , intent(out) :: qprecc !convective precipitation (mm/s) - real , intent(out) :: qprecl !large-scale precipitation (mm/s) - real, dimension( 1: 2), intent(out) :: solad !incoming direct solar radiation (w/m2) - real, dimension( 1: 2), intent(out) :: solai !incoming diffuse solar radiation (w/m2) - real , intent(out) :: swdown !downward solar filtered by sun angle [w/m2] - real , intent(out) :: bdfall !!bulk density of snowfall (kg/m3) ajn - real , intent(out) :: rain !rainfall (mm/s) ajn - real , intent(out) :: snow !liquid equivalent snowfall (mm/s) ajn - real , intent(out) :: fp !fraction of area receiving precipitation ajn - real , intent(out) :: fpice !fraction of ice ajn - real , intent(out) :: prcp !total precipitation [mm/s] ! mb/an : v3.7 + real (kind=kind_phys) , intent(out) :: thair !potential temperature (k) + real (kind=kind_phys) , intent(out) :: qair !specific humidity (kg/kg) (q2/(1+q2)) + real (kind=kind_phys) , intent(out) :: eair !vapor pressure air (pa) + real (kind=kind_phys) , intent(out) :: rhoair !density air (kg/m3) + real (kind=kind_phys) , intent(out) :: qprecc !convective precipitation (mm/s) + real (kind=kind_phys) , intent(out) :: qprecl !large-scale precipitation (mm/s) + real (kind=kind_phys), dimension( 1: 2), intent(out) :: solad !incoming direct solar radiation (w/m2) + real (kind=kind_phys), dimension( 1: 2), intent(out) :: solai !incoming diffuse solar radiation (w/m2) + real (kind=kind_phys) , intent(out) :: swdown !downward solar filtered by sun angle [w/m2] + real (kind=kind_phys) , intent(out) :: bdfall !!bulk density of snowfall (kg/m3) ajn + real (kind=kind_phys) , intent(out) :: rain !rainfall (mm/s) ajn + real (kind=kind_phys) , intent(out) :: snow !liquid equivalent snowfall (mm/s) ajn + real (kind=kind_phys) , intent(out) :: fp !fraction of area receiving precipitation ajn + real (kind=kind_phys) , intent(out) :: fpice !fraction of ice ajn + real (kind=kind_phys) , intent(out) :: prcp !total precipitation [mm/s] ! mb/an : v3.7 !locals - real :: pair !atm bottom level pressure (pa) - real :: prcp_frozen !total frozen precipitation [mm/s] ! mb/an : v3.7 - real, parameter :: rho_grpl = 500.0 ! graupel bulk density [kg/m3] ! mb/an : v3.7 - real, parameter :: rho_hail = 917.0 ! hail bulk density [kg/m3] ! mb/an : v3.7 + real (kind=kind_phys) :: pair !atm bottom level pressure (pa) + real (kind=kind_phys) :: prcp_frozen !total frozen precipitation [mm/s] ! mb/an : v3.7 + real (kind=kind_phys), parameter :: rho_grpl = 500.0 ! graupel bulk density [kg/m3] ! mb/an : v3.7 + real (kind=kind_phys), parameter :: rho_hail = 917.0 ! hail bulk density [kg/m3] ! mb/an : v3.7 ! -------------------------------------------------------------------------------------------------- !jref: seems like pair should be p1000mb?? @@ -827,13 +956,13 @@ subroutine atm (parameters,sfcprs ,sfctmp ,q2 , prcp = prcpconv + prcpnonc + prcpshcv -! if(opt_snf == 4) then + if(opt_snf == 4) then qprecc = prcpconv + prcpshcv qprecl = prcpnonc -! else -! qprecc = 0.10 * prcp ! should be from the atmospheric model -! qprecl = 0.90 * prcp ! should be from the atmospheric model -! end if + else + qprecc = 0.10 * prcp ! should be from the atmospheric model + qprecl = 0.90 * prcp ! should be from the atmospheric model + end if ! fractional area that receives precipitation (see, niu et al. 2005) @@ -882,7 +1011,7 @@ subroutine atm (parameters,sfcprs ,sfctmp ,q2 , if(opt_snf == 4) then prcp_frozen = prcpsnow + prcpgrpl + prcphail if(prcpnonc > 0. .and. prcp_frozen > 0.) then - fpice = min(1.0,prcp_frozen/prcp) + fpice = min(1.0,prcp_frozen/prcpnonc) fpice = max(0.0,fpice) bdfall = bdfall*(prcpsnow/prcp_frozen) + rho_grpl*(prcpgrpl/prcp_frozen) + & rho_hail*(prcphail/prcp_frozen) @@ -901,8 +1030,10 @@ end subroutine atm !== begin phenology ================================================================================ !>\ingroup NoahMP_LSM - subroutine phenology (parameters,vegtyp , snowh , tv , lat , yearlen , julian , & !in - lai , sai , troot , elai , esai , igs) +!!vegetation phenology considering vegetation canopy being buried by snow and +!!evolution in time. + subroutine phenology (parameters,vegtyp ,croptype, snowh , tv , lat , yearlen , julian , & !in + lai , sai , troot , elai , esai , igs, pgs) ! -------------------------------------------------------------------------------------------------- ! vegetation phenology considering vegeation canopy being buries by snow and evolution in time @@ -912,34 +1043,38 @@ subroutine phenology (parameters,vegtyp , snowh , tv , lat , yearlen , ju ! inputs type (noahmp_parameters), intent(in) :: parameters integer , intent(in ) :: vegtyp !vegetation type - real , intent(in ) :: snowh !snow height [m] - real , intent(in ) :: tv !vegetation temperature (k) - real , intent(in ) :: lat !latitude (radians) + integer , intent(in ) :: croptype !vegetation type + real (kind=kind_phys) , intent(in ) :: snowh !snow height [m] + real (kind=kind_phys) , intent(in ) :: tv !vegetation temperature (k) + real (kind=kind_phys) , intent(in ) :: lat !latitude (radians) integer , intent(in ) :: yearlen!number of days in the particular year - real , intent(in ) :: julian !julian day of year (fractional) ( 0 <= julian < yearlen ) - real , intent(in ) :: troot !root-zone averaged temperature (k) - real , intent(inout) :: lai !lai, unadjusted for burying by snow - real , intent(inout) :: sai !sai, unadjusted for burying by snow + real (kind=kind_phys) , intent(in ) :: julian !julian day of year (fractional) ( 0 <= julian < yearlen ) + real (kind=kind_phys) , intent(in ) :: troot !root-zone averaged temperature (k) + real (kind=kind_phys) , intent(inout) :: lai !lai, unadjusted for burying by snow + real (kind=kind_phys) , intent(inout) :: sai !sai, unadjusted for burying by snow ! outputs - real , intent(out ) :: elai !leaf area index, after burying by snow - real , intent(out ) :: esai !stem area index, after burying by snow - real , intent(out ) :: igs !growing season index (0=off, 1=on) + real (kind=kind_phys) , intent(out ) :: elai !leaf area index, after burying by snow + real (kind=kind_phys) , intent(out ) :: esai !stem area index, after burying by snow + real (kind=kind_phys) , intent(out ) :: igs !growing season index (0=off, 1=on) + integer , intent(in ) :: pgs !plant growing stage ! locals - real :: db !thickness of canopy buried by snow (m) - real :: fb !fraction of canopy buried by snow - real :: snowhc !critical snow depth at which short vege + real (kind=kind_phys) :: db !thickness of canopy buried by snow (m) + real (kind=kind_phys) :: fb !fraction of canopy buried by snow + real (kind=kind_phys) :: snowhc !critical snow depth at which short vege !is fully covered by snow integer :: k !index integer :: it1,it2 !interpolation months - real :: day !current day of year ( 0 <= day < yearlen ) - real :: wt1,wt2 !interpolation weights - real :: t !current month (1.00, ..., 12.00) + real (kind=kind_phys) :: day !current day of year ( 0 <= day < yearlen ) + real (kind=kind_phys) :: wt1,wt2 !interpolation weights + real (kind=kind_phys) :: t !current month (1.00, ..., 12.00) ! -------------------------------------------------------------------------------------------------- +if (croptype == 0) then + if ( dveg == 1 .or. dveg == 3 .or. dveg == 4 ) then if (lat >= 0.) then @@ -961,7 +1096,13 @@ subroutine phenology (parameters,vegtyp , snowh , tv , lat , yearlen , ju lai = wt1*parameters%laim(it1) + wt2*parameters%laim(it2) sai = wt1*parameters%saim(it1) + wt2*parameters%saim(it2) endif - if (sai < 0.05) sai = 0.0 ! mb: sai check, change to 0.05 v3.6 + + if(dveg == 7 .or. dveg == 8 .or. dveg == 9) then + sai = max(0.05,0.1 * lai) ! when reading lai, set sai to 10% lai, but not below 0.05 mb: v3.8 + if (lai < 0.05) sai = 0.0 ! if lai below minimum, make sure sai = 0 + endif + + if (sai < 0.05) sai = 0.0 ! mb: sai check, change to 0.05 v3.6 if (lai < 0.05 .or. sai == 0.0) lai = 0.0 ! mb: lai check if ( ( vegtyp == parameters%iswater ) .or. ( vegtyp == parameters%isbarren ) .or. & @@ -970,6 +1111,8 @@ subroutine phenology (parameters,vegtyp , snowh , tv , lat , yearlen , ju sai = 0. endif +endif ! croptype == 0 + !buried by snow db = min( max(snowh - parameters%hvb,0.), parameters%hvt-parameters%hvb ) @@ -977,15 +1120,22 @@ subroutine phenology (parameters,vegtyp , snowh , tv , lat , yearlen , ju if(parameters%hvt> 0. .and. parameters%hvt <= 1.0) then !mb: change to 1.0 and 0.2 to reflect snowhc = parameters%hvt*exp(-snowh/0.2) ! changes to hvt in mptable - fb = min(snowh,snowhc)/snowhc +! fb = min(snowh,snowhc)/snowhc + if (snowh < snowhc) then + fb = snowh/snowhc + else + fb = 1.0 + endif endif elai = lai*(1.-fb) esai = sai*(1.-fb) - if (esai < 0.05) esai = 0.0 ! mb: esai check, change to 0.05 v3.6 - if (elai < 0.05 .or. esai == 0.0) elai = 0.0 ! mb: lai check + if (esai < 0.05 .and. croptype == 0) esai = 0.0 ! mb: esai check, change to 0.05 v3.6 + if ((elai < 0.05 .or. esai == 0.0) .and. croptype == 0) elai = 0.0 ! mb: lai check - if (tv .gt. parameters%tmin) then +! set growing season flag + + if ((tv .gt. parameters%tmin .and. croptype == 0).or.(pgs > 2 .and. pgs < 7 .and. croptype > 0)) then igs = 1. else igs = 0. @@ -996,6 +1146,8 @@ end subroutine phenology !== begin precip_heat ============================================================================== !>\ingroup NoahMP_LSM +!! Michael Barlage: Oct 2013 - Split canwater to calculate precip movement for +!! tracking of advected heat. subroutine precip_heat (parameters,iloc ,jloc ,vegtyp ,dt ,uu ,vv , & !in elai ,esai ,fveg ,ist , & !in bdfall ,rain ,snow ,fp , & !in @@ -1016,50 +1168,50 @@ subroutine precip_heat (parameters,iloc ,jloc ,vegtyp ,dt ,uu ,vv integer,intent(in) :: jloc !grid index integer,intent(in) :: vegtyp !vegetation type integer,intent(in) :: ist !surface type 1-soil; 2-lake - real, intent(in) :: dt !main time step (s) - real, intent(in) :: uu !u-direction wind speed [m/s] - real, intent(in) :: vv !v-direction wind speed [m/s] - real, intent(in) :: elai !leaf area index, after burying by snow - real, intent(in) :: esai !stem area index, after burying by snow - real, intent(in) :: fveg !greeness vegetation fraction (-) - real, intent(in) :: bdfall !bulk density of snowfall (kg/m3) - real, intent(in) :: rain !rainfall (mm/s) - real, intent(in) :: snow !snowfall (mm/s) - real, intent(in) :: fp !fraction of the gridcell that receives precipitation - real, intent(in) :: tv !vegetation temperature (k) - real, intent(in) :: sfctmp !model-level temperature (k) - real, intent(in) :: tg !ground temperature (k) + real (kind=kind_phys), intent(in) :: dt !main time step (s) + real (kind=kind_phys), intent(in) :: uu !u-direction wind speed [m/s] + real (kind=kind_phys), intent(in) :: vv !v-direction wind speed [m/s] + real (kind=kind_phys), intent(in) :: elai !leaf area index, after burying by snow + real (kind=kind_phys), intent(in) :: esai !stem area index, after burying by snow + real (kind=kind_phys), intent(in) :: fveg !greeness vegetation fraction (-) + real (kind=kind_phys), intent(in) :: bdfall !bulk density of snowfall (kg/m3) + real (kind=kind_phys), intent(in) :: rain !rainfall (mm/s) + real (kind=kind_phys), intent(in) :: snow !snowfall (mm/s) + real (kind=kind_phys), intent(in) :: fp !fraction of the gridcell that receives precipitation + real (kind=kind_phys), intent(in) :: tv !vegetation temperature (k) + real (kind=kind_phys), intent(in) :: sfctmp !model-level temperature (k) + real (kind=kind_phys), intent(in) :: tg !ground temperature (k) ! input & output - real, intent(inout) :: canliq !intercepted liquid water (mm) - real, intent(inout) :: canice !intercepted ice mass (mm) + real (kind=kind_phys), intent(inout) :: canliq !intercepted liquid water (mm) + real (kind=kind_phys), intent(inout) :: canice !intercepted ice mass (mm) ! output - real, intent(out) :: qintr !interception rate for rain (mm/s) - real, intent(out) :: qdripr !drip rate for rain (mm/s) - real, intent(out) :: qthror !throughfall for rain (mm/s) - real, intent(out) :: qints !interception (loading) rate for snowfall (mm/s) - real, intent(out) :: qdrips !drip (unloading) rate for intercepted snow (mm/s) - real, intent(out) :: qthros !throughfall of snowfall (mm/s) - real, intent(out) :: pahv !precipitation advected heat - vegetation net (w/m2) - real, intent(out) :: pahg !precipitation advected heat - under canopy net (w/m2) - real, intent(out) :: pahb !precipitation advected heat - bare ground net (w/m2) - real, intent(out) :: qrain !rain at ground srf (mm/s) [+] - real, intent(out) :: qsnow !snow at ground srf (mm/s) [+] - real, intent(out) :: snowhin !snow depth increasing rate (m/s) - real, intent(out) :: fwet !wetted or snowed fraction of the canopy (-) - real, intent(out) :: cmc !intercepted water (mm) + real (kind=kind_phys), intent(out) :: qintr !interception rate for rain (mm/s) + real (kind=kind_phys), intent(out) :: qdripr !drip rate for rain (mm/s) + real (kind=kind_phys), intent(out) :: qthror !throughfall for rain (mm/s) + real (kind=kind_phys), intent(out) :: qints !interception (loading) rate for snowfall (mm/s) + real (kind=kind_phys), intent(out) :: qdrips !drip (unloading) rate for intercepted snow (mm/s) + real (kind=kind_phys), intent(out) :: qthros !throughfall of snowfall (mm/s) + real (kind=kind_phys), intent(out) :: pahv !precipitation advected heat - vegetation net (w/m2) + real (kind=kind_phys), intent(out) :: pahg !precipitation advected heat - under canopy net (w/m2) + real (kind=kind_phys), intent(out) :: pahb !precipitation advected heat - bare ground net (w/m2) + real (kind=kind_phys), intent(out) :: qrain !rain at ground srf (mm/s) [+] + real (kind=kind_phys), intent(out) :: qsnow !snow at ground srf (mm/s) [+] + real (kind=kind_phys), intent(out) :: snowhin !snow depth increasing rate (m/s) + real (kind=kind_phys), intent(out) :: fwet !wetted or snowed fraction of the canopy (-) + real (kind=kind_phys), intent(out) :: cmc !intercepted water (mm) ! -------------------------------------------------------------------- ! ------------------------ local variables --------------------------- - real :: maxsno !canopy capacity for snow interception (mm) - real :: maxliq !canopy capacity for rain interception (mm) - real :: ft !temperature factor for unloading rate - real :: fv !wind factor for unloading rate - real :: pah_ac !precipitation advected heat - air to canopy (w/m2) - real :: pah_cg !precipitation advected heat - canopy to ground (w/m2) - real :: pah_ag !precipitation advected heat - air to ground (w/m2) - real :: icedrip !canice unloading + real (kind=kind_phys) :: maxsno !canopy capacity for snow interception (mm) + real (kind=kind_phys) :: maxliq !canopy capacity for rain interception (mm) + real (kind=kind_phys) :: ft !temperature factor for unloading rate + real (kind=kind_phys) :: fv !wind factor for unloading rate + real (kind=kind_phys) :: pah_ac !precipitation advected heat - air to canopy (w/m2) + real (kind=kind_phys) :: pah_cg !precipitation advected heat - canopy to ground (w/m2) + real (kind=kind_phys) :: pah_ag !precipitation advected heat - air to ground (w/m2) + real (kind=kind_phys) :: icedrip !canice unloading ! -------------------------------------------------------------------- ! initialization @@ -1226,6 +1378,7 @@ end subroutine precip_heat !== begin error ==================================================================================== !>\ingroup NoahMP_LSM +!! check surface energy balance and water balance. subroutine error (parameters,swdown ,fsa ,fsr ,fira ,fsh ,fcev , & fgev ,fctr ,ssoil ,beg_wb ,canliq ,canice , & sneqv ,wa ,smc ,dzsnso ,prcp ,ecan , & @@ -1249,41 +1402,41 @@ subroutine error (parameters,swdown ,fsa ,fsr ,fira ,fsh ,fcev , & integer , intent(in) :: ist !surface type 1->soil; 2->lake integer , intent(in) :: iloc !grid index integer , intent(in) :: jloc !grid index - real , intent(in) :: swdown !downward solar filtered by sun angle [w/m2] - real , intent(in) :: fsa !total absorbed solar radiation (w/m2) - real , intent(in) :: fsr !total reflected solar radiation (w/m2) - real , intent(in) :: fira !total net longwave rad (w/m2) [+ to atm] - real , intent(in) :: fsh !total sensible heat (w/m2) [+ to atm] - real , intent(in) :: fcev !canopy evaporation heat (w/m2) [+ to atm] - real , intent(in) :: fgev !ground evaporation heat (w/m2) [+ to atm] - real , intent(in) :: fctr !transpiration heat flux (w/m2) [+ to atm] - real , intent(in) :: ssoil !ground heat flux (w/m2) [+ to soil] - real , intent(in) :: fveg - real , intent(in) :: sav - real , intent(in) :: sag - real , intent(in) :: fsrv - real , intent(in) :: fsrg - real , intent(in) :: zwt - - real , intent(in) :: prcp !precipitation rate (kg m-2 s-1) - real , intent(in) :: ecan !evaporation of intercepted water (mm/s) - real , intent(in) :: etran !transpiration rate (mm/s) - real , intent(in) :: edir !soil surface evaporation rate[mm/s] - real , intent(in) :: runsrf !surface runoff [mm/s] - real , intent(in) :: runsub !baseflow (saturation excess) [mm/s] - real , intent(in) :: canliq !intercepted liquid water (mm) - real , intent(in) :: canice !intercepted ice mass (mm) - real , intent(in) :: sneqv !snow water eqv. [mm] - real, dimension( 1:nsoil), intent(in) :: smc !soil moisture (ice + liq.) [m3/m3] - real, dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer thickness [m] - real , intent(in) :: wa !water storage in aquifer [mm] - real , intent(in) :: dt !time step [sec] - real , intent(in) :: beg_wb !water storage at begin of a timesetp [mm] - real , intent(out) :: errwat !error in water balance [mm/timestep] - real, intent(in) :: pah !precipitation advected heat - total (w/m2) - real, intent(in) :: pahv !precipitation advected heat - total (w/m2) - real, intent(in) :: pahg !precipitation advected heat - total (w/m2) - real, intent(in) :: pahb !precipitation advected heat - total (w/m2) + real (kind=kind_phys) , intent(in) :: swdown !downward solar filtered by sun angle [w/m2] + real (kind=kind_phys) , intent(in) :: fsa !total absorbed solar radiation (w/m2) + real (kind=kind_phys) , intent(in) :: fsr !total reflected solar radiation (w/m2) + real (kind=kind_phys) , intent(in) :: fira !total net longwave rad (w/m2) [+ to atm] + real (kind=kind_phys) , intent(in) :: fsh !total sensible heat (w/m2) [+ to atm] + real (kind=kind_phys) , intent(in) :: fcev !canopy evaporation heat (w/m2) [+ to atm] + real (kind=kind_phys) , intent(in) :: fgev !ground evaporation heat (w/m2) [+ to atm] + real (kind=kind_phys) , intent(in) :: fctr !transpiration heat flux (w/m2) [+ to atm] + real (kind=kind_phys) , intent(in) :: ssoil !ground heat flux (w/m2) [+ to soil] + real (kind=kind_phys) , intent(in) :: fveg + real (kind=kind_phys) , intent(in) :: sav + real (kind=kind_phys) , intent(in) :: sag + real (kind=kind_phys) , intent(in) :: fsrv + real (kind=kind_phys) , intent(in) :: fsrg + real (kind=kind_phys) , intent(in) :: zwt + + real (kind=kind_phys) , intent(in) :: prcp !precipitation rate (kg m-2 s-1) + real (kind=kind_phys) , intent(in) :: ecan !evaporation of intercepted water (mm/s) + real (kind=kind_phys) , intent(in) :: etran !transpiration rate (mm/s) + real (kind=kind_phys) , intent(in) :: edir !soil surface evaporation rate[mm/s] + real (kind=kind_phys) , intent(in) :: runsrf !surface runoff [mm/s] + real (kind=kind_phys) , intent(in) :: runsub !baseflow (saturation excess) [mm/s] + real (kind=kind_phys) , intent(in) :: canliq !intercepted liquid water (mm) + real (kind=kind_phys) , intent(in) :: canice !intercepted ice mass (mm) + real (kind=kind_phys) , intent(in) :: sneqv !snow water eqv. [mm] + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: smc !soil moisture (ice + liq.) [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer thickness [m] + real (kind=kind_phys) , intent(in) :: wa !water storage in aquifer [mm] + real (kind=kind_phys) , intent(in) :: dt !time step [sec] + real (kind=kind_phys) , intent(in) :: beg_wb !water storage at begin of a timesetp [mm] + real (kind=kind_phys) , intent(out) :: errwat !error in water balance [mm/timestep] + real (kind=kind_phys), intent(in) :: pah !precipitation advected heat - total (w/m2) + real (kind=kind_phys), intent(in) :: pahv !precipitation advected heat - total (w/m2) + real (kind=kind_phys), intent(in) :: pahg !precipitation advected heat - total (w/m2) + real (kind=kind_phys), intent(in) :: pahb !precipitation advected heat - total (w/m2) #ifdef CCPP character(len=*) , intent(inout) :: errmsg @@ -1291,11 +1444,11 @@ subroutine error (parameters,swdown ,fsa ,fsr ,fira ,fsh ,fcev , & #endif integer :: iz !do-loop index - real :: end_wb !water storage at end of a timestep [mm] - !kwm real :: errwat !error in water balance [mm/timestep] - real :: erreng !error in surface energy balance [w/m2] - real :: errsw !error in shortwave radiation balance [w/m2] - real :: fsrvg + real (kind=kind_phys) :: end_wb !water storage at end of a timestep [mm] + !kwm real (kind=kind_phys) :: errwat !error in water balance [mm/timestep] + real (kind=kind_phys) :: erreng !error in surface energy balance [w/m2] + real (kind=kind_phys) :: errsw !error in shortwave radiation balance [w/m2] + real (kind=kind_phys) :: fsrvg character(len=256) :: message ! -------------------------------------------------------------------------------------------------- !jref:start @@ -1420,6 +1573,13 @@ end subroutine error !== begin energy =================================================================================== !>\ingroup NoahMP_LSM +!! We use different approaches to deal with subgrid features of radiation +!! transfer and turbulent transfer. we use 'tile' approach to compute turbulent +!! fluxes,while we use modified two-stream to compute radiation transfer. +!! tile approach, assemblying vegetation canopies together, +!! may expose too much ground surfaces (either covered by snow or grass) to solar +!! radiation. the modified two-stream assumes vegetation covers fully the +!! gridcell but with gaps between tree crowns. subroutine energy (parameters,ice ,vegtyp ,ist ,nsnow ,nsoil , & !in isnow ,dt ,rhoair ,sfcprs ,qair , & !in sfctmp ,thair ,lwdn ,uu ,vv ,zref , & !in @@ -1438,14 +1598,14 @@ subroutine energy (parameters,ice ,vegtyp ,ist ,nsnow ,nsoil , & !in sneqvo ,sneqv ,sh2o ,smc ,snice ,snliq , & !inout albold ,cm ,ch ,dx ,dz8w ,q2 , & !inout #ifdef CCPP - tauss ,errmsg ,errflg, & !inout + tauss ,laisun ,laisha ,rb ,errmsg ,errflg, & !inout #else - tauss , & !inout + tauss ,laisun ,laisha ,rb , & !inout #endif !jref:start qc ,qsfc ,psfc , & !in t2mv ,t2mb ,fsrv , & - fsrg ,rssun ,rssha ,bgap ,wgap,tgv,tgb,& + fsrg ,rssun ,rssha ,albd ,albi,albsnd ,albsni,bgap ,wgap,tgv,tgb,& q1 ,q2v ,q2b ,q2e ,chv ,chb, emissi,pah ,& shg,shc,shb,evg,evb,ghv,ghb,irg,irc,irb,tr,evc,chleaf,chuc,chv2,chb2 ) !out !jref:end @@ -1495,214 +1655,218 @@ subroutine energy (parameters,ice ,vegtyp ,ist ,nsnow ,nsoil , & !in integer , intent(in) :: nsnow !maximum no. of snow layers integer , intent(in) :: nsoil !number of soil layers integer , intent(in) :: isnow !actual no. of snow layers - real , intent(in) :: dt !time step [sec] - real , intent(in) :: qsnow !snowfall on the ground (mm/s) - real , intent(in) :: rhoair !density air (kg/m3) - real , intent(in) :: eair !vapor pressure air (pa) - real , intent(in) :: sfcprs !pressure (pa) - real , intent(in) :: qair !specific humidity (kg/kg) - real , intent(in) :: sfctmp !air temperature (k) - real , intent(in) :: thair !potential temperature (k) - real , intent(in) :: lwdn !downward longwave radiation (w/m2) - real , intent(in) :: uu !wind speed in e-w dir (m/s) - real , intent(in) :: vv !wind speed in n-s dir (m/s) - real , dimension( 1: 2), intent(in) :: solad !incoming direct solar rad. (w/m2) - real , dimension( 1: 2), intent(in) :: solai !incoming diffuse solar rad. (w/m2) - real , intent(in) :: cosz !cosine solar zenith angle (0-1) - real , intent(in) :: elai !lai adjusted for burying by snow - real , intent(in) :: esai !lai adjusted for burying by snow - real , intent(in) :: fwet !fraction of canopy that is wet [-] - real , intent(in) :: fveg !greeness vegetation fraction (-) - real , intent(in) :: lat !latitude (radians) - real , intent(in) :: canliq !canopy-intercepted liquid water (mm) - real , intent(in) :: canice !canopy-intercepted ice mass (mm) - real , intent(in) :: foln !foliage nitrogen (%) - real , intent(in) :: co2air !atmospheric co2 concentration (pa) - real , intent(in) :: o2air !atmospheric o2 concentration (pa) - real , intent(in) :: igs !growing season index (0=off, 1=on) - - real , intent(in) :: zref !reference height (m) - real , intent(in) :: tbot !bottom condition for soil temp. (k) - real , dimension(-nsnow+1:nsoil), intent(in) :: zsnso !layer-bottom depth from snow surf [m] - real , dimension( 1:nsoil), intent(in) :: zsoil !layer-bottom depth from soil surf [m] - real , dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !depth of snow & soil layer-bottom [m] - real, intent(in) :: pahv !precipitation advected heat - vegetation net (w/m2) - real, intent(in) :: pahg !precipitation advected heat - under canopy net (w/m2) - real, intent(in) :: pahb !precipitation advected heat - bare ground net (w/m2) + real (kind=kind_phys) , intent(in) :: dt !time step [sec] + real (kind=kind_phys) , intent(in) :: qsnow !snowfall on the ground (mm/s) + real (kind=kind_phys) , intent(in) :: rhoair !density air (kg/m3) + real (kind=kind_phys) , intent(in) :: eair !vapor pressure air (pa) + real (kind=kind_phys) , intent(in) :: sfcprs !pressure (pa) + real (kind=kind_phys) , intent(in) :: qair !specific humidity (kg/kg) + real (kind=kind_phys) , intent(in) :: sfctmp !air temperature (k) + real (kind=kind_phys) , intent(in) :: thair !potential temperature (k) + real (kind=kind_phys) , intent(in) :: lwdn !downward longwave radiation (w/m2) + real (kind=kind_phys) , intent(in) :: uu !wind speed in e-w dir (m/s) + real (kind=kind_phys) , intent(in) :: vv !wind speed in n-s dir (m/s) + real (kind=kind_phys) , dimension( 1: 2), intent(in) :: solad !incoming direct solar rad. (w/m2) + real (kind=kind_phys) , dimension( 1: 2), intent(in) :: solai !incoming diffuse solar rad. (w/m2) + real (kind=kind_phys) , intent(in) :: cosz !cosine solar zenith angle (0-1) + real (kind=kind_phys) , intent(in) :: elai !lai adjusted for burying by snow + real (kind=kind_phys) , intent(in) :: esai !lai adjusted for burying by snow + real (kind=kind_phys) , intent(in) :: fwet !fraction of canopy that is wet [-] + real (kind=kind_phys) , intent(in) :: fveg !greeness vegetation fraction (-) + real (kind=kind_phys) , intent(in) :: lat !latitude (radians) + real (kind=kind_phys) , intent(in) :: canliq !canopy-intercepted liquid water (mm) + real (kind=kind_phys) , intent(in) :: canice !canopy-intercepted ice mass (mm) + real (kind=kind_phys) , intent(in) :: foln !foliage nitrogen (%) + real (kind=kind_phys) , intent(in) :: co2air !atmospheric co2 concentration (pa) + real (kind=kind_phys) , intent(in) :: o2air !atmospheric o2 concentration (pa) + real (kind=kind_phys) , intent(in) :: igs !growing season index (0=off, 1=on) + + real (kind=kind_phys) , intent(in) :: zref !reference height (m) + real (kind=kind_phys) , intent(in) :: tbot !bottom condition for soil temp. (k) + real (kind=kind_phys) , dimension(-nsnow+1:nsoil), intent(in) :: zsnso !layer-bottom depth from snow surf [m] + real (kind=kind_phys) , dimension( 1:nsoil), intent(in) :: zsoil !layer-bottom depth from soil surf [m] + real (kind=kind_phys) , dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !depth of snow & soil layer-bottom [m] + real (kind=kind_phys), intent(in) :: pahv !precipitation advected heat - vegetation net (w/m2) + real (kind=kind_phys), intent(in) :: pahg !precipitation advected heat - under canopy net (w/m2) + real (kind=kind_phys), intent(in) :: pahb !precipitation advected heat - bare ground net (w/m2) !jref:start; in - real , intent(in) :: qc !cloud water mixing ratio - real , intent(inout) :: qsfc !mixing ratio at lowest model layer - real , intent(in) :: psfc !pressure at lowest model layer - real , intent(in) :: dx !horisontal resolution - real , intent(in) :: dz8w !thickness of lowest layer - real , intent(in) :: q2 !mixing ratio (kg/kg) + real (kind=kind_phys) , intent(in) :: qc !cloud water mixing ratio + real (kind=kind_phys) , intent(inout) :: qsfc !mixing ratio at lowest model layer + real (kind=kind_phys) , intent(in) :: psfc !pressure at lowest model layer + real (kind=kind_phys) , intent(in) :: dx !horisontal resolution + real (kind=kind_phys) , intent(in) :: dz8w !thickness of lowest layer + real (kind=kind_phys) , intent(in) :: q2 !mixing ratio (kg/kg) !jref:end ! outputs - real , intent(out) :: z0wrf !combined z0 sent to coupled model + real (kind=kind_phys) , intent(out) :: z0wrf !combined z0 sent to coupled model integer, dimension(-nsnow+1:nsoil), intent(out) :: imelt !phase change index [1-melt; 2-freeze] - real , dimension(-nsnow+1: 0), intent(out) :: snicev !partial volume ice [m3/m3] - real , dimension(-nsnow+1: 0), intent(out) :: snliqv !partial volume liq. water [m3/m3] - real , dimension(-nsnow+1: 0), intent(out) :: epore !effective porosity [m3/m3] - real , intent(out) :: fsno !snow cover fraction (-) - real , intent(out) :: qmelt !snowmelt [mm/s] - real , intent(out) :: ponding!pounding at ground [mm] - real , intent(out) :: sav !solar rad. absorbed by veg. (w/m2) - real , intent(out) :: sag !solar rad. absorbed by ground (w/m2) - real , intent(out) :: fsa !tot. absorbed solar radiation (w/m2) - real , intent(out) :: fsr !tot. reflected solar radiation (w/m2) - real , intent(out) :: taux !wind stress: e-w (n/m2) - real , intent(out) :: tauy !wind stress: n-s (n/m2) - real , intent(out) :: fira !total net lw. rad (w/m2) [+ to atm] - real , intent(out) :: fsh !total sensible heat (w/m2) [+ to atm] - real , intent(out) :: fcev !canopy evaporation (w/m2) [+ to atm] - real , intent(out) :: fgev !ground evaporation (w/m2) [+ to atm] - real , intent(out) :: fctr !transpiration (w/m2) [+ to atm] - real , intent(out) :: trad !radiative temperature (k) - real , intent(out) :: t2m !2 m height air temperature (k) - real , intent(out) :: psn !total photosyn. (umolco2/m2/s) [+] - real , intent(out) :: apar !total photosyn. active energy (w/m2) - real , intent(out) :: ssoil !ground heat flux (w/m2) [+ to soil] - real , dimension( 1:nsoil), intent(out) :: btrani !soil water transpiration factor (0-1) - real , intent(out) :: btran !soil water transpiration factor (0-1) -! real , intent(out) :: lathea !latent heat vap./sublimation (j/kg) - real , intent(out) :: latheav !latent heat vap./sublimation (j/kg) - real , intent(out) :: latheag !latent heat vap./sublimation (j/kg) + real (kind=kind_phys) , dimension(-nsnow+1: 0), intent(out) :: snicev !partial volume ice [m3/m3] + real (kind=kind_phys) , dimension(-nsnow+1: 0), intent(out) :: snliqv !partial volume liq. water [m3/m3] + real (kind=kind_phys) , dimension(-nsnow+1: 0), intent(out) :: epore !effective porosity [m3/m3] + real (kind=kind_phys) , intent(out) :: fsno !snow cover fraction (-) + real (kind=kind_phys) , intent(out) :: qmelt !snowmelt [mm/s] + real (kind=kind_phys) , intent(out) :: ponding!pounding at ground [mm] + real (kind=kind_phys) , intent(out) :: sav !solar rad. absorbed by veg. (w/m2) + real (kind=kind_phys) , intent(out) :: sag !solar rad. absorbed by ground (w/m2) + real (kind=kind_phys) , intent(out) :: fsa !tot. absorbed solar radiation (w/m2) + real (kind=kind_phys) , intent(out) :: fsr !tot. reflected solar radiation (w/m2) + real (kind=kind_phys) , intent(out) :: taux !wind stress: e-w (n/m2) + real (kind=kind_phys) , intent(out) :: tauy !wind stress: n-s (n/m2) + real (kind=kind_phys) , intent(out) :: fira !total net lw. rad (w/m2) [+ to atm] + real (kind=kind_phys) , intent(out) :: fsh !total sensible heat (w/m2) [+ to atm] + real (kind=kind_phys) , intent(out) :: fcev !canopy evaporation (w/m2) [+ to atm] + real (kind=kind_phys) , intent(out) :: fgev !ground evaporation (w/m2) [+ to atm] + real (kind=kind_phys) , intent(out) :: fctr !transpiration (w/m2) [+ to atm] + real (kind=kind_phys) , intent(out) :: trad !radiative temperature (k) + real (kind=kind_phys) , intent(out) :: t2m !2 m height air temperature (k) + real (kind=kind_phys) , intent(out) :: psn !total photosyn. (umolco2/m2/s) [+] + real (kind=kind_phys) , intent(out) :: apar !total photosyn. active energy (w/m2) + real (kind=kind_phys) , intent(out) :: ssoil !ground heat flux (w/m2) [+ to soil] + real (kind=kind_phys) , dimension( 1:nsoil), intent(out) :: btrani !soil water transpiration factor (0-1) + real (kind=kind_phys) , intent(out) :: btran !soil water transpiration factor (0-1) +! real (kind=kind_phys) , intent(out) :: lathea !latent heat vap./sublimation (j/kg) + real (kind=kind_phys) , intent(out) :: latheav !latent heat vap./sublimation (j/kg) + real (kind=kind_phys) , intent(out) :: latheag !latent heat vap./sublimation (j/kg) logical , intent(out) :: frozen_ground ! used to define latent heat pathway logical , intent(out) :: frozen_canopy ! used to define latent heat pathway !jref:start - real , intent(out) :: fsrv !veg. reflected solar radiation (w/m2) - real , intent(out) :: fsrg !ground reflected solar radiation (w/m2) - real, intent(out) :: rssun !sunlit leaf stomatal resistance (s/m) - real, intent(out) :: rssha !shaded leaf stomatal resistance (s/m) + real (kind=kind_phys) , intent(out) :: fsrv !veg. reflected solar radiation (w/m2) + real (kind=kind_phys) , intent(out) :: fsrg !ground reflected solar radiation (w/m2) + real (kind=kind_phys), intent(out) :: rssun !sunlit leaf stomatal resistance (s/m) + real (kind=kind_phys), intent(out) :: rssha !shaded leaf stomatal resistance (s/m) !jref:end - out for debug !jref:start; output - real , intent(out) :: t2mv !2-m air temperature over vegetated part [k] - real , intent(out) :: t2mb !2-m air temperature over bare ground part [k] - real , intent(out) :: bgap - real , intent(out) :: wgap + real (kind=kind_phys) , intent(out) :: t2mv !2-m air temperature over vegetated part [k] + real (kind=kind_phys) , intent(out) :: t2mb !2-m air temperature over bare ground part [k] + real (kind=kind_phys) , intent(out) :: bgap + real (kind=kind_phys) , intent(out) :: wgap + real (kind=kind_phys), dimension(1:2) , intent(out) :: albd !albedo (direct) + real (kind=kind_phys), dimension(1:2) , intent(out) :: albi !albedo (diffuse) + real (kind=kind_phys), dimension(1:2) , intent(out) :: albsnd !snow albedo (direct) + real (kind=kind_phys), dimension(1:2) , intent(out) :: albsni !snow albedo (diffuse) !jref:end ! input & output - real , intent(inout) :: ts !surface temperature (k) - real , intent(inout) :: tv !vegetation temperature (k) - real , intent(inout) :: tg !ground temperature (k) - real , dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow/soil temperature [k] - real , intent(inout) :: snowh !snow height [m] - real , intent(inout) :: sneqv !snow mass (mm) - real , intent(inout) :: sneqvo !snow mass at last time step (mm) - real , dimension( 1:nsoil), intent(inout) :: sh2o !liquid soil moisture [m3/m3] - real , dimension( 1:nsoil), intent(inout) :: smc !soil moisture (ice + liq.) [m3/m3] - real , dimension(-nsnow+1: 0), intent(inout) :: snice !snow ice mass (kg/m2) - real , dimension(-nsnow+1: 0), intent(inout) :: snliq !snow liq mass (kg/m2) - real , intent(inout) :: eah !canopy air vapor pressure (pa) - real , intent(inout) :: tah !canopy air temperature (k) - real , intent(inout) :: albold !snow albedo at last time step(class type) - real , intent(inout) :: tauss !non-dimensional snow age - real , intent(inout) :: cm !momentum drag coefficient - real , intent(inout) :: ch !sensible heat exchange coefficient - real , intent(inout) :: q1 + real (kind=kind_phys) , intent(inout) :: ts !surface temperature (k) + real (kind=kind_phys) , intent(inout) :: tv !vegetation temperature (k) + real (kind=kind_phys) , intent(inout) :: tg !ground temperature (k) + real (kind=kind_phys) , dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow/soil temperature [k] + real (kind=kind_phys) , intent(inout) :: snowh !snow height [m] + real (kind=kind_phys) , intent(inout) :: sneqv !snow mass (mm) + real (kind=kind_phys) , intent(inout) :: sneqvo !snow mass at last time step (mm) + real (kind=kind_phys) , dimension( 1:nsoil), intent(inout) :: sh2o !liquid soil moisture [m3/m3] + real (kind=kind_phys) , dimension( 1:nsoil), intent(inout) :: smc !soil moisture (ice + liq.) [m3/m3] + real (kind=kind_phys) , dimension(-nsnow+1: 0), intent(inout) :: snice !snow ice mass (kg/m2) + real (kind=kind_phys) , dimension(-nsnow+1: 0), intent(inout) :: snliq !snow liq mass (kg/m2) + real (kind=kind_phys) , intent(inout) :: eah !canopy air vapor pressure (pa) + real (kind=kind_phys) , intent(inout) :: tah !canopy air temperature (k) + real (kind=kind_phys) , intent(inout) :: albold !snow albedo at last time step(class type) + real (kind=kind_phys) , intent(inout) :: tauss !non-dimensional snow age + real (kind=kind_phys) , intent(inout) :: cm !momentum drag coefficient + real (kind=kind_phys) , intent(inout) :: ch !sensible heat exchange coefficient + real (kind=kind_phys) , intent(inout) :: q1 + real , intent(inout) :: rb !leaf boundary layer resistance (s/m) + real , intent(inout) :: laisun !sunlit leaf area index (m2/m2) + real , intent(inout) :: laisha !shaded leaf area index (m2/m2) #ifdef CCPP character(len=*) , intent(inout) :: errmsg integer , intent(inout) :: errflg #endif -! real :: q2e - real, intent(out) :: emissi - real, intent(out) :: pah !precipitation advected heat - total (w/m2) +! real (kind=kind_phys) :: q2e + real (kind=kind_phys), intent(out) :: emissi + real (kind=kind_phys), intent(out) :: pah !precipitation advected heat - total (w/m2) ! local integer :: iz !do-loop index logical :: veg !true if vegetated surface - real :: ur !wind speed at height zlvl (m/s) - real :: zlvl !reference height (m) - real :: fsun !sunlit fraction of canopy [-] - real :: rb !leaf boundary layer resistance (s/m) - real :: rsurf !ground surface resistance (s/m) - real :: l_rsurf!dry-layer thickness for computing rsurf (sakaguchi and zeng, 2009) - real :: d_rsurf!reduced vapor diffusivity in soil for computing rsurf (sz09) - real :: bevap !soil water evaporation factor (0- 1) - real :: mol !monin-obukhov length (m) - real :: vai !sum of lai + stem area index [m2/m2] - real :: cwp !canopy wind extinction parameter - real :: zpd !zero plane displacement (m) - real :: z0m !z0 momentum (m) - real :: zpdg !zero plane displacement (m) - real :: z0mg !z0 momentum, ground (m) - real :: emv !vegetation emissivity - real :: emg !ground emissivity - real :: fire !emitted ir (w/m2) - - real :: laisun !sunlit leaf area index (m2/m2) - real :: laisha !shaded leaf area index (m2/m2) - real :: psnsun !sunlit photosynthesis (umolco2/m2/s) - real :: psnsha !shaded photosynthesis (umolco2/m2/s) + real (kind=kind_phys) :: ur !wind speed at height zlvl (m/s) + real (kind=kind_phys) :: zlvl !reference height (m) + real (kind=kind_phys) :: fsun !sunlit fraction of canopy [-] + real (kind=kind_phys) :: rsurf !ground surface resistance (s/m) + real (kind=kind_phys) :: l_rsurf!dry-layer thickness for computing rsurf (sakaguchi and zeng, 2009) + real (kind=kind_phys) :: d_rsurf!reduced vapor diffusivity in soil for computing rsurf (sz09) + real (kind=kind_phys) :: bevap !soil water evaporation factor (0- 1) + real (kind=kind_phys) :: mol !monin-obukhov length (m) + real (kind=kind_phys) :: vai !sum of lai + stem area index [m2/m2] + real (kind=kind_phys) :: cwp !canopy wind extinction parameter + real (kind=kind_phys) :: zpd !zero plane displacement (m) + real (kind=kind_phys) :: z0m !z0 momentum (m) + real (kind=kind_phys) :: zpdg !zero plane displacement (m) + real (kind=kind_phys) :: z0mg !z0 momentum, ground (m) + real (kind=kind_phys) :: emv !vegetation emissivity + real (kind=kind_phys) :: emg !ground emissivity + real (kind=kind_phys) :: fire !emitted ir (w/m2) + + real (kind=kind_phys) :: psnsun !sunlit photosynthesis (umolco2/m2/s) + real (kind=kind_phys) :: psnsha !shaded photosynthesis (umolco2/m2/s) !jref:start - for debug -! real :: rssun !sunlit stomatal resistance (s/m) -! real :: rssha !shaded stomatal resistance (s/m) +! real (kind=kind_phys) :: rssun !sunlit stomatal resistance (s/m) +! real (kind=kind_phys) :: rssha !shaded stomatal resistance (s/m) !jref:end - for debug - real :: parsun !par absorbed per sunlit lai (w/m2) - real :: parsha !par absorbed per shaded lai (w/m2) - - real, dimension(-nsnow+1:nsoil) :: fact !temporary used in phase change - real, dimension(-nsnow+1:nsoil) :: df !thermal conductivity [w/m/k] - real, dimension(-nsnow+1:nsoil) :: hcpct !heat capacity [j/m3/k] - real :: bdsno !bulk density of snow (kg/m3) - real :: fmelt !melting factor for snow cover frac - real :: gx !temporary variable - real, dimension(-nsnow+1:nsoil) :: phi !light through water (w/m2) -! real :: gamma !psychrometric constant (pa/k) - real :: gammav !psychrometric constant (pa/k) - real :: gammag !psychrometric constant (pa/k) - real :: psi !surface layer soil matrix potential (m) - real :: rhsur !raltive humidity in surface soil/snow air space (-) + real (kind=kind_phys) :: parsun !par absorbed per sunlit lai (w/m2) + real (kind=kind_phys) :: parsha !par absorbed per shaded lai (w/m2) + + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: fact !temporary used in phase change + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: df !thermal conductivity [w/m/k] + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: hcpct !heat capacity [j/m3/k] + real (kind=kind_phys) :: bdsno !bulk density of snow (kg/m3) + real (kind=kind_phys) :: fmelt !melting factor for snow cover frac + real (kind=kind_phys) :: gx !temporary variable + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: phi !light through water (w/m2) +! real (kind=kind_phys) :: gamma !psychrometric constant (pa/k) + real (kind=kind_phys) :: gammav !psychrometric constant (pa/k) + real (kind=kind_phys) :: gammag !psychrometric constant (pa/k) + real (kind=kind_phys) :: psi !surface layer soil matrix potential (m) + real (kind=kind_phys) :: rhsur !raltive humidity in surface soil/snow air space (-) ! temperature and fluxes over vegetated fraction - real :: tauxv !wind stress: e-w dir [n/m2] - real :: tauyv !wind stress: n-s dir [n/m2] - real,intent(out) :: irc !canopy net lw rad. [w/m2] [+ to atm] - real,intent(out) :: irg !ground net lw rad. [w/m2] [+ to atm] - real,intent(out) :: shc !canopy sen. heat [w/m2] [+ to atm] - real,intent(out) :: shg !ground sen. heat [w/m2] [+ to atm] + real (kind=kind_phys) :: tauxv !wind stress: e-w dir [n/m2] + real (kind=kind_phys) :: tauyv !wind stress: n-s dir [n/m2] + real (kind=kind_phys),intent(out) :: irc !canopy net lw rad. [w/m2] [+ to atm] + real (kind=kind_phys),intent(out) :: irg !ground net lw rad. [w/m2] [+ to atm] + real (kind=kind_phys),intent(out) :: shc !canopy sen. heat [w/m2] [+ to atm] + real (kind=kind_phys),intent(out) :: shg !ground sen. heat [w/m2] [+ to atm] !jref:start - real,intent(out) :: q2v - real,intent(out) :: q2b - real,intent(out) :: q2e + real (kind=kind_phys),intent(out) :: q2v + real (kind=kind_phys),intent(out) :: q2b + real (kind=kind_phys),intent(out) :: q2e !jref:end - real,intent(out) :: evc !canopy evap. heat [w/m2] [+ to atm] - real,intent(out) :: evg !ground evap. heat [w/m2] [+ to atm] - real,intent(out) :: tr !transpiration heat [w/m2] [+ to atm] - real,intent(out) :: ghv !ground heat flux [w/m2] [+ to soil] - real,intent(out) :: tgv !ground surface temp. [k] - real :: cmv !momentum drag coefficient - real,intent(out) :: chv !sensible heat exchange coefficient + real (kind=kind_phys),intent(out) :: evc !canopy evap. heat [w/m2] [+ to atm] + real (kind=kind_phys),intent(out) :: evg !ground evap. heat [w/m2] [+ to atm] + real (kind=kind_phys),intent(out) :: tr !transpiration heat [w/m2] [+ to atm] + real (kind=kind_phys),intent(out) :: ghv !ground heat flux [w/m2] [+ to soil] + real (kind=kind_phys),intent(out) :: tgv !ground surface temp. [k] + real (kind=kind_phys) :: cmv !momentum drag coefficient + real (kind=kind_phys),intent(out) :: chv !sensible heat exchange coefficient ! temperature and fluxes over bare soil fraction - real :: tauxb !wind stress: e-w dir [n/m2] - real :: tauyb !wind stress: n-s dir [n/m2] - real,intent(out) :: irb !net longwave rad. [w/m2] [+ to atm] - real,intent(out) :: shb !sensible heat [w/m2] [+ to atm] - real,intent(out) :: evb !evaporation heat [w/m2] [+ to atm] - real,intent(out) :: ghb !ground heat flux [w/m2] [+ to soil] - real,intent(out) :: tgb !ground surface temp. [k] - real :: cmb !momentum drag coefficient - real,intent(out) :: chb !sensible heat exchange coefficient - real,intent(out) :: chleaf !leaf exchange coefficient - real,intent(out) :: chuc !under canopy exchange coefficient + real (kind=kind_phys) :: tauxb !wind stress: e-w dir [n/m2] + real (kind=kind_phys) :: tauyb !wind stress: n-s dir [n/m2] + real (kind=kind_phys),intent(out) :: irb !net longwave rad. [w/m2] [+ to atm] + real (kind=kind_phys),intent(out) :: shb !sensible heat [w/m2] [+ to atm] + real (kind=kind_phys),intent(out) :: evb !evaporation heat [w/m2] [+ to atm] + real (kind=kind_phys),intent(out) :: ghb !ground heat flux [w/m2] [+ to soil] + real (kind=kind_phys),intent(out) :: tgb !ground surface temp. [k] + real (kind=kind_phys) :: cmb !momentum drag coefficient + real (kind=kind_phys),intent(out) :: chb !sensible heat exchange coefficient + real (kind=kind_phys),intent(out) :: chleaf !leaf exchange coefficient + real (kind=kind_phys),intent(out) :: chuc !under canopy exchange coefficient !jref:start - real,intent(out) :: chv2 !sensible heat conductance, canopy air to zlvl air (m/s) - real,intent(out) :: chb2 !sensible heat conductance, canopy air to zlvl air (m/s) - real :: noahmpres + real (kind=kind_phys),intent(out) :: chv2 !sensible heat conductance, canopy air to zlvl air (m/s) + real (kind=kind_phys),intent(out) :: chb2 !sensible heat conductance, canopy air to zlvl air (m/s) + real (kind=kind_phys) :: noahmpres !jref:end - real, parameter :: mpe = 1.e-6 - real, parameter :: psiwlt = -150. !metric potential for wilting point (m) - real, parameter :: z0 = 0.01 ! bare-soil roughness length (m) (i.e., under the canopy) + real (kind=kind_phys), parameter :: mpe = 1.e-6 + real (kind=kind_phys), parameter :: psiwlt = -150. !metric potential for wilting point (m) + real (kind=kind_phys), parameter :: z0 = 0.002 ! bare-soil roughness length (m) (i.e., under the canopy) ! --------------------------------------------------------------------------------------------------- ! initialize fluxes from veg. fraction @@ -1725,6 +1889,7 @@ subroutine energy (parameters,ice ,vegtyp ,ist ,nsnow ,nsoil , & !in chleaf = 0. chuc = 0. chv2 = 0. + rb = 0. ! wind speed at reference height: ur >= 1 @@ -1739,10 +1904,14 @@ subroutine energy (parameters,ice ,vegtyp ,ist ,nsnow ,nsoil , & !in ! ground snow cover fraction [niu and yang, 2007, jgr] fsno = 0. + if(snowh <= 1.e-6 .or. sneqv <= 1.e-3) then + snowh = 0.0 + sneqv = 0.0 + end if if(snowh.gt.0.) then bdsno = sneqv / snowh fmelt = (bdsno/100.)**parameters%mfsno - fsno = tanh( snowh /(2.5* z0 * fmelt)) + fsno = tanh( snowh /(parameters%scffac * fmelt)) endif ! ground roughness length @@ -1769,6 +1938,15 @@ subroutine energy (parameters,ice ,vegtyp ,ist ,nsnow ,nsoil , & !in zpd = zpdg end if +! special case for urban + + IF (parameters%urban_flag) THEN + Z0MG = parameters%Z0MVT + ZPDG = 0.65 * parameters%HVT + Z0M = Z0MG + ZPD = ZPDG + END IF + zlvl = max(zpd,parameters%hvt) + zref if(zpdg >= zlvl) zlvl = zpdg + zref ! ur = ur*log(zlvl/z0m)/log(10./z0m) !input ur is at 10m @@ -1796,15 +1974,15 @@ subroutine energy (parameters,ice ,vegtyp ,ist ,nsnow ,nsoil , & !in albold ,tauss , & !inout fsun ,laisun ,laisha ,parsun ,parsha , & !out sav ,sag ,fsr ,fsa ,fsrv , & - fsrg ,bgap ,wgap ) !out + fsrg ,albd ,albi ,albsnd ,albsni ,bgap ,wgap ) ! out ! vegetation and ground emissivity emv = 1. - exp(-(elai+esai)/1.0) if (ice == 1) then - emg = 0.98*(1.-fsno) + 1.0*fsno + emg = 0.98*(1.-fsno) + parameters%snow_emis*fsno else - emg = parameters%eg(ist)*(1.-fsno) + 1.0*fsno + emg = parameters%eg(ist)*(1.-fsno) + parameters%snow_emis*fsno end if ! soil moisture factor controlling stomatal resistance @@ -1814,14 +1992,14 @@ subroutine energy (parameters,ice ,vegtyp ,ist ,nsnow ,nsoil , & !in if(ist ==1 ) then do iz = 1, parameters%nroot if(opt_btr == 1) then ! noah - gx = (sh2o(iz)-parameters%smcwlt) / (parameters%smcref-parameters%smcwlt) + gx = (sh2o(iz)-parameters%smcwlt(iz)) / (parameters%smcref(iz)-parameters%smcwlt(iz)) end if if(opt_btr == 2) then ! clm - psi = max(psiwlt,-parameters%psisat*(max(0.01,sh2o(iz))/parameters%smcmax)**(-parameters%bexp) ) - gx = (1.-psi/psiwlt)/(1.+parameters%psisat/psiwlt) + psi = max(psiwlt,-parameters%psisat(iz)*(max(0.01,sh2o(iz))/parameters%smcmax(iz))**(-parameters%bexp(iz)) ) + gx = (1.-psi/psiwlt)/(1.+parameters%psisat(iz)/psiwlt) end if if(opt_btr == 3) then ! ssib - psi = max(psiwlt,-parameters%psisat*(max(0.01,sh2o(iz))/parameters%smcmax)**(-parameters%bexp) ) + psi = max(psiwlt,-parameters%psisat(iz)*(max(0.01,sh2o(iz))/parameters%smcmax(iz))**(-parameters%bexp(iz)) ) gx = 1.-exp(-5.8*(log(psiwlt/psi))) end if @@ -1836,25 +2014,31 @@ subroutine energy (parameters,ice ,vegtyp ,ist ,nsnow ,nsoil , & !in ! soil surface resistance for ground evap. - bevap = max(0.0,sh2o(1)/parameters%smcmax) + bevap = max(0.0,sh2o(1)/parameters%smcmax(1)) if(ist == 2) then rsurf = 1. ! avoid being divided by 0 rhsur = 1.0 else - ! rsurf based on sakaguchi and zeng, 2009 - ! taking the "residual water content" to be the wilting point, - ! and correcting the exponent on the d term (typo in sz09 ?) - l_rsurf = (-zsoil(1)) * ( exp ( (1.0 - min(1.0,sh2o(1)/parameters%smcmax)) ** 5 ) - 1.0 ) / ( 2.71828 - 1.0 ) - d_rsurf = 2.2e-5 * parameters%smcmax * parameters%smcmax * ( 1.0 - parameters%smcwlt / parameters%smcmax ) ** (2.0+3.0/parameters%bexp) - rsurf = l_rsurf / d_rsurf + if(opt_rsf == 1 .or. opt_rsf == 4) then + ! rsurf based on sakaguchi and zeng, 2009 + ! taking the "residual water content" to be the wilting point, + ! and correcting the exponent on the d term (typo in sz09 ?) + l_rsurf = (-zsoil(1)) * ( exp ( (1.0 - min(1.0,sh2o(1)/parameters%smcmax(1))) ** parameters%rsurf_exp ) - 1.0 ) / ( 2.71828 - 1.0 ) + d_rsurf = 2.2e-5 * parameters%smcmax(1) * parameters%smcmax(1) * ( 1.0 - parameters%smcwlt(1) / parameters%smcmax(1) ) ** (2.0+3.0/parameters%bexp(1)) + rsurf = l_rsurf / d_rsurf + elseif(opt_rsf == 2) then + rsurf = fsno * 1. + (1.-fsno)* exp(8.25-4.225*bevap) !sellers (1992) ! older rsurf computations + elseif(opt_rsf == 3) then + rsurf = fsno * 1. + (1.-fsno)* exp(8.25-6.0 *bevap) !adjusted to decrease rsurf for wet soil + endif - ! older rsurf computations: - ! rsurf = fsno * 1. + (1.-fsno)* exp(8.25-4.225*bevap) !sellers (1992) - ! rsurf = fsno * 1. + (1.-fsno)* exp(8.25-6.0 *bevap) !adjusted to decrease rsurf for wet soil + if(opt_rsf == 4) then ! ad: fsno weighted; snow rsurf set in mptable v3.8 + rsurf = 1. / (fsno * (1./parameters%rsurf_snow) + (1.-fsno) * (1./max(rsurf, 0.001))) + endif if(sh2o(1) < 0.01 .and. snowh == 0.) rsurf = 1.e6 - psi = -parameters%psisat*(max(0.01,sh2o(1))/parameters%smcmax)**(-parameters%bexp) + psi = -parameters%psisat(1)*(max(0.01,sh2o(1))/parameters%smcmax(1))**(-parameters%bexp(1)) rhsur = fsno + (1.-fsno) * exp(psi*grav/(rw*tg)) end if @@ -1896,14 +2080,12 @@ subroutine energy (parameters,ice ,vegtyp ,ist ,nsnow ,nsoil , & !in tgv = tg cmv = cm chv = ch -! YRQ -! write(*,*) 'cm,ch,tv,tgv, YRQ', cm,ch,tv,tgv call vege_flux (parameters,nsnow ,nsoil ,isnow ,vegtyp ,veg , & !in dt ,sav ,sag ,lwdn ,ur , & !in uu ,vv ,sfctmp ,thair ,qair , & !in - eair ,rhoair ,snowh ,vai ,gammav ,gammag , & !in + eair ,rhoair ,snowh ,vai ,gammav ,gammag , & !in fwet ,laisun ,laisha ,cwp ,dzsnso , & !in - zlvl ,zpd ,z0m ,fveg , & !in + zlvl ,zpd ,z0m ,fveg , & !in z0mg ,emv ,emg ,canliq ,fsno, & !in canice ,stc ,df ,rssun ,rssha , & !in rsurf ,latheav ,latheag ,parsun ,parsha ,igs , & !in @@ -1933,7 +2115,7 @@ subroutine energy (parameters,ice ,vegtyp ,ist ,nsnow ,nsoil , & !in call bare_flux (parameters,nsnow ,nsoil ,isnow ,dt ,sag , & !in lwdn ,ur ,uu ,vv ,sfctmp , & !in thair ,qair ,eair ,rhoair ,snowh , & !in - dzsnso ,zlvl ,zpdg ,z0mg ,fsno, & !in + dzsnso ,zlvl ,zpdg ,z0mg ,fsno, & !in emg ,stc ,df ,rsurf ,latheag , & !in gammag ,rhsur ,iloc ,jloc ,q2 ,pahb , & !in #ifdef CCPP @@ -2095,35 +2277,35 @@ subroutine thermoprop (parameters,nsoil ,nsnow ,isnow ,ist ,dzsnso , integer , intent(in) :: nsnow !maximum no. of snow layers integer , intent(in) :: isnow !actual no. of snow layers integer , intent(in) :: ist !surface type - real , intent(in) :: dt !time step [s] - real, dimension(-nsnow+1: 0), intent(in) :: snice !snow ice mass (kg/m2) - real, dimension(-nsnow+1: 0), intent(in) :: snliq !snow liq mass (kg/m2) - real, dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !thickness of snow/soil layers [m] - real, dimension( 1:nsoil), intent(in) :: smc !soil moisture (ice + liq.) [m3/m3] - real, dimension( 1:nsoil), intent(in) :: sh2o !liquid soil moisture [m3/m3] - real , intent(in) :: snowh !snow height [m] - real, intent(in) :: tg !surface temperature (k) - real, dimension(-nsnow+1:nsoil), intent(in) :: stc !snow/soil/lake temp. (k) - real, intent(in) :: ur !wind speed at zlvl (m/s) - real, intent(in) :: lat !latitude (radians) - real, intent(in) :: z0m !roughness length (m) - real, intent(in) :: zlvl !reference height (m) + real (kind=kind_phys) , intent(in) :: dt !time step [s] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: snice !snow ice mass (kg/m2) + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: snliq !snow liq mass (kg/m2) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !thickness of snow/soil layers [m] + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: smc !soil moisture (ice + liq.) [m3/m3] + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: sh2o !liquid soil moisture [m3/m3] + real (kind=kind_phys) , intent(in) :: snowh !snow height [m] + real (kind=kind_phys), intent(in) :: tg !surface temperature (k) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: stc !snow/soil/lake temp. (k) + real (kind=kind_phys), intent(in) :: ur !wind speed at zlvl (m/s) + real (kind=kind_phys), intent(in) :: lat !latitude (radians) + real (kind=kind_phys), intent(in) :: z0m !roughness length (m) + real (kind=kind_phys), intent(in) :: zlvl !reference height (m) integer , intent(in) :: vegtyp !vegtyp type ! outputs - real, dimension(-nsnow+1:nsoil), intent(out) :: df !thermal conductivity [w/m/k] - real, dimension(-nsnow+1:nsoil), intent(out) :: hcpct !heat capacity [j/m3/k] - real, dimension(-nsnow+1: 0), intent(out) :: snicev !partial volume of ice [m3/m3] - real, dimension(-nsnow+1: 0), intent(out) :: snliqv !partial volume of liquid water [m3/m3] - real, dimension(-nsnow+1: 0), intent(out) :: epore !effective porosity [m3/m3] - real, dimension(-nsnow+1:nsoil), intent(out) :: fact !computing energy for phase change + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(out) :: df !thermal conductivity [w/m/k] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(out) :: hcpct !heat capacity [j/m3/k] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(out) :: snicev !partial volume of ice [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(out) :: snliqv !partial volume of liquid water [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(out) :: epore !effective porosity [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(out) :: fact !computing energy for phase change ! -------------------------------------------------------------------------------------------------- ! locals integer :: iz - real, dimension(-nsnow+1: 0) :: cvsno !volumetric specific heat (j/m3/k) - real, dimension(-nsnow+1: 0) :: tksno !snow thermal conductivity (j/m3/k) - real, dimension( 1:nsoil) :: sice !soil ice content + real (kind=kind_phys), dimension(-nsnow+1: 0) :: cvsno !volumetric specific heat (j/m3/k) + real (kind=kind_phys), dimension(-nsnow+1: 0) :: tksno !snow thermal conductivity (j/m3/k) + real (kind=kind_phys), dimension( 1:nsoil) :: sice !soil ice content ! -------------------------------------------------------------------------------------------------- ! compute snow thermal conductivity and heat capacity @@ -2140,9 +2322,9 @@ subroutine thermoprop (parameters,nsoil ,nsnow ,isnow ,ist ,dzsnso , do iz = 1, nsoil sice(iz) = smc(iz) - sh2o(iz) - hcpct(iz) = sh2o(iz)*cwat + (1.0-parameters%smcmax)*parameters%csoil & - + (parameters%smcmax-smc(iz))*cpair + sice(iz)*cice - call tdfcnd (parameters,df(iz), smc(iz), sh2o(iz)) + hcpct(iz) = sh2o(iz)*cwat + (1.0-parameters%smcmax(iz))*parameters%csoil & + + (parameters%smcmax(iz)-smc(iz))*cpair + sice(iz)*cice + call tdfcnd (parameters,iz,df(iz), smc(iz), sh2o(iz)) end do if ( parameters%urban_flag ) then @@ -2192,6 +2374,7 @@ end subroutine thermoprop !== begin csnow ==================================================================================== !>\ingroup NoahMP_LSM +!! snow bulk density,volumetric capacity, and thermal conductivity subroutine csnow (parameters,isnow ,nsnow ,nsoil ,snice ,snliq ,dzsnso , & !in tksno ,cvsno ,snicev ,snliqv ,epore ) !out ! -------------------------------------------------------------------------------------------------- @@ -2205,22 +2388,22 @@ subroutine csnow (parameters,isnow ,nsnow ,nsoil ,snice ,snliq ,dzsnso integer, intent(in) :: isnow !number of snow layers (-) integer , intent(in) :: nsnow !maximum no. of snow layers integer , intent(in) :: nsoil !number of soil layers - real, dimension(-nsnow+1: 0), intent(in) :: snice !snow ice mass (kg/m2) - real, dimension(-nsnow+1: 0), intent(in) :: snliq !snow liq mass (kg/m2) - real, dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer thickness [m] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: snice !snow ice mass (kg/m2) + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: snliq !snow liq mass (kg/m2) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer thickness [m] ! outputs - real, dimension(-nsnow+1: 0), intent(out) :: cvsno !volumetric specific heat (j/m3/k) - real, dimension(-nsnow+1: 0), intent(out) :: tksno !thermal conductivity (w/m/k) - real, dimension(-nsnow+1: 0), intent(out) :: snicev !partial volume of ice [m3/m3] - real, dimension(-nsnow+1: 0), intent(out) :: snliqv !partial volume of liquid water [m3/m3] - real, dimension(-nsnow+1: 0), intent(out) :: epore !effective porosity [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(out) :: cvsno !volumetric specific heat (j/m3/k) + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(out) :: tksno !thermal conductivity (w/m/k) + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(out) :: snicev !partial volume of ice [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(out) :: snliqv !partial volume of liquid water [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(out) :: epore !effective porosity [m3/m3] ! locals integer :: iz - real, dimension(-nsnow+1: 0) :: bdsnoi !bulk density of snow(kg/m3) + real (kind=kind_phys), dimension(-nsnow+1: 0) :: bdsnoi !bulk density of snow(kg/m3) !--------------------------------------------------------------------------------------------------- ! thermal capacity of snow @@ -2252,7 +2435,9 @@ end subroutine csnow !== begin tdfcnd =================================================================================== !>\ingroup NoahMP_LSM - subroutine tdfcnd (parameters, df, smc, sh2o) +!! calculate thermal diffusivity and conductivity of the soil. peters-lidard +!! approach (peters-lidard et al., 1998) + subroutine tdfcnd (parameters, isoil, df, smc, sh2o) ! -------------------------------------------------------------------------------------------------- ! calculate thermal diffusivity and conductivity of the soil. ! peters-lidard approach (peters-lidard et al., 1998) @@ -2262,22 +2447,23 @@ subroutine tdfcnd (parameters, df, smc, sh2o) ! -------------------------------------------------------------------------------------------------- implicit none type (noahmp_parameters), intent(in) :: parameters - real, intent(in) :: smc ! total soil water - real, intent(in) :: sh2o ! liq. soil water - real, intent(out) :: df ! thermal diffusivity + integer, intent(in) :: isoil ! soil layer + real (kind=kind_phys), intent(in) :: smc ! total soil water + real (kind=kind_phys), intent(in) :: sh2o ! liq. soil water + real (kind=kind_phys), intent(out) :: df ! thermal diffusivity ! local variables - real :: ake - real :: gammd - real :: thkdry - real :: thko ! thermal conductivity for other soil components - real :: thkqtz ! thermal conductivity for quartz - real :: thksat ! - real :: thks ! thermal conductivity for the solids - real :: thkw ! water thermal conductivity - real :: satratio - real :: xu - real :: xunfroz + real (kind=kind_phys) :: ake + real (kind=kind_phys) :: gammd + real (kind=kind_phys) :: thkdry + real (kind=kind_phys) :: thko ! thermal conductivity for other soil components + real (kind=kind_phys) :: thkqtz ! thermal conductivity for quartz + real (kind=kind_phys) :: thksat ! + real (kind=kind_phys) :: thks ! thermal conductivity for the solids + real (kind=kind_phys) :: thkw ! water thermal conductivity + real (kind=kind_phys) :: satratio + real (kind=kind_phys) :: xu + real (kind=kind_phys) :: xunfroz ! -------------------------------------------------------------------------------------------------- ! we now get quartz as an input argument (set in routine redprm): ! data quartz /0.82, 0.10, 0.25, 0.60, 0.52, @@ -2306,7 +2492,7 @@ subroutine tdfcnd (parameters, df, smc, sh2o) ! poros = smcmax ! saturation ratio: ! parameters w/(m.k) - satratio = smc / parameters%smcmax + satratio = smc / parameters%smcmax(isoil) thkw = 0.57 ! if (quartz .le. 0.2) thko = 3.0 thko = 2.0 @@ -2315,19 +2501,20 @@ subroutine tdfcnd (parameters, df, smc, sh2o) thkqtz = 7.7 ! unfrozen fraction (from 1., i.e., 100%liquid, to 0. (100% frozen)) - thks = (thkqtz ** parameters%quartz)* (thko ** (1. - parameters%quartz)) + thks = (thkqtz ** parameters%quartz(isoil))* (thko ** (1. - parameters%quartz(isoil))) ! unfrozen volume for saturation (porosity*xunfroz) - xunfroz = sh2o / smc + xunfroz = 1.0 ! prevent divide by zero (suggested by d. mocko) + if(smc > 0.) xunfroz = sh2o / smc ! saturated thermal conductivity - xu = xunfroz * parameters%smcmax + xu = xunfroz * parameters%smcmax(isoil) ! dry density in kg/m3 - thksat = thks ** (1. - parameters%smcmax)* tkice ** (parameters%smcmax - xu)* thkw ** & + thksat = thks ** (1. - parameters%smcmax(isoil))* tkice ** (parameters%smcmax(isoil) - xu)* thkw ** & (xu) ! dry thermal conductivity in w.m-1.k-1 - gammd = (1. - parameters%smcmax)*2700. + gammd = (1. - parameters%smcmax(isoil))*2700. thkdry = (0.135* gammd+ 64.7)/ (2700. - 0.947* gammd) ! frozen @@ -2370,7 +2557,7 @@ subroutine radiation (parameters,vegtyp ,ist ,ice ,nsoil , & !in albold ,tauss , & !inout fsun ,laisun ,laisha ,parsun ,parsha , & !out sav ,sag ,fsr ,fsa ,fsrv , & - fsrg ,bgap ,wgap) !out + fsrg ,albd ,albi ,albsnd ,albsni ,bgap ,wgap) !out ! -------------------------------------------------------------------------------------------------- implicit none ! -------------------------------------------------------------------------------------------------- @@ -2383,67 +2570,69 @@ subroutine radiation (parameters,vegtyp ,ist ,ice ,nsoil , & !in integer, intent(in) :: ice !ice (ice = 1) integer, intent(in) :: nsoil !number of soil layers - real, intent(in) :: dt !time step [s] - real, intent(in) :: qsnow !snowfall (mm/s) - real, intent(in) :: sneqvo !snow mass at last time step(mm) - real, intent(in) :: sneqv !snow mass (mm) - real, intent(in) :: snowh !snow height (mm) - real, intent(in) :: cosz !cosine solar zenith angle (0-1) - real, intent(in) :: tg !ground temperature (k) - real, intent(in) :: tv !vegetation temperature (k) - real, intent(in) :: elai !lai, one-sided, adjusted for burying by snow - real, intent(in) :: esai !sai, one-sided, adjusted for burying by snow - real, intent(in) :: fwet !fraction of canopy that is wet - real, dimension(1:nsoil), intent(in) :: smc !volumetric soil water [m3/m3] - real, dimension(1:2) , intent(in) :: solad !incoming direct solar radiation (w/m2) - real, dimension(1:2) , intent(in) :: solai !incoming diffuse solar radiation (w/m2) - real, intent(in) :: fsno !snow cover fraction (-) - real, intent(in) :: fveg !green vegetation fraction [0.0-1.0] + real (kind=kind_phys), intent(in) :: dt !time step [s] + real (kind=kind_phys), intent(in) :: qsnow !snowfall (mm/s) + real (kind=kind_phys), intent(in) :: sneqvo !snow mass at last time step(mm) + real (kind=kind_phys), intent(in) :: sneqv !snow mass (mm) + real (kind=kind_phys), intent(in) :: snowh !snow height (mm) + real (kind=kind_phys), intent(in) :: cosz !cosine solar zenith angle (0-1) + real (kind=kind_phys), intent(in) :: tg !ground temperature (k) + real (kind=kind_phys), intent(in) :: tv !vegetation temperature (k) + real (kind=kind_phys), intent(in) :: elai !lai, one-sided, adjusted for burying by snow + real (kind=kind_phys), intent(in) :: esai !sai, one-sided, adjusted for burying by snow + real (kind=kind_phys), intent(in) :: fwet !fraction of canopy that is wet + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: smc !volumetric soil water [m3/m3] + real (kind=kind_phys), dimension(1:2) , intent(in) :: solad !incoming direct solar radiation (w/m2) + real (kind=kind_phys), dimension(1:2) , intent(in) :: solai !incoming diffuse solar radiation (w/m2) + real (kind=kind_phys), intent(in) :: fsno !snow cover fraction (-) + real (kind=kind_phys), intent(in) :: fveg !green vegetation fraction [0.0-1.0] ! inout - real, intent(inout) :: albold !snow albedo at last time step (class type) - real, intent(inout) :: tauss !non-dimensional snow age. + real (kind=kind_phys), intent(inout) :: albold !snow albedo at last time step (class type) + real (kind=kind_phys), intent(inout) :: tauss !non-dimensional snow age. ! output - real, intent(out) :: fsun !sunlit fraction of canopy (-) - real, intent(out) :: laisun !sunlit leaf area (-) - real, intent(out) :: laisha !shaded leaf area (-) - real, intent(out) :: parsun !average absorbed par for sunlit leaves (w/m2) - real, intent(out) :: parsha !average absorbed par for shaded leaves (w/m2) - real, intent(out) :: sav !solar radiation absorbed by vegetation (w/m2) - real, intent(out) :: sag !solar radiation absorbed by ground (w/m2) - real, intent(out) :: fsa !total absorbed solar radiation (w/m2) - real, intent(out) :: fsr !total reflected solar radiation (w/m2) + real (kind=kind_phys), intent(out) :: fsun !sunlit fraction of canopy (-) + real (kind=kind_phys), intent(out) :: laisun !sunlit leaf area (-) + real (kind=kind_phys), intent(out) :: laisha !shaded leaf area (-) + real (kind=kind_phys), intent(out) :: parsun !average absorbed par for sunlit leaves (w/m2) + real (kind=kind_phys), intent(out) :: parsha !average absorbed par for shaded leaves (w/m2) + real (kind=kind_phys), intent(out) :: sav !solar radiation absorbed by vegetation (w/m2) + real (kind=kind_phys), intent(out) :: sag !solar radiation absorbed by ground (w/m2) + real (kind=kind_phys), intent(out) :: fsa !total absorbed solar radiation (w/m2) + real (kind=kind_phys), intent(out) :: fsr !total reflected solar radiation (w/m2) !jref:start - real, intent(out) :: fsrv !veg. reflected solar radiation (w/m2) - real, intent(out) :: fsrg !ground reflected solar radiation (w/m2) - real, intent(out) :: bgap - real, intent(out) :: wgap + real (kind=kind_phys), intent(out) :: fsrv !veg. reflected solar radiation (w/m2) + real (kind=kind_phys), intent(out) :: fsrg !ground reflected solar radiation (w/m2) + real (kind=kind_phys), intent(out) :: bgap + real (kind=kind_phys), intent(out) :: wgap + real (kind=kind_phys), dimension(1:2), intent(out) :: albsnd !snow albedo (direct) + real (kind=kind_phys), dimension(1:2), intent(out) :: albsni !snow albedo (diffuse) !jref:end ! local - real :: fage !snow age function (0 - new snow) - real, dimension(1:2) :: albgrd !ground albedo (direct) - real, dimension(1:2) :: albgri !ground albedo (diffuse) - real, dimension(1:2) :: albd !surface albedo (direct) - real, dimension(1:2) :: albi !surface albedo (diffuse) - real, dimension(1:2) :: fabd !flux abs by veg (per unit direct flux) - real, dimension(1:2) :: fabi !flux abs by veg (per unit diffuse flux) - real, dimension(1:2) :: ftdd !down direct flux below veg (per unit dir flux) - real, dimension(1:2) :: ftid !down diffuse flux below veg (per unit dir flux) - real, dimension(1:2) :: ftii !down diffuse flux below veg (per unit dif flux) + real (kind=kind_phys) :: fage !snow age function (0 - new snow) + real (kind=kind_phys), dimension(1:2) :: albgrd !ground albedo (direct) + real (kind=kind_phys), dimension(1:2) :: albgri !ground albedo (diffuse) + real (kind=kind_phys), dimension(1:2) :: albd !surface albedo (direct) + real (kind=kind_phys), dimension(1:2) :: albi !surface albedo (diffuse) + real (kind=kind_phys), dimension(1:2) :: fabd !flux abs by veg (per unit direct flux) + real (kind=kind_phys), dimension(1:2) :: fabi !flux abs by veg (per unit diffuse flux) + real (kind=kind_phys), dimension(1:2) :: ftdd !down direct flux below veg (per unit dir flux) + real (kind=kind_phys), dimension(1:2) :: ftid !down diffuse flux below veg (per unit dir flux) + real (kind=kind_phys), dimension(1:2) :: ftii !down diffuse flux below veg (per unit dif flux) !jref:start - real, dimension(1:2) :: frevi - real, dimension(1:2) :: frevd - real, dimension(1:2) :: fregi - real, dimension(1:2) :: fregd + real (kind=kind_phys), dimension(1:2) :: frevi + real (kind=kind_phys), dimension(1:2) :: frevd + real (kind=kind_phys), dimension(1:2) :: fregi + real (kind=kind_phys), dimension(1:2) :: fregd !jref:end - real :: fsha !shaded fraction of canopy - real :: vai !total lai + stem area index, one sided + real (kind=kind_phys) :: fsha !shaded fraction of canopy + real (kind=kind_phys) :: vai !total lai + stem area index, one sided - real,parameter :: mpe = 1.e-6 + real (kind=kind_phys),parameter :: mpe = 1.e-6 logical veg !true: vegetated for surface temperature calculation ! -------------------------------------------------------------------------------------------------- @@ -2459,7 +2648,7 @@ subroutine radiation (parameters,vegtyp ,ist ,ice ,nsoil , & !in albgrd ,albgri ,albd ,albi ,fabd , & !out fabi ,ftdd ,ftid ,ftii ,fsun , & !) !out frevi ,frevd ,fregd ,fregi ,bgap , & !inout - wgap) + wgap ,albsnd ,albsni ) ! surface radiation @@ -2487,6 +2676,9 @@ end subroutine radiation !== begin albedo =================================================================================== !>\ingroup NoahMP_LSM +!! surface albedos. also fluxes (per unit incoming direct and diffuse radiation) +!! reflected, transmitted, and absorbed by vegetation. also sunlight fraction +!! of the canopy. subroutine albedo (parameters,vegtyp ,ist ,ice ,nsoil , & !in dt ,cosz ,fage ,elai ,esai , & !in tg ,tv ,snowh ,fsno ,fwet , & !in @@ -2496,7 +2688,7 @@ subroutine albedo (parameters,vegtyp ,ist ,ice ,nsoil , & !in albgrd ,albgri ,albd ,albi ,fabd , & !out fabi ,ftdd ,ftid ,ftii ,fsun , & !out frevi ,frevd ,fregd ,fregi ,bgap , & !out - wgap) + wgap ,albsnd ,albsni ) ! -------------------------------------------------------------------------------------------------- ! surface albedos. also fluxes (per unit incoming direct and diffuse @@ -2514,67 +2706,67 @@ subroutine albedo (parameters,vegtyp ,ist ,ice ,nsoil , & !in integer, intent(in) :: ist !surface type integer, intent(in) :: ice !ice (ice = 1) - real, intent(in) :: dt !time step [sec] - real, intent(in) :: qsnow !snowfall - real, intent(in) :: cosz !cosine solar zenith angle for next time step - real, intent(in) :: snowh !snow height (mm) - real, intent(in) :: tg !ground temperature (k) - real, intent(in) :: tv !vegetation temperature (k) - real, intent(in) :: elai !lai, one-sided, adjusted for burying by snow - real, intent(in) :: esai !sai, one-sided, adjusted for burying by snow - real, intent(in) :: fsno !fraction of grid covered by snow - real, intent(in) :: fwet !fraction of canopy that is wet - real, intent(in) :: sneqvo !snow mass at last time step(mm) - real, intent(in) :: sneqv !snow mass (mm) - real, intent(in) :: fveg !green vegetation fraction [0.0-1.0] - real, dimension(1:nsoil), intent(in) :: smc !volumetric soil water (m3/m3) + real (kind=kind_phys), intent(in) :: dt !time step [sec] + real (kind=kind_phys), intent(in) :: qsnow !snowfall + real (kind=kind_phys), intent(in) :: cosz !cosine solar zenith angle for next time step + real (kind=kind_phys), intent(in) :: snowh !snow height (mm) + real (kind=kind_phys), intent(in) :: tg !ground temperature (k) + real (kind=kind_phys), intent(in) :: tv !vegetation temperature (k) + real (kind=kind_phys), intent(in) :: elai !lai, one-sided, adjusted for burying by snow + real (kind=kind_phys), intent(in) :: esai !sai, one-sided, adjusted for burying by snow + real (kind=kind_phys), intent(in) :: fsno !fraction of grid covered by snow + real (kind=kind_phys), intent(in) :: fwet !fraction of canopy that is wet + real (kind=kind_phys), intent(in) :: sneqvo !snow mass at last time step(mm) + real (kind=kind_phys), intent(in) :: sneqv !snow mass (mm) + real (kind=kind_phys), intent(in) :: fveg !green vegetation fraction [0.0-1.0] + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: smc !volumetric soil water (m3/m3) ! inout - real, intent(inout) :: albold !snow albedo at last time step (class type) - real, intent(inout) :: tauss !non-dimensional snow age + real (kind=kind_phys), intent(inout) :: albold !snow albedo at last time step (class type) + real (kind=kind_phys), intent(inout) :: tauss !non-dimensional snow age ! output - real, dimension(1: 2), intent(out) :: albgrd !ground albedo (direct) - real, dimension(1: 2), intent(out) :: albgri !ground albedo (diffuse) - real, dimension(1: 2), intent(out) :: albd !surface albedo (direct) - real, dimension(1: 2), intent(out) :: albi !surface albedo (diffuse) - real, dimension(1: 2), intent(out) :: fabd !flux abs by veg (per unit direct flux) - real, dimension(1: 2), intent(out) :: fabi !flux abs by veg (per unit diffuse flux) - real, dimension(1: 2), intent(out) :: ftdd !down direct flux below veg (per unit dir flux) - real, dimension(1: 2), intent(out) :: ftid !down diffuse flux below veg (per unit dir flux) - real, dimension(1: 2), intent(out) :: ftii !down diffuse flux below veg (per unit dif flux) - real, intent(out) :: fsun !sunlit fraction of canopy (-) + real (kind=kind_phys), dimension(1: 2), intent(out) :: albgrd !ground albedo (direct) + real (kind=kind_phys), dimension(1: 2), intent(out) :: albgri !ground albedo (diffuse) + real (kind=kind_phys), dimension(1: 2), intent(out) :: albd !surface albedo (direct) + real (kind=kind_phys), dimension(1: 2), intent(out) :: albi !surface albedo (diffuse) + real (kind=kind_phys), dimension(1: 2), intent(out) :: fabd !flux abs by veg (per unit direct flux) + real (kind=kind_phys), dimension(1: 2), intent(out) :: fabi !flux abs by veg (per unit diffuse flux) + real (kind=kind_phys), dimension(1: 2), intent(out) :: ftdd !down direct flux below veg (per unit dir flux) + real (kind=kind_phys), dimension(1: 2), intent(out) :: ftid !down diffuse flux below veg (per unit dir flux) + real (kind=kind_phys), dimension(1: 2), intent(out) :: ftii !down diffuse flux below veg (per unit dif flux) + real (kind=kind_phys), intent(out) :: fsun !sunlit fraction of canopy (-) !jref:start - real, dimension(1: 2), intent(out) :: frevd - real, dimension(1: 2), intent(out) :: frevi - real, dimension(1: 2), intent(out) :: fregd - real, dimension(1: 2), intent(out) :: fregi - real, intent(out) :: bgap - real, intent(out) :: wgap + real (kind=kind_phys), dimension(1: 2), intent(out) :: frevd + real (kind=kind_phys), dimension(1: 2), intent(out) :: frevi + real (kind=kind_phys), dimension(1: 2), intent(out) :: fregd + real (kind=kind_phys), dimension(1: 2), intent(out) :: fregi + real (kind=kind_phys), intent(out) :: bgap + real (kind=kind_phys), intent(out) :: wgap !jref:end ! ------------------------------------------------------------------------ ! ------------------------ local variables ------------------------------- ! local - real :: fage !snow age function - real :: alb + real (kind=kind_phys) :: fage !snow age function + real (kind=kind_phys) :: alb integer :: ib !indices integer :: nband !number of solar radiation wave bands integer :: ic !direct beam: ic=0; diffuse: ic=1 - real :: wl !fraction of lai+sai that is lai - real :: ws !fraction of lai+sai that is sai - real :: mpe !prevents overflow for division by zero + real (kind=kind_phys) :: wl !fraction of lai+sai that is lai + real (kind=kind_phys) :: ws !fraction of lai+sai that is sai + real (kind=kind_phys) :: mpe !prevents overflow for division by zero - real, dimension(1:2) :: rho !leaf/stem reflectance weighted by fraction lai and sai - real, dimension(1:2) :: tau !leaf/stem transmittance weighted by fraction lai and sai - real, dimension(1:2) :: ftdi !down direct flux below veg per unit dif flux = 0 - real, dimension(1:2) :: albsnd !snow albedo (direct) - real, dimension(1:2) :: albsni !snow albedo (diffuse) + real (kind=kind_phys), dimension(1:2) :: rho !leaf/stem reflectance weighted by fraction lai and sai + real (kind=kind_phys), dimension(1:2) :: tau !leaf/stem transmittance weighted by fraction lai and sai + real (kind=kind_phys), dimension(1:2) :: ftdi !down direct flux below veg per unit dif flux = 0 + real (kind=kind_phys), dimension(1:2) :: albsnd !snow albedo (direct) + real (kind=kind_phys), dimension(1:2) :: albsni !snow albedo (diffuse) - real :: vai !elai+esai - real :: gdir !average projected leaf/stem area in solar direction - real :: ext !optical depth direct beam per unit leaf + stem area + real (kind=kind_phys) :: vai !elai+esai + real (kind=kind_phys) :: gdir !average projected leaf/stem area in solar direction + real (kind=kind_phys) :: ext !optical depth direct beam per unit leaf + stem area ! -------------------------------------------------------------------------------------------------- @@ -2582,6 +2774,10 @@ subroutine albedo (parameters,vegtyp ,ist ,ice ,nsoil , & !in mpe = 1.e-06 bgap = 0. wgap = 0. + frevd = 0. + frevi = 0. + fregd = 0. + fregi = 0. ! initialize output because solar radiation only done if cosz > 0 @@ -2590,6 +2786,8 @@ subroutine albedo (parameters,vegtyp ,ist ,ice ,nsoil , & !in albi(ib) = 0. albgrd(ib) = 0. albgri(ib) = 0. + albsnd(ib) = 0. + albsni(ib) = 0. fabd(ib) = 0. fabi(ib) = 0. ftdd(ib) = 0. @@ -2687,55 +2885,55 @@ subroutine surrad (parameters,mpe ,fsun ,fsha ,elai ,vai , & !i type (noahmp_parameters), intent(in) :: parameters integer, intent(in) :: iloc integer, intent(in) :: jloc - real, intent(in) :: mpe !prevents underflow errors if division by zero - - real, intent(in) :: fsun !sunlit fraction of canopy - real, intent(in) :: fsha !shaded fraction of canopy - real, intent(in) :: elai !leaf area, one-sided - real, intent(in) :: vai !leaf + stem area, one-sided - real, intent(in) :: laisun !sunlit leaf area index, one-sided - real, intent(in) :: laisha !shaded leaf area index, one-sided - - real, dimension(1:2), intent(in) :: solad !incoming direct solar radiation (w/m2) - real, dimension(1:2), intent(in) :: solai !incoming diffuse solar radiation (w/m2) - real, dimension(1:2), intent(in) :: fabd !flux abs by veg (per unit incoming direct flux) - real, dimension(1:2), intent(in) :: fabi !flux abs by veg (per unit incoming diffuse flux) - real, dimension(1:2), intent(in) :: ftdd !down dir flux below veg (per incoming dir flux) - real, dimension(1:2), intent(in) :: ftid !down dif flux below veg (per incoming dir flux) - real, dimension(1:2), intent(in) :: ftii !down dif flux below veg (per incoming dif flux) - real, dimension(1:2), intent(in) :: albgrd !ground albedo (direct) - real, dimension(1:2), intent(in) :: albgri !ground albedo (diffuse) - real, dimension(1:2), intent(in) :: albd !overall surface albedo (direct) - real, dimension(1:2), intent(in) :: albi !overall surface albedo (diffuse) - - real, dimension(1:2), intent(in) :: frevd !overall surface albedo veg (direct) - real, dimension(1:2), intent(in) :: frevi !overall surface albedo veg (diffuse) - real, dimension(1:2), intent(in) :: fregd !overall surface albedo grd (direct) - real, dimension(1:2), intent(in) :: fregi !overall surface albedo grd (diffuse) + real (kind=kind_phys), intent(in) :: mpe !prevents underflow errors if division by zero + + real (kind=kind_phys), intent(in) :: fsun !sunlit fraction of canopy + real (kind=kind_phys), intent(in) :: fsha !shaded fraction of canopy + real (kind=kind_phys), intent(in) :: elai !leaf area, one-sided + real (kind=kind_phys), intent(in) :: vai !leaf + stem area, one-sided + real (kind=kind_phys), intent(in) :: laisun !sunlit leaf area index, one-sided + real (kind=kind_phys), intent(in) :: laisha !shaded leaf area index, one-sided + + real (kind=kind_phys), dimension(1:2), intent(in) :: solad !incoming direct solar radiation (w/m2) + real (kind=kind_phys), dimension(1:2), intent(in) :: solai !incoming diffuse solar radiation (w/m2) + real (kind=kind_phys), dimension(1:2), intent(in) :: fabd !flux abs by veg (per unit incoming direct flux) + real (kind=kind_phys), dimension(1:2), intent(in) :: fabi !flux abs by veg (per unit incoming diffuse flux) + real (kind=kind_phys), dimension(1:2), intent(in) :: ftdd !down dir flux below veg (per incoming dir flux) + real (kind=kind_phys), dimension(1:2), intent(in) :: ftid !down dif flux below veg (per incoming dir flux) + real (kind=kind_phys), dimension(1:2), intent(in) :: ftii !down dif flux below veg (per incoming dif flux) + real (kind=kind_phys), dimension(1:2), intent(in) :: albgrd !ground albedo (direct) + real (kind=kind_phys), dimension(1:2), intent(in) :: albgri !ground albedo (diffuse) + real (kind=kind_phys), dimension(1:2), intent(in) :: albd !overall surface albedo (direct) + real (kind=kind_phys), dimension(1:2), intent(in) :: albi !overall surface albedo (diffuse) + + real (kind=kind_phys), dimension(1:2), intent(in) :: frevd !overall surface albedo veg (direct) + real (kind=kind_phys), dimension(1:2), intent(in) :: frevi !overall surface albedo veg (diffuse) + real (kind=kind_phys), dimension(1:2), intent(in) :: fregd !overall surface albedo grd (direct) + real (kind=kind_phys), dimension(1:2), intent(in) :: fregi !overall surface albedo grd (diffuse) ! output - real, intent(out) :: parsun !average absorbed par for sunlit leaves (w/m2) - real, intent(out) :: parsha !average absorbed par for shaded leaves (w/m2) - real, intent(out) :: sav !solar radiation absorbed by vegetation (w/m2) - real, intent(out) :: sag !solar radiation absorbed by ground (w/m2) - real, intent(out) :: fsa !total absorbed solar radiation (w/m2) - real, intent(out) :: fsr !total reflected solar radiation (w/m2) - real, intent(out) :: fsrv !reflected solar radiation by vegetation - real, intent(out) :: fsrg !reflected solar radiation by ground + real (kind=kind_phys), intent(out) :: parsun !average absorbed par for sunlit leaves (w/m2) + real (kind=kind_phys), intent(out) :: parsha !average absorbed par for shaded leaves (w/m2) + real (kind=kind_phys), intent(out) :: sav !solar radiation absorbed by vegetation (w/m2) + real (kind=kind_phys), intent(out) :: sag !solar radiation absorbed by ground (w/m2) + real (kind=kind_phys), intent(out) :: fsa !total absorbed solar radiation (w/m2) + real (kind=kind_phys), intent(out) :: fsr !total reflected solar radiation (w/m2) + real (kind=kind_phys), intent(out) :: fsrv !reflected solar radiation by vegetation + real (kind=kind_phys), intent(out) :: fsrg !reflected solar radiation by ground ! ------------------------ local variables ---------------------------------------------------- integer :: ib !waveband number (1=vis, 2=nir) integer :: nband !number of solar radiation waveband classes - real :: abs !absorbed solar radiation (w/m2) - real :: rnir !reflected solar radiation [nir] (w/m2) - real :: rvis !reflected solar radiation [vis] (w/m2) - real :: laifra !leaf area fraction of canopy - real :: trd !transmitted solar radiation: direct (w/m2) - real :: tri !transmitted solar radiation: diffuse (w/m2) - real, dimension(1:2) :: cad !direct beam absorbed by canopy (w/m2) - real, dimension(1:2) :: cai !diffuse radiation absorbed by canopy (w/m2) + real (kind=kind_phys) :: abs !absorbed solar radiation (w/m2) + real (kind=kind_phys) :: rnir !reflected solar radiation [nir] (w/m2) + real (kind=kind_phys) :: rvis !reflected solar radiation [vis] (w/m2) + real (kind=kind_phys) :: laifra !leaf area fraction of canopy + real (kind=kind_phys) :: trd !transmitted solar radiation: direct (w/m2) + real (kind=kind_phys) :: tri !transmitted solar radiation: diffuse (w/m2) + real (kind=kind_phys), dimension(1:2) :: cad !direct beam absorbed by canopy (w/m2) + real (kind=kind_phys), dimension(1:2) :: cai !diffuse radiation absorbed by canopy (w/m2) ! --------------------------------------------------------------------------------------------- nband = 2 @@ -2804,39 +3002,37 @@ subroutine snow_age (parameters,dt,tg,sneqvo,sneqv,tauss,fage) ! ------------------------ input/output variables -------------------------------------------------- !input type (noahmp_parameters), intent(in) :: parameters - real, intent(in) :: dt !main time step (s) - real, intent(in) :: tg !ground temperature (k) - real, intent(in) :: sneqvo !snow mass at last time step(mm) - real, intent(in) :: sneqv !snow water per unit ground area (mm) + real (kind=kind_phys), intent(in) :: dt !main time step (s) + real (kind=kind_phys), intent(in) :: tg !ground temperature (k) + real (kind=kind_phys), intent(in) :: sneqvo !snow mass at last time step(mm) + real (kind=kind_phys), intent(in) :: sneqv !snow water per unit ground area (mm) !output - real, intent(out) :: fage !snow age + real (kind=kind_phys), intent(out) :: fage !snow age !input/output - real, intent(inout) :: tauss !non-dimensional snow age + real (kind=kind_phys), intent(inout) :: tauss !non-dimensional snow age !local - real :: tage !total aging effects - real :: age1 !effects of grain growth due to vapor diffusion - real :: age2 !effects of grain growth at freezing of melt water - real :: age3 !effects of soot - real :: dela !temporary variable - real :: sge !temporary variable - real :: dels !temporary variable - real :: dela0 !temporary variable - real :: arg !temporary variable + real (kind=kind_phys) :: tage !total aging effects + real (kind=kind_phys) :: age1 !effects of grain growth due to vapor diffusion + real (kind=kind_phys) :: age2 !effects of grain growth at freezing of melt water + real (kind=kind_phys) :: age3 !effects of soot + real (kind=kind_phys) :: dela !temporary variable + real (kind=kind_phys) :: sge !temporary variable + real (kind=kind_phys) :: dels !temporary variable + real (kind=kind_phys) :: dela0 !temporary variable + real (kind=kind_phys) :: arg !temporary variable ! see yang et al. (1997) j.of climate for detail. !--------------------------------------------------------------------------------------------------- if(sneqv.le.0.0) then tauss = 0. - else if (sneqv.gt.800.) then - tauss = 0. else - dela0 = 1.e-6*dt - arg = 5.e3*(1./tfrz-1./tg) + dela0 = dt/parameters%tau0 + arg = parameters%grain_growth*(1./tfrz-1./tg) age1 = exp(arg) - age2 = exp(amin1(0.,10.*arg)) - age3 = 0.3 + age2 = exp(amin1(0.,parameters%extra_growth*arg)) + age3 = parameters%dirt_soot tage = age1+age2+age3 dela = dela0*tage dels = amax1(0.0,sneqv-sneqvo) / parameters%swemx @@ -2860,28 +3056,28 @@ subroutine snowalb_bats (parameters,nband,fsno,cosz,fage,albsnd,albsni) type (noahmp_parameters), intent(in) :: parameters integer,intent(in) :: nband !number of waveband classes - real,intent(in) :: cosz !cosine solar zenith angle - real,intent(in) :: fsno !snow cover fraction (-) - real,intent(in) :: fage !snow age correction + real (kind=kind_phys),intent(in) :: cosz !cosine solar zenith angle + real (kind=kind_phys),intent(in) :: fsno !snow cover fraction (-) + real (kind=kind_phys),intent(in) :: fage !snow age correction ! output - real, dimension(1:2),intent(out) :: albsnd !snow albedo for direct(1=vis, 2=nir) - real, dimension(1:2),intent(out) :: albsni !snow albedo for diffuse + real (kind=kind_phys), dimension(1:2),intent(out) :: albsnd !snow albedo for direct(1=vis, 2=nir) + real (kind=kind_phys), dimension(1:2),intent(out) :: albsni !snow albedo for diffuse ! --------------------------------------------------------------------------------------------- ! ------------------------ local variables ---------------------------------------------------- integer :: ib !waveband class - real :: fzen !zenith angle correction - real :: cf1 !temperary variable - real :: sl2 !2.*sl - real :: sl1 !1/sl - real :: sl !adjustable parameter - real, parameter :: c1 = 0.2 !default in bats - real, parameter :: c2 = 0.5 !default in bats -! real, parameter :: c1 = 0.2 * 2. ! double the default to match sleepers river's -! real, parameter :: c2 = 0.5 * 2. ! snow surface albedo (double aging effects) + real (kind=kind_phys) :: fzen !zenith angle correction + real (kind=kind_phys) :: cf1 !temperary variable + real (kind=kind_phys) :: sl2 !2.*sl + real (kind=kind_phys) :: sl1 !1/sl + real (kind=kind_phys) :: sl !adjustable parameter +! real (kind=kind_phys), parameter :: c1 = 0.2 !default in bats +! real (kind=kind_phys), parameter :: c2 = 0.5 !default in bats +! real (kind=kind_phys), parameter :: c1 = 0.2 * 2. ! double the default to match sleepers river's +! real (kind=kind_phys), parameter :: c2 = 0.5 * 2. ! snow surface albedo (double aging effects) ! --------------------------------------------------------------------------------------------- ! zero albedos for all points @@ -2890,17 +3086,17 @@ subroutine snowalb_bats (parameters,nband,fsno,cosz,fage,albsnd,albsni) ! when cosz > 0 - sl=2.0 + sl=parameters%bats_cosz sl1=1./sl sl2=2.*sl cf1=((1.+sl1)/(1.+sl2*cosz)-sl1) fzen=amax1(cf1,0.) - albsni(1)=0.95*(1.-c1*fage) - albsni(2)=0.65*(1.-c2*fage) + albsni(1)=parameters%bats_vis_new*(1.-parameters%bats_vis_age*fage) + albsni(2)=parameters%bats_nir_new*(1.-parameters%bats_nir_age*fage) - albsnd(1)=albsni(1)+0.4*fzen*(1.-albsni(1)) ! vis direct - albsnd(2)=albsni(2)+0.4*fzen*(1.-albsni(2)) ! nir direct + albsnd(1)=albsni(1)+parameters%bats_vis_dir*fzen*(1.-albsni(1)) ! vis direct + albsnd(2)=albsni(2)+parameters%bats_vis_dir*fzen*(1.-albsni(2)) ! nir direct end subroutine snowalb_bats @@ -2918,17 +3114,17 @@ subroutine snowalb_class (parameters,nband,qsnow,dt,alb,albold,albsnd,albsni,ilo integer,intent(in) :: jloc !grid index integer,intent(in) :: nband !number of waveband classes - real,intent(in) :: qsnow !snowfall (mm/s) - real,intent(in) :: dt !time step (sec) - real,intent(in) :: albold !snow albedo at last time step + real (kind=kind_phys),intent(in) :: qsnow !snowfall (mm/s) + real (kind=kind_phys),intent(in) :: dt !time step (sec) + real (kind=kind_phys),intent(in) :: albold !snow albedo at last time step ! in & out - real, intent(inout) :: alb ! + real (kind=kind_phys), intent(inout) :: alb ! ! output - real, dimension(1:2),intent(out) :: albsnd !snow albedo for direct(1=vis, 2=nir) - real, dimension(1:2),intent(out) :: albsni !snow albedo for diffuse + real (kind=kind_phys), dimension(1:2),intent(out) :: albsnd !snow albedo for direct(1=vis, 2=nir) + real (kind=kind_phys), dimension(1:2),intent(out) :: albsni !snow albedo for diffuse ! --------------------------------------------------------------------------------------------- ! ------------------------ local variables ---------------------------------------------------- @@ -2977,24 +3173,24 @@ subroutine groundalb (parameters,nsoil ,nband ,ice ,ist , & !in integer, intent(in) :: nband !number of solar radiation waveband classes integer, intent(in) :: ice !value of ist for land ice integer, intent(in) :: ist !surface type - real, intent(in) :: fsno !fraction of surface covered with snow (-) - real, intent(in) :: tg !ground temperature (k) - real, intent(in) :: cosz !cosine solar zenith angle (0-1) - real, dimension(1:nsoil), intent(in) :: smc !volumetric soil water content (m3/m3) - real, dimension(1: 2), intent(in) :: albsnd !direct beam snow albedo (vis, nir) - real, dimension(1: 2), intent(in) :: albsni !diffuse snow albedo (vis, nir) + real (kind=kind_phys), intent(in) :: fsno !fraction of surface covered with snow (-) + real (kind=kind_phys), intent(in) :: tg !ground temperature (k) + real (kind=kind_phys), intent(in) :: cosz !cosine solar zenith angle (0-1) + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: smc !volumetric soil water content (m3/m3) + real (kind=kind_phys), dimension(1: 2), intent(in) :: albsnd !direct beam snow albedo (vis, nir) + real (kind=kind_phys), dimension(1: 2), intent(in) :: albsni !diffuse snow albedo (vis, nir) !output - real, dimension(1: 2), intent(out) :: albgrd !ground albedo (direct beam: vis, nir) - real, dimension(1: 2), intent(out) :: albgri !ground albedo (diffuse: vis, nir) + real (kind=kind_phys), dimension(1: 2), intent(out) :: albgrd !ground albedo (direct beam: vis, nir) + real (kind=kind_phys), dimension(1: 2), intent(out) :: albgri !ground albedo (diffuse: vis, nir) !local integer :: ib !waveband number (1=vis, 2=nir) - real :: inc !soil water correction factor for soil albedo - real :: albsod !soil albedo (direct) - real :: albsoi !soil albedo (diffuse) + real (kind=kind_phys) :: inc !soil water correction factor for soil albedo + real (kind=kind_phys) :: albsod !soil albedo (direct) + real (kind=kind_phys) :: albsoi !soil albedo (diffuse) ! -------------------------------------------------------------------------------------------------- do ib = 1, nband @@ -3026,6 +3222,11 @@ end subroutine groundalb !== begin twostream ================================================================================ !>\ingroup NoahMP_LSM +!! use two-stream approximation of Dickinson (1983) adv geophysics +!! 25: 305-353 and sellers (1985) int j remote sensing 6: 1335-1372 +!! to calculate fluxes absorbed by vegetation, reflected by vegetation, +!! and transmitted through vegetation for unit incoming direct or diffuse +!! flux given an underlying surface with known albedo. subroutine twostream (parameters,ib ,ic ,vegtyp ,cosz ,vai , & !in fwet ,t ,albgrd ,albgri ,rho , & !in tau ,fveg ,ist ,iloc ,jloc , & !in @@ -3051,68 +3252,68 @@ subroutine twostream (parameters,ib ,ic ,vegtyp ,cosz ,vai , & ! integer, intent(in) :: ic !0=unit incoming direct; 1=unit incoming diffuse integer, intent(in) :: vegtyp !vegetation type - real, intent(in) :: cosz !cosine of direct zenith angle (0-1) - real, intent(in) :: vai !one-sided leaf+stem area index (m2/m2) - real, intent(in) :: fwet !fraction of lai, sai that is wetted (-) - real, intent(in) :: t !surface temperature (k) + real (kind=kind_phys), intent(in) :: cosz !cosine of direct zenith angle (0-1) + real (kind=kind_phys), intent(in) :: vai !one-sided leaf+stem area index (m2/m2) + real (kind=kind_phys), intent(in) :: fwet !fraction of lai, sai that is wetted (-) + real (kind=kind_phys), intent(in) :: t !surface temperature (k) - real, dimension(1:2), intent(in) :: albgrd !direct albedo of underlying surface (-) - real, dimension(1:2), intent(in) :: albgri !diffuse albedo of underlying surface (-) - real, dimension(1:2), intent(in) :: rho !leaf+stem reflectance - real, dimension(1:2), intent(in) :: tau !leaf+stem transmittance - real, intent(in) :: fveg !green vegetation fraction [0.0-1.0] + real (kind=kind_phys), dimension(1:2), intent(in) :: albgrd !direct albedo of underlying surface (-) + real (kind=kind_phys), dimension(1:2), intent(in) :: albgri !diffuse albedo of underlying surface (-) + real (kind=kind_phys), dimension(1:2), intent(in) :: rho !leaf+stem reflectance + real (kind=kind_phys), dimension(1:2), intent(in) :: tau !leaf+stem transmittance + real (kind=kind_phys), intent(in) :: fveg !green vegetation fraction [0.0-1.0] ! output - real, dimension(1:2), intent(out) :: fab !flux abs by veg layer (per unit incoming flux) - real, dimension(1:2), intent(out) :: fre !flux refl above veg layer (per unit incoming flux) - real, dimension(1:2), intent(out) :: ftd !down dir flux below veg layer (per unit in flux) - real, dimension(1:2), intent(out) :: fti !down dif flux below veg layer (per unit in flux) - real, intent(out) :: gdir !projected leaf+stem area in solar direction - real, dimension(1:2), intent(out) :: frev !flux reflected by veg layer (per unit incoming flux) - real, dimension(1:2), intent(out) :: freg !flux reflected by ground (per unit incoming flux) + real (kind=kind_phys), dimension(1:2), intent(out) :: fab !flux abs by veg layer (per unit incoming flux) + real (kind=kind_phys), dimension(1:2), intent(out) :: fre !flux refl above veg layer (per unit incoming flux) + real (kind=kind_phys), dimension(1:2), intent(out) :: ftd !down dir flux below veg layer (per unit in flux) + real (kind=kind_phys), dimension(1:2), intent(out) :: fti !down dif flux below veg layer (per unit in flux) + real (kind=kind_phys), intent(out) :: gdir !projected leaf+stem area in solar direction + real (kind=kind_phys), dimension(1:2), intent(out) :: frev !flux reflected by veg layer (per unit incoming flux) + real (kind=kind_phys), dimension(1:2), intent(out) :: freg !flux reflected by ground (per unit incoming flux) ! local - real :: omega !fraction of intercepted radiation that is scattered - real :: omegal !omega for leaves - real :: betai !upscatter parameter for diffuse radiation - real :: betail !betai for leaves - real :: betad !upscatter parameter for direct beam radiation - real :: betadl !betad for leaves - real :: ext !optical depth of direct beam per unit leaf area - real :: avmu !average diffuse optical depth - - real :: coszi !0.001 <= cosz <= 1.000 - real :: asu !single scattering albedo - real :: chil ! -0.4 <= xl <= 0.6 - - real :: tmp0,tmp1,tmp2,tmp3,tmp4,tmp5,tmp6,tmp7,tmp8,tmp9 - real :: p1,p2,p3,p4,s1,s2,u1,u2,u3 - real :: b,c,d,d1,d2,f,h,h1,h2,h3,h4,h5,h6,h7,h8,h9,h10 - real :: phi1,phi2,sigma - real :: ftds,ftis,fres - real :: denfveg - real :: vai_spread + real (kind=kind_phys) :: omega !fraction of intercepted radiation that is scattered + real (kind=kind_phys) :: omegal !omega for leaves + real (kind=kind_phys) :: betai !upscatter parameter for diffuse radiation + real (kind=kind_phys) :: betail !betai for leaves + real (kind=kind_phys) :: betad !upscatter parameter for direct beam radiation + real (kind=kind_phys) :: betadl !betad for leaves + real (kind=kind_phys) :: ext !optical depth of direct beam per unit leaf area + real (kind=kind_phys) :: avmu !average diffuse optical depth + + real (kind=kind_phys) :: coszi !0.001 <= cosz <= 1.000 + real (kind=kind_phys) :: asu !single scattering albedo + real (kind=kind_phys) :: chil ! -0.4 <= xl <= 0.6 + + real (kind=kind_phys) :: tmp0,tmp1,tmp2,tmp3,tmp4,tmp5,tmp6,tmp7,tmp8,tmp9 + real (kind=kind_phys) :: p1,p2,p3,p4,s1,s2,u1,u2,u3 + real (kind=kind_phys) :: b,c,d,d1,d2,f,h,h1,h2,h3,h4,h5,h6,h7,h8,h9,h10 + real (kind=kind_phys) :: phi1,phi2,sigma + real (kind=kind_phys) :: ftds,ftis,fres + real (kind=kind_phys) :: denfveg + real (kind=kind_phys) :: vai_spread !jref:start - real :: freveg,frebar,ftdveg,ftiveg,ftdbar,ftibar - real :: thetaz + real (kind=kind_phys) :: freveg,frebar,ftdveg,ftiveg,ftdbar,ftibar + real (kind=kind_phys) :: thetaz !jref:end ! variables for the modified two-stream scheme ! niu and yang (2004), jgr - real, parameter :: pai = 3.14159265 - real :: hd !crown depth (m) - real :: bb !vertical crown radius (m) - real :: thetap !angle conversion from sza - real :: fa !foliage volume density (m-1) - real :: newvai !effective lsai (-) + real (kind=kind_phys), parameter :: pai = 3.14159265 + real (kind=kind_phys) :: hd !crown depth (m) + real (kind=kind_phys) :: bb !vertical crown radius (m) + real (kind=kind_phys) :: thetap !angle conversion from sza + real (kind=kind_phys) :: fa !foliage volume density (m-1) + real (kind=kind_phys) :: newvai !effective lsai (-) - real,intent(inout) :: bgap !between canopy gap fraction for beam (-) - real,intent(inout) :: wgap !within canopy gap fraction for beam (-) + real (kind=kind_phys),intent(inout) :: bgap !between canopy gap fraction for beam (-) + real (kind=kind_phys),intent(inout) :: wgap !within canopy gap fraction for beam (-) - real :: kopen !gap fraction for diffue light (-) - real :: gap !total gap fraction for beam ( <=1-shafac ) + real (kind=kind_phys) :: kopen !gap fraction for diffue light (-) + real (kind=kind_phys) :: gap !total gap fraction for beam ( <=1-shafac ) ! ----------------------------------------------------------------- ! compute within and between gaps @@ -3261,7 +3462,6 @@ subroutine twostream (parameters,ib ,ic ,vegtyp ,cosz ,vai , & ! frev(ib) = freveg freg(ib) = frebar - ! flux absorbed by vegetation fab(ib) = 1. - fre(ib) - (1.-albgrd(ib))*ftd(ib) & @@ -3277,12 +3477,14 @@ end subroutine twostream !== begin vege_flux ================================================================================ !>\ingroup NoahMP_LSM +!! use newton-raphson iteration to solve for vegetation (tv) and +!! ground (tg) temperatures that balance the surface energy budgets. subroutine vege_flux(parameters,nsnow ,nsoil ,isnow ,vegtyp ,veg , & !in dt ,sav ,sag ,lwdn ,ur , & !in uu ,vv ,sfctmp ,thair ,qair , & !in eair ,rhoair ,snowh ,vai ,gammav ,gammag, & !in fwet ,laisun ,laisha ,cwp ,dzsnso , & !in - zlvl ,zpd ,z0m ,fveg , & !in + zlvl ,zpd ,z0m ,fveg , & !in z0mg ,emv ,emg ,canliq ,fsno, & !in canice ,stc ,df ,rssun ,rssha , & !in rsurf ,latheav ,latheag ,parsun ,parsha ,igs , & !in @@ -3319,74 +3521,73 @@ subroutine vege_flux(parameters,nsnow ,nsoil ,isnow ,vegtyp ,veg , & integer, intent(in) :: nsoil !number of soil layers integer, intent(in) :: isnow !actual no. of snow layers integer, intent(in) :: vegtyp !vegetation physiology type - real, intent(in) :: fveg !greeness vegetation fraction (-) - real, intent(in) :: sav !solar rad absorbed by veg (w/m2) - real, intent(in) :: sag !solar rad absorbed by ground (w/m2) - real, intent(in) :: lwdn !atmospheric longwave radiation (w/m2) - real, intent(in) :: ur !wind speed at height zlvl (m/s) - real, intent(in) :: uu !wind speed in eastward dir (m/s) - real, intent(in) :: vv !wind speed in northward dir (m/s) - real, intent(in) :: sfctmp !air temperature at reference height (k) - real, intent(in) :: thair !potential temp at reference height (k) - real, intent(in) :: eair !vapor pressure air at zlvl (pa) - real, intent(in) :: qair !specific humidity at zlvl (kg/kg) - real, intent(in) :: rhoair !density air (kg/m**3) - real, intent(in) :: dt !time step (s) - real, intent(in) :: fsno !snow fraction - - real, intent(in) :: snowh !actual snow depth [m] - real, intent(in) :: fwet !wetted fraction of canopy - real, intent(in) :: cwp !canopy wind parameter - - real, intent(in) :: vai !total leaf area index + stem area index - real, intent(in) :: laisun !sunlit leaf area index, one-sided (m2/m2) - real, intent(in) :: laisha !shaded leaf area index, one-sided (m2/m2) - real, intent(in) :: zlvl !reference height (m) - - real, intent(in) :: zpd !zero plane displacement (m) - real, intent(in) :: z0m !roughness length, momentum (m) - real, intent(in) :: z0mg !roughness length, momentum, ground (m) - real, intent(in) :: emv !vegetation emissivity - real, intent(in) :: emg !ground emissivity - - real, dimension(-nsnow+1:nsoil), intent(in) :: stc !soil/snow temperature (k) - real, dimension(-nsnow+1:nsoil), intent(in) :: df !thermal conductivity of snow/soil (w/m/k) - real, dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !thinkness of snow/soil layers (m) - real, intent(in) :: canliq !intercepted liquid water (mm) - real, intent(in) :: canice !intercepted ice mass (mm) - real, intent(in) :: rsurf !ground surface resistance (s/m) -! real, intent(in) :: gamma !psychrometric constant (pa/k) -! real, intent(in) :: lathea !latent heat of vaporization/subli (j/kg) - real, intent(in) :: gammav !psychrometric constant (pa/k) - real, intent(in) :: latheav !latent heat of vaporization/subli (j/kg) - real, intent(in) :: gammag !psychrometric constant (pa/k) - real, intent(in) :: latheag !latent heat of vaporization/subli (j/kg) - real, intent(in) :: parsun !par absorbed per unit sunlit lai (w/m2) - real, intent(in) :: parsha !par absorbed per unit shaded lai (w/m2) - real, intent(in) :: foln !foliage nitrogen (%) - real, intent(in) :: co2air !atmospheric co2 concentration (pa) - real, intent(in) :: o2air !atmospheric o2 concentration (pa) - real, intent(in) :: igs !growing season index (0=off, 1=on) - real, intent(in) :: sfcprs !pressure (pa) - real, intent(in) :: btran !soil water transpiration factor (0 to 1) - real, intent(in) :: rhsur !raltive humidity in surface soil/snow air space (-) - - real , intent(in) :: qc !cloud water mixing ratio - real , intent(in) :: psfc !pressure at lowest model layer - real , intent(in) :: dx !grid spacing - real , intent(in) :: q2 !mixing ratio (kg/kg) - real , intent(in) :: dz8w !thickness of lowest layer - real , intent(inout) :: qsfc !mixing ratio at lowest model layer - real, intent(in) :: pahv !precipitation advected heat - canopy net in (w/m2) - real, intent(in) :: pahg !precipitation advected heat - ground net in (w/m2) + real (kind=kind_phys), intent(in) :: fveg !greeness vegetation fraction (-) + real (kind=kind_phys), intent(in) :: sav !solar rad absorbed by veg (w/m2) + real (kind=kind_phys), intent(in) :: sag !solar rad absorbed by ground (w/m2) + real (kind=kind_phys), intent(in) :: lwdn !atmospheric longwave radiation (w/m2) + real (kind=kind_phys), intent(in) :: ur !wind speed at height zlvl (m/s) + real (kind=kind_phys), intent(in) :: uu !wind speed in eastward dir (m/s) + real (kind=kind_phys), intent(in) :: vv !wind speed in northward dir (m/s) + real (kind=kind_phys), intent(in) :: sfctmp !air temperature at reference height (k) + real (kind=kind_phys), intent(in) :: thair !potential temp at reference height (k) + real (kind=kind_phys), intent(in) :: eair !vapor pressure air at zlvl (pa) + real (kind=kind_phys), intent(in) :: qair !specific humidity at zlvl (kg/kg) + real (kind=kind_phys), intent(in) :: rhoair !density air (kg/m**3) + real (kind=kind_phys), intent(in) :: dt !time step (s) + real (kind=kind_phys), intent(in) :: fsno !snow fraction + + real (kind=kind_phys), intent(in) :: snowh !actual snow depth [m] + real (kind=kind_phys), intent(in) :: fwet !wetted fraction of canopy + real (kind=kind_phys), intent(in) :: cwp !canopy wind parameter + + real (kind=kind_phys), intent(in) :: vai !total leaf area index + stem area index + real (kind=kind_phys), intent(in) :: laisun !sunlit leaf area index, one-sided (m2/m2) + real (kind=kind_phys), intent(in) :: laisha !shaded leaf area index, one-sided (m2/m2) + real (kind=kind_phys), intent(in) :: zlvl !reference height (m) + real (kind=kind_phys), intent(in) :: zpd !zero plane displacement (m) + real (kind=kind_phys), intent(in) :: z0m !roughness length, momentum (m) + real (kind=kind_phys), intent(in) :: z0mg !roughness length, momentum, ground (m) + real (kind=kind_phys), intent(in) :: emv !vegetation emissivity + real (kind=kind_phys), intent(in) :: emg !ground emissivity + + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: stc !soil/snow temperature (k) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: df !thermal conductivity of snow/soil (w/m/k) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !thinkness of snow/soil layers (m) + real (kind=kind_phys), intent(in) :: canliq !intercepted liquid water (mm) + real (kind=kind_phys), intent(in) :: canice !intercepted ice mass (mm) + real (kind=kind_phys), intent(in) :: rsurf !ground surface resistance (s/m) +! real (kind=kind_phys), intent(in) :: gamma !psychrometric constant (pa/k) +! real (kind=kind_phys), intent(in) :: lathea !latent heat of vaporization/subli (j/kg) + real (kind=kind_phys), intent(in) :: gammav !psychrometric constant (pa/k) + real (kind=kind_phys), intent(in) :: latheav !latent heat of vaporization/subli (j/kg) + real (kind=kind_phys), intent(in) :: gammag !psychrometric constant (pa/k) + real (kind=kind_phys), intent(in) :: latheag !latent heat of vaporization/subli (j/kg) + real (kind=kind_phys), intent(in) :: parsun !par absorbed per unit sunlit lai (w/m2) + real (kind=kind_phys), intent(in) :: parsha !par absorbed per unit shaded lai (w/m2) + real (kind=kind_phys), intent(in) :: foln !foliage nitrogen (%) + real (kind=kind_phys), intent(in) :: co2air !atmospheric co2 concentration (pa) + real (kind=kind_phys), intent(in) :: o2air !atmospheric o2 concentration (pa) + real (kind=kind_phys), intent(in) :: igs !growing season index (0=off, 1=on) + real (kind=kind_phys), intent(in) :: sfcprs !pressure (pa) + real (kind=kind_phys), intent(in) :: btran !soil water transpiration factor (0 to 1) + real (kind=kind_phys), intent(in) :: rhsur !raltive humidity in surface soil/snow air space (-) + + real (kind=kind_phys) , intent(in) :: qc !cloud water mixing ratio + real (kind=kind_phys) , intent(in) :: psfc !pressure at lowest model layer + real (kind=kind_phys) , intent(in) :: dx !grid spacing + real (kind=kind_phys) , intent(in) :: q2 !mixing ratio (kg/kg) + real (kind=kind_phys) , intent(in) :: dz8w !thickness of lowest layer + real (kind=kind_phys) , intent(inout) :: qsfc !mixing ratio at lowest model layer + real (kind=kind_phys), intent(in) :: pahv !precipitation advected heat - canopy net in (w/m2) + real (kind=kind_phys), intent(in) :: pahg !precipitation advected heat - ground net in (w/m2) ! input/output - real, intent(inout) :: eah !canopy air vapor pressure (pa) - real, intent(inout) :: tah !canopy air temperature (k) - real, intent(inout) :: tv !vegetation temperature (k) - real, intent(inout) :: tg !ground temperature (k) - real, intent(inout) :: cm !momentum drag coefficient - real, intent(inout) :: ch !sensible heat exchange coefficient + real (kind=kind_phys), intent(inout) :: eah !canopy air vapor pressure (pa) + real (kind=kind_phys), intent(inout) :: tah !canopy air temperature (k) + real (kind=kind_phys), intent(inout) :: tv !vegetation temperature (k) + real (kind=kind_phys), intent(inout) :: tg !ground temperature (k) + real (kind=kind_phys), intent(inout) :: cm !momentum drag coefficient + real (kind=kind_phys), intent(inout) :: ch !sensible heat exchange coefficient #ifdef CCPP character(len=*), intent(inout) :: errmsg @@ -3395,107 +3596,106 @@ subroutine vege_flux(parameters,nsnow ,nsoil ,isnow ,vegtyp ,veg , & ! output ! -fsa + fira + fsh + (fcev + fctr + fgev) + fcst + ssoil = 0 - real, intent(out) :: tauxv !wind stress: e-w (n/m2) - real, intent(out) :: tauyv !wind stress: n-s (n/m2) - real, intent(out) :: irc !net longwave radiation (w/m2) [+= to atm] - real, intent(out) :: shc !sensible heat flux (w/m2) [+= to atm] - real, intent(out) :: evc !evaporation heat flux (w/m2) [+= to atm] - real, intent(out) :: irg !net longwave radiation (w/m2) [+= to atm] - real, intent(out) :: shg !sensible heat flux (w/m2) [+= to atm] - real, intent(out) :: evg !evaporation heat flux (w/m2) [+= to atm] - real, intent(out) :: tr !transpiration heat flux (w/m2)[+= to atm] - real, intent(out) :: gh !ground heat (w/m2) [+ = to soil] - real, intent(out) :: t2mv !2 m height air temperature (k) - real, intent(out) :: psnsun !sunlit leaf photosynthesis (umolco2/m2/s) - real, intent(out) :: psnsha !shaded leaf photosynthesis (umolco2/m2/s) - real, intent(out) :: chleaf !leaf exchange coefficient - real, intent(out) :: chuc !under canopy exchange coefficient - - real, intent(out) :: q2v - real :: cah !sensible heat conductance, canopy air to zlvl air (m/s) - real :: u10v !10 m wind speed in eastward dir (m/s) - real :: v10v !10 m wind speed in eastward dir (m/s) - real :: wspd + real (kind=kind_phys), intent(out) :: tauxv !wind stress: e-w (n/m2) + real (kind=kind_phys), intent(out) :: tauyv !wind stress: n-s (n/m2) + real (kind=kind_phys), intent(out) :: irc !net longwave radiation (w/m2) [+= to atm] + real (kind=kind_phys), intent(out) :: shc !sensible heat flux (w/m2) [+= to atm] + real (kind=kind_phys), intent(out) :: evc !evaporation heat flux (w/m2) [+= to atm] + real (kind=kind_phys), intent(out) :: irg !net longwave radiation (w/m2) [+= to atm] + real (kind=kind_phys), intent(out) :: shg !sensible heat flux (w/m2) [+= to atm] + real (kind=kind_phys), intent(out) :: evg !evaporation heat flux (w/m2) [+= to atm] + real (kind=kind_phys), intent(out) :: tr !transpiration heat flux (w/m2)[+= to atm] + real (kind=kind_phys), intent(out) :: gh !ground heat (w/m2) [+ = to soil] + real (kind=kind_phys), intent(out) :: t2mv !2 m height air temperature (k) + real (kind=kind_phys), intent(out) :: psnsun !sunlit leaf photosynthesis (umolco2/m2/s) + real (kind=kind_phys), intent(out) :: psnsha !shaded leaf photosynthesis (umolco2/m2/s) + real (kind=kind_phys), intent(out) :: chleaf !leaf exchange coefficient + real (kind=kind_phys), intent(out) :: chuc !under canopy exchange coefficient + + real (kind=kind_phys), intent(out) :: q2v + real (kind=kind_phys) :: cah !sensible heat conductance, canopy air to zlvl air (m/s) + real (kind=kind_phys) :: u10v !10 m wind speed in eastward dir (m/s) + real (kind=kind_phys) :: v10v !10 m wind speed in eastward dir (m/s) + real (kind=kind_phys) :: wspd ! ------------------------ local variables ---------------------------------------------------- - real :: cw !water vapor exchange coefficient - real :: fv !friction velocity (m/s) - real :: wstar !friction velocity n vertical direction (m/s) (only for sfcdif2) - real :: z0h !roughness length, sensible heat (m) - real :: z0hg !roughness length, sensible heat (m) - real :: rb !bulk leaf boundary layer resistance (s/m) - real :: ramc !aerodynamic resistance for momentum (s/m) - real :: rahc !aerodynamic resistance for sensible heat (s/m) - real :: rawc !aerodynamic resistance for water vapor (s/m) - real :: ramg !aerodynamic resistance for momentum (s/m) - real :: rahg !aerodynamic resistance for sensible heat (s/m) - real :: rawg !aerodynamic resistance for water vapor (s/m) - - real, intent(out) :: rssun !sunlit leaf stomatal resistance (s/m) - real, intent(out) :: rssha !shaded leaf stomatal resistance (s/m) - - real :: mol !monin-obukhov length (m) - real :: dtv !change in tv, last iteration (k) - real :: dtg !change in tg, last iteration (k) - - real :: air,cir !coefficients for ir as function of ts**4 - real :: csh !coefficients for sh as function of ts - real :: cev !coefficients for ev as function of esat[ts] - real :: cgh !coefficients for st as function of ts - real :: atr,ctr !coefficients for tr as function of esat[ts] - real :: ata,bta !coefficients for tah as function of ts - real :: aea,bea !coefficients for eah as function of esat[ts] - - real :: estv !saturation vapor pressure at tv (pa) - real :: estg !saturation vapor pressure at tg (pa) - real :: destv !d(es)/dt at ts (pa/k) - real :: destg !d(es)/dt at tg (pa/k) - real :: esatw !es for water - real :: esati !es for ice - real :: dsatw !d(es)/dt at tg (pa/k) for water - real :: dsati !d(es)/dt at tg (pa/k) for ice - - real :: fm !momentum stability correction, weighted by prior iters - real :: fh !sen heat stability correction, weighted by prior iters - real :: fhg !sen heat stability correction, ground - real :: hcan !canopy height (m) [note: hcan >= z0mg] - - real :: a !temporary calculation - real :: b !temporary calculation - real :: cvh !sensible heat conductance, leaf surface to canopy air (m/s) - real :: caw !latent heat conductance, canopy air zlvl air (m/s) - real :: ctw !transpiration conductance, leaf to canopy air (m/s) - real :: cew !evaporation conductance, leaf to canopy air (m/s) - real :: cgw !latent heat conductance, ground to canopy air (m/s) - real :: cond !sum of conductances (s/m) - real :: uc !wind speed at top of canopy (m/s) - real :: kh !turbulent transfer coefficient, sensible heat, (m2/s) - real :: h !temporary sensible heat flux (w/m2) - real :: hg !temporary sensible heat flux (w/m2) - - real :: moz !monin-obukhov stability parameter - real :: mozg !monin-obukhov stability parameter - real :: mozold !monin-obukhov stability parameter from prior iteration - real :: fm2 !monin-obukhov momentum adjustment at 2m - real :: fh2 !monin-obukhov heat adjustment at 2m - real :: ch2 !surface exchange at 2m - real :: thstar !surface exchange at 2m - - real :: thvair - real :: thah - real :: rahc2 !aerodynamic resistance for sensible heat (s/m) - real :: rawc2 !aerodynamic resistance for water vapor (s/m) - real, intent(out):: cah2 !sensible heat conductance for diagnostics - real :: ch2v !exchange coefficient for 2m over vegetation. - real :: cq2v !exchange coefficient for 2m over vegetation. - real :: eah2 !2m vapor pressure over canopy - real :: qfx !moisture flux - real :: e1 - - - real :: vaie !total leaf area index + stem area index,effective - real :: laisune !sunlit leaf area index, one-sided (m2/m2),effective - real :: laishae !shaded leaf area index, one-sided (m2/m2),effective + real (kind=kind_phys) :: cw !water vapor exchange coefficient + real (kind=kind_phys) :: fv !friction velocity (m/s) + real (kind=kind_phys) :: wstar !friction velocity n vertical direction (m/s) (only for sfcdif2) + real (kind=kind_phys) :: z0h !roughness length, sensible heat (m) + real (kind=kind_phys) :: z0hg !roughness length, sensible heat (m) + real (kind=kind_phys) :: rb !bulk leaf boundary layer resistance (s/m) + real (kind=kind_phys) :: ramc !aerodynamic resistance for momentum (s/m) + real (kind=kind_phys) :: rahc !aerodynamic resistance for sensible heat (s/m) + real (kind=kind_phys) :: rawc !aerodynamic resistance for water vapor (s/m) + real (kind=kind_phys) :: ramg !aerodynamic resistance for momentum (s/m) + real (kind=kind_phys) :: rahg !aerodynamic resistance for sensible heat (s/m) + real (kind=kind_phys) :: rawg !aerodynamic resistance for water vapor (s/m) + + real (kind=kind_phys), intent(out) :: rssun !sunlit leaf stomatal resistance (s/m) + real (kind=kind_phys), intent(out) :: rssha !shaded leaf stomatal resistance (s/m) + + real (kind=kind_phys) :: mol !monin-obukhov length (m) + real (kind=kind_phys) :: dtv !change in tv, last iteration (k) + real (kind=kind_phys) :: dtg !change in tg, last iteration (k) + + real (kind=kind_phys) :: air,cir !coefficients for ir as function of ts**4 + real (kind=kind_phys) :: csh !coefficients for sh as function of ts + real (kind=kind_phys) :: cev !coefficients for ev as function of esat[ts] + real (kind=kind_phys) :: cgh !coefficients for st as function of ts + real (kind=kind_phys) :: atr,ctr !coefficients for tr as function of esat[ts] + real (kind=kind_phys) :: ata,bta !coefficients for tah as function of ts + real (kind=kind_phys) :: aea,bea !coefficients for eah as function of esat[ts] + + real (kind=kind_phys) :: estv !saturation vapor pressure at tv (pa) + real (kind=kind_phys) :: estg !saturation vapor pressure at tg (pa) + real (kind=kind_phys) :: destv !d(es)/dt at ts (pa/k) + real (kind=kind_phys) :: destg !d(es)/dt at tg (pa/k) + real (kind=kind_phys) :: esatw !es for water + real (kind=kind_phys) :: esati !es for ice + real (kind=kind_phys) :: dsatw !d(es)/dt at tg (pa/k) for water + real (kind=kind_phys) :: dsati !d(es)/dt at tg (pa/k) for ice + + real (kind=kind_phys) :: fm !momentum stability correction, weighted by prior iters + real (kind=kind_phys) :: fh !sen heat stability correction, weighted by prior iters + real (kind=kind_phys) :: fhg !sen heat stability correction, ground + real (kind=kind_phys) :: hcan !canopy height (m) [note: hcan >= z0mg] + + real (kind=kind_phys) :: a !temporary calculation + real (kind=kind_phys) :: b !temporary calculation + real (kind=kind_phys) :: cvh !sensible heat conductance, leaf surface to canopy air (m/s) + real (kind=kind_phys) :: caw !latent heat conductance, canopy air zlvl air (m/s) + real (kind=kind_phys) :: ctw !transpiration conductance, leaf to canopy air (m/s) + real (kind=kind_phys) :: cew !evaporation conductance, leaf to canopy air (m/s) + real (kind=kind_phys) :: cgw !latent heat conductance, ground to canopy air (m/s) + real (kind=kind_phys) :: cond !sum of conductances (s/m) + real (kind=kind_phys) :: uc !wind speed at top of canopy (m/s) + real (kind=kind_phys) :: kh !turbulent transfer coefficient, sensible heat, (m2/s) + real (kind=kind_phys) :: h !temporary sensible heat flux (w/m2) + real (kind=kind_phys) :: hg !temporary sensible heat flux (w/m2) + real (kind=kind_phys) :: moz !monin-obukhov stability parameter + real (kind=kind_phys) :: mozg !monin-obukhov stability parameter + real (kind=kind_phys) :: mozold !monin-obukhov stability parameter from prior iteration + real (kind=kind_phys) :: fm2 !monin-obukhov momentum adjustment at 2m + real (kind=kind_phys) :: fh2 !monin-obukhov heat adjustment at 2m + real (kind=kind_phys) :: ch2 !surface exchange at 2m + real (kind=kind_phys) :: thstar !surface exchange at 2m + + real (kind=kind_phys) :: thvair + real (kind=kind_phys) :: thah + real (kind=kind_phys) :: rahc2 !aerodynamic resistance for sensible heat (s/m) + real (kind=kind_phys) :: rawc2 !aerodynamic resistance for water vapor (s/m) + real (kind=kind_phys), intent(out):: cah2 !sensible heat conductance for diagnostics + real (kind=kind_phys) :: ch2v !exchange coefficient for 2m over vegetation. + real (kind=kind_phys) :: cq2v !exchange coefficient for 2m over vegetation. + real (kind=kind_phys) :: eah2 !2m vapor pressure over canopy + real (kind=kind_phys) :: qfx !moisture flux + real (kind=kind_phys) :: e1 + + + real (kind=kind_phys) :: vaie !total leaf area index + stem area index,effective + real (kind=kind_phys) :: laisune !sunlit leaf area index, one-sided (m2/m2),effective + real (kind=kind_phys) :: laishae !shaded leaf area index, one-sided (m2/m2),effective integer :: k !index integer :: iter !iteration index @@ -3505,12 +3705,12 @@ subroutine vege_flux(parameters,nsnow ,nsoil ,isnow ,vegtyp ,veg , & !jref - niterg test from 3-5 integer, parameter :: niterg = 5 !number of iterations for ground temperature integer :: mozsgn !number of times moz changes sign - real :: mpe !prevents overflow error if division by zero + real (kind=kind_phys) :: mpe !prevents overflow error if division by zero integer :: liter !last iteration - real :: t, tdc !kelvin to degree celsius with limit -50 to +50 + real (kind=kind_phys) :: t, tdc !kelvin to degree celsius with limit -50 to +50 character(len=80) :: message @@ -3529,18 +3729,16 @@ subroutine vege_flux(parameters,nsnow ,nsoil ,isnow ,vegtyp ,veg , & moz = 0. mozsgn = 0 mozold = 0. + fh2 = 0. hg = 0. h = 0. qfx = 0. -! YRQ -! write(*,*) 'tv,tg,stc in input:YRQ', tv,tg,stc +! limit lai -! convert grid-cell lai to the fractional vegetated area (fveg) - - vaie = min(6.,vai / fveg) - laisune = min(6.,laisun / fveg) - laishae = min(6.,laisha / fveg) + vaie = min(6.,vai ) + laisune = min(6.,laisun) + laishae = min(6.,laisha) ! saturation vapor pressure at ground temperature @@ -3602,7 +3800,6 @@ subroutine vege_flux(parameters,nsnow ,nsoil ,isnow ,vegtyp ,veg , & air = -emv*(1.+(1.-emv)*(1.-emg))*lwdn - emv*emg*sb*tg**4 cir = (2.-emv*(1.-emg))*emv*sb - ! --------------------------------------------------------------------------------------------- loop1: do iter = 1, niterc ! begin stability iteration @@ -3623,7 +3820,7 @@ subroutine vege_flux(parameters,nsnow ,nsoil ,isnow ,vegtyp ,veg , & #ifdef CCPP moz ,mozsgn ,fm ,fh ,fm2 ,fh2 ,errmsg ,errflg ,& !inout #else - moz ,mozsgn ,fm ,fh ,fm2 ,fh2 , & !inout + moz ,mozsgn ,fm ,fh ,fm2,fh2, & !inout #endif cm ,ch ,fv ,ch2 ) !out #ifdef CCPP @@ -3764,7 +3961,6 @@ subroutine vege_flux(parameters,nsnow ,nsoil ,isnow ,vegtyp ,veg , & csh = rhoair*cpair/rahg cev = rhoair*cpair / (gammag*(rawg+rsurf)) ! barlage: change to ground v3.6 cgh = 2.*df(isnow+1)/dzsnso(isnow+1) -! write(*,*)'inside tg=',tg,'stc(1)=',stc(1) loop2: do iter = 1, niterg @@ -3801,7 +3997,7 @@ subroutine vege_flux(parameters,nsnow ,nsoil ,isnow ,vegtyp ,veg , & if(opt_stc == 1 .or. opt_stc == 3) then if (snowh > 0.05 .and. tg > tfrz) then - tg = tfrz + if(opt_stc == 1) tg = tfrz if(opt_stc == 3) tg = (1.-fsno)*tg + fsno*tfrz ! mb: allow tg>0c during melt v3.7 irg = cir*tg**4 - emg*(1.-emv)*lwdn - emg*emv*sb*tv**4 shg = csh * (tg - tah) @@ -3849,6 +4045,8 @@ end subroutine vege_flux !== begin bare_flux ================================================================================ !>\ingroup NoahMP_LSM +!! use newton-raphson iteration to solve ground (tg) temperature +!! that balances the surface energy budgets for bare soil fraction. subroutine bare_flux (parameters,nsnow ,nsoil ,isnow ,dt ,sag , & !in lwdn ,ur ,uu ,vv ,sfctmp , & !in thair ,qair ,eair ,rhoair ,snowh , & !in @@ -3881,47 +4079,47 @@ subroutine bare_flux (parameters,nsnow ,nsoil ,isnow ,dt ,sag , & integer, intent(in) :: nsnow !maximum no. of snow layers integer, intent(in) :: nsoil !number of soil layers integer, intent(in) :: isnow !actual no. of snow layers - real, intent(in) :: dt !time step (s) - real, intent(in) :: sag !solar radiation absorbed by ground (w/m2) - real, intent(in) :: lwdn !atmospheric longwave radiation (w/m2) - real, intent(in) :: ur !wind speed at height zlvl (m/s) - real, intent(in) :: uu !wind speed in eastward dir (m/s) - real, intent(in) :: vv !wind speed in northward dir (m/s) - real, intent(in) :: sfctmp !air temperature at reference height (k) - real, intent(in) :: thair !potential temperature at height zlvl (k) - real, intent(in) :: qair !specific humidity at height zlvl (kg/kg) - real, intent(in) :: eair !vapor pressure air at height (pa) - real, intent(in) :: rhoair !density air (kg/m3) - real, intent(in) :: snowh !actual snow depth [m] - real, dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !thickness of snow/soil layers (m) - real, intent(in) :: zlvl !reference height (m) - real, intent(in) :: zpd !zero plane displacement (m) - real, intent(in) :: z0m !roughness length, momentum, ground (m) - real, intent(in) :: emg !ground emissivity - real, dimension(-nsnow+1:nsoil), intent(in) :: stc !soil/snow temperature (k) - real, dimension(-nsnow+1:nsoil), intent(in) :: df !thermal conductivity of snow/soil (w/m/k) - real, intent(in) :: rsurf !ground surface resistance (s/m) - real, intent(in) :: lathea !latent heat of vaporization/subli (j/kg) - real, intent(in) :: gamma !psychrometric constant (pa/k) - real, intent(in) :: rhsur !raltive humidity in surface soil/snow air space (-) - real, intent(in) :: fsno !snow fraction + real (kind=kind_phys), intent(in) :: dt !time step (s) + real (kind=kind_phys), intent(in) :: sag !solar radiation absorbed by ground (w/m2) + real (kind=kind_phys), intent(in) :: lwdn !atmospheric longwave radiation (w/m2) + real (kind=kind_phys), intent(in) :: ur !wind speed at height zlvl (m/s) + real (kind=kind_phys), intent(in) :: uu !wind speed in eastward dir (m/s) + real (kind=kind_phys), intent(in) :: vv !wind speed in northward dir (m/s) + real (kind=kind_phys), intent(in) :: sfctmp !air temperature at reference height (k) + real (kind=kind_phys), intent(in) :: thair !potential temperature at height zlvl (k) + real (kind=kind_phys), intent(in) :: qair !specific humidity at height zlvl (kg/kg) + real (kind=kind_phys), intent(in) :: eair !vapor pressure air at height (pa) + real (kind=kind_phys), intent(in) :: rhoair !density air (kg/m3) + real (kind=kind_phys), intent(in) :: snowh !actual snow depth [m] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !thickness of snow/soil layers (m) + real (kind=kind_phys), intent(in) :: zlvl !reference height (m) + real (kind=kind_phys), intent(in) :: zpd !zero plane displacement (m) + real (kind=kind_phys), intent(in) :: z0m !roughness length, momentum, ground (m) + real (kind=kind_phys), intent(in) :: emg !ground emissivity + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: stc !soil/snow temperature (k) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: df !thermal conductivity of snow/soil (w/m/k) + real (kind=kind_phys), intent(in) :: rsurf !ground surface resistance (s/m) + real (kind=kind_phys), intent(in) :: lathea !latent heat of vaporization/subli (j/kg) + real (kind=kind_phys), intent(in) :: gamma !psychrometric constant (pa/k) + real (kind=kind_phys), intent(in) :: rhsur !raltive humidity in surface soil/snow air space (-) + real (kind=kind_phys), intent(in) :: fsno !snow fraction !jref:start; in integer , intent(in) :: ivgtyp - real , intent(in) :: qc !cloud water mixing ratio - real , intent(inout) :: qsfc !mixing ratio at lowest model layer - real , intent(in) :: psfc !pressure at lowest model layer - real , intent(in) :: sfcprs !pressure at lowest model layer - real , intent(in) :: dx !horisontal grid spacing - real , intent(in) :: q2 !mixing ratio (kg/kg) - real , intent(in) :: dz8w !thickness of lowest layer + real (kind=kind_phys) , intent(in) :: qc !cloud water mixing ratio + real (kind=kind_phys) , intent(inout) :: qsfc !mixing ratio at lowest model layer + real (kind=kind_phys) , intent(in) :: psfc !pressure at lowest model layer + real (kind=kind_phys) , intent(in) :: sfcprs !pressure at lowest model layer + real (kind=kind_phys) , intent(in) :: dx !horisontal grid spacing + real (kind=kind_phys) , intent(in) :: q2 !mixing ratio (kg/kg) + real (kind=kind_phys) , intent(in) :: dz8w !thickness of lowest layer !jref:end - real, intent(in) :: pahb !precipitation advected heat - ground net in (w/m2) + real (kind=kind_phys), intent(in) :: pahb !precipitation advected heat - ground net in (w/m2) ! input/output - real, intent(inout) :: tgb !ground temperature (k) - real, intent(inout) :: cm !momentum drag coefficient - real, intent(inout) :: ch !sensible heat exchange coefficient + real (kind=kind_phys), intent(inout) :: tgb !ground temperature (k) + real (kind=kind_phys), intent(inout) :: cm !momentum drag coefficient + real (kind=kind_phys), intent(inout) :: ch !sensible heat exchange coefficient #ifdef CCPP character(len=*), intent(inout) :: errmsg integer, intent(inout) :: errflg @@ -3930,91 +4128,91 @@ subroutine bare_flux (parameters,nsnow ,nsoil ,isnow ,dt ,sag , & ! output ! -sab + irb[tg] + shb[tg] + evb[tg] + ghb[tg] = 0 - real, intent(out) :: tauxb !wind stress: e-w (n/m2) - real, intent(out) :: tauyb !wind stress: n-s (n/m2) - real, intent(out) :: irb !net longwave rad (w/m2) [+ to atm] - real, intent(out) :: shb !sensible heat flux (w/m2) [+ to atm] - real, intent(out) :: evb !latent heat flux (w/m2) [+ to atm] - real, intent(out) :: ghb !ground heat flux (w/m2) [+ to soil] - real, intent(out) :: t2mb !2 m height air temperature (k) + real (kind=kind_phys), intent(out) :: tauxb !wind stress: e-w (n/m2) + real (kind=kind_phys), intent(out) :: tauyb !wind stress: n-s (n/m2) + real (kind=kind_phys), intent(out) :: irb !net longwave rad (w/m2) [+ to atm] + real (kind=kind_phys), intent(out) :: shb !sensible heat flux (w/m2) [+ to atm] + real (kind=kind_phys), intent(out) :: evb !latent heat flux (w/m2) [+ to atm] + real (kind=kind_phys), intent(out) :: ghb !ground heat flux (w/m2) [+ to soil] + real (kind=kind_phys), intent(out) :: t2mb !2 m height air temperature (k) !jref:start - real, intent(out) :: q2b !bare ground heat conductance - real :: ehb !bare ground heat conductance - real :: u10b !10 m wind speed in eastward dir (m/s) - real :: v10b !10 m wind speed in eastward dir (m/s) - real :: wspd + real (kind=kind_phys), intent(out) :: q2b !bare ground heat conductance + real (kind=kind_phys) :: ehb !bare ground heat conductance + real (kind=kind_phys) :: u10b !10 m wind speed in eastward dir (m/s) + real (kind=kind_phys) :: v10b !10 m wind speed in eastward dir (m/s) + real (kind=kind_phys) :: wspd !jref:end ! local variables - real :: taux !wind stress: e-w (n/m2) - real :: tauy !wind stress: n-s (n/m2) - real :: fira !total net longwave rad (w/m2) [+ to atm] - real :: fsh !total sensible heat flux (w/m2) [+ to atm] - real :: fgev !ground evaporation heat flux (w/m2)[+ to atm] - real :: ssoil !soil heat flux (w/m2) [+ to soil] - real :: fire !emitted ir (w/m2) - real :: trad !radiative temperature (k) - real :: tah !"surface" temperature at height z0h+zpd (k) - - real :: cw !water vapor exchange coefficient - real :: fv !friction velocity (m/s) - real :: wstar !friction velocity n vertical direction (m/s) (only for sfcdif2) - real :: z0h !roughness length, sensible heat, ground (m) - real :: rb !bulk leaf boundary layer resistance (s/m) - real :: ramb !aerodynamic resistance for momentum (s/m) - real :: rahb !aerodynamic resistance for sensible heat (s/m) - real :: rawb !aerodynamic resistance for water vapor (s/m) - real :: mol !monin-obukhov length (m) - real :: dtg !change in tg, last iteration (k) - - real :: cir !coefficients for ir as function of ts**4 - real :: csh !coefficients for sh as function of ts - real :: cev !coefficients for ev as function of esat[ts] - real :: cgh !coefficients for st as function of ts + real (kind=kind_phys) :: taux !wind stress: e-w (n/m2) + real (kind=kind_phys) :: tauy !wind stress: n-s (n/m2) + real (kind=kind_phys) :: fira !total net longwave rad (w/m2) [+ to atm] + real (kind=kind_phys) :: fsh !total sensible heat flux (w/m2) [+ to atm] + real (kind=kind_phys) :: fgev !ground evaporation heat flux (w/m2)[+ to atm] + real (kind=kind_phys) :: ssoil !soil heat flux (w/m2) [+ to soil] + real (kind=kind_phys) :: fire !emitted ir (w/m2) + real (kind=kind_phys) :: trad !radiative temperature (k) + real (kind=kind_phys) :: tah !"surface" temperature at height z0h+zpd (k) + + real (kind=kind_phys) :: cw !water vapor exchange coefficient + real (kind=kind_phys) :: fv !friction velocity (m/s) + real (kind=kind_phys) :: wstar !friction velocity n vertical direction (m/s) (only for sfcdif2) + real (kind=kind_phys) :: z0h !roughness length, sensible heat, ground (m) + real (kind=kind_phys) :: rb !bulk leaf boundary layer resistance (s/m) + real (kind=kind_phys) :: ramb !aerodynamic resistance for momentum (s/m) + real (kind=kind_phys) :: rahb !aerodynamic resistance for sensible heat (s/m) + real (kind=kind_phys) :: rawb !aerodynamic resistance for water vapor (s/m) + real (kind=kind_phys) :: mol !monin-obukhov length (m) + real (kind=kind_phys) :: dtg !change in tg, last iteration (k) + + real (kind=kind_phys) :: cir !coefficients for ir as function of ts**4 + real (kind=kind_phys) :: csh !coefficients for sh as function of ts + real (kind=kind_phys) :: cev !coefficients for ev as function of esat[ts] + real (kind=kind_phys) :: cgh !coefficients for st as function of ts !jref:start - real :: rahb2 !aerodynamic resistance for sensible heat 2m (s/m) - real :: rawb2 !aerodynamic resistance for water vapor 2m (s/m) - real,intent(out) :: ehb2 !sensible heat conductance for diagnostics - real :: ch2b !exchange coefficient for 2m temp. - real :: cq2b !exchange coefficient for 2m temp. - real :: thvair !virtual potential air temp - real :: thgh !potential ground temp - real :: emb !momentum conductance - real :: qfx !moisture flux - real :: estg2 !saturation vapor pressure at 2m (pa) + real (kind=kind_phys) :: rahb2 !aerodynamic resistance for sensible heat 2m (s/m) + real (kind=kind_phys) :: rawb2 !aerodynamic resistance for water vapor 2m (s/m) + real (kind=kind_phys),intent(out) :: ehb2 !sensible heat conductance for diagnostics + real (kind=kind_phys) :: ch2b !exchange coefficient for 2m temp. + real (kind=kind_phys) :: cq2b !exchange coefficient for 2m temp. + real (kind=kind_phys) :: thvair !virtual potential air temp + real (kind=kind_phys) :: thgh !potential ground temp + real (kind=kind_phys) :: emb !momentum conductance + real (kind=kind_phys) :: qfx !moisture flux + real (kind=kind_phys) :: estg2 !saturation vapor pressure at 2m (pa) integer :: vegtyp !vegetation type set to isbarren - real :: e1 + real (kind=kind_phys) :: e1 !jref:end - real :: estg !saturation vapor pressure at tg (pa) - real :: destg !d(es)/dt at tg (pa/k) - real :: esatw !es for water - real :: esati !es for ice - real :: dsatw !d(es)/dt at tg (pa/k) for water - real :: dsati !d(es)/dt at tg (pa/k) for ice - - real :: a !temporary calculation - real :: b !temporary calculation - real :: h !temporary sensible heat flux (w/m2) - real :: moz !monin-obukhov stability parameter - real :: mozold !monin-obukhov stability parameter from prior iteration - real :: fm !momentum stability correction, weighted by prior iters - real :: fh !sen heat stability correction, weighted by prior iters + real (kind=kind_phys) :: estg !saturation vapor pressure at tg (pa) + real (kind=kind_phys) :: destg !d(es)/dt at tg (pa/k) + real (kind=kind_phys) :: esatw !es for water + real (kind=kind_phys) :: esati !es for ice + real (kind=kind_phys) :: dsatw !d(es)/dt at tg (pa/k) for water + real (kind=kind_phys) :: dsati !d(es)/dt at tg (pa/k) for ice + + real (kind=kind_phys) :: a !temporary calculation + real (kind=kind_phys) :: b !temporary calculation + real (kind=kind_phys) :: h !temporary sensible heat flux (w/m2) + real (kind=kind_phys) :: moz !monin-obukhov stability parameter + real (kind=kind_phys) :: mozold !monin-obukhov stability parameter from prior iteration + real (kind=kind_phys) :: fm !momentum stability correction, weighted by prior iters + real (kind=kind_phys) :: fh !sen heat stability correction, weighted by prior iters integer :: mozsgn !number of times moz changes sign - real :: fm2 !monin-obukhov momentum adjustment at 2m - real :: fh2 !monin-obukhov heat adjustment at 2m - real :: ch2 !surface exchange at 2m + real (kind=kind_phys) :: fm2 !monin-obukhov momentum adjustment at 2m + real (kind=kind_phys) :: fh2 !monin-obukhov heat adjustment at 2m + real (kind=kind_phys) :: ch2 !surface exchange at 2m integer :: iter !iteration index integer :: niterb !number of iterations for surface temperature - real :: mpe !prevents overflow error if division by zero + real (kind=kind_phys) :: mpe !prevents overflow error if division by zero !jref:start ! data niterb /3/ data niterb /5/ save niterb - real :: t, tdc !kelvin to degree celsius with limit -50 to +50 + real (kind=kind_phys) :: t, tdc !kelvin to degree celsius with limit -50 to +50 tdc(t) = min( 50., max(-50.,(t-tfrz)) ) ! ----------------------------------------------------------------- @@ -4025,6 +4223,7 @@ subroutine bare_flux (parameters,nsnow ,nsoil ,isnow ,dt ,sag , & moz = 0. mozsgn = 0 mozold = 0. + fh2 = 0. h = 0. qfx = 0. fv = 0.1 @@ -4135,7 +4334,7 @@ subroutine bare_flux (parameters,nsnow ,nsoil ,isnow ,dt ,sag , & if(opt_stc == 1 .or. opt_stc == 3) then if (snowh > 0.05 .and. tgb > tfrz) then - tgb = tfrz + if(opt_stc == 1) tgb = tfrz if(opt_stc == 3) tgb = (1.-fsno)*tgb + fsno*tfrz ! mb: allow tg>0c during melt v3.7 irb = cir * tgb**4 - emg*lwdn shb = csh * (tgb - sfctmp) @@ -4173,6 +4372,8 @@ end subroutine bare_flux !== begin ragrb ==================================================================================== !>\ingroup NoahMP_LSM +!! compute under-canopy aerodynamic resistance rag and leaf boundary layer +!! resistance rb. subroutine ragrb(parameters,iter ,vai ,rhoair ,hg ,tah , & !in zpd ,z0mg ,z0hg ,hcan ,uc , & !in z0h ,fv ,cwp ,vegtyp ,mpe , & !in @@ -4191,39 +4392,39 @@ subroutine ragrb(parameters,iter ,vai ,rhoair ,hg ,tah , & !in integer, intent(in) :: jloc !grid index integer, intent(in) :: iter !iteration index integer, intent(in) :: vegtyp !vegetation physiology type - real, intent(in) :: vai !total lai + stem area index, one sided - real, intent(in) :: rhoair !density air (kg/m3) - real, intent(in) :: hg !ground sensible heat flux (w/m2) - real, intent(in) :: tv !vegetation temperature (k) - real, intent(in) :: tah !air temperature at height z0h+zpd (k) - real, intent(in) :: zpd !zero plane displacement (m) - real, intent(in) :: z0mg !roughness length, momentum, ground (m) - real, intent(in) :: hcan !canopy height (m) [note: hcan >= z0mg] - real, intent(in) :: uc !wind speed at top of canopy (m/s) - real, intent(in) :: z0h !roughness length, sensible heat (m) - real, intent(in) :: z0hg !roughness length, sensible heat, ground (m) - real, intent(in) :: fv !friction velocity (m/s) - real, intent(in) :: cwp !canopy wind parameter - real, intent(in) :: mpe !prevents overflow error if division by zero + real (kind=kind_phys), intent(in) :: vai !total lai + stem area index, one sided + real (kind=kind_phys), intent(in) :: rhoair !density air (kg/m3) + real (kind=kind_phys), intent(in) :: hg !ground sensible heat flux (w/m2) + real (kind=kind_phys), intent(in) :: tv !vegetation temperature (k) + real (kind=kind_phys), intent(in) :: tah !air temperature at height z0h+zpd (k) + real (kind=kind_phys), intent(in) :: zpd !zero plane displacement (m) + real (kind=kind_phys), intent(in) :: z0mg !roughness length, momentum, ground (m) + real (kind=kind_phys), intent(in) :: hcan !canopy height (m) [note: hcan >= z0mg] + real (kind=kind_phys), intent(in) :: uc !wind speed at top of canopy (m/s) + real (kind=kind_phys), intent(in) :: z0h !roughness length, sensible heat (m) + real (kind=kind_phys), intent(in) :: z0hg !roughness length, sensible heat, ground (m) + real (kind=kind_phys), intent(in) :: fv !friction velocity (m/s) + real (kind=kind_phys), intent(in) :: cwp !canopy wind parameter + real (kind=kind_phys), intent(in) :: mpe !prevents overflow error if division by zero ! in & out - real, intent(inout) :: mozg !monin-obukhov stability parameter - real, intent(inout) :: fhg !stability correction + real (kind=kind_phys), intent(inout) :: mozg !monin-obukhov stability parameter + real (kind=kind_phys), intent(inout) :: fhg !stability correction ! outputs - real :: ramg !aerodynamic resistance for momentum (s/m) - real :: rahg !aerodynamic resistance for sensible heat (s/m) - real :: rawg !aerodynamic resistance for water vapor (s/m) - real :: rb !bulk leaf boundary layer resistance (s/m) - - - real :: kh !turbulent transfer coefficient, sensible heat, (m2/s) - real :: tmp1 !temporary calculation - real :: tmp2 !temporary calculation - real :: tmprah2 !temporary calculation for aerodynamic resistances - real :: tmprb !temporary calculation for rb - real :: molg,fhgnew,cwpc + real (kind=kind_phys) :: ramg !aerodynamic resistance for momentum (s/m) + real (kind=kind_phys) :: rahg !aerodynamic resistance for sensible heat (s/m) + real (kind=kind_phys) :: rawg !aerodynamic resistance for water vapor (s/m) + real (kind=kind_phys) :: rb !bulk leaf boundary layer resistance (s/m) + + + real (kind=kind_phys) :: kh !turbulent transfer coefficient, sensible heat, (m2/s) + real (kind=kind_phys) :: tmp1 !temporary calculation + real (kind=kind_phys) :: tmp2 !temporary calculation + real (kind=kind_phys) :: tmprah2 !temporary calculation for aerodynamic resistances + real (kind=kind_phys) :: tmprb !temporary calculation for rb + real (kind=kind_phys) :: molg,fhgnew,cwpc ! -------------------------------------------------------------------------------------------------- ! stability correction to below canopy resistance @@ -4267,6 +4468,7 @@ subroutine ragrb(parameters,iter ,vai ,rhoair ,hg ,tah , & !in tmprb = cwpc*50. / (1. - exp(-cwpc/2.)) rb = tmprb * sqrt(parameters%dleaf/uc) + rb = max(rb,20.0) ! rb = 200 end subroutine ragrb @@ -4274,6 +4476,7 @@ end subroutine ragrb !== begin sfcdif1 ================================================================================== !>\ingroup NoahMP_LSM +!! compute surface drag coefficient cm for momentum and ch for heat. subroutine sfcdif1(parameters,iter ,sfctmp ,rhoair ,h ,qair , & !in & zlvl ,zpd ,z0m ,z0h ,ur , & !in & mpe ,iloc ,jloc , & !in @@ -4294,24 +4497,24 @@ subroutine sfcdif1(parameters,iter ,sfctmp ,rhoair ,h ,qair , & !in integer, intent(in) :: iloc !grid index integer, intent(in) :: jloc !grid index integer, intent(in) :: iter !iteration index - real, intent(in) :: sfctmp !temperature at reference height (k) - real, intent(in) :: rhoair !density air (kg/m**3) - real, intent(in) :: h !sensible heat flux (w/m2) [+ to atm] - real, intent(in) :: qair !specific humidity at reference height (kg/kg) - real, intent(in) :: zlvl !reference height (m) - real, intent(in) :: zpd !zero plane displacement (m) - real, intent(in) :: z0h !roughness length, sensible heat, ground (m) - real, intent(in) :: z0m !roughness length, momentum, ground (m) - real, intent(in) :: ur !wind speed (m/s) - real, intent(in) :: mpe !prevents overflow error if division by zero + real (kind=kind_phys), intent(in) :: sfctmp !temperature at reference height (k) + real (kind=kind_phys), intent(in) :: rhoair !density air (kg/m**3) + real (kind=kind_phys), intent(in) :: h !sensible heat flux (w/m2) [+ to atm] + real (kind=kind_phys), intent(in) :: qair !specific humidity at reference height (kg/kg) + real (kind=kind_phys), intent(in) :: zlvl !reference height (m) + real (kind=kind_phys), intent(in) :: zpd !zero plane displacement (m) + real (kind=kind_phys), intent(in) :: z0h !roughness length, sensible heat, ground (m) + real (kind=kind_phys), intent(in) :: z0m !roughness length, momentum, ground (m) + real (kind=kind_phys), intent(in) :: ur !wind speed (m/s) + real (kind=kind_phys), intent(in) :: mpe !prevents overflow error if division by zero ! in & out integer, intent(inout) :: mozsgn !number of times moz changes sign - real, intent(inout) :: moz !monin-obukhov stability (z/l) - real, intent(inout) :: fm !momentum stability correction, weighted by prior iters - real, intent(inout) :: fh !sen heat stability correction, weighted by prior iters - real, intent(inout) :: fm2 !sen heat stability correction, weighted by prior iters - real, intent(inout) :: fh2 !sen heat stability correction, weighted by prior iters + real (kind=kind_phys), intent(inout) :: moz !monin-obukhov stability (z/l) + real (kind=kind_phys), intent(inout) :: fm !momentum stability correction, weighted by prior iters + real (kind=kind_phys), intent(inout) :: fh !sen heat stability correction, weighted by prior iters + real (kind=kind_phys), intent(inout) :: fm2 !sen heat stability correction, weighted by prior iters + real (kind=kind_phys), intent(inout) :: fh2 !sen heat stability correction, weighted by prior iters #ifdef CCPP character(len=*), intent(inout) :: errmsg integer, intent(inout) :: errflg @@ -4319,28 +4522,28 @@ subroutine sfcdif1(parameters,iter ,sfctmp ,rhoair ,h ,qair , & !in ! outputs - real, intent(out) :: cm !drag coefficient for momentum - real, intent(out) :: ch !drag coefficient for heat - real, intent(out) :: fv !friction velocity (m/s) - real, intent(out) :: ch2 !drag coefficient for heat + real (kind=kind_phys), intent(out) :: cm !drag coefficient for momentum + real (kind=kind_phys), intent(out) :: ch !drag coefficient for heat + real (kind=kind_phys), intent(out) :: fv !friction velocity (m/s) + real (kind=kind_phys), intent(out) :: ch2 !drag coefficient for heat ! locals - real :: mol !monin-obukhov length (m) - real :: tmpcm !temporary calculation for cm - real :: tmpch !temporary calculation for ch - real :: fmnew !stability correction factor, momentum, for current moz - real :: fhnew !stability correction factor, sen heat, for current moz - real :: mozold !monin-obukhov stability parameter from prior iteration - real :: tmp1,tmp2,tmp3,tmp4,tmp5 !temporary calculation - real :: tvir !temporary virtual temperature (k) - real :: moz2 !2/l - real :: tmpcm2 !temporary calculation for cm2 - real :: tmpch2 !temporary calculation for ch2 - real :: fm2new !stability correction factor, momentum, for current moz - real :: fh2new !stability correction factor, sen heat, for current moz - real :: tmp12,tmp22,tmp32 !temporary calculation - - real :: cmfm, chfh, cm2fm2, ch2fh2 + real (kind=kind_phys) :: mol !monin-obukhov length (m) + real (kind=kind_phys) :: tmpcm !temporary calculation for cm + real (kind=kind_phys) :: tmpch !temporary calculation for ch + real (kind=kind_phys) :: fmnew !stability correction factor, momentum, for current moz + real (kind=kind_phys) :: fhnew !stability correction factor, sen heat, for current moz + real (kind=kind_phys) :: mozold !monin-obukhov stability parameter from prior iteration + real (kind=kind_phys) :: tmp1,tmp2,tmp3,tmp4,tmp5 !temporary calculation + real (kind=kind_phys) :: tvir !temporary virtual temperature (k) + real (kind=kind_phys) :: moz2 !2/l + real (kind=kind_phys) :: tmpcm2 !temporary calculation for cm2 + real (kind=kind_phys) :: tmpch2 !temporary calculation for ch2 + real (kind=kind_phys) :: fm2new !stability correction factor, momentum, for current moz + real (kind=kind_phys) :: fh2new !stability correction factor, sen heat, for current moz + real (kind=kind_phys) :: tmp12,tmp22,tmp32 !temporary calculation + + real (kind=kind_phys) :: cmfm, chfh, cm2fm2, ch2fh2 ! ------------------------------------------------------------------------------------------------- ! monin-obukhov stability parameter moz for next iteration @@ -4363,7 +4566,7 @@ subroutine sfcdif1(parameters,iter ,sfctmp ,rhoair ,h ,qair , & !in tmpch2 = log((2.0 + z0h) / z0h) if(iter == 1) then - fv = 0.0 + fv = 0.1 moz = 0.0 mol = 0.0 moz2 = 0.0 @@ -4453,6 +4656,8 @@ end subroutine sfcdif1 !== begin sfcdif2 ================================================================================== !>\ingroup NoahMP_LSM +!! calculate surface layer exchange coefficients via iteractive process (Chen et +!! al. 1997, blm) subroutine sfcdif2(parameters,iter ,z0 ,thz0 ,thlm ,sfcspd , & !in zlm ,iloc ,jloc , & !in akms ,akhs ,rlmo ,wstar2 , & !in @@ -4469,48 +4674,48 @@ subroutine sfcdif2(parameters,iter ,z0 ,thz0 ,thlm ,sfcspd , & !in integer, intent(in) :: iloc integer, intent(in) :: jloc integer, intent(in) :: iter - real, intent(in) :: zlm, z0, thz0, thlm, sfcspd - real, intent(inout) :: akms - real, intent(inout) :: akhs - real, intent(inout) :: rlmo - real, intent(inout) :: wstar2 - real, intent(out) :: ustar - - real zz, pslmu, pslms, pslhu, pslhs - real xx, pspmu, yy, pspms, psphu, psphs - real zilfc, zu, zt, rdz, cxch - real dthv, du2, btgh, zslu, zslt, rlogu, rlogt - real zetalt, zetalu, zetau, zetat, xlu4, xlt4, xu4, xt4 - - real xlu, xlt, xu, xt, psmz, simm, pshz, simh, ustark, rlmn, & + real (kind=kind_phys), intent(in) :: zlm, z0, thz0, thlm, sfcspd + real (kind=kind_phys), intent(inout) :: akms + real (kind=kind_phys), intent(inout) :: akhs + real (kind=kind_phys), intent(inout) :: rlmo + real (kind=kind_phys), intent(inout) :: wstar2 + real (kind=kind_phys), intent(out) :: ustar + + real (kind=kind_phys) zz, pslmu, pslms, pslhu, pslhs + real (kind=kind_phys) xx, pspmu, yy, pspms, psphu, psphs + real (kind=kind_phys) zilfc, zu, zt, rdz, cxch + real (kind=kind_phys) dthv, du2, btgh, zslu, zslt, rlogu, rlogt + real (kind=kind_phys) zetalt, zetalu, zetau, zetat, xlu4, xlt4, xu4, xt4 + + real (kind=kind_phys) xlu, xlt, xu, xt, psmz, simm, pshz, simh, ustark, rlmn, & & rlma integer ilech, itr integer, parameter :: itrmx = 5 - real, parameter :: wwst = 1.2 - real, parameter :: wwst2 = wwst * wwst - real, parameter :: vkrm = 0.40 - real, parameter :: excm = 0.001 - real, parameter :: beta = 1.0 / 270.0 - real, parameter :: btg = beta * grav - real, parameter :: elfc = vkrm * btg - real, parameter :: wold = 0.15 - real, parameter :: wnew = 1.0 - wold - real, parameter :: pihf = 3.14159265 / 2. - real, parameter :: epsu2 = 1.e-4 - real, parameter :: epsust = 0.07 - real, parameter :: epsit = 1.e-4 - real, parameter :: epsa = 1.e-8 - real, parameter :: ztmin = -5.0 - real, parameter :: ztmax = 1.0 - real, parameter :: hpbl = 1000.0 - real, parameter :: sqvisc = 258.2 - real, parameter :: ric = 0.183 - real, parameter :: rric = 1.0 / ric - real, parameter :: fhneu = 0.8 - real, parameter :: rfc = 0.191 - real, parameter :: rfac = ric / ( fhneu * rfc * rfc ) + real (kind=kind_phys), parameter :: wwst = 1.2 + real (kind=kind_phys), parameter :: wwst2 = wwst * wwst + real (kind=kind_phys), parameter :: vkrm = 0.40 + real (kind=kind_phys), parameter :: excm = 0.001 + real (kind=kind_phys), parameter :: beta = 1.0 / 270.0 + real (kind=kind_phys), parameter :: btg = beta * grav + real (kind=kind_phys), parameter :: elfc = vkrm * btg + real (kind=kind_phys), parameter :: wold = 0.15 + real (kind=kind_phys), parameter :: wnew = 1.0 - wold + real (kind=kind_phys), parameter :: pihf = 3.14159265 / 2. + real (kind=kind_phys), parameter :: epsu2 = 1.e-4 + real (kind=kind_phys), parameter :: epsust = 0.07 + real (kind=kind_phys), parameter :: epsit = 1.e-4 + real (kind=kind_phys), parameter :: epsa = 1.e-8 + real (kind=kind_phys), parameter :: ztmin = -5.0 + real (kind=kind_phys), parameter :: ztmax = 1.0 + real (kind=kind_phys), parameter :: hpbl = 1000.0 + real (kind=kind_phys), parameter :: sqvisc = 258.2 + real (kind=kind_phys), parameter :: ric = 0.183 + real (kind=kind_phys), parameter :: rric = 1.0 / ric + real (kind=kind_phys), parameter :: fhneu = 0.8 + real (kind=kind_phys), parameter :: rfc = 0.191 + real (kind=kind_phys), parameter :: rfac = ric / ( fhneu * rfc * rfc ) ! ---------------------------------------------------------------------- ! note: the two code blocks below define functions @@ -4592,6 +4797,8 @@ subroutine sfcdif2(parameters,iter ,z0 ,thz0 ,thlm ,sfcspd , & !in else zetalu = min (zetalu,ztmax) zetalt = min (zetalt,ztmax) + zetau = min (zetau,ztmax/(zslu/zu)) ! barlage: add limit on zetau/zetat + zetat = min (zetat,ztmax/(zslt/zt)) ! barlage: prevent simm/simh < 0 psmz = pspms (zetau) simm = pspms (zetalu) - psmz + rlogu pshz = psphs (zetat) @@ -4628,10 +4835,12 @@ subroutine sfcdif2(parameters,iter ,z0 ,thz0 ,thlm ,sfcspd , & !in !----------------------------------------------------------------------- rlogt = log (zslt / zt) ustark = ustar * vkrm + if(simm < 1.e-6) simm = 1.e-6 ! limit stability function akms = max (ustark / simm,cxch) !----------------------------------------------------------------------- ! if statements to avoid tangent linear problems near zero !----------------------------------------------------------------------- + if(simh < 1.e-6) simh = 1.e-6 ! limit stability function akhs = max (ustark / simh,cxch) if (btgh * akhs * dthv .ne. 0.0) then @@ -4656,6 +4865,8 @@ end subroutine sfcdif2 !== begin esat ===================================================================================== !>\ingroup NoahMP_LSM +!! use polynomials to calculate saturation vapor pressure and derivative with +!! respect to temperature: over water when t > 0 c and over ice when t <= 0 c. subroutine esat(t, esw, esi, desw, desi) !--------------------------------------------------------------------------------------------------- ! use polynomials to calculate saturation vapor pressure and derivative with @@ -4664,21 +4875,21 @@ subroutine esat(t, esw, esi, desw, desi) !--------------------------------------------------------------------------------------------------- ! in - real, intent(in) :: t !temperature + real (kind=kind_phys), intent(in) :: t !temperature !out - real, intent(out) :: esw !saturation vapor pressure over water (pa) - real, intent(out) :: esi !saturation vapor pressure over ice (pa) - real, intent(out) :: desw !d(esat)/dt over water (pa/k) - real, intent(out) :: desi !d(esat)/dt over ice (pa/k) + real (kind=kind_phys), intent(out) :: esw !saturation vapor pressure over water (pa) + real (kind=kind_phys), intent(out) :: esi !saturation vapor pressure over ice (pa) + real (kind=kind_phys), intent(out) :: desw !d(esat)/dt over water (pa/k) + real (kind=kind_phys), intent(out) :: desi !d(esat)/dt over ice (pa/k) ! local - real :: a0,a1,a2,a3,a4,a5,a6 !coefficients for esat over water - real :: b0,b1,b2,b3,b4,b5,b6 !coefficients for esat over ice - real :: c0,c1,c2,c3,c4,c5,c6 !coefficients for dsat over water - real :: d0,d1,d2,d3,d4,d5,d6 !coefficients for dsat over ice + real (kind=kind_phys) :: a0,a1,a2,a3,a4,a5,a6 !coefficients for esat over water + real (kind=kind_phys) :: b0,b1,b2,b3,b4,b5,b6 !coefficients for esat over ice + real (kind=kind_phys) :: c0,c1,c2,c3,c4,c5,c6 !coefficients for dsat over water + real (kind=kind_phys) :: d0,d1,d2,d3,d4,d5,d6 !coefficients for dsat over ice parameter (a0=6.107799961 , a1=4.436518521e-01, & a2=1.428945805e-02, a3=2.650648471e-04, & @@ -4723,27 +4934,27 @@ subroutine stomata (parameters,vegtyp ,mpe ,apar ,foln ,iloc , jlo integer,intent(in) :: jloc !grid index integer,intent(in) :: vegtyp !vegetation physiology type - real, intent(in) :: igs !growing season index (0=off, 1=on) - real, intent(in) :: mpe !prevents division by zero errors - - real, intent(in) :: tv !foliage temperature (k) - real, intent(in) :: ei !vapor pressure inside leaf (sat vapor press at tv) (pa) - real, intent(in) :: ea !vapor pressure of canopy air (pa) - real, intent(in) :: apar !par absorbed per unit lai (w/m2) - real, intent(in) :: o2 !atmospheric o2 concentration (pa) - real, intent(in) :: co2 !atmospheric co2 concentration (pa) - real, intent(in) :: sfcprs !air pressure at reference height (pa) - real, intent(in) :: sfctmp !air temperature at reference height (k) - real, intent(in) :: btran !soil water transpiration factor (0 to 1) - real, intent(in) :: foln !foliage nitrogen concentration (%) - real, intent(in) :: rb !boundary layer resistance (s/m) + real (kind=kind_phys), intent(in) :: igs !growing season index (0=off, 1=on) + real (kind=kind_phys), intent(in) :: mpe !prevents division by zero errors + + real (kind=kind_phys), intent(in) :: tv !foliage temperature (k) + real (kind=kind_phys), intent(in) :: ei !vapor pressure inside leaf (sat vapor press at tv) (pa) + real (kind=kind_phys), intent(in) :: ea !vapor pressure of canopy air (pa) + real (kind=kind_phys), intent(in) :: apar !par absorbed per unit lai (w/m2) + real (kind=kind_phys), intent(in) :: o2 !atmospheric o2 concentration (pa) + real (kind=kind_phys), intent(in) :: co2 !atmospheric co2 concentration (pa) + real (kind=kind_phys), intent(in) :: sfcprs !air pressure at reference height (pa) + real (kind=kind_phys), intent(in) :: sfctmp !air temperature at reference height (k) + real (kind=kind_phys), intent(in) :: btran !soil water transpiration factor (0 to 1) + real (kind=kind_phys), intent(in) :: foln !foliage nitrogen concentration (%) + real (kind=kind_phys), intent(in) :: rb !boundary layer resistance (s/m) ! output - real, intent(out) :: rs !leaf stomatal resistance (s/m) - real, intent(out) :: psn !foliage photosynthesis (umol co2 /m2/ s) [always +] + real (kind=kind_phys), intent(out) :: rs !leaf stomatal resistance (s/m) + real (kind=kind_phys), intent(out) :: psn !foliage photosynthesis (umol co2 /m2/ s) [always +] ! in&out - real :: rlb !boundary layer resistance (s m2 / umol) + real (kind=kind_phys) :: rlb !boundary layer resistance (s m2 / umol) ! --------------------------------------------------------------------------------------------- ! ------------------------ local variables ---------------------------------------------------- @@ -4753,32 +4964,32 @@ subroutine stomata (parameters,vegtyp ,mpe ,apar ,foln ,iloc , jlo data niter /3/ save niter - real :: ab !used in statement functions - real :: bc !used in statement functions - real :: f1 !generic temperature response (statement function) - real :: f2 !generic temperature inhibition (statement function) - real :: tc !foliage temperature (degree celsius) - real :: cs !co2 concentration at leaf surface (pa) - real :: kc !co2 michaelis-menten constant (pa) - real :: ko !o2 michaelis-menten constant (pa) - real :: a,b,c,q !intermediate calculations for rs - real :: r1,r2 !roots for rs - real :: fnf !foliage nitrogen adjustment factor (0 to 1) - real :: ppf !absorb photosynthetic photon flux (umol photons/m2/s) - real :: wc !rubisco limited photosynthesis (umol co2/m2/s) - real :: wj !light limited photosynthesis (umol co2/m2/s) - real :: we !export limited photosynthesis (umol co2/m2/s) - real :: cp !co2 compensation point (pa) - real :: ci !internal co2 (pa) - real :: awc !intermediate calculation for wc - real :: vcmx !maximum rate of carbonylation (umol co2/m2/s) - real :: j !electron transport (umol co2/m2/s) - real :: cea !constrain ea or else model blows up - real :: cf !s m2/umol -> s/m + real (kind=kind_phys) :: ab !used in statement functions + real (kind=kind_phys) :: bc !used in statement functions + real (kind=kind_phys) :: f1 !generic temperature response (statement function) + real (kind=kind_phys) :: f2 !generic temperature inhibition (statement function) + real (kind=kind_phys) :: tc !foliage temperature (degree celsius) + real (kind=kind_phys) :: cs !co2 concentration at leaf surface (pa) + real (kind=kind_phys) :: kc !co2 michaelis-menten constant (pa) + real (kind=kind_phys) :: ko !o2 michaelis-menten constant (pa) + real (kind=kind_phys) :: a,b,c,q !intermediate calculations for rs + real (kind=kind_phys) :: r1,r2 !roots for rs + real (kind=kind_phys) :: fnf !foliage nitrogen adjustment factor (0 to 1) + real (kind=kind_phys) :: ppf !absorb photosynthetic photon flux (umol photons/m2/s) + real (kind=kind_phys) :: wc !rubisco limited photosynthesis (umol co2/m2/s) + real (kind=kind_phys) :: wj !light limited photosynthesis (umol co2/m2/s) + real (kind=kind_phys) :: we !export limited photosynthesis (umol co2/m2/s) + real (kind=kind_phys) :: cp !co2 compensation point (pa) + real (kind=kind_phys) :: ci !internal co2 (pa) + real (kind=kind_phys) :: awc !intermediate calculation for wc + real (kind=kind_phys) :: vcmx !maximum rate of carbonylation (umol co2/m2/s) + real (kind=kind_phys) :: j !electron transport (umol co2/m2/s) + real (kind=kind_phys) :: cea !constrain ea or else model blows up + real (kind=kind_phys) :: cf !s m2/umol -> s/m f1(ab,bc) = ab**((bc-25.)/10.) f2(ab) = 1. + exp((-2.2e05+710.*(ab+273.16))/(8.314*(ab+273.16))) - real :: t + real (kind=kind_phys) :: t ! --------------------------------------------------------------------------------------------- ! initialize rs=rsmax and psn=0 because will only do calculations @@ -4844,6 +5055,10 @@ end subroutine stomata !== begin canres =================================================================================== !>\ingroup NoahMP_LSM +!! calculate canopy resistance which depends on incoming solar radiation, +!! air temperature, atmospheric water vapor pressure deficit at the lowest +!! model level, and soil moisture (preferably unfrozen soil moisture rather +!! than total). subroutine canres (parameters,par ,sfctmp,rcsoil ,eah ,sfcprs , & !in rc ,psn ,iloc ,jloc ) !out @@ -4866,26 +5081,26 @@ subroutine canres (parameters,par ,sfctmp,rcsoil ,eah ,sfcprs , & !in type (noahmp_parameters), intent(in) :: parameters integer, intent(in) :: iloc !grid index integer, intent(in) :: jloc !grid index - real, intent(in) :: par !par absorbed per unit sunlit lai (w/m2) - real, intent(in) :: sfctmp !canopy air temperature - real, intent(in) :: sfcprs !surface pressure (pa) - real, intent(in) :: eah !water vapor pressure (pa) - real, intent(in) :: rcsoil !soil moisture stress factor + real (kind=kind_phys), intent(in) :: par !par absorbed per unit sunlit lai (w/m2) + real (kind=kind_phys), intent(in) :: sfctmp !canopy air temperature + real (kind=kind_phys), intent(in) :: sfcprs !surface pressure (pa) + real (kind=kind_phys), intent(in) :: eah !water vapor pressure (pa) + real (kind=kind_phys), intent(in) :: rcsoil !soil moisture stress factor !outputs - real, intent(out) :: rc !canopy resistance per unit lai - real, intent(out) :: psn !foliage photosynthesis (umolco2/m2/s) + real (kind=kind_phys), intent(out) :: rc !canopy resistance per unit lai + real (kind=kind_phys), intent(out) :: psn !foliage photosynthesis (umolco2/m2/s) !local - real :: rcq - real :: rcs - real :: rct - real :: ff - real :: q2 !water vapor mixing ratio (kg/kg) - real :: q2sat !saturation q2 - real :: dqsdt2 !d(q2sat)/d(t) + real (kind=kind_phys) :: rcq + real (kind=kind_phys) :: rcs + real (kind=kind_phys) :: rct + real (kind=kind_phys) :: ff + real (kind=kind_phys) :: q2 !water vapor mixing ratio (kg/kg) + real (kind=kind_phys) :: q2sat !saturation q2 + real (kind=kind_phys) :: dqsdt2 !d(q2sat)/d(t) ! rsmin, rsmax, topt, rgl, hs are canopy stress parameters set in redprm ! ---------------------------------------------------------------------- @@ -4934,12 +5149,12 @@ subroutine calhum(parameters,sfctmp, sfcprs, q2sat, dqsdt2) implicit none type (noahmp_parameters), intent(in) :: parameters - real, intent(in) :: sfctmp, sfcprs - real, intent(out) :: q2sat, dqsdt2 - real, parameter :: a2=17.67,a3=273.15,a4=29.65, elwv=2.501e6, & + real (kind=kind_phys), intent(in) :: sfctmp, sfcprs + real (kind=kind_phys), intent(out) :: q2sat, dqsdt2 + real (kind=kind_phys), parameter :: a2=17.67,a3=273.15,a4=29.65, elwv=2.501e6, & a23m4=a2*(a3-a4), e0=0.611, rv=461.0, & epsilon=0.622 - real :: es, sfcprsx + real (kind=kind_phys) :: es, sfcprsx ! q2sat: saturated mixing ratio es = e0 * exp ( elwv/rv*(1./a3 - 1./sfctmp) ) @@ -4961,6 +5176,10 @@ end subroutine calhum !== begin tsnosoi ================================================================================== !>\ingroup NoahMP_LSM +!! compute snow (up to 3l) and soil (4l) temperature. note that snow +!! temperatures during melting season may exceed melting point (tfrz) but later +!! in phasechange subroutine the snow temperatures are reset to tfrz for melting +!! snow. subroutine tsnosoi (parameters,ice ,nsoil ,nsnow ,isnow ,ist , & !in tbot ,zsnso ,ssoil ,df ,hcpct , & !in sag ,dt ,snowh ,dzsnso , & !in @@ -4988,20 +5207,20 @@ subroutine tsnosoi (parameters,ice ,nsoil ,nsnow ,isnow ,ist , & ! integer, intent(in) :: isnow !actual no of snow layers integer, intent(in) :: ist !surface type - real, intent(in) :: dt !time step (s) - real, intent(in) :: tbot ! - real, intent(in) :: ssoil !ground heat flux (w/m2) - real, intent(in) :: sag !solar rad. absorbed by ground (w/m2) - real, intent(in) :: snowh !snow depth (m) - real, intent(in) :: tg !ground temperature (k) - real, dimension(-nsnow+1:nsoil), intent(in) :: zsnso !layer-bot. depth from snow surf.(m) - real, dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer thickness (m) - real, dimension(-nsnow+1:nsoil), intent(in) :: df !thermal conductivity - real, dimension(-nsnow+1:nsoil), intent(in) :: hcpct !heat capacity (j/m3/k) + real (kind=kind_phys), intent(in) :: dt !time step (s) + real (kind=kind_phys), intent(in) :: tbot ! + real (kind=kind_phys), intent(in) :: ssoil !ground heat flux (w/m2) + real (kind=kind_phys), intent(in) :: sag !solar rad. absorbed by ground (w/m2) + real (kind=kind_phys), intent(in) :: snowh !snow depth (m) + real (kind=kind_phys), intent(in) :: tg !ground temperature (k) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: zsnso !layer-bot. depth from snow surf.(m) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer thickness (m) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: df !thermal conductivity + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: hcpct !heat capacity (j/m3/k) !input and output - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc #ifdef CCPP character(len=*) , intent(inout) :: errmsg integer , intent(inout) :: errflg @@ -5010,15 +5229,15 @@ subroutine tsnosoi (parameters,ice ,nsoil ,nsnow ,isnow ,ist , & ! !local integer :: iz - real :: zbotsno !zbot from snow surface - real, dimension(-nsnow+1:nsoil) :: ai, bi, ci, rhsts - real :: eflxb !energy influx from soil bottom (w/m2) - real, dimension(-nsnow+1:nsoil) :: phi !light through water (w/m2) - - real, dimension(-nsnow+1:nsoil) :: tbeg - real :: err_est !heat storage error (w/m2) - real :: ssoil2 !ground heat flux (w/m2) (for energy check) - real :: eflxb2 !heat flux from the bottom (w/m2) (for energy check) + real (kind=kind_phys) :: zbotsno !zbot from snow surface + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: ai, bi, ci, rhsts + real (kind=kind_phys) :: eflxb !energy influx from soil bottom (w/m2) + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: phi !light through water (w/m2) + + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: tbeg + real (kind=kind_phys) :: err_est !heat storage error (w/m2) + real (kind=kind_phys) :: ssoil2 !ground heat flux (w/m2) (for energy check) + real (kind=kind_phys) :: eflxb2 !heat flux from the bottom (w/m2) (for energy check) character(len=256) :: message ! ---------------------------------------------------------------------- ! compute solar penetration through water, needs more work @@ -5068,7 +5287,7 @@ subroutine tsnosoi (parameters,ice ,nsoil ,nsnow ,isnow ,ist , & ! err_est = err_est + (stc(iz)-tbeg(iz)) * dzsnso(iz) * hcpct(iz) / dt enddo - if (opt_stc == 1) then ! semi-implicit + if (opt_stc == 1 .or. opt_stc == 3) then ! semi-implicit err_est = err_est - (ssoil +eflxb) else ! full-implicit ssoil2 = df(isnow+1)*(tg-stc(isnow+1))/(0.5*dzsnso(isnow+1)) !m. barlage @@ -5097,6 +5316,9 @@ end subroutine tsnosoi !== begin hrt ====================================================================================== !>\ingroup NoahMP_LSM +!! calculate the right hand side of the time tendency term of the soil +!! thermal diffusion equation. also to compute (prepare) the matrix +!! coefficients for the tri-diagonal matrix of the implicit time scheme. subroutine hrt (parameters,nsnow ,nsoil ,isnow ,zsnso , & stc ,tbot ,zbot ,dt , & df ,hcpct ,ssoil ,phi , & @@ -5116,34 +5338,34 @@ subroutine hrt (parameters,nsnow ,nsoil ,isnow ,zsnso , & integer, intent(in) :: nsoil !no of soil layers (4) integer, intent(in) :: nsnow !maximum no of snow layers (3) integer, intent(in) :: isnow !actual no of snow layers - real, intent(in) :: tbot !bottom soil temp. at zbot (k) - real, intent(in) :: zbot !depth of lower boundary condition (m) + real (kind=kind_phys), intent(in) :: tbot !bottom soil temp. at zbot (k) + real (kind=kind_phys), intent(in) :: zbot !depth of lower boundary condition (m) !from soil surface not snow surface - real, intent(in) :: dt !time step (s) - real, intent(in) :: ssoil !ground heat flux (w/m2) - real, dimension(-nsnow+1:nsoil), intent(in) :: zsnso !depth of layer-bottom of snow/soil (m) - real, dimension(-nsnow+1:nsoil), intent(in) :: stc !snow/soil temperature (k) - real, dimension(-nsnow+1:nsoil), intent(in) :: df !thermal conductivity [w/m/k] - real, dimension(-nsnow+1:nsoil), intent(in) :: hcpct !heat capacity [j/m3/k] - real, dimension(-nsnow+1:nsoil), intent(in) :: phi !light through water (w/m2) + real (kind=kind_phys), intent(in) :: dt !time step (s) + real (kind=kind_phys), intent(in) :: ssoil !ground heat flux (w/m2) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: zsnso !depth of layer-bottom of snow/soil (m) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: stc !snow/soil temperature (k) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: df !thermal conductivity [w/m/k] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: hcpct !heat capacity [j/m3/k] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: phi !light through water (w/m2) ! output - real, dimension(-nsnow+1:nsoil), intent(out) :: rhsts !right-hand side of the matrix - real, dimension(-nsnow+1:nsoil), intent(out) :: ai !left-hand side coefficient - real, dimension(-nsnow+1:nsoil), intent(out) :: bi !left-hand side coefficient - real, dimension(-nsnow+1:nsoil), intent(out) :: ci !left-hand side coefficient - real, intent(out) :: botflx !energy influx from soil bottom (w/m2) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(out) :: rhsts !right-hand side of the matrix + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(out) :: ai !left-hand side coefficient + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(out) :: bi !left-hand side coefficient + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(out) :: ci !left-hand side coefficient + real (kind=kind_phys), intent(out) :: botflx !energy influx from soil bottom (w/m2) ! local integer :: k - real, dimension(-nsnow+1:nsoil) :: ddz - real, dimension(-nsnow+1:nsoil) :: dz - real, dimension(-nsnow+1:nsoil) :: denom - real, dimension(-nsnow+1:nsoil) :: dtsdz - real, dimension(-nsnow+1:nsoil) :: eflux - real :: temp1 + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: ddz + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: dz + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: denom + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: dtsdz + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: eflux + real (kind=kind_phys) :: temp1 ! ---------------------------------------------------------------------- do k = isnow+1, nsoil @@ -5177,7 +5399,7 @@ subroutine hrt (parameters,nsnow ,nsoil ,isnow ,zsnso , & if (k == isnow+1) then ai(k) = 0.0 ci(k) = - df(k) * ddz(k) / denom(k) - if (opt_stc == 1) then + if (opt_stc == 1 .or. opt_stc == 3 ) then bi(k) = - ci(k) end if if (opt_stc == 2) then @@ -5200,6 +5422,7 @@ end subroutine hrt !== begin hstep ==================================================================================== !>\ingroup NoahMP_LSM +!! calculate/update the soil temperature fields. subroutine hstep (parameters,nsnow ,nsoil ,isnow ,dt , & ai ,bi ,ci ,rhsts , & stc ) @@ -5214,19 +5437,19 @@ subroutine hstep (parameters,nsnow ,nsoil ,isnow ,dt , & integer, intent(in) :: nsoil integer, intent(in) :: nsnow integer, intent(in) :: isnow - real, intent(in) :: dt + real (kind=kind_phys), intent(in) :: dt ! output & input - real, dimension(-nsnow+1:nsoil), intent(inout) :: rhsts - real, dimension(-nsnow+1:nsoil), intent(inout) :: ai - real, dimension(-nsnow+1:nsoil), intent(inout) :: bi - real, dimension(-nsnow+1:nsoil), intent(inout) :: ci - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: rhsts + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: ai + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: bi + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: ci + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc ! local integer :: k - real, dimension(-nsnow+1:nsoil) :: rhstsin - real, dimension(-nsnow+1:nsoil) :: ciin + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: rhstsin + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: ciin ! ---------------------------------------------------------------------- do k = isnow+1,nsoil @@ -5236,7 +5459,6 @@ subroutine hstep (parameters,nsnow ,nsoil ,isnow ,dt , & ci(k) = ci(k) * dt end do - ! copy values for input variables before call to rosr12 do k = isnow+1,nsoil @@ -5246,7 +5468,6 @@ subroutine hstep (parameters,nsnow ,nsoil ,isnow ,dt , & ! solve the tri-diagonal matrix equation - call rosr12 (ci,ai,bi,ciin,rhstsin,rhsts,isnow+1,nsoil,nsnow) ! update snow & soil temperature @@ -5285,8 +5506,8 @@ subroutine rosr12 (p,a,b,c,d,delta,ntop,nsoil,nsnow) integer, intent(in) :: nsoil,nsnow integer :: k, kk - real, dimension(-nsnow+1:nsoil),intent(in):: a, b, d - real, dimension(-nsnow+1:nsoil),intent(inout):: c,p,delta + real (kind=kind_phys), dimension(-nsnow+1:nsoil),intent(in):: a, b, d + real (kind=kind_phys), dimension(-nsnow+1:nsoil),intent(inout):: c,p,delta ! ---------------------------------------------------------------------- ! initialize eqn coef c for the lowest soil layer @@ -5322,6 +5543,7 @@ end subroutine rosr12 !== begin phasechange ============================================================================== !>\ingroup NoahMP_LSM +!! melting/freezing of snow water and soil water subroutine phasechange (parameters,nsnow ,nsoil ,isnow ,dt ,fact , & !in dzsnso ,hcpct ,ist ,iloc ,jloc , & !in stc ,snice ,snliq ,sneqv ,snowh , & !inout @@ -5345,25 +5567,25 @@ subroutine phasechange (parameters,nsnow ,nsoil ,isnow ,dt ,fact , integer, intent(in) :: nsoil !no. of soil layers [=4] integer, intent(in) :: isnow !actual no. of snow layers [<=3] integer, intent(in) :: ist !surface type: 1->soil; 2->lake - real, intent(in) :: dt !land model time step (sec) - real, dimension(-nsnow+1:nsoil), intent(in) :: fact !temporary - real, dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer thickness [m] - real, dimension(-nsnow+1:nsoil), intent(in) :: hcpct !heat capacity (j/m3/k) + real (kind=kind_phys), intent(in) :: dt !land model time step (sec) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: fact !temporary + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer thickness [m] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: hcpct !heat capacity (j/m3/k) ! outputs integer, dimension(-nsnow+1:nsoil), intent(out) :: imelt !phase change index - real, intent(out) :: qmelt !snowmelt rate [mm/s] - real, intent(out) :: ponding!snowmelt when snow has no layer [mm] + real (kind=kind_phys), intent(out) :: qmelt !snowmelt rate [mm/s] + real (kind=kind_phys), intent(out) :: ponding!snowmelt when snow has no layer [mm] ! inputs and outputs - real, intent(inout) :: sneqv - real, intent(inout) :: snowh - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow/soil layer temperature [k] - real, dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid water [m3/m3] - real, dimension( 1:nsoil), intent(inout) :: smc !total soil water [m3/m3] - real, dimension(-nsnow+1:0) , intent(inout) :: snice !snow layer ice [mm] - real, dimension(-nsnow+1:0) , intent(inout) :: snliq !snow layer liquid water [mm] + real (kind=kind_phys), intent(inout) :: sneqv + real (kind=kind_phys), intent(inout) :: snowh + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow/soil layer temperature [k] + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid water [m3/m3] + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: smc !total soil water [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1:0) , intent(inout) :: snice !snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1:0) , intent(inout) :: snliq !snow layer liquid water [mm] #ifdef CCPP character(len=*) , intent(inout) :: errmsg integer , intent(inout) :: errflg @@ -5372,19 +5594,19 @@ subroutine phasechange (parameters,nsnow ,nsoil ,isnow ,dt ,fact , ! local integer :: j !do loop index - real, dimension(-nsnow+1:nsoil) :: hm !energy residual [w/m2] - real, dimension(-nsnow+1:nsoil) :: xm !melting or freezing water [kg/m2] - real, dimension(-nsnow+1:nsoil) :: wmass0 - real, dimension(-nsnow+1:nsoil) :: wice0 - real, dimension(-nsnow+1:nsoil) :: wliq0 - real, dimension(-nsnow+1:nsoil) :: mice !soil/snow ice mass [mm] - real, dimension(-nsnow+1:nsoil) :: mliq !soil/snow liquid water mass [mm] - real, dimension(-nsnow+1:nsoil) :: supercool !supercooled water in soil (kg/m2) - real :: heatr !energy residual or loss after melting/freezing - real :: temp1 !temporary variables [kg/m2] - real :: propor - real :: smp !frozen water potential (mm) - real :: xmf !total latent heat of phase change + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: hm !energy residual [w/m2] + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: xm !melting or freezing water [kg/m2] + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: wmass0 + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: wice0 + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: wliq0 + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: mice !soil/snow ice mass [mm] + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: mliq !soil/snow liquid water mass [mm] + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: supercool !supercooled water in soil (kg/m2) + real (kind=kind_phys) :: heatr !energy residual or loss after melting/freezing + real (kind=kind_phys) :: temp1 !temporary variables [kg/m2] + real (kind=kind_phys) :: propor + real (kind=kind_phys) :: smp !frozen water potential (mm) + real (kind=kind_phys) :: xmf !total latent heat of phase change ! ---------------------------------------------------------------------- ! initialization @@ -5421,16 +5643,16 @@ subroutine phasechange (parameters,nsnow ,nsoil ,isnow ,dt ,fact , if (opt_frz == 1) then if(stc(j) < tfrz) then smp = hfus*(tfrz-stc(j))/(grav*stc(j)) !(m) - supercool(j) = parameters%smcmax*(smp/parameters%psisat)**(-1./parameters%bexp) + supercool(j) = parameters%smcmax(j)*(smp/parameters%psisat(j))**(-1./parameters%bexp(j)) supercool(j) = supercool(j)*dzsnso(j)*1000. !(mm) end if end if if (opt_frz == 2) then #ifdef CCPP - call frh2o (parameters,supercool(j),stc(j),smc(j),sh2o(j),errmsg,errflg) + call frh2o (parameters,j,supercool(j),stc(j),smc(j),sh2o(j),errmsg,errflg) if (errflg /=0) return #else - call frh2o (parameters,supercool(j),stc(j),smc(j),sh2o(j)) + call frh2o (parameters,j,supercool(j),stc(j),smc(j),sh2o(j)) #endif supercool(j) = supercool(j)*dzsnso(j)*1000. !(mm) end if @@ -5479,6 +5701,7 @@ subroutine phasechange (parameters,nsnow ,nsoil ,isnow ,dt ,fact , sneqv = max(0.,temp1-xm(1)) propor = sneqv/temp1 snowh = max(0.,propor * snowh) + snowh = min(max(snowh,sneqv/500.0),sneqv/50.0) ! limit adjustment to a reasonable density heatr = hm(1) - hfus*(temp1-sneqv)/dt if (heatr > 0.) then xm(1) = heatr*dt/hfus @@ -5521,6 +5744,11 @@ subroutine phasechange (parameters,nsnow ,nsoil ,isnow ,dt ,fact , stc(j) = stc(j) + fact(j)*heatr if (j <= 0) then ! snow if (mliq(j)*mice(j)>0.) stc(j) = tfrz + if (mice(j) == 0.) then ! barlage + stc(j) = tfrz ! barlage + hm(j+1) = hm(j+1) + heatr ! barlage + xm(j+1) = hm(j+1)*dt/hfus ! barlage + endif end if endif @@ -5547,7 +5775,11 @@ end subroutine phasechange !== begin frh2o ==================================================================================== !>\ingroup NoahMP_LSM - subroutine frh2o (parameters,free,tkelv,smc,sh2o,& +!! calculate amount of supercooled liquid soil water content if +!! temperature is below 273.15k (tfrz). requires newton-type iteration +!! to solve the nonlinear implicit equation given in eqn 17 of koren et al. +!! (1999, jgr, vol 104(d16),19569-19585) + subroutine frh2o (parameters,isoil,free,tkelv,smc,sh2o,& #ifdef CCPP errmsg,errflg) #else @@ -5583,16 +5815,17 @@ subroutine frh2o (parameters,free,tkelv,smc,sh2o,& ! ---------------------------------------------------------------------- implicit none type (noahmp_parameters), intent(in) :: parameters - real, intent(in) :: sh2o,smc,tkelv - real, intent(out) :: free + integer,intent(in) :: isoil + real (kind=kind_phys), intent(in) :: sh2o,smc,tkelv + real (kind=kind_phys), intent(out) :: free #ifdef CCPP character(len=*), intent(inout) :: errmsg integer, intent(inout) :: errflg #endif - real :: bx,denom,df,dswl,fk,swl,swlk + real (kind=kind_phys) :: bx,denom,df,dswl,fk,swl,swlk integer :: nlog,kcount ! parameter(ck = 0.0) - real, parameter :: ck = 8.0, blim = 5.5, error = 0.005, & + real (kind=kind_phys), parameter :: ck = 8.0, blim = 5.5, error = 0.005, & dice = 920.0 character(len=80) :: message @@ -5601,12 +5834,12 @@ subroutine frh2o (parameters,free,tkelv,smc,sh2o,& ! simulations showed if b > 5.5 unfrozen water content is ! non-realistically high at very low temperatures. ! ---------------------------------------------------------------------- - bx = parameters%bexp + bx = parameters%bexp(isoil) ! ---------------------------------------------------------------------- ! initializing iterations counter and iterative solution flag. ! ---------------------------------------------------------------------- - if (parameters%bexp > blim) bx = blim + if (parameters%bexp(isoil) > blim) bx = blim nlog = 0 ! ---------------------------------------------------------------------- @@ -5635,8 +5868,8 @@ subroutine frh2o (parameters,free,tkelv,smc,sh2o,& 1001 continue if (.not.( (nlog < 10) .and. (kcount == 0))) goto 1002 nlog = nlog +1 - df = alog ( ( parameters%psisat * grav / hfus ) * ( ( 1. + ck * swl )**2.) * & - ( parameters%smcmax / (smc - swl) )** bx) - alog ( - ( & + df = alog ( ( parameters%psisat(isoil) * grav / hfus ) * ( ( 1. + ck * swl )**2.) * & + ( parameters%smcmax(isoil) / (smc - swl) )** bx) - alog ( - ( & tkelv - tfrz)/ tkelv) denom = 2. * ck / ( 1. + ck * swl ) + bx / ( smc - swl ) swlk = swl - df / denom @@ -5681,8 +5914,8 @@ subroutine frh2o (parameters,free,tkelv,smc,sh2o,& #else call wrf_message(trim(message)) #endif - fk = ( ( (hfus / (grav * ( - parameters%psisat)))* & - ( (tkelv - tfrz)/ tkelv))** ( -1/ bx))* parameters%smcmax + fk = ( ( (hfus / (grav * ( - parameters%psisat(isoil))))* & + ( (tkelv - tfrz)/ tkelv))** ( -1/ bx))* parameters%smcmax(isoil) if (fk < 0.02) fk = 0.02 free = min (fk, smc) ! ---------------------------------------------------------------------- @@ -5728,91 +5961,91 @@ subroutine water (parameters,vegtyp ,nsnow ,nsoil ,imelt ,dt ,uu , & integer , intent(in) :: ist !surface type 1-soil; 2-lake integer, intent(in) :: nsoil !no. of soil layers integer, dimension(-nsnow+1:0) , intent(in) :: imelt !melting state index [1-melt; 2-freeze] - real, intent(in) :: dt !main time step (s) - real, intent(in) :: uu !u-direction wind speed [m/s] - real, intent(in) :: vv !v-direction wind speed [m/s] - real, intent(in) :: fcev !canopy evaporation (w/m2) [+ to atm ] - real, intent(in) :: fctr !transpiration (w/m2) [+ to atm] - real, intent(in) :: qprecc !convective precipitation (mm/s) - real, intent(in) :: qprecl !large-scale precipitation (mm/s) - real, intent(in) :: elai !leaf area index, after burying by snow - real, intent(in) :: esai !stem area index, after burying by snow - real, intent(in) :: sfctmp !surface air temperature [k] - real, intent(in) :: qvap !soil surface evaporation rate[mm/s] - real, intent(in) :: qdew !soil surface dew rate[mm/s] - real, dimension( 1:nsoil), intent(in) :: zsoil !depth of layer-bottom from soil surface - real, dimension( 1:nsoil), intent(in) :: btrani !soil water stress factor (0 to 1) - real, dimension(-nsnow+1: 0), intent(in) :: ficeold !ice fraction at last timestep -! real , intent(in) :: ponding ![mm] - real , intent(in) :: tg !ground temperature (k) - real , intent(in) :: fveg !greeness vegetation fraction (-) - real , intent(in) :: bdfall !bulk density of snowfall (kg/m3) ! mb/an: v3.7 - real , intent(in) :: fp !fraction of the gridcell that receives precipitation ! mb/an: v3.7 - real , intent(in) :: rain !rainfall (mm/s) ! mb/an: v3.7 - real , intent(in) :: snow !snowfall (mm/s) ! mb/an: v3.7 - real, dimension( 1:nsoil), intent(in) :: smceq !equilibrium soil water content [m3/m3] (used in m-m&f groundwater dynamics) - real , intent(in) :: qsnow !snow at ground srf (mm/s) [+] - real , intent(in) :: qrain !rain at ground srf (mm) [+] - real , intent(in) :: snowhin !snow depth increasing rate (m/s) + real (kind=kind_phys), intent(in) :: dt !main time step (s) + real (kind=kind_phys), intent(in) :: uu !u-direction wind speed [m/s] + real (kind=kind_phys), intent(in) :: vv !v-direction wind speed [m/s] + real (kind=kind_phys), intent(in) :: fcev !canopy evaporation (w/m2) [+ to atm ] + real (kind=kind_phys), intent(in) :: fctr !transpiration (w/m2) [+ to atm] + real (kind=kind_phys), intent(in) :: qprecc !convective precipitation (mm/s) + real (kind=kind_phys), intent(in) :: qprecl !large-scale precipitation (mm/s) + real (kind=kind_phys), intent(in) :: elai !leaf area index, after burying by snow + real (kind=kind_phys), intent(in) :: esai !stem area index, after burying by snow + real (kind=kind_phys), intent(in) :: sfctmp !surface air temperature [k] + real (kind=kind_phys), intent(in) :: qvap !soil surface evaporation rate[mm/s] + real (kind=kind_phys), intent(in) :: qdew !soil surface dew rate[mm/s] + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: zsoil !depth of layer-bottom from soil surface + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: btrani !soil water stress factor (0 to 1) + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: ficeold !ice fraction at last timestep +! real (kind=kind_phys) , intent(in) :: ponding ![mm] + real (kind=kind_phys) , intent(in) :: tg !ground temperature (k) + real (kind=kind_phys) , intent(in) :: fveg !greeness vegetation fraction (-) + real (kind=kind_phys) , intent(in) :: bdfall !bulk density of snowfall (kg/m3) ! mb/an: v3.7 + real (kind=kind_phys) , intent(in) :: fp !fraction of the gridcell that receives precipitation ! mb/an: v3.7 + real (kind=kind_phys) , intent(in) :: rain !rainfall (mm/s) ! mb/an: v3.7 + real (kind=kind_phys) , intent(in) :: snow !snowfall (mm/s) ! mb/an: v3.7 + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: smceq !equilibrium soil water content [m3/m3] (used in m-m&f groundwater dynamics) + real (kind=kind_phys) , intent(in) :: qsnow !snow at ground srf (mm/s) [+] + real (kind=kind_phys) , intent(in) :: qrain !rain at ground srf (mm) [+] + real (kind=kind_phys) , intent(in) :: snowhin !snow depth increasing rate (m/s) ! input/output integer, intent(inout) :: isnow !actual no. of snow layers - real, intent(inout) :: canliq !intercepted liquid water (mm) - real, intent(inout) :: canice !intercepted ice mass (mm) - real, intent(inout) :: tv !vegetation temperature (k) - real, intent(inout) :: snowh !snow height [m] - real, intent(inout) :: sneqv !snow water eqv. [mm] - real, dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] - real, dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow/soil layer temperature [k] - real, dimension(-nsnow+1:nsoil), intent(inout) :: zsnso !depth of snow/soil layer-bottom - real, dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso !snow/soil layer thickness [m] - real, dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid water content [m3/m3] - real, dimension( 1:nsoil), intent(inout) :: sice !soil ice content [m3/m3] - real, dimension( 1:nsoil), intent(inout) :: smc !total soil water content [m3/m3] - real, intent(inout) :: zwt !the depth to water table [m] - real, intent(inout) :: wa !water storage in aquifer [mm] - real, intent(inout) :: wt !water storage in aquifer + real (kind=kind_phys), intent(inout) :: canliq !intercepted liquid water (mm) + real (kind=kind_phys), intent(inout) :: canice !intercepted ice mass (mm) + real (kind=kind_phys), intent(inout) :: tv !vegetation temperature (k) + real (kind=kind_phys), intent(inout) :: snowh !snow height [m] + real (kind=kind_phys), intent(inout) :: sneqv !snow water eqv. [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow/soil layer temperature [k] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: zsnso !depth of snow/soil layer-bottom + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso !snow/soil layer thickness [m] + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid water content [m3/m3] + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sice !soil ice content [m3/m3] + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: smc !total soil water content [m3/m3] + real (kind=kind_phys), intent(inout) :: zwt !the depth to water table [m] + real (kind=kind_phys), intent(inout) :: wa !water storage in aquifer [mm] + real (kind=kind_phys), intent(inout) :: wt !water storage in aquifer !+ stuarated soil [mm] - real, intent(inout) :: wslake !water storage in lake (can be -) (mm) - real , intent(inout) :: ponding ![mm] - real, intent(inout) :: smcwtd !soil water content between bottom of the soil and water table [m3/m3] - real, intent(inout) :: deeprech !recharge to or from the water table when deep [m] - real, intent(inout) :: rech !recharge to or from the water table when shallow [m] (diagnostic) + real (kind=kind_phys), intent(inout) :: wslake !water storage in lake (can be -) (mm) + real (kind=kind_phys) , intent(inout) :: ponding ![mm] + real (kind=kind_phys), intent(inout) :: smcwtd !soil water content between bottom of the soil and water table [m3/m3] + real (kind=kind_phys), intent(inout) :: deeprech !recharge to or from the water table when deep [m] + real (kind=kind_phys), intent(inout) :: rech !recharge to or from the water table when shallow [m] (diagnostic) ! output - real, intent(out) :: cmc !intercepted water per ground area (mm) - real, intent(out) :: ecan !evap of intercepted water (mm/s) [+] - real, intent(out) :: etran !transpiration rate (mm/s) [+] - real, intent(out) :: fwet !wetted/snowed fraction of canopy (-) - real, intent(out) :: runsrf !surface runoff [mm/s] - real, intent(out) :: runsub !baseflow (sturation excess) [mm/s] - real, intent(out) :: qin !groundwater recharge [mm/s] - real, intent(out) :: qdis !groundwater discharge [mm/s] - real, intent(out) :: ponding1 - real, intent(out) :: ponding2 - real, intent(out) :: esnow - real, intent(out) :: qsnbot !melting water out of snow bottom [mm/s] - real , intent(in) :: latheav !latent heat vap./sublimation (j/kg) - real , intent(in) :: latheag !latent heat vap./sublimation (j/kg) + real (kind=kind_phys), intent(out) :: cmc !intercepted water per ground area (mm) + real (kind=kind_phys), intent(out) :: ecan !evap of intercepted water (mm/s) [+] + real (kind=kind_phys), intent(out) :: etran !transpiration rate (mm/s) [+] + real (kind=kind_phys), intent(out) :: fwet !wetted/snowed fraction of canopy (-) + real (kind=kind_phys), intent(out) :: runsrf !surface runoff [mm/s] + real (kind=kind_phys), intent(out) :: runsub !baseflow (sturation excess) [mm/s] + real (kind=kind_phys), intent(out) :: qin !groundwater recharge [mm/s] + real (kind=kind_phys), intent(out) :: qdis !groundwater discharge [mm/s] + real (kind=kind_phys), intent(out) :: ponding1 + real (kind=kind_phys), intent(out) :: ponding2 + real (kind=kind_phys), intent(out) :: esnow + real (kind=kind_phys), intent(out) :: qsnbot !melting water out of snow bottom [mm/s] + real (kind=kind_phys) , intent(in) :: latheav !latent heat vap./sublimation (j/kg) + real (kind=kind_phys) , intent(in) :: latheag !latent heat vap./sublimation (j/kg) logical , intent(in) :: frozen_ground ! used to define latent heat pathway logical , intent(in) :: frozen_canopy ! used to define latent heat pathway ! local integer :: iz - real :: qinsur !water input on soil surface [m/s] - real :: qseva !soil surface evap rate [mm/s] - real :: qsdew !soil surface dew rate [mm/s] - real :: qsnfro !snow surface frost rate[mm/s] - real :: qsnsub !snow surface sublimation rate [mm/s] - real, dimension( 1:nsoil) :: etrani !transpiration rate (mm/s) [+] - real, dimension( 1:nsoil) :: wcnd !hydraulic conductivity (m/s) - real :: qdrain !soil-bottom free drainage [mm/s] - real :: snoflow !glacier flow [mm/s] - real :: fcrmax !maximum of fcr (-) + real (kind=kind_phys) :: qinsur !water input on soil surface [m/s] + real (kind=kind_phys) :: qseva !soil surface evap rate [mm/s] + real (kind=kind_phys) :: qsdew !soil surface dew rate [mm/s] + real (kind=kind_phys) :: qsnfro !snow surface frost rate[mm/s] + real (kind=kind_phys) :: qsnsub !snow surface sublimation rate [mm/s] + real (kind=kind_phys), dimension( 1:nsoil) :: etrani !transpiration rate (mm/s) [+] + real (kind=kind_phys), dimension( 1:nsoil) :: wcnd !hydraulic conductivity (m/s) + real (kind=kind_phys) :: qdrain !soil-bottom free drainage [mm/s] + real (kind=kind_phys) :: snoflow !glacier flow [mm/s] + real (kind=kind_phys) :: fcrmax !maximum of fcr (-) - real, parameter :: wslmax = 5000. !maximum lake water storage (mm) + real (kind=kind_phys), parameter :: wslmax = 5000. !maximum lake water storage (mm) ! ---------------------------------------------------------------------- @@ -5840,7 +6073,7 @@ subroutine water (parameters,vegtyp ,nsnow ,nsoil ,imelt ,dt ,uu , & qsnsub = min(qvap, sneqv/dt) endif qseva = qvap-qsnsub - esnow = qsnsub*2.83e+6 + esnow = qsnsub*hsub qsnfro = 0. if (sneqv > 0.) then @@ -5932,6 +6165,7 @@ end subroutine water !== begin canwater ================================================================================= !>\ingroup NoahMP_LSM +!! canopy hydrology subroutine canwater (parameters,vegtyp ,dt , & !in fcev ,fctr ,elai , & !in esai ,tg ,fveg ,iloc , jloc , & !in @@ -5950,38 +6184,38 @@ subroutine canwater (parameters,vegtyp ,dt , & !in integer,intent(in) :: iloc !grid index integer,intent(in) :: jloc !grid index integer,intent(in) :: vegtyp !vegetation type - real, intent(in) :: dt !main time step (s) - real, intent(in) :: fcev !canopy evaporation (w/m2) [+ = to atm] - real, intent(in) :: fctr !transpiration (w/m2) [+ = to atm] - real, intent(in) :: elai !leaf area index, after burying by snow - real, intent(in) :: esai !stem area index, after burying by snow - real, intent(in) :: tg !ground temperature (k) - real, intent(in) :: fveg !greeness vegetation fraction (-) + real (kind=kind_phys), intent(in) :: dt !main time step (s) + real (kind=kind_phys), intent(in) :: fcev !canopy evaporation (w/m2) [+ = to atm] + real (kind=kind_phys), intent(in) :: fctr !transpiration (w/m2) [+ = to atm] + real (kind=kind_phys), intent(in) :: elai !leaf area index, after burying by snow + real (kind=kind_phys), intent(in) :: esai !stem area index, after burying by snow + real (kind=kind_phys), intent(in) :: tg !ground temperature (k) + real (kind=kind_phys), intent(in) :: fveg !greeness vegetation fraction (-) logical , intent(in) :: frozen_canopy ! used to define latent heat pathway - real , intent(in) :: bdfall !bulk density of snowfall (kg/m3) ! mb/an: v3.7 + real (kind=kind_phys) , intent(in) :: bdfall !bulk density of snowfall (kg/m3) ! mb/an: v3.7 ! input & output - real, intent(inout) :: canliq !intercepted liquid water (mm) - real, intent(inout) :: canice !intercepted ice mass (mm) - real, intent(inout) :: tv !vegetation temperature (k) + real (kind=kind_phys), intent(inout) :: canliq !intercepted liquid water (mm) + real (kind=kind_phys), intent(inout) :: canice !intercepted ice mass (mm) + real (kind=kind_phys), intent(inout) :: tv !vegetation temperature (k) ! output - real, intent(out) :: cmc !intercepted water (mm) - real, intent(out) :: ecan !evaporation of intercepted water (mm/s) [+] - real, intent(out) :: etran !transpiration rate (mm/s) [+] - real, intent(out) :: fwet !wetted or snowed fraction of the canopy (-) + real (kind=kind_phys), intent(out) :: cmc !intercepted water (mm) + real (kind=kind_phys), intent(out) :: ecan !evaporation of intercepted water (mm/s) [+] + real (kind=kind_phys), intent(out) :: etran !transpiration rate (mm/s) [+] + real (kind=kind_phys), intent(out) :: fwet !wetted or snowed fraction of the canopy (-) ! -------------------------------------------------------------------- ! ------------------------ local variables --------------------------- - real :: maxsno !canopy capacity for snow interception (mm) - real :: maxliq !canopy capacity for rain interception (mm) - real :: qevac !evaporation rate (mm/s) - real :: qdewc !dew rate (mm/s) - real :: qfroc !frost rate (mm/s) - real :: qsubc !sublimation rate (mm/s) - real :: qmeltc !melting rate of canopy snow (mm/s) - real :: qfrzc !refreezing rate of canopy liquid water (mm/s) - real :: canmas !total canopy mass (kg/m2) + real (kind=kind_phys) :: maxsno !canopy capacity for snow interception (mm) + real (kind=kind_phys) :: maxliq !canopy capacity for rain interception (mm) + real (kind=kind_phys) :: qevac !evaporation rate (mm/s) + real (kind=kind_phys) :: qdewc !dew rate (mm/s) + real (kind=kind_phys) :: qfroc !frost rate (mm/s) + real (kind=kind_phys) :: qsubc !sublimation rate (mm/s) + real (kind=kind_phys) :: qmeltc !melting rate of canopy snow (mm/s) + real (kind=kind_phys) :: qfrzc !refreezing rate of canopy liquid water (mm/s) + real (kind=kind_phys) :: canmas !total canopy mass (kg/m2) ! -------------------------------------------------------------------- ! initialization @@ -6081,37 +6315,37 @@ subroutine snowwater (parameters,nsnow ,nsoil ,imelt ,dt ,zsoil , & !in integer, intent(in) :: nsnow !maximum no. of snow layers integer, intent(in) :: nsoil !no. of soil layers integer, dimension(-nsnow+1:0) , intent(in) :: imelt !melting state index [0-no melt;1-melt] - real, intent(in) :: dt !time step (s) - real, dimension( 1:nsoil), intent(in) :: zsoil !depth of layer-bottom from soil surface - real, intent(in) :: sfctmp !surface air temperature [k] - real, intent(in) :: snowhin!snow depth increasing rate (m/s) - real, intent(in) :: qsnow !snow at ground srf (mm/s) [+] - real, intent(in) :: qsnfro !snow surface frost rate[mm/s] - real, intent(in) :: qsnsub !snow surface sublimation rate[mm/s] - real, intent(in) :: qrain !snow surface rain rate[mm/s] - real, dimension(-nsnow+1:0) , intent(in) :: ficeold!ice fraction at last timestep + real (kind=kind_phys), intent(in) :: dt !time step (s) + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: zsoil !depth of layer-bottom from soil surface + real (kind=kind_phys), intent(in) :: sfctmp !surface air temperature [k] + real (kind=kind_phys), intent(in) :: snowhin!snow depth increasing rate (m/s) + real (kind=kind_phys), intent(in) :: qsnow !snow at ground srf (mm/s) [+] + real (kind=kind_phys), intent(in) :: qsnfro !snow surface frost rate[mm/s] + real (kind=kind_phys), intent(in) :: qsnsub !snow surface sublimation rate[mm/s] + real (kind=kind_phys), intent(in) :: qrain !snow surface rain rate[mm/s] + real (kind=kind_phys), dimension(-nsnow+1:0) , intent(in) :: ficeold!ice fraction at last timestep ! input & output integer, intent(inout) :: isnow !actual no. of snow layers - real, intent(inout) :: snowh !snow height [m] - real, intent(inout) :: sneqv !snow water eqv. [mm] - real, dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] - real, dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] - real, dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid moisture (m3/m3) - real, dimension( 1:nsoil), intent(inout) :: sice !soil ice moisture (m3/m3) - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] - real, dimension(-nsnow+1:nsoil), intent(inout) :: zsnso !depth of snow/soil layer-bottom - real, dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso !snow/soil layer thickness [m] + real (kind=kind_phys), intent(inout) :: snowh !snow height [m] + real (kind=kind_phys), intent(inout) :: sneqv !snow water eqv. [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid moisture (m3/m3) + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sice !soil ice moisture (m3/m3) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: zsnso !depth of snow/soil layer-bottom + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso !snow/soil layer thickness [m] ! output - real, intent(out) :: qsnbot !melting water out of snow bottom [mm/s] - real, intent(out) :: snoflow!glacier flow [mm] - real, intent(out) :: ponding1 - real, intent(out) :: ponding2 + real (kind=kind_phys), intent(out) :: qsnbot !melting water out of snow bottom [mm/s] + real (kind=kind_phys), intent(out) :: snoflow!glacier flow [mm] + real (kind=kind_phys), intent(out) :: ponding1 + real (kind=kind_phys), intent(out) :: ponding2 ! local integer :: iz,i - real :: bdsnow !bulk density of snow (kg/m3) + real (kind=kind_phys) :: bdsnow !bulk density of snow (kg/m3) ! ---------------------------------------------------------------------- snoflow = 0.0 ponding1 = 0.0 @@ -6157,9 +6391,9 @@ subroutine snowwater (parameters,nsnow ,nsoil ,imelt ,dt ,zsoil , & !in !to obtain equilibrium state of snow in glacier region - if(sneqv > 2000.) then ! 2000 mm -> maximum water depth + if(sneqv > 5000.) then ! 5000 mm -> maximum water depth bdsnow = snice(0) / dzsnso(0) - snoflow = (sneqv - 2000.) + snoflow = (sneqv - 5000.) snice(0) = snice(0) - snoflow dzsnso(0) = dzsnso(0) - snoflow/bdsnow snoflow = snoflow / dt @@ -6199,6 +6433,8 @@ end subroutine snowwater !== begin snowfall ================================================================================= !>\ingroup NoahMP_LSM +!! snow depth and density to account for the new snowfall. +!! new values of snow depth & density returned. subroutine snowfall (parameters,nsoil ,nsnow ,dt ,qsnow ,snowhin , & !in sfctmp ,iloc ,jloc , & !in isnow ,snowh ,dzsnso ,stc ,snice , & !inout @@ -6216,20 +6452,20 @@ subroutine snowfall (parameters,nsoil ,nsnow ,dt ,qsnow ,snowhin , & !in integer, intent(in) :: jloc !grid index integer, intent(in) :: nsoil !no. of soil layers integer, intent(in) :: nsnow !maximum no. of snow layers - real, intent(in) :: dt !main time step (s) - real, intent(in) :: qsnow !snow at ground srf (mm/s) [+] - real, intent(in) :: snowhin!snow depth increasing rate (m/s) - real, intent(in) :: sfctmp !surface air temperature [k] + real (kind=kind_phys), intent(in) :: dt !main time step (s) + real (kind=kind_phys), intent(in) :: qsnow !snow at ground srf (mm/s) [+] + real (kind=kind_phys), intent(in) :: snowhin!snow depth increasing rate (m/s) + real (kind=kind_phys), intent(in) :: sfctmp !surface air temperature [k] ! input and output integer, intent(inout) :: isnow !actual no. of snow layers - real, intent(inout) :: snowh !snow depth [m] - real, intent(inout) :: sneqv !swow water equivalent [m] - real, dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso !thickness of snow/soil layers (m) - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] - real, dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] - real, dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] + real (kind=kind_phys), intent(inout) :: snowh !snow depth [m] + real (kind=kind_phys), intent(inout) :: sneqv !swow water equivalent [m] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso !thickness of snow/soil layers (m) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] ! local @@ -6288,16 +6524,16 @@ subroutine combine (parameters,nsnow ,nsoil ,iloc ,jloc , & !in ! input and output integer, intent(inout) :: isnow !actual no. of snow layers - real, dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid moisture (m3/m3) - real, dimension( 1:nsoil), intent(inout) :: sice !soil ice moisture (m3/m3) - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] - real, dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] - real, dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] - real, dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso!snow layer depth [m] - real, intent(inout) :: sneqv !snow water equivalent [m] - real, intent(inout) :: snowh !snow depth [m] - real, intent(out) :: ponding1 - real, intent(out) :: ponding2 + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid moisture (m3/m3) + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sice !soil ice moisture (m3/m3) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso!snow layer depth [m] + real (kind=kind_phys), intent(inout) :: sneqv !snow water equivalent [m] + real (kind=kind_phys), intent(inout) :: snowh !snow depth [m] + real (kind=kind_phys), intent(out) :: ponding1 + real (kind=kind_phys), intent(out) :: ponding2 ! local variables: @@ -6305,10 +6541,10 @@ subroutine combine (parameters,nsnow ,nsoil ,iloc ,jloc , & !in integer :: isnow_old ! number of top snow layer integer :: mssi ! node index integer :: neibor ! adjacent node selected for combination - real :: zwice ! total ice mass in snow - real :: zwliq ! total liquid water in snow + real (kind=kind_phys) :: zwice ! total ice mass in snow + real (kind=kind_phys) :: zwliq ! total liquid water in snow - real :: dzmin(3) ! minimum of top snow layer + real (kind=kind_phys) :: dzmin(3) ! minimum of top snow layer ! data dzmin /0.045, 0.05, 0.2/ data dzmin /0.025, 0.025, 0.1/ ! mb: change limit !----------------------------------------------------------------------- @@ -6320,10 +6556,12 @@ subroutine combine (parameters,nsnow ,nsoil ,iloc ,jloc , & !in if(j /= 0) then snliq(j+1) = snliq(j+1) + snliq(j) snice(j+1) = snice(j+1) + snice(j) + dzsnso(j+1) = dzsnso(j+1) + dzsnso(j) else if (isnow_old < -1) then ! mb/km: change to isnow snliq(j-1) = snliq(j-1) + snliq(j) snice(j-1) = snice(j-1) + snice(j) + dzsnso(j-1) = dzsnso(j-1) + dzsnso(j) else if(snice(j) >= 0.) then ponding1 = snliq(j) ! isnow will get set to zero below; ponding1 will get @@ -6471,24 +6709,24 @@ subroutine divide (parameters,nsnow ,nsoil , & !in ! input and output integer , intent(inout) :: isnow !actual no. of snow layers - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] - real, dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] - real, dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] - real, dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso!snow layer depth [m] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso!snow layer depth [m] ! local variables: integer :: j !indices integer :: msno !number of layer (top) to msno (bot) - real :: drr !thickness of the combined [m] - real, dimension( 1:nsnow) :: dz !snow layer thickness [m] - real, dimension( 1:nsnow) :: swice !partial volume of ice [m3/m3] - real, dimension( 1:nsnow) :: swliq !partial volume of liquid water [m3/m3] - real, dimension( 1:nsnow) :: tsno !node temperature [k] - real :: zwice !temporary - real :: zwliq !temporary - real :: propor!temporary - real :: dtdz !temporary + real (kind=kind_phys) :: drr !thickness of the combined [m] + real (kind=kind_phys), dimension( 1:nsnow) :: dz !snow layer thickness [m] + real (kind=kind_phys), dimension( 1:nsnow) :: swice !partial volume of ice [m3/m3] + real (kind=kind_phys), dimension( 1:nsnow) :: swliq !partial volume of liquid water [m3/m3] + real (kind=kind_phys), dimension( 1:nsnow) :: tsno !node temperature [k] + real (kind=kind_phys) :: zwice !temporary + real (kind=kind_phys) :: zwliq !temporary + real (kind=kind_phys) :: propor!temporary + real (kind=kind_phys) :: dtdz !temporary ! ---------------------------------------------------------------------- do j = 1,nsnow @@ -6595,24 +6833,24 @@ subroutine combo(parameters,dz, wliq, wice, t, dz2, wliq2, wice2, t2) ! input type (noahmp_parameters), intent(in) :: parameters - real, intent(in) :: dz2 !nodal thickness of 2 elements being combined [m] - real, intent(in) :: wliq2 !liquid water of element 2 [kg/m2] - real, intent(in) :: wice2 !ice of element 2 [kg/m2] - real, intent(in) :: t2 !nodal temperature of element 2 [k] - real, intent(inout) :: dz !nodal thickness of 1 elements being combined [m] - real, intent(inout) :: wliq !liquid water of element 1 - real, intent(inout) :: wice !ice of element 1 [kg/m2] - real, intent(inout) :: t !node temperature of element 1 [k] + real (kind=kind_phys), intent(in) :: dz2 !nodal thickness of 2 elements being combined [m] + real (kind=kind_phys), intent(in) :: wliq2 !liquid water of element 2 [kg/m2] + real (kind=kind_phys), intent(in) :: wice2 !ice of element 2 [kg/m2] + real (kind=kind_phys), intent(in) :: t2 !nodal temperature of element 2 [k] + real (kind=kind_phys), intent(inout) :: dz !nodal thickness of 1 elements being combined [m] + real (kind=kind_phys), intent(inout) :: wliq !liquid water of element 1 + real (kind=kind_phys), intent(inout) :: wice !ice of element 1 [kg/m2] + real (kind=kind_phys), intent(inout) :: t !node temperature of element 1 [k] ! local - real :: dzc !total thickness of nodes 1 and 2 (dzc=dz+dz2). - real :: wliqc !combined liquid water [kg/m2] - real :: wicec !combined ice [kg/m2] - real :: tc !combined node temperature [k] - real :: h !enthalpy of element 1 [j/m2] - real :: h2 !enthalpy of element 2 [j/m2] - real :: hc !temporary + real (kind=kind_phys) :: dzc !total thickness of nodes 1 and 2 (dzc=dz+dz2). + real (kind=kind_phys) :: wliqc !combined liquid water [kg/m2] + real (kind=kind_phys) :: wicec !combined ice [kg/m2] + real (kind=kind_phys) :: tc !combined node temperature [k] + real (kind=kind_phys) :: h !enthalpy of element 1 [j/m2] + real (kind=kind_phys) :: h2 !enthalpy of element 2 [j/m2] + real (kind=kind_phys) :: hc !temporary !----------------------------------------------------------------------- @@ -6654,37 +6892,37 @@ subroutine compact (parameters,nsnow ,nsoil ,dt ,stc ,snice , & !in integer, intent(in) :: nsoil !no. of soil layers [ =4] integer, intent(in) :: nsnow !maximum no. of snow layers [ =3] integer, dimension(-nsnow+1:0) , intent(in) :: imelt !melting state index [0-no melt;1-melt] - real, intent(in) :: dt !time step (sec) - real, dimension(-nsnow+1:nsoil), intent(in) :: stc !snow layer temperature [k] - real, dimension(-nsnow+1: 0), intent(in) :: snice !snow layer ice [mm] - real, dimension(-nsnow+1: 0), intent(in) :: snliq !snow layer liquid water [mm] - real, dimension( 1:nsoil), intent(in) :: zsoil !depth of layer-bottom from soil srf - real, dimension(-nsnow+1: 0), intent(in) :: ficeold!ice fraction at last timestep + real (kind=kind_phys), intent(in) :: dt !time step (sec) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: stc !snow layer temperature [k] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: snice !snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: snliq !snow layer liquid water [mm] + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: zsoil !depth of layer-bottom from soil srf + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: ficeold!ice fraction at last timestep ! input and output integer, intent(inout) :: isnow ! actual no. of snow layers - real, dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso ! snow layer thickness [m] - real, dimension(-nsnow+1:nsoil), intent(inout) :: zsnso ! depth of snow/soil layer-bottom + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso ! snow layer thickness [m] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: zsnso ! depth of snow/soil layer-bottom ! local - real, parameter :: c2 = 21.e-3 ![m3/kg] ! default 21.e-3 - real, parameter :: c3 = 2.5e-6 ![1/s] - real, parameter :: c4 = 0.04 ![1/k] - real, parameter :: c5 = 2.0 ! - real, parameter :: dm = 100.0 !upper limit on destructive metamorphism compaction [kg/m3] - real, parameter :: eta0 = 0.8e+6 !viscosity coefficient [kg-s/m2] + real (kind=kind_phys), parameter :: c2 = 21.e-3 ![m3/kg] ! default 21.e-3 + real (kind=kind_phys), parameter :: c3 = 2.5e-6 ![1/s] + real (kind=kind_phys), parameter :: c4 = 0.04 ![1/k] + real (kind=kind_phys), parameter :: c5 = 2.0 ! + real (kind=kind_phys), parameter :: dm = 100.0 !upper limit on destructive metamorphism compaction [kg/m3] + real (kind=kind_phys), parameter :: eta0 = 0.8e+6 !viscosity coefficient [kg-s/m2] !according to anderson, it is between 0.52e6~1.38e6 - real :: burden !pressure of overlying snow [kg/m2] - real :: ddz1 !rate of settling of snow pack due to destructive metamorphism. - real :: ddz2 !rate of compaction of snow pack due to overburden. - real :: ddz3 !rate of compaction of snow pack due to melt [1/s] - real :: dexpf !expf=exp(-c4*(273.15-stc)). - real :: td !stc - tfrz [k] - real :: pdzdtc !nodal rate of change in fractional-thickness due to compaction [fraction/s] - real :: void !void (1 - snice - snliq) - real :: wx !water mass (ice + liquid) [kg/m2] - real :: bi !partial density of ice [kg/m3] - real, dimension(-nsnow+1:0) :: fice !fraction of ice at current time step + real (kind=kind_phys) :: burden !pressure of overlying snow [kg/m2] + real (kind=kind_phys) :: ddz1 !rate of settling of snow pack due to destructive metamorphism. + real (kind=kind_phys) :: ddz2 !rate of compaction of snow pack due to overburden. + real (kind=kind_phys) :: ddz3 !rate of compaction of snow pack due to melt [1/s] + real (kind=kind_phys) :: dexpf !expf=exp(-c4*(273.15-stc)). + real (kind=kind_phys) :: td !stc - tfrz [k] + real (kind=kind_phys) :: pdzdtc !nodal rate of change in fractional-thickness due to compaction [fraction/s] + real (kind=kind_phys) :: void !void (1 - snice - snliq) + real (kind=kind_phys) :: wx !water mass (ice + liquid) [kg/m2] + real (kind=kind_phys) :: bi !partial density of ice [kg/m3] + real (kind=kind_phys), dimension(-nsnow+1:0) :: fice !fraction of ice at current time step integer :: j @@ -6734,6 +6972,7 @@ subroutine compact (parameters,nsnow ,nsoil ,dt ,stc ,snice , & !in ! the change in dz due to compaction dzsnso(j) = dzsnso(j)*(1.+pdzdtc) + dzsnso(j) = max(dzsnso(j),snice(j)/denice + snliq(j)/denh2o) end if ! pressure of overlying snow @@ -6747,6 +6986,8 @@ end subroutine compact !== begin snowh2o ================================================================================== !>\ingroup NoahMP_LSM +!! renew the mass of ice lens (snice) and liquid (snliq) of the +!! surface snow layer resulting from sublimation (frost) / evaporation (dew) subroutine snowh2o (parameters,nsnow ,nsoil ,dt ,qsnfro ,qsnsub , & !in qrain ,iloc ,jloc , & !in isnow ,dzsnso ,snowh ,sneqv ,snice , & !inout @@ -6765,38 +7006,39 @@ subroutine snowh2o (parameters,nsnow ,nsoil ,dt ,qsnfro ,qsnsub , & !in integer, intent(in) :: jloc !grid index integer, intent(in) :: nsnow !maximum no. of snow layers[=3] integer, intent(in) :: nsoil !no. of soil layers[=4] - real, intent(in) :: dt !time step - real, intent(in) :: qsnfro !snow surface frost rate[mm/s] - real, intent(in) :: qsnsub !snow surface sublimation rate[mm/s] - real, intent(in) :: qrain !snow surface rain rate[mm/s] + real (kind=kind_phys), intent(in) :: dt !time step + real (kind=kind_phys), intent(in) :: qsnfro !snow surface frost rate[mm/s] + real (kind=kind_phys), intent(in) :: qsnsub !snow surface sublimation rate[mm/s] + real (kind=kind_phys), intent(in) :: qrain !snow surface rain rate[mm/s] ! output - real, intent(out) :: qsnbot !melting water out of snow bottom [mm/s] + real (kind=kind_phys), intent(out) :: qsnbot !melting water out of snow bottom [mm/s] ! input and output integer, intent(inout) :: isnow !actual no. of snow layers - real, dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso ! snow layer depth [m] - real, intent(inout) :: snowh !snow height [m] - real, intent(inout) :: sneqv !snow water eqv. [mm] - real, dimension(-nsnow+1:0), intent(inout) :: snice !snow layer ice [mm] - real, dimension(-nsnow+1:0), intent(inout) :: snliq !snow layer liquid water [mm] - real, dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid moisture (m3/m3) - real, dimension( 1:nsoil), intent(inout) :: sice !soil ice moisture (m3/m3) - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso ! snow layer depth [m] + real (kind=kind_phys), intent(inout) :: snowh !snow height [m] + real (kind=kind_phys), intent(inout) :: sneqv !snow water eqv. [mm] + real (kind=kind_phys), dimension(-nsnow+1:0), intent(inout) :: snice !snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1:0), intent(inout) :: snliq !snow layer liquid water [mm] + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid moisture (m3/m3) + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sice !soil ice moisture (m3/m3) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] ! local variables: integer :: j !do loop/array indices - real :: qin !water flow into the element (mm/s) - real :: qout !water flow out of the element (mm/s) - real :: wgdif !ice mass after minus sublimation - real, dimension(-nsnow+1:0) :: vol_liq !partial volume of liquid water in layer - real, dimension(-nsnow+1:0) :: vol_ice !partial volume of ice lens in layer - real, dimension(-nsnow+1:0) :: epore !effective porosity = porosity - vol_ice - real :: propor, temp - real :: ponding1, ponding2 + real (kind=kind_phys) :: qin !water flow into the element (mm/s) + real (kind=kind_phys) :: qout !water flow out of the element (mm/s) + real (kind=kind_phys) :: wgdif !ice mass after minus sublimation + real (kind=kind_phys), dimension(-nsnow+1:0) :: vol_liq !partial volume of liquid water in layer + real (kind=kind_phys), dimension(-nsnow+1:0) :: vol_ice !partial volume of ice lens in layer + real (kind=kind_phys), dimension(-nsnow+1:0) :: epore !effective porosity = porosity - vol_ice + real (kind=kind_phys) :: propor, temp + real (kind=kind_phys) :: ponding1, ponding2 + REAL, PARAMETER :: max_liq_mass_fraction = 0.4 ! ---------------------------------------------------------------------- !for the case when sneqv becomes '0' after 'combine' @@ -6819,6 +7061,7 @@ subroutine snowh2o (parameters,nsnow ,nsoil ,dt ,qsnfro ,qsnsub , & !in sneqv = sneqv - qsnsub*dt + qsnfro*dt propor = sneqv/temp snowh = max(0.,propor * snowh) + snowh = min(max(snowh,sneqv/500.0),sneqv/50.0) ! limit adjustment to a reasonable density if(sneqv < 0.) then sice(1) = sice(1) + sneqv/(dzsnso(1)*1000.) @@ -6831,7 +7074,7 @@ subroutine snowh2o (parameters,nsnow ,nsoil ,dt ,qsnfro ,qsnsub , & !in end if end if - if(snowh <= 1.e-8 .or. sneqv <= 1.e-6) then + if(snowh <= 1.e-6 .or. sneqv <= 1.e-3) then snowh = 0.0 sneqv = 0.0 end if @@ -6858,38 +7101,32 @@ subroutine snowh2o (parameters,nsnow ,nsoil ,dt ,qsnfro ,qsnsub , & !in ! porosity and partial volume - !kwm looks to me like loop index / if test can be simplified. - - do j = -nsnow+1, 0 - if (j >= isnow+1) then - vol_ice(j) = min(1., snice(j)/(dzsnso(j)*denice)) - epore(j) = 1. - vol_ice(j) - vol_liq(j) = min(epore(j),snliq(j)/(dzsnso(j)*denh2o)) - end if + do j = isnow+1, 0 + vol_ice(j) = min(1., snice(j)/(dzsnso(j)*denice)) + epore(j) = 1. - vol_ice(j) end do qin = 0. qout = 0. - !kwm looks to me like loop index / if test can be simplified. + do j = isnow+1, 0 + snliq(j) = snliq(j) + qin + vol_liq(j) = snliq(j)/(dzsnso(j)*denh2o) + qout = max(0.,(vol_liq(j)-parameters%ssi*epore(j))*dzsnso(j)) + if(j == 0) then + qout = max((vol_liq(j)- epore(j))*dzsnso(j) , parameters%snow_ret_fac*dt*qout) + end if + qout = qout*denh2o + snliq(j) = snliq(j) - qout + if((snliq(j)/(snice(j)+snliq(j))) > max_liq_mass_fraction) then + qout = qout + (snliq(j) - max_liq_mass_fraction/(1.0 - max_liq_mass_fraction)*snice(j)) + snliq(j) = max_liq_mass_fraction/(1.0 - max_liq_mass_fraction)*snice(j) + endif + qin = qout + end do - do j = -nsnow+1, 0 - if (j >= isnow+1) then - snliq(j) = snliq(j) + qin - if (j <= -1) then - if (epore(j) < 0.05 .or. epore(j+1) < 0.05) then - qout = 0. - else - qout = max(0.,(vol_liq(j)-parameters%ssi*epore(j))*dzsnso(j)) - qout = min(qout,(1.-vol_ice(j+1)-vol_liq(j+1))*dzsnso(j+1)) - end if - else - qout = max(0.,(vol_liq(j) - parameters%ssi*epore(j))*dzsnso(j)) - end if - qout = qout*1000. - snliq(j) = snliq(j) - qout - qin = qout - end if + do j = isnow+1, 0 + dzsnso(j) = max(dzsnso(j),snliq(j)/denh2o + snice(j)/denice) end do ! liquid water from snow bottom to soil @@ -6901,6 +7138,7 @@ end subroutine snowh2o !== begin soilwater ================================================================================ !>\ingroup NoahMP_LSM +!! calculate surface runoff and soil moisture. subroutine soilwater (parameters,nsoil ,nsnow ,dt ,zsoil ,dzsnso , & !in qinsur ,qseva ,etrani ,sice ,iloc , jloc, & !in sh2o ,smc ,zwt ,vegtyp ,& !inout @@ -6919,60 +7157,61 @@ subroutine soilwater (parameters,nsoil ,nsnow ,dt ,zsoil ,dzsnso , & !in integer, intent(in) :: jloc !grid index integer, intent(in) :: nsoil !no. of soil layers integer, intent(in) :: nsnow !maximum no. of snow layers - real, intent(in) :: dt !time step (sec) - real, intent(in) :: qinsur !water input on soil surface [mm/s] - real, intent(in) :: qseva !evap from soil surface [mm/s] - real, dimension(1:nsoil), intent(in) :: zsoil !depth of soil layer-bottom [m] - real, dimension(1:nsoil), intent(in) :: etrani !evapotranspiration from soil layers [mm/s] - real, dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer depth [m] - real, dimension(1:nsoil), intent(in) :: sice !soil ice content [m3/m3] + real (kind=kind_phys), intent(in) :: dt !time step (sec) + real (kind=kind_phys), intent(in) :: qinsur !water input on soil surface [mm/s] + real (kind=kind_phys), intent(in) :: qseva !evap from soil surface [mm/s] + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: zsoil !depth of soil layer-bottom [m] + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: etrani !evapotranspiration from soil layers [mm/s] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer depth [m] + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: sice !soil ice content [m3/m3] integer, intent(in) :: vegtyp ! input & output - real, dimension(1:nsoil), intent(inout) :: sh2o !soil liquid water content [m3/m3] - real, dimension(1:nsoil), intent(inout) :: smc !total soil water content [m3/m3] - real, intent(inout) :: zwt !water table depth [m] - real, intent(inout) :: smcwtd !soil moisture between bottom of the soil and the water table [m3/m3] - real , intent(inout) :: deeprech + real (kind=kind_phys), dimension(1:nsoil), intent(inout) :: sh2o !soil liquid water content [m3/m3] + real (kind=kind_phys), dimension(1:nsoil), intent(inout) :: smc !total soil water content [m3/m3] + real (kind=kind_phys), intent(inout) :: zwt !water table depth [m] + real (kind=kind_phys), intent(inout) :: smcwtd !soil moisture between bottom of the soil and the water table [m3/m3] + real (kind=kind_phys) , intent(inout) :: deeprech ! output - real, intent(out) :: qdrain !soil-bottom free drainage [mm/s] - real, intent(out) :: runsrf !surface runoff [mm/s] - real, intent(out) :: runsub !subsurface runoff [mm/s] - real, intent(out) :: fcrmax !maximum of fcr (-) - real, dimension(1:nsoil), intent(out) :: wcnd !hydraulic conductivity (m/s) + real (kind=kind_phys), intent(out) :: qdrain !soil-bottom free drainage [mm/s] + real (kind=kind_phys), intent(out) :: runsrf !surface runoff [mm/s] + real (kind=kind_phys), intent(out) :: runsub !subsurface runoff [mm/s] + real (kind=kind_phys), intent(out) :: fcrmax !maximum of fcr (-) + real (kind=kind_phys), dimension(1:nsoil), intent(out) :: wcnd !hydraulic conductivity (m/s) ! local integer :: k,iz !do-loop index integer :: iter !iteration index - real :: dtfine !fine time step (s) - real, dimension(1:nsoil) :: rhstt !right-hand side term of the matrix - real, dimension(1:nsoil) :: ai !left-hand side term - real, dimension(1:nsoil) :: bi !left-hand side term - real, dimension(1:nsoil) :: ci !left-hand side term - - real :: fff !runoff decay factor (m-1) - real :: rsbmx !baseflow coefficient [mm/s] - real :: pddum !infiltration rate at surface (m/s) - real :: fice !ice fraction in frozen soil - real :: wplus !saturation excess of the total soil [m] - real :: rsat !accumulation of wplus (saturation excess) [m] - real :: sicemax!maximum soil ice content (m3/m3) - real :: sh2omin!minimum soil liquid water content (m3/m3) - real :: wtsub !sum of wcnd(k)*dzsnso(k) - real :: mh2o !water mass removal (mm) - real :: fsat !fractional saturated area (-) - real, dimension(1:nsoil) :: mliq ! - real :: xs ! - real :: watmin ! - real :: qdrain_save ! - real :: epore !effective porosity [m3/m3] - real, dimension(1:nsoil) :: fcr !impermeable fraction due to frozen soil + real (kind=kind_phys) :: dtfine !fine time step (s) + real (kind=kind_phys), dimension(1:nsoil) :: rhstt !right-hand side term of the matrix + real (kind=kind_phys), dimension(1:nsoil) :: ai !left-hand side term + real (kind=kind_phys), dimension(1:nsoil) :: bi !left-hand side term + real (kind=kind_phys), dimension(1:nsoil) :: ci !left-hand side term + + real (kind=kind_phys) :: fff !runoff decay factor (m-1) + real (kind=kind_phys) :: rsbmx !baseflow coefficient [mm/s] + real (kind=kind_phys) :: pddum !infiltration rate at surface (m/s) + real (kind=kind_phys) :: fice !ice fraction in frozen soil + real (kind=kind_phys) :: wplus !saturation excess of the total soil [m] + real (kind=kind_phys) :: rsat !accumulation of wplus (saturation excess) [m] + real (kind=kind_phys) :: sicemax!maximum soil ice content (m3/m3) + real (kind=kind_phys) :: sh2omin!minimum soil liquid water content (m3/m3) + real (kind=kind_phys) :: wtsub !sum of wcnd(k)*dzsnso(k) + real (kind=kind_phys) :: mh2o !water mass removal (mm) + real (kind=kind_phys) :: fsat !fractional saturated area (-) + real (kind=kind_phys), dimension(1:nsoil) :: mliq ! + real (kind=kind_phys) :: xs ! + real (kind=kind_phys) :: watmin ! + real (kind=kind_phys) :: qdrain_save ! + real (kind=kind_phys) :: runsrf_save ! + real (kind=kind_phys) :: epore !effective porosity [m3/m3] + real (kind=kind_phys), dimension(1:nsoil) :: fcr !impermeable fraction due to frozen soil integer :: niter !iteration times soil moisture (-) - real :: smctot !2-m averaged soil moisture (m3/m3) - real :: dztot !2-m soil depth (m) - real, parameter :: a = 4.0 + real (kind=kind_phys) :: smctot !2-m averaged soil moisture (m3/m3) + real (kind=kind_phys) :: dztot !2-m soil depth (m) + real (kind=kind_phys), parameter :: a = 4.0 ! ---------------------------------------------------------------------- runsrf = 0.0 pddum = 0.0 @@ -6981,7 +7220,7 @@ subroutine soilwater (parameters,nsoil ,nsnow ,dt ,zsoil ,dzsnso , & !in ! for the case when snowmelt water is too large do k = 1,nsoil - epore = max ( 1.e-4 , ( parameters%smcmax - sice(k) ) ) + epore = max ( 1.e-4 , ( parameters%smcmax(k) - sice(k) ) ) rsat = rsat + max(0.,sh2o(k)-epore)*dzsnso(k) sh2o(k) = min(epore,sh2o(k)) end do @@ -6989,7 +7228,7 @@ subroutine soilwater (parameters,nsoil ,nsnow ,dt ,zsoil ,dzsnso , & !in !impermeable fraction due to frozen soil do k = 1,nsoil - fice = min(1.0,sice(k)/parameters%smcmax) + fice = min(1.0,sice(k)/parameters%smcmax(k)) fcr(k) = max(0.0,exp(-a*(1.-fice))- exp(-a)) / & (1.0 - exp(-a)) end do @@ -6998,7 +7237,7 @@ subroutine soilwater (parameters,nsoil ,nsnow ,dt ,zsoil ,dzsnso , & !in sicemax = 0.0 fcrmax = 0.0 - sh2omin = parameters%smcmax + sh2omin = parameters%smcmax(1) do k = 1,nsoil if (sice(k) > sicemax) sicemax = sice(k) if (fcr(k) > fcrmax) fcrmax = fcr(k) @@ -7057,11 +7296,11 @@ subroutine soilwater (parameters,nsoil ,nsnow ,dt ,zsoil ,dzsnso , & !in dztot = 0. do k = 1,nsoil dztot = dztot + dzsnso(k) - smctot = smctot + smc(k)*dzsnso(k) + smctot = smctot + smc(k)/parameters%smcmax(k)*dzsnso(k) if(dztot >= 2.0) exit end do smctot = smctot/dztot - fsat = max(0.01,smctot/parameters%smcmax) ** 4. !bats + fsat = max(0.01,smctot) ** 4. !bats if(qinsur > 0.) then runsrf = qinsur * ((1.0-fcr(1))*fsat+fcr(1)) @@ -7073,19 +7312,26 @@ subroutine soilwater (parameters,nsoil ,nsnow ,dt ,zsoil ,dzsnso , & !in niter = 1 - if(opt_inf == 1) then !opt_inf =2 may cause water imbalance +! if(opt_inf == 1) then !opt_inf =2 may cause water imbalance niter = 3 - if (pddum*dt>dzsnso(1)*parameters%smcmax ) then + if (pddum*dt>dzsnso(1)*parameters%smcmax(1) ) then niter = niter*2 end if - end if +! end if dtfine = dt / niter ! solve soil moisture qdrain_save = 0.0 + runsrf_save = 0.0 do iter = 1, niter + if(qinsur > 0. .and. opt_run == 3) then + call infil (parameters,nsoil ,dtfine ,zsoil ,sh2o ,sice , & !in + sicemax,qinsur , & !in + pddum ,runsrf ) !out + end if + call srt (parameters,nsoil ,zsoil ,dtfine ,pddum ,etrani , & !in qseva ,sh2o ,smc ,zwt ,fcr , & !in sicemax,fcrmax ,iloc ,jloc ,smcwtd , & !in @@ -7099,9 +7345,11 @@ subroutine soilwater (parameters,nsoil ,nsnow ,dt ,zsoil ,dzsnso , & !in wplus) !out rsat = rsat + wplus qdrain_save = qdrain_save + qdrain + runsrf_save = runsrf_save + runsrf end do qdrain = qdrain_save/niter + runsrf = runsrf_save/niter runsrf = runsrf * 1000. + rsat * 1000./dt ! m/s -> mm/s qdrain = qdrain * 1000. @@ -7162,6 +7410,7 @@ end subroutine soilwater !== begin zwteq ==================================================================================== !>\ingroup NoahMP_LSM +!! calculate equilibrium water table depth (niu et al., 2005) subroutine zwteq (parameters,nsoil ,nsnow ,zsoil ,dzsnso ,sh2o ,zwt) ! ---------------------------------------------------------------------- ! calculate equilibrium water table depth (niu et al., 2005) @@ -7173,28 +7422,28 @@ subroutine zwteq (parameters,nsoil ,nsnow ,zsoil ,dzsnso ,sh2o ,zwt) type (noahmp_parameters), intent(in) :: parameters integer, intent(in) :: nsoil !no. of soil layers integer, intent(in) :: nsnow !maximum no. of snow layers - real, dimension(1:nsoil), intent(in) :: zsoil !depth of soil layer-bottom [m] - real, dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer depth [m] - real, dimension(1:nsoil), intent(in) :: sh2o !soil liquid water content [m3/m3] + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: zsoil !depth of soil layer-bottom [m] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer depth [m] + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: sh2o !soil liquid water content [m3/m3] ! output - real, intent(out) :: zwt !water table depth [m] + real (kind=kind_phys), intent(out) :: zwt !water table depth [m] ! locals integer :: k !do-loop index integer, parameter :: nfine = 100 !no. of fine soil layers of 6m soil - real :: wd1 !water deficit from coarse (4-l) soil moisture profile - real :: wd2 !water deficit from fine (100-l) soil moisture profile - real :: dzfine !layer thickness of the 100-l soil layers to 6.0 m - real :: temp !temporary variable - real, dimension(1:nfine) :: zfine !layer-bottom depth of the 100-l soil layers to 6.0 m + real (kind=kind_phys) :: wd1 !water deficit from coarse (4-l) soil moisture profile + real (kind=kind_phys) :: wd2 !water deficit from fine (100-l) soil moisture profile + real (kind=kind_phys) :: dzfine !layer thickness of the 100-l soil layers to 6.0 m + real (kind=kind_phys) :: temp !temporary variable + real (kind=kind_phys), dimension(1:nfine) :: zfine !layer-bottom depth of the 100-l soil layers to 6.0 m ! ---------------------------------------------------------------------- wd1 = 0. do k = 1,nsoil - wd1 = wd1 + (parameters%smcmax-sh2o(k)) * dzsnso(k) ! [m] + wd1 = wd1 + (parameters%smcmax(1)-sh2o(k)) * dzsnso(k) ! [m] enddo dzfine = 3.0 * (-zsoil(nsoil)) / nfine @@ -7206,8 +7455,8 @@ subroutine zwteq (parameters,nsoil ,nsnow ,zsoil ,dzsnso ,sh2o ,zwt) wd2 = 0. do k = 1,nfine - temp = 1. + (zwt-zfine(k))/parameters%psisat - wd2 = wd2 + parameters%smcmax*(1.-temp**(-1./parameters%bexp))*dzfine + temp = 1. + (zwt-zfine(k))/parameters%psisat(1) + wd2 = wd2 + parameters%smcmax(1)*(1.-temp**(-1./parameters%bexp(1)))*dzfine if(abs(wd2-wd1).le.0.01) then zwt = zfine(k) exit @@ -7219,6 +7468,7 @@ end subroutine zwteq !== begin infil ==================================================================================== !>\ingroup NoahMP_LSM +!! compute inflitration rate at soil surface and surface runoff subroutine infil (parameters,nsoil ,dt ,zsoil ,sh2o ,sice , & !in sicemax,qinsur , & !in pddum ,runsrf ) !out @@ -7230,50 +7480,50 @@ subroutine infil (parameters,nsoil ,dt ,zsoil ,sh2o ,sice , & !in ! inputs type (noahmp_parameters), intent(in) :: parameters integer, intent(in) :: nsoil !no. of soil layers - real, intent(in) :: dt !time step (sec) - real, dimension(1:nsoil), intent(in) :: zsoil !depth of soil layer-bottom [m] - real, dimension(1:nsoil), intent(in) :: sh2o !soil liquid water content [m3/m3] - real, dimension(1:nsoil), intent(in) :: sice !soil ice content [m3/m3] - real, intent(in) :: qinsur !water input on soil surface [mm/s] - real, intent(in) :: sicemax!maximum soil ice content (m3/m3) + real (kind=kind_phys), intent(in) :: dt !time step (sec) + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: zsoil !depth of soil layer-bottom [m] + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: sh2o !soil liquid water content [m3/m3] + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: sice !soil ice content [m3/m3] + real (kind=kind_phys), intent(in) :: qinsur !water input on soil surface [mm/s] + real (kind=kind_phys), intent(in) :: sicemax!maximum soil ice content (m3/m3) ! outputs - real, intent(out) :: runsrf !surface runoff [mm/s] - real, intent(out) :: pddum !infiltration rate at surface + real (kind=kind_phys), intent(out) :: runsrf !surface runoff [mm/s] + real (kind=kind_phys), intent(out) :: pddum !infiltration rate at surface ! locals integer :: ialp1, j, jj, k - real :: val - real :: ddt - real :: px - real :: dt1, dd, dice - real :: fcr - real :: sum - real :: acrt - real :: wdf - real :: wcnd - real :: smcav - real :: infmax - real, dimension(1:nsoil) :: dmax + real (kind=kind_phys) :: val + real (kind=kind_phys) :: ddt + real (kind=kind_phys) :: px + real (kind=kind_phys) :: dt1, dd, dice + real (kind=kind_phys) :: fcr + real (kind=kind_phys) :: sum + real (kind=kind_phys) :: acrt + real (kind=kind_phys) :: wdf + real (kind=kind_phys) :: wcnd + real (kind=kind_phys) :: smcav + real (kind=kind_phys) :: infmax + real (kind=kind_phys), dimension(1:nsoil) :: dmax integer, parameter :: cvfrz = 3 ! -------------------------------------------------------------------------------- if (qinsur > 0.0) then dt1 = dt /86400. - smcav = parameters%smcmax - parameters%smcwlt + smcav = parameters%smcmax(1) - parameters%smcwlt(1) ! maximum infiltration rate dmax(1)= -zsoil(1) * smcav dice = -zsoil(1) * sice(1) - dmax(1)= dmax(1)* (1.0-(sh2o(1) + sice(1) - parameters%smcwlt)/smcav) + dmax(1)= dmax(1)* (1.0-(sh2o(1) + sice(1) - parameters%smcwlt(1))/smcav) dd = dmax(1) do k = 2,nsoil dice = dice + (zsoil(k-1) - zsoil(k) ) * sice(k) dmax(k) = (zsoil(k-1) - zsoil(k)) * smcav - dmax(k) = dmax(k) * (1.0-(sh2o(k) + sice(k) - parameters%smcwlt)/smcav) + dmax(k) = dmax(k) * (1.0-(sh2o(k) + sice(k) - parameters%smcwlt(k))/smcav) dd = dd + dmax(k) end do @@ -7306,7 +7556,7 @@ subroutine infil (parameters,nsoil ,dt ,zsoil ,sh2o ,sice , & !in ! jref for urban areas ! if ( parameters%urban_flag ) infmax == infmax * 0.05 - call wdfcnd2 (parameters,wdf,wcnd,sh2o(1),sicemax) + call wdfcnd2 (parameters,wdf,wcnd,sh2o(1),sicemax,1) infmax = max (infmax,wcnd) infmax = min (infmax,px) @@ -7320,6 +7570,9 @@ end subroutine infil !== begin srt ====================================================================================== !>\ingroup NoahMP_LSM +!! calculate the right hand side of the time tendency term of the soil +!! water diffusion equation. also to compute (prepare) the matrix coefficients +!! for the tri-diagonal matrix of the implicit time scheme. subroutine srt (parameters,nsoil ,zsoil ,dt ,pddum ,etrani , & !in qseva ,sh2o ,smc ,zwt ,fcr , & !in sicemax,fcrmax ,iloc ,jloc ,smcwtd , & !in @@ -7338,46 +7591,46 @@ subroutine srt (parameters,nsoil ,zsoil ,dt ,pddum ,etrani , & !in integer, intent(in) :: iloc !grid index integer, intent(in) :: jloc !grid index integer, intent(in) :: nsoil - real, dimension(1:nsoil), intent(in) :: zsoil - real, intent(in) :: dt - real, intent(in) :: pddum - real, intent(in) :: qseva - real, dimension(1:nsoil), intent(in) :: etrani - real, dimension(1:nsoil), intent(in) :: sh2o - real, dimension(1:nsoil), intent(in) :: smc - real, intent(in) :: zwt ! water table depth [m] - real, dimension(1:nsoil), intent(in) :: fcr - real, intent(in) :: fcrmax !maximum of fcr (-) - real, intent(in) :: sicemax!maximum soil ice content (m3/m3) - real, intent(in) :: smcwtd !soil moisture between bottom of the soil and the water table + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: zsoil + real (kind=kind_phys), intent(in) :: dt + real (kind=kind_phys), intent(in) :: pddum + real (kind=kind_phys), intent(in) :: qseva + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: etrani + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: sh2o + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: smc + real (kind=kind_phys), intent(in) :: zwt ! water table depth [m] + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: fcr + real (kind=kind_phys), intent(in) :: fcrmax !maximum of fcr (-) + real (kind=kind_phys), intent(in) :: sicemax!maximum soil ice content (m3/m3) + real (kind=kind_phys), intent(in) :: smcwtd !soil moisture between bottom of the soil and the water table ! output - real, dimension(1:nsoil), intent(out) :: rhstt - real, dimension(1:nsoil), intent(out) :: ai - real, dimension(1:nsoil), intent(out) :: bi - real, dimension(1:nsoil), intent(out) :: ci - real, dimension(1:nsoil), intent(out) :: wcnd !hydraulic conductivity (m/s) - real, intent(out) :: qdrain !bottom drainage (m/s) + real (kind=kind_phys), dimension(1:nsoil), intent(out) :: rhstt + real (kind=kind_phys), dimension(1:nsoil), intent(out) :: ai + real (kind=kind_phys), dimension(1:nsoil), intent(out) :: bi + real (kind=kind_phys), dimension(1:nsoil), intent(out) :: ci + real (kind=kind_phys), dimension(1:nsoil), intent(out) :: wcnd !hydraulic conductivity (m/s) + real (kind=kind_phys), intent(out) :: qdrain !bottom drainage (m/s) ! local integer :: k - real, dimension(1:nsoil) :: ddz - real, dimension(1:nsoil) :: denom - real, dimension(1:nsoil) :: dsmdz - real, dimension(1:nsoil) :: wflux - real, dimension(1:nsoil) :: wdf - real, dimension(1:nsoil) :: smx - real :: temp1 - real :: smxwtd !soil moisture between bottom of the soil and water table - real :: smxbot !soil moisture below bottom to calculate flux + real (kind=kind_phys), dimension(1:nsoil) :: ddz + real (kind=kind_phys), dimension(1:nsoil) :: denom + real (kind=kind_phys), dimension(1:nsoil) :: dsmdz + real (kind=kind_phys), dimension(1:nsoil) :: wflux + real (kind=kind_phys), dimension(1:nsoil) :: wdf + real (kind=kind_phys), dimension(1:nsoil) :: smx + real (kind=kind_phys) :: temp1 + real (kind=kind_phys) :: smxwtd !soil moisture between bottom of the soil and water table + real (kind=kind_phys) :: smxbot !soil moisture below bottom to calculate flux ! niu and yang (2006), j. of hydrometeorology ! ---------------------------------------------------------------------- if(opt_inf == 1) then do k = 1, nsoil - call wdfcnd1 (parameters,wdf(k),wcnd(k),smc(k),fcr(k)) + call wdfcnd1 (parameters,wdf(k),wcnd(k),smc(k),fcr(k),k) smx(k) = smc(k) end do if(opt_run == 5)smxwtd=smcwtd @@ -7385,7 +7638,7 @@ subroutine srt (parameters,nsoil ,zsoil ,dt ,pddum ,etrani , & !in if(opt_inf == 2) then do k = 1, nsoil - call wdfcnd2 (parameters,wdf(k),wcnd(k),sh2o(k),sicemax) + call wdfcnd2 (parameters,wdf(k),wcnd(k),sh2o(k),sicemax,k) smx(k) = sh2o(k) end do if(opt_run == 5)smxwtd=smcwtd*sh2o(nsoil)/smc(nsoil) !same liquid fraction as in the bottom layer @@ -7454,6 +7707,7 @@ end subroutine srt !== begin sstep ==================================================================================== !>\ingroup NoahMP_LSM +!! calculate/update soil moisture content values. subroutine sstep (parameters,nsoil ,nsnow ,dt ,zsoil ,dzsnso , & !in sice ,iloc ,jloc ,zwt , & !in sh2o ,smc ,ai ,bi ,ci , & !inout @@ -7472,33 +7726,33 @@ subroutine sstep (parameters,nsoil ,nsnow ,dt ,zsoil ,dzsnso , & !in integer, intent(in) :: jloc !grid index integer, intent(in) :: nsoil ! integer, intent(in) :: nsnow ! - real, intent(in) :: dt - real, intent(in) :: zwt - real, dimension( 1:nsoil), intent(in) :: zsoil - real, dimension( 1:nsoil), intent(in) :: sice - real, dimension(-nsnow+1:nsoil), intent(in) :: dzsnso ! snow/soil layer thickness [m] + real (kind=kind_phys), intent(in) :: dt + real (kind=kind_phys), intent(in) :: zwt + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: zsoil + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: sice + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso ! snow/soil layer thickness [m] !input and output - real, dimension(1:nsoil), intent(inout) :: sh2o - real, dimension(1:nsoil), intent(inout) :: smc - real, dimension(1:nsoil), intent(inout) :: ai - real, dimension(1:nsoil), intent(inout) :: bi - real, dimension(1:nsoil), intent(inout) :: ci - real, dimension(1:nsoil), intent(inout) :: rhstt - real , intent(inout) :: smcwtd - real , intent(inout) :: qdrain - real , intent(inout) :: deeprech + real (kind=kind_phys), dimension(1:nsoil), intent(inout) :: sh2o + real (kind=kind_phys), dimension(1:nsoil), intent(inout) :: smc + real (kind=kind_phys), dimension(1:nsoil), intent(inout) :: ai + real (kind=kind_phys), dimension(1:nsoil), intent(inout) :: bi + real (kind=kind_phys), dimension(1:nsoil), intent(inout) :: ci + real (kind=kind_phys), dimension(1:nsoil), intent(inout) :: rhstt + real (kind=kind_phys) , intent(inout) :: smcwtd + real (kind=kind_phys) , intent(inout) :: qdrain + real (kind=kind_phys) , intent(inout) :: deeprech !output - real, intent(out) :: wplus !saturation excess water (m) + real (kind=kind_phys), intent(out) :: wplus !saturation excess water (m) !local integer :: k - real, dimension(1:nsoil) :: rhsttin - real, dimension(1:nsoil) :: ciin - real :: stot - real :: epore - real :: wminus + real (kind=kind_phys), dimension(1:nsoil) :: rhsttin + real (kind=kind_phys), dimension(1:nsoil) :: ciin + real (kind=kind_phys) :: stot + real (kind=kind_phys) :: epore + real (kind=kind_phys) :: wminus ! ---------------------------------------------------------------------- wplus = 0.0 @@ -7537,10 +7791,10 @@ subroutine sstep (parameters,nsoil ,nsnow ,dt ,zsoil ,dzsnso , & !in deeprech = deeprech + dt * qdrain else smcwtd = smcwtd + dt * qdrain / dzsnso(nsoil) - wplus = max((smcwtd-parameters%smcmax), 0.0) * dzsnso(nsoil) + wplus = max((smcwtd-parameters%smcmax(nsoil)), 0.0) * dzsnso(nsoil) wminus = max((1.e-4-smcwtd), 0.0) * dzsnso(nsoil) - smcwtd = max( min(smcwtd,parameters%smcmax) , 1.e-4) + smcwtd = max( min(smcwtd,parameters%smcmax(nsoil)) , 1.e-4) sh2o(nsoil) = sh2o(nsoil) + wplus/dzsnso(nsoil) !reduce fluxes at the bottom boundaries accordingly @@ -7551,22 +7805,39 @@ subroutine sstep (parameters,nsoil ,nsnow ,dt ,zsoil ,dzsnso , & !in endif do k = nsoil,2,-1 - epore = max ( 1.e-4 , ( parameters%smcmax - sice(k) ) ) + epore = max ( 1.e-4 , ( parameters%smcmax(k) - sice(k) ) ) wplus = max((sh2o(k)-epore), 0.0) * dzsnso(k) sh2o(k) = min(epore,sh2o(k)) sh2o(k-1) = sh2o(k-1) + wplus/dzsnso(k-1) end do - epore = max ( 1.e-4 , ( parameters%smcmax - sice(1) ) ) + epore = max ( 1.e-4 , ( parameters%smcmax(1) - sice(1) ) ) wplus = max((sh2o(1)-epore), 0.0) * dzsnso(1) sh2o(1) = min(epore,sh2o(1)) + if(wplus > 0.0) then + sh2o(2) = sh2o(2) + wplus/dzsnso(2) + do k = 2,nsoil-1 + epore = max ( 1.e-4 , ( parameters%smcmax(k) - sice(k) ) ) + wplus = max((sh2o(k)-epore), 0.0) * dzsnso(k) + sh2o(k) = min(epore,sh2o(k)) + sh2o(k+1) = sh2o(k+1) + wplus/dzsnso(k+1) + end do + + epore = max ( 1.e-4 , ( parameters%smcmax(nsoil) - sice(nsoil) ) ) + wplus = max((sh2o(nsoil)-epore), 0.0) * dzsnso(nsoil) + sh2o(nsoil) = min(epore,sh2o(nsoil)) + end if + + smc = sh2o + sice + end subroutine sstep !== begin wdfcnd1 ================================================================================== !>\ingroup NoahMP_LSM - subroutine wdfcnd1 (parameters,wdf,wcnd,smc,fcr) +!! calculate soil water diffusivity and soil hydraulic conductivity. + subroutine wdfcnd1 (parameters,wdf,wcnd,smc,fcr,isoil) ! ---------------------------------------------------------------------- ! calculate soil water diffusivity and soil hydraulic conductivity. ! ---------------------------------------------------------------------- @@ -7574,30 +7845,31 @@ subroutine wdfcnd1 (parameters,wdf,wcnd,smc,fcr) ! ---------------------------------------------------------------------- ! input type (noahmp_parameters), intent(in) :: parameters - real,intent(in) :: smc - real,intent(in) :: fcr + real (kind=kind_phys),intent(in) :: smc + real (kind=kind_phys),intent(in) :: fcr + integer,intent(in) :: isoil ! output - real,intent(out) :: wcnd - real,intent(out) :: wdf + real (kind=kind_phys),intent(out) :: wcnd + real (kind=kind_phys),intent(out) :: wdf ! local - real :: expon - real :: factr - real :: vkwgt + real (kind=kind_phys) :: expon + real (kind=kind_phys) :: factr + real (kind=kind_phys) :: vkwgt ! ---------------------------------------------------------------------- ! soil water diffusivity - factr = max(0.01, smc/parameters%smcmax) - expon = parameters%bexp + 2.0 - wdf = parameters%dwsat * factr ** expon + factr = max(0.01, smc/parameters%smcmax(isoil)) + expon = parameters%bexp(isoil) + 2.0 + wdf = parameters%dwsat(isoil) * factr ** expon wdf = wdf * (1.0 - fcr) ! hydraulic conductivity - expon = 2.0*parameters%bexp + 3.0 - wcnd = parameters%dksat * factr ** expon + expon = 2.0*parameters%bexp(isoil) + 3.0 + wcnd = parameters%dksat(isoil) * factr ** expon wcnd = wcnd * (1.0 - fcr) end subroutine wdfcnd1 @@ -7605,7 +7877,8 @@ end subroutine wdfcnd1 !== begin wdfcnd2 ================================================================================== !>\ingroup NoahMP_LSM - subroutine wdfcnd2 (parameters,wdf,wcnd,smc,sice) +!! calculate soil water diffusivity and soil hydraulic conductivity. + subroutine wdfcnd2 (parameters,wdf,wcnd,smc,sice,isoil) ! ---------------------------------------------------------------------- ! calculate soil water diffusivity and soil hydraulic conductivity. ! ---------------------------------------------------------------------- @@ -7613,34 +7886,37 @@ subroutine wdfcnd2 (parameters,wdf,wcnd,smc,sice) ! ---------------------------------------------------------------------- ! input type (noahmp_parameters), intent(in) :: parameters - real,intent(in) :: smc - real,intent(in) :: sice + real (kind=kind_phys),intent(in) :: smc + real (kind=kind_phys),intent(in) :: sice + integer,intent(in) :: isoil ! output - real,intent(out) :: wcnd - real,intent(out) :: wdf + real (kind=kind_phys),intent(out) :: wcnd + real (kind=kind_phys),intent(out) :: wdf ! local - real :: expon - real :: factr - real :: vkwgt + real (kind=kind_phys) :: expon + real (kind=kind_phys) :: factr1,factr2 + real (kind=kind_phys) :: vkwgt ! ---------------------------------------------------------------------- ! soil water diffusivity - factr = max(0.01, smc/parameters%smcmax) - expon = parameters%bexp + 2.0 - wdf = parameters%dwsat * factr ** expon + factr1 = 0.05/parameters%smcmax(isoil) + factr2 = max(0.01, smc/parameters%smcmax(isoil)) + factr1 = min(factr1,factr2) + expon = parameters%bexp(isoil) + 2.0 + wdf = parameters%dwsat(isoil) * factr2 ** expon if (sice > 0.0) then vkwgt = 1./ (1. + (500.* sice)**3.) - wdf = vkwgt * wdf + (1.-vkwgt)*parameters%dwsat*(0.2/parameters%smcmax)**expon + wdf = vkwgt * wdf + (1.-vkwgt)*parameters%dwsat(isoil)*(factr1)**expon end if ! hydraulic conductivity - expon = 2.0*parameters%bexp + 3.0 - wcnd = parameters%dksat * factr ** expon + expon = 2.0*parameters%bexp(isoil) + 3.0 + wcnd = parameters%dksat(isoil) * factr2 ** expon end subroutine wdfcnd2 @@ -7660,46 +7936,46 @@ subroutine groundwater(parameters,nsnow ,nsoil ,dt ,sice ,zsoil , & !in integer, intent(in) :: jloc !grid index integer, intent(in) :: nsnow !maximum no. of snow layers integer, intent(in) :: nsoil !no. of soil layers - real, intent(in) :: dt !timestep [sec] - real, intent(in) :: fcrmax!maximum fcr (-) - real, dimension( 1:nsoil), intent(in) :: sice !soil ice content [m3/m3] - real, dimension( 1:nsoil), intent(in) :: zsoil !depth of soil layer-bottom [m] - real, dimension( 1:nsoil), intent(in) :: wcnd !hydraulic conductivity (m/s) - real, dimension(-nsnow+1:nsoil), intent(in) :: stc !snow/soil temperature (k) + real (kind=kind_phys), intent(in) :: dt !timestep [sec] + real (kind=kind_phys), intent(in) :: fcrmax!maximum fcr (-) + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: sice !soil ice content [m3/m3] + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: zsoil !depth of soil layer-bottom [m] + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: wcnd !hydraulic conductivity (m/s) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: stc !snow/soil temperature (k) ! input and output - real, dimension( 1:nsoil), intent(inout) :: sh2o !liquid soil water [m3/m3] - real, intent(inout) :: zwt !the depth to water table [m] - real, intent(inout) :: wa !water storage in aquifer [mm] - real, intent(inout) :: wt !water storage in aquifer + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sh2o !liquid soil water [m3/m3] + real (kind=kind_phys), intent(inout) :: zwt !the depth to water table [m] + real (kind=kind_phys), intent(inout) :: wa !water storage in aquifer [mm] + real (kind=kind_phys), intent(inout) :: wt !water storage in aquifer !+ saturated soil [mm] ! output - real, intent(out) :: qin !groundwater recharge [mm/s] - real, intent(out) :: qdis !groundwater discharge [mm/s] + real (kind=kind_phys), intent(out) :: qin !groundwater recharge [mm/s] + real (kind=kind_phys), intent(out) :: qdis !groundwater discharge [mm/s] ! local - real :: fff !runoff decay factor (m-1) - real :: rsbmx !baseflow coefficient [mm/s] + real (kind=kind_phys) :: fff !runoff decay factor (m-1) + real (kind=kind_phys) :: rsbmx !baseflow coefficient [mm/s] integer :: iz !do-loop index integer :: iwt !layer index above water table layer - real, dimension( 1:nsoil) :: dzmm !layer thickness [mm] - real, dimension( 1:nsoil) :: znode !node depth [m] - real, dimension( 1:nsoil) :: mliq !liquid water mass [kg/m2 or mm] - real, dimension( 1:nsoil) :: epore !effective porosity [-] - real, dimension( 1:nsoil) :: hk !hydraulic conductivity [mm/s] - real, dimension( 1:nsoil) :: smc !total soil water content [m3/m3] - real(kind=8) :: s_node!degree of saturation of iwt layer - real :: dzsum !cumulative depth above water table [m] - real :: smpfz !matric potential (frozen effects) [mm] - real :: ka !aquifer hydraulic conductivity [mm/s] - real :: wh_zwt!water head at water table [mm] - real :: wh !water head at layer above zwt [mm] - real :: ws !water used to fill air pore [mm] - real :: wtsub !sum of hk*dzmm - real :: watmin!minimum soil vol soil moisture [m3/m3] - real :: xs !excessive water above saturation [mm] - real, parameter :: rous = 0.2 !specific yield [-] - real, parameter :: cmic = 0.20 !microprore content (0.0-1.0) + real (kind=kind_phys), dimension( 1:nsoil) :: dzmm !layer thickness [mm] + real (kind=kind_phys), dimension( 1:nsoil) :: znode !node depth [m] + real (kind=kind_phys), dimension( 1:nsoil) :: mliq !liquid water mass [kg/m2 or mm] + real (kind=kind_phys), dimension( 1:nsoil) :: epore !effective porosity [-] + real (kind=kind_phys), dimension( 1:nsoil) :: hk !hydraulic conductivity [mm/s] + real (kind=kind_phys), dimension( 1:nsoil) :: smc !total soil water content [m3/m3] + real (kind=kind_phys) :: s_node!degree of saturation of iwt layer + real (kind=kind_phys) :: dzsum !cumulative depth above water table [m] + real (kind=kind_phys) :: smpfz !matric potential (frozen effects) [mm] + real (kind=kind_phys) :: ka !aquifer hydraulic conductivity [mm/s] + real (kind=kind_phys) :: wh_zwt!water head at water table [mm] + real (kind=kind_phys) :: wh !water head at layer above zwt [mm] + real (kind=kind_phys) :: ws !water used to fill air pore [mm] + real (kind=kind_phys) :: wtsub !sum of hk*dzmm + real (kind=kind_phys) :: watmin!minimum soil vol soil moisture [m3/m3] + real (kind=kind_phys) :: xs !excessive water above saturation [mm] + real (kind=kind_phys), parameter :: rous = 0.2 !specific yield [-] + real (kind=kind_phys), parameter :: cmic = 0.20 !microprore content (0.0-1.0) !0.0-close to free drainage ! ------------------------------------------------------------- qdis = 0.0 @@ -7725,7 +8001,7 @@ subroutine groundwater(parameters,nsnow ,nsoil ,dt ,sice ,zsoil , & !in do iz = 1, nsoil smc(iz) = sh2o(iz) + sice(iz) mliq(iz) = sh2o(iz) * dzmm(iz) - epore(iz) = max(0.01,parameters%smcmax - sice(iz)) + epore(iz) = max(0.01,parameters%smcmax(iz) - sice(iz)) hk(iz) = 1.e3*wcnd(iz) enddo @@ -7749,9 +8025,9 @@ subroutine groundwater(parameters,nsnow ,nsoil ,dt ,sice ,zsoil , & !in ! matric potential at the layer above the water table - s_node = min(1.0,smc(iwt)/parameters%smcmax ) + s_node = min(1.0,smc(iwt)/parameters%smcmax(iwt) ) s_node = max(s_node,real(0.01,kind=8)) - smpfz = -parameters%psisat*1000.*s_node**(-parameters%bexp) ! m --> mm + smpfz = -parameters%psisat(iwt)*1000.*s_node**(-parameters%bexp(iwt)) ! m --> mm smpfz = max(-120000.0,cmic*smpfz) ! recharge rate qin to groundwater @@ -7835,6 +8111,8 @@ end subroutine groundwater !== begin shallowwatertable ======================================================================== !>\ingroup NoahMP_LSM +!! diagnoses water table depth and computes recharge when the water table is +!! within the resolved soil layers, according to the miguez-macho&fan scheme. subroutine shallowwatertable (parameters,nsnow ,nsoil ,zsoil, dt , & !in dzsnso ,smceq ,iloc ,jloc , & !in smc ,wtd ,smcwtd ,rech, qdrain ) !inout @@ -7849,26 +8127,26 @@ subroutine shallowwatertable (parameters,nsnow ,nsoil ,zsoil, dt , & !in integer, intent(in) :: nsnow !maximum no. of snow layers integer, intent(in) :: nsoil !no. of soil layers integer, intent(in) :: iloc,jloc - real, intent(in) :: dt - real, dimension( 1:nsoil), intent(in) :: zsoil !depth of soil layer-bottom [m] - real, dimension(-nsnow+1:nsoil), intent(in) :: dzsnso ! snow/soil layer thickness [m] - real, dimension( 1:nsoil), intent(in) :: smceq !equilibrium soil water content [m3/m3] + real (kind=kind_phys), intent(in) :: dt + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: zsoil !depth of soil layer-bottom [m] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso ! snow/soil layer thickness [m] + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: smceq !equilibrium soil water content [m3/m3] ! input and output - real, dimension( 1:nsoil), intent(inout) :: smc !total soil water content [m3/m3] - real, intent(inout) :: wtd !the depth to water table [m] - real, intent(inout) :: smcwtd !soil moisture between bottom of the soil and the water table [m3/m3] - real, intent(out) :: rech ! groundwater recharge (net vertical flux across the water table), positive up - real, intent(inout) :: qdrain + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: smc !total soil water content [m3/m3] + real (kind=kind_phys), intent(inout) :: wtd !the depth to water table [m] + real (kind=kind_phys), intent(inout) :: smcwtd !soil moisture between bottom of the soil and the water table [m3/m3] + real (kind=kind_phys), intent(out) :: rech ! groundwater recharge (net vertical flux across the water table), positive up + real (kind=kind_phys), intent(inout) :: qdrain ! local integer :: iz !do-loop index integer :: iwtd !layer index above water table layer integer :: kwtd !layer index where the water table layer is - real :: wtdold - real :: dzup - real :: smceqdeep - real, dimension( 0:nsoil) :: zsoil0 + real (kind=kind_phys) :: wtdold + real (kind=kind_phys) :: dzup + real (kind=kind_phys) :: smceqdeep + real (kind=kind_phys), dimension( 0:nsoil) :: zsoil0 ! ------------------------------------------------------------- @@ -7887,30 +8165,30 @@ subroutine shallowwatertable (parameters,nsnow ,nsoil ,zsoil, dt , & !in wtdold=wtd if(smc(kwtd).gt.smceq(kwtd))then - if(smc(kwtd).eq.parameters%smcmax)then !wtd went to the layer above + if(smc(kwtd).eq.parameters%smcmax(kwtd))then !wtd went to the layer above wtd=zsoil0(iwtd) - rech=-(wtdold-wtd) * (parameters%smcmax-smceq(kwtd)) + rech=-(wtdold-wtd) * (parameters%smcmax(kwtd)-smceq(kwtd)) iwtd=iwtd-1 kwtd=kwtd-1 if(kwtd.ge.1)then if(smc(kwtd).gt.smceq(kwtd))then wtdold=wtd wtd = min( ( smc(kwtd)*dzsnso(kwtd) & - - smceq(kwtd)*zsoil0(iwtd) + parameters%smcmax*zsoil0(kwtd) ) / & - ( parameters%smcmax-smceq(kwtd) ), zsoil0(iwtd)) - rech=rech-(wtdold-wtd) * (parameters%smcmax-smceq(kwtd)) + - smceq(kwtd)*zsoil0(iwtd) + parameters%smcmax(kwtd)*zsoil0(kwtd) ) / & + ( parameters%smcmax(kwtd)-smceq(kwtd) ), zsoil0(iwtd)) + rech=rech-(wtdold-wtd) * (parameters%smcmax(kwtd)-smceq(kwtd)) endif endif else !wtd stays in the layer wtd = min( ( smc(kwtd)*dzsnso(kwtd) & - - smceq(kwtd)*zsoil0(iwtd) + parameters%smcmax*zsoil0(kwtd) ) / & - ( parameters%smcmax-smceq(kwtd) ), zsoil0(iwtd)) - rech=-(wtdold-wtd) * (parameters%smcmax-smceq(kwtd)) + - smceq(kwtd)*zsoil0(iwtd) + parameters%smcmax(kwtd)*zsoil0(kwtd) ) / & + ( parameters%smcmax(kwtd)-smceq(kwtd) ), zsoil0(iwtd)) + rech=-(wtdold-wtd) * (parameters%smcmax(kwtd)-smceq(kwtd)) endif else !wtd has gone down to the layer below wtd=zsoil0(kwtd) - rech=-(wtdold-wtd) * (parameters%smcmax-smceq(kwtd)) + rech=-(wtdold-wtd) * (parameters%smcmax(kwtd)-smceq(kwtd)) kwtd=kwtd+1 iwtd=iwtd+1 !wtd crossed to the layer below. now adjust it there @@ -7918,13 +8196,13 @@ subroutine shallowwatertable (parameters,nsnow ,nsoil ,zsoil, dt , & !in wtdold=wtd if(smc(kwtd).gt.smceq(kwtd))then wtd = min( ( smc(kwtd)*dzsnso(kwtd) & - - smceq(kwtd)*zsoil0(iwtd) + parameters%smcmax*zsoil0(kwtd) ) / & - ( parameters%smcmax-smceq(kwtd) ) , zsoil0(iwtd) ) + - smceq(kwtd)*zsoil0(iwtd) + parameters%smcmax(kwtd)*zsoil0(kwtd) ) / & + ( parameters%smcmax(kwtd)-smceq(kwtd) ) , zsoil0(iwtd) ) else wtd=zsoil0(kwtd) endif rech = rech - (wtdold-wtd) * & - (parameters%smcmax-smceq(kwtd)) + (parameters%smcmax(kwtd)-smceq(kwtd)) else wtdold=wtd @@ -7933,38 +8211,42 @@ subroutine shallowwatertable (parameters,nsnow ,nsoil ,zsoil, dt , & !in ! qdrain = qdrain - 1000 * (smceq(nsoil)-smc(nsoil)) * dzsnso(nsoil) / dt ! smc(nsoil)=smceq(nsoil) !adjust wtd in the ficticious layer below - smceqdeep = parameters%smcmax * ( -parameters%psisat / ( -parameters%psisat - dzsnso(nsoil) ) ) ** (1./parameters%bexp) + smceqdeep = parameters%smcmax(nsoil) * ( -parameters%psisat(nsoil) / ( -parameters%psisat(nsoil) - dzsnso(nsoil) ) ) ** (1./parameters%bexp(nsoil)) wtd = min( ( smcwtd*dzsnso(nsoil) & - - smceqdeep*zsoil0(nsoil) + parameters%smcmax*(zsoil0(nsoil)-dzsnso(nsoil)) ) / & - ( parameters%smcmax-smceqdeep ) , zsoil0(nsoil) ) + - smceqdeep*zsoil0(nsoil) + parameters%smcmax(nsoil)*(zsoil0(nsoil)-dzsnso(nsoil)) ) / & + ( parameters%smcmax(nsoil)-smceqdeep ) , zsoil0(nsoil) ) rech = rech - (wtdold-wtd) * & - (parameters%smcmax-smceqdeep) + (parameters%smcmax(nsoil)-smceqdeep) endif endif elseif(wtd.ge.zsoil0(nsoil)-dzsnso(nsoil))then !if wtd was already below the bottom of the resolved soil crust wtdold=wtd - smceqdeep = parameters%smcmax * ( -parameters%psisat / ( -parameters%psisat - dzsnso(nsoil) ) ) ** (1./parameters%bexp) + smceqdeep = parameters%smcmax(nsoil) * ( -parameters%psisat(nsoil) / ( -parameters%psisat(nsoil) - dzsnso(nsoil) ) ) ** (1./parameters%bexp(nsoil)) if(smcwtd.gt.smceqdeep)then wtd = min( ( smcwtd*dzsnso(nsoil) & - - smceqdeep*zsoil0(nsoil) + parameters%smcmax*(zsoil0(nsoil)-dzsnso(nsoil)) ) / & - ( parameters%smcmax-smceqdeep ) , zsoil0(nsoil) ) - rech = -(wtdold-wtd) * (parameters%smcmax-smceqdeep) + - smceqdeep*zsoil0(nsoil) + parameters%smcmax(nsoil)*(zsoil0(nsoil)-dzsnso(nsoil)) ) / & + ( parameters%smcmax(nsoil)-smceqdeep ) , zsoil0(nsoil) ) + rech = -(wtdold-wtd) * (parameters%smcmax(nsoil)-smceqdeep) else - rech = -(wtdold-(zsoil0(nsoil)-dzsnso(nsoil))) * (parameters%smcmax-smceqdeep) + rech = -(wtdold-(zsoil0(nsoil)-dzsnso(nsoil))) * (parameters%smcmax(nsoil)-smceqdeep) wtdold=zsoil0(nsoil)-dzsnso(nsoil) !and now even further down - dzup=(smceqdeep-smcwtd)*dzsnso(nsoil)/(parameters%smcmax-smceqdeep) + dzup=(smceqdeep-smcwtd)*dzsnso(nsoil)/(parameters%smcmax(nsoil)-smceqdeep) wtd=wtdold-dzup - rech = rech - (parameters%smcmax-smceqdeep)*dzup + rech = rech - (parameters%smcmax(nsoil)-smceqdeep)*dzup smcwtd=smceqdeep endif endif -if(iwtd.lt.nsoil)smcwtd=parameters%smcmax +if(iwtd.lt.nsoil .and. iwtd.gt.0) then + smcwtd=parameters%smcmax(iwtd) +elseif(iwtd.lt.nsoil .and. iwtd.le.0) then + smcwtd=parameters%smcmax(1) +end if end subroutine shallowwatertable @@ -7993,51 +8275,51 @@ subroutine carbon (parameters,nsnow ,nsoil ,vegtyp ,dt ,zsoil , & !in integer , intent(in) :: vegtyp !vegetation type integer , intent(in) :: nsnow !number of snow layers integer , intent(in) :: nsoil !number of soil layers - real , intent(in) :: lat !latitude (radians) - real , intent(in) :: dt !time step (s) - real, dimension( 1:nsoil), intent(in) :: zsoil !depth of layer-bottom from soil surface - real, dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer thickness [m] - real, dimension(-nsnow+1:nsoil), intent(in) :: stc !snow/soil temperature [k] - real, dimension( 1:nsoil), intent(in) :: smc !soil moisture (ice + liq.) [m3/m3] - real , intent(in) :: tv !vegetation temperature (k) - real , intent(in) :: tg !ground temperature (k) - real , intent(in) :: foln !foliage nitrogen (%) - real , intent(in) :: btran !soil water transpiration factor (0 to 1) - real , intent(in) :: psn !total leaf photosyn (umolco2/m2/s) [+] - real , intent(in) :: apar !par by canopy (w/m2) - real , intent(in) :: igs !growing season index (0=off, 1=on) - real , intent(in) :: fveg !vegetation greenness fraction - real , intent(in) :: troot !root-zone averaged temperature (k) + real (kind=kind_phys) , intent(in) :: lat !latitude (radians) + real (kind=kind_phys) , intent(in) :: dt !time step (s) + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: zsoil !depth of layer-bottom from soil surface + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer thickness [m] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: stc !snow/soil temperature [k] + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: smc !soil moisture (ice + liq.) [m3/m3] + real (kind=kind_phys) , intent(in) :: tv !vegetation temperature (k) + real (kind=kind_phys) , intent(in) :: tg !ground temperature (k) + real (kind=kind_phys) , intent(in) :: foln !foliage nitrogen (%) + real (kind=kind_phys) , intent(in) :: btran !soil water transpiration factor (0 to 1) + real (kind=kind_phys) , intent(in) :: psn !total leaf photosyn (umolco2/m2/s) [+] + real (kind=kind_phys) , intent(in) :: apar !par by canopy (w/m2) + real (kind=kind_phys) , intent(in) :: igs !growing season index (0=off, 1=on) + real (kind=kind_phys) , intent(in) :: fveg !vegetation greenness fraction + real (kind=kind_phys) , intent(in) :: troot !root-zone averaged temperature (k) integer , intent(in) :: ist !surface type 1->soil; 2->lake ! input & output (carbon) - real , intent(inout) :: lfmass !leaf mass [g/m2] - real , intent(inout) :: rtmass !mass of fine roots [g/m2] - real , intent(inout) :: stmass !stem mass [g/m2] - real , intent(inout) :: wood !mass of wood (incl. woody roots) [g/m2] - real , intent(inout) :: stblcp !stable carbon in deep soil [g/m2] - real , intent(inout) :: fastcp !short-lived carbon in shallow soil [g/m2] + real (kind=kind_phys) , intent(inout) :: lfmass !leaf mass [g/m2] + real (kind=kind_phys) , intent(inout) :: rtmass !mass of fine roots [g/m2] + real (kind=kind_phys) , intent(inout) :: stmass !stem mass [g/m2] + real (kind=kind_phys) , intent(inout) :: wood !mass of wood (incl. woody roots) [g/m2] + real (kind=kind_phys) , intent(inout) :: stblcp !stable carbon in deep soil [g/m2] + real (kind=kind_phys) , intent(inout) :: fastcp !short-lived carbon in shallow soil [g/m2] ! outputs: (carbon) - real , intent(out) :: gpp !net instantaneous assimilation [g/m2/s c] - real , intent(out) :: npp !net primary productivity [g/m2/s c] - real , intent(out) :: nee !net ecosystem exchange [g/m2/s co2] - real , intent(out) :: autors !net ecosystem respiration [g/m2/s c] - real , intent(out) :: heters !organic respiration [g/m2/s c] - real , intent(out) :: totsc !total soil carbon [g/m2 c] - real , intent(out) :: totlb !total living carbon ([g/m2 c] - real , intent(out) :: xlai !leaf area index [-] - real , intent(out) :: xsai !stem area index [-] -! real , intent(out) :: vocflx(5) ! voc fluxes [ug c m-2 h-1] + real (kind=kind_phys) , intent(out) :: gpp !net instantaneous assimilation [g/m2/s c] + real (kind=kind_phys) , intent(out) :: npp !net primary productivity [g/m2/s c] + real (kind=kind_phys) , intent(out) :: nee !net ecosystem exchange [g/m2/s co2] + real (kind=kind_phys) , intent(out) :: autors !net ecosystem respiration [g/m2/s c] + real (kind=kind_phys) , intent(out) :: heters !organic respiration [g/m2/s c] + real (kind=kind_phys) , intent(out) :: totsc !total soil carbon [g/m2 c] + real (kind=kind_phys) , intent(out) :: totlb !total living carbon ([g/m2 c] + real (kind=kind_phys) , intent(out) :: xlai !leaf area index [-] + real (kind=kind_phys) , intent(out) :: xsai !stem area index [-] +! real (kind=kind_phys) , intent(out) :: vocflx(5) ! voc fluxes [ug c m-2 h-1] ! local variables integer :: j !do-loop index - real :: wroot !root zone soil water [-] - real :: wstres !water stress coeficient [-] (1. for wilting ) - real :: lapm !leaf area per unit mass [m2/g] + real (kind=kind_phys) :: wroot !root zone soil water [-] + real (kind=kind_phys) :: wstres !water stress coeficient [-] (1. for wilting ) + real (kind=kind_phys) :: lapm !leaf area per unit mass [m2/g] ! ------------------------------------------------------------------------------------------ if ( ( vegtyp == parameters%iswater ) .or. ( vegtyp == parameters%isbarren ) .or. & @@ -8069,7 +8351,7 @@ subroutine carbon (parameters,nsnow ,nsoil ,vegtyp ,dt ,zsoil , & !in wroot = 0. do j=1,parameters%nroot - wroot = wroot + smc(j)/parameters%smcmax * dzsnso(j) / (-zsoil(parameters%nroot)) + wroot = wroot + smc(j)/parameters%smcmax(j) * dzsnso(j) / (-zsoil(parameters%nroot)) enddo call co2flux (parameters,nsnow ,nsoil ,vegtyp ,igs ,dt , & !in @@ -8089,6 +8371,8 @@ end subroutine carbon !== begin co2flux ================================================================================== !>\ingroup NoahMP_LSM +!! the original code is from Dickinson et al.(1998), modified by guo-yue niu, +!! 2004 subroutine co2flux (parameters,nsnow ,nsoil ,vegtyp ,igs ,dt , & !in dzsnso ,stc ,psn ,troot ,tv , & !in wroot ,wstres ,foln ,lapm , & !in @@ -8111,102 +8395,102 @@ subroutine co2flux (parameters,nsnow ,nsoil ,vegtyp ,igs ,dt , & !in integer , intent(in) :: vegtyp !vegetation physiology type integer , intent(in) :: nsnow !number of snow layers integer , intent(in) :: nsoil !number of soil layers - real , intent(in) :: dt !time step (s) - real , intent(in) :: lat !latitude (radians) - real , intent(in) :: igs !growing season index (0=off, 1=on) - real, dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer thickness [m] - real, dimension(-nsnow+1:nsoil), intent(in) :: stc !snow/soil temperature [k] - real , intent(in) :: psn !total leaf photosynthesis (umolco2/m2/s) - real , intent(in) :: troot !root-zone averaged temperature (k) - real , intent(in) :: tv !leaf temperature (k) - real , intent(in) :: wroot !root zone soil water - real , intent(in) :: wstres !soil water stress - real , intent(in) :: foln !foliage nitrogen (%) - real , intent(in) :: lapm !leaf area per unit mass [m2/g] - real , intent(in) :: fveg !vegetation greenness fraction + real (kind=kind_phys) , intent(in) :: dt !time step (s) + real (kind=kind_phys) , intent(in) :: lat !latitude (radians) + real (kind=kind_phys) , intent(in) :: igs !growing season index (0=off, 1=on) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer thickness [m] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: stc !snow/soil temperature [k] + real (kind=kind_phys) , intent(in) :: psn !total leaf photosynthesis (umolco2/m2/s) + real (kind=kind_phys) , intent(in) :: troot !root-zone averaged temperature (k) + real (kind=kind_phys) , intent(in) :: tv !leaf temperature (k) + real (kind=kind_phys) , intent(in) :: wroot !root zone soil water + real (kind=kind_phys) , intent(in) :: wstres !soil water stress + real (kind=kind_phys) , intent(in) :: foln !foliage nitrogen (%) + real (kind=kind_phys) , intent(in) :: lapm !leaf area per unit mass [m2/g] + real (kind=kind_phys) , intent(in) :: fveg !vegetation greenness fraction ! input and output - real , intent(inout) :: xlai !leaf area index from leaf carbon [-] - real , intent(inout) :: xsai !stem area index from leaf carbon [-] - real , intent(inout) :: lfmass !leaf mass [g/m2] - real , intent(inout) :: rtmass !mass of fine roots [g/m2] - real , intent(inout) :: stmass !stem mass [g/m2] - real , intent(inout) :: fastcp !short lived carbon [g/m2] - real , intent(inout) :: stblcp !stable carbon pool [g/m2] - real , intent(inout) :: wood !mass of wood (incl. woody roots) [g/m2] + real (kind=kind_phys) , intent(inout) :: xlai !leaf area index from leaf carbon [-] + real (kind=kind_phys) , intent(inout) :: xsai !stem area index from leaf carbon [-] + real (kind=kind_phys) , intent(inout) :: lfmass !leaf mass [g/m2] + real (kind=kind_phys) , intent(inout) :: rtmass !mass of fine roots [g/m2] + real (kind=kind_phys) , intent(inout) :: stmass !stem mass [g/m2] + real (kind=kind_phys) , intent(inout) :: fastcp !short lived carbon [g/m2] + real (kind=kind_phys) , intent(inout) :: stblcp !stable carbon pool [g/m2] + real (kind=kind_phys) , intent(inout) :: wood !mass of wood (incl. woody roots) [g/m2] ! output - real , intent(out) :: gpp !net instantaneous assimilation [g/m2/s] - real , intent(out) :: npp !net primary productivity [g/m2] - real , intent(out) :: nee !net ecosystem exchange (autors+heters-gpp) - real , intent(out) :: autors !net ecosystem resp. (maintance and growth) - real , intent(out) :: heters !organic respiration - real , intent(out) :: totsc !total soil carbon (g/m2) - real , intent(out) :: totlb !total living carbon (g/m2) + real (kind=kind_phys) , intent(out) :: gpp !net instantaneous assimilation [g/m2/s] + real (kind=kind_phys) , intent(out) :: npp !net primary productivity [g/m2] + real (kind=kind_phys) , intent(out) :: nee !net ecosystem exchange (autors+heters-gpp) + real (kind=kind_phys) , intent(out) :: autors !net ecosystem resp. (maintance and growth) + real (kind=kind_phys) , intent(out) :: heters !organic respiration + real (kind=kind_phys) , intent(out) :: totsc !total soil carbon (g/m2) + real (kind=kind_phys) , intent(out) :: totlb !total living carbon (g/m2) ! local - real :: cflux !carbon flux to atmosphere [g/m2/s] - real :: lfmsmn !minimum leaf mass [g/m2] - real :: rswood !wood respiration [g/m2] - real :: rsleaf !leaf maintenance respiration per timestep [g/m2] - real :: rsroot !fine root respiration per time step [g/m2] - real :: nppl !leaf net primary productivity [g/m2/s] - real :: nppr !root net primary productivity [g/m2/s] - real :: nppw !wood net primary productivity [g/m2/s] - real :: npps !wood net primary productivity [g/m2/s] - real :: dielf !death of leaf mass per time step [g/m2] - - real :: addnpplf !leaf assimil after resp. losses removed [g/m2] - real :: addnppst !stem assimil after resp. losses removed [g/m2] - real :: carbfx !carbon assimilated per model step [g/m2] - real :: grleaf !growth respiration rate for leaf [g/m2/s] - real :: grroot !growth respiration rate for root [g/m2/s] - real :: grwood !growth respiration rate for wood [g/m2/s] - real :: grstem !growth respiration rate for stem [g/m2/s] - real :: leafpt !fraction of carbon allocated to leaves [-] - real :: lfdel !maximum leaf mass available to change [g/m2/s] - real :: lftovr !stem turnover per time step [g/m2] - real :: sttovr !stem turnover per time step [g/m2] - real :: wdtovr !wood turnover per time step [g/m2] - real :: rssoil !soil respiration per time step [g/m2] - real :: rttovr !root carbon loss per time step by turnover [g/m2] - real :: stablc !decay rate of fast carbon to slow carbon [g/m2/s] - real :: woodf !calculated wood to root ratio [-] - real :: nonlef !fraction of carbon to root and wood [-] - real :: rootpt !fraction of carbon flux to roots [-] - real :: woodpt !fraction of carbon flux to wood [-] - real :: stempt !fraction of carbon flux to stem [-] - real :: resp !leaf respiration [umol/m2/s] - real :: rsstem !stem respiration [g/m2/s] - - real :: fsw !soil water factor for microbial respiration - real :: fst !soil temperature factor for microbial respiration - real :: fnf !foliage nitrogen adjustemt to respiration (<= 1) - real :: tf !temperature factor - real :: rf !respiration reduction factor (<= 1) - real :: stdel - real :: stmsmn - real :: sapm !stem area per unit mass (m2/g) - real :: diest + real (kind=kind_phys) :: cflux !carbon flux to atmosphere [g/m2/s] + real (kind=kind_phys) :: lfmsmn !minimum leaf mass [g/m2] + real (kind=kind_phys) :: rswood !wood respiration [g/m2] + real (kind=kind_phys) :: rsleaf !leaf maintenance respiration per timestep [g/m2] + real (kind=kind_phys) :: rsroot !fine root respiration per time step [g/m2] + real (kind=kind_phys) :: nppl !leaf net primary productivity [g/m2/s] + real (kind=kind_phys) :: nppr !root net primary productivity [g/m2/s] + real (kind=kind_phys) :: nppw !wood net primary productivity [g/m2/s] + real (kind=kind_phys) :: npps !wood net primary productivity [g/m2/s] + real (kind=kind_phys) :: dielf !death of leaf mass per time step [g/m2] + + real (kind=kind_phys) :: addnpplf !leaf assimil after resp. losses removed [g/m2] + real (kind=kind_phys) :: addnppst !stem assimil after resp. losses removed [g/m2] + real (kind=kind_phys) :: carbfx !carbon assimilated per model step [g/m2] + real (kind=kind_phys) :: grleaf !growth respiration rate for leaf [g/m2/s] + real (kind=kind_phys) :: grroot !growth respiration rate for root [g/m2/s] + real (kind=kind_phys) :: grwood !growth respiration rate for wood [g/m2/s] + real (kind=kind_phys) :: grstem !growth respiration rate for stem [g/m2/s] + real (kind=kind_phys) :: leafpt !fraction of carbon allocated to leaves [-] + real (kind=kind_phys) :: lfdel !maximum leaf mass available to change [g/m2/s] + real (kind=kind_phys) :: lftovr !stem turnover per time step [g/m2] + real (kind=kind_phys) :: sttovr !stem turnover per time step [g/m2] + real (kind=kind_phys) :: wdtovr !wood turnover per time step [g/m2] + real (kind=kind_phys) :: rssoil !soil respiration per time step [g/m2] + real (kind=kind_phys) :: rttovr !root carbon loss per time step by turnover [g/m2] + real (kind=kind_phys) :: stablc !decay rate of fast carbon to slow carbon [g/m2/s] + real (kind=kind_phys) :: woodf !calculated wood to root ratio [-] + real (kind=kind_phys) :: nonlef !fraction of carbon to root and wood [-] + real (kind=kind_phys) :: rootpt !fraction of carbon flux to roots [-] + real (kind=kind_phys) :: woodpt !fraction of carbon flux to wood [-] + real (kind=kind_phys) :: stempt !fraction of carbon flux to stem [-] + real (kind=kind_phys) :: resp !leaf respiration [umol/m2/s] + real (kind=kind_phys) :: rsstem !stem respiration [g/m2/s] + + real (kind=kind_phys) :: fsw !soil water factor for microbial respiration + real (kind=kind_phys) :: fst !soil temperature factor for microbial respiration + real (kind=kind_phys) :: fnf !foliage nitrogen adjustemt to respiration (<= 1) + real (kind=kind_phys) :: tf !temperature factor + real (kind=kind_phys) :: rf !respiration reduction factor (<= 1) + real (kind=kind_phys) :: stdel + real (kind=kind_phys) :: stmsmn + real (kind=kind_phys) :: sapm !stem area per unit mass (m2/g) + real (kind=kind_phys) :: diest ! -------------------------- constants ------------------------------- - real :: bf !parameter for present wood allocation [-] - real :: rswoodc !wood respiration coeficient [1/s] - real :: stovrc !stem turnover coefficient [1/s] - real :: rsdryc !degree of drying that reduces soil respiration [-] - real :: rtovrc !root turnover coefficient [1/s] - real :: wstrc !water stress coeficient [-] - real :: laimin !minimum leaf area index [m2/m2] - real :: xsamin !minimum leaf area index [m2/m2] - real :: sc - real :: sd - real :: vegfrac + real (kind=kind_phys) :: bf !parameter for present wood allocation [-] + real (kind=kind_phys) :: rswoodc !wood respiration coeficient [1/s] + real (kind=kind_phys) :: stovrc !stem turnover coefficient [1/s] + real (kind=kind_phys) :: rsdryc !degree of drying that reduces soil respiration [-] + real (kind=kind_phys) :: rtovrc !root turnover coefficient [1/s] + real (kind=kind_phys) :: wstrc !water stress coeficient [-] + real (kind=kind_phys) :: laimin !minimum leaf area index [m2/m2] + real (kind=kind_phys) :: xsamin !minimum leaf area index [m2/m2] + real (kind=kind_phys) :: sc + real (kind=kind_phys) :: sd + real (kind=kind_phys) :: vegfrac ! respiration as a function of temperature - real :: r,x + real (kind=kind_phys) :: r,x r(x) = exp(0.08*(x-298.16)) ! --------------------------------------------------------------------------------- @@ -8257,10 +8541,10 @@ subroutine co2flux (parameters,nsnow ,nsoil ,vegtyp ,igs ,dt , & !in ! fraction of carbon into wood versus root - if(wood.gt.0) then + if(wood > 1.e-6) then woodf = (1.-exp(-bf*(parameters%wrrat*rtmass/wood))/bf)*parameters%wdpool else - woodf = 0. + woodf = parameters%wdpool endif rootpt = nonlef*(1.-woodf) @@ -8359,6 +8643,589 @@ subroutine co2flux (parameters,nsnow ,nsoil ,vegtyp ,igs ,dt , & !in end subroutine co2flux +!== begin carbon_crop ============================================================================== +!>\ingroup NoahMP_LSM +!! initial crop version created by xing liu +!! initial crop version added by barlage v3.8 + subroutine carbon_crop (parameters,nsnow ,nsoil ,vegtyp ,dt ,zsoil ,julian , & !in + dzsnso ,stc ,smc ,tv ,psn ,foln ,btran , & !in + soldn ,t2m , & !in + lfmass ,rtmass ,stmass ,wood ,stblcp ,fastcp ,grain , & !inout + xlai ,xsai ,gdd , & !inout + gpp ,npp ,nee ,autors ,heters ,totsc ,totlb, pgs ) !out +! ------------------------------------------------------------------------------------------ +! initial crop version created by xing liu +! initial crop version added by barlage v3.8 + +! ------------------------------------------------------------------------------------------ + implicit none +! ------------------------------------------------------------------------------------------ +! inputs (carbon) + + type (noahmp_parameters), intent(in) :: parameters + integer , intent(in) :: nsnow !number of snow layers + integer , intent(in) :: nsoil !number of soil layers + integer , intent(in) :: vegtyp !vegetation type + real (kind=kind_phys) , intent(in) :: dt !time step (s) + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: zsoil !depth of layer-bottomfrom soil surface + real (kind=kind_phys) , intent(in) :: julian !julian day of year(fractional) ( 0 <= julian < yearlen ) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layerthickness [m] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: stc !snow/soil temperature[k] + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: smc !soil moisture (ice +liq.) [m3/m3] + real (kind=kind_phys) , intent(in) :: tv !vegetation temperature(k) + real (kind=kind_phys) , intent(in) :: psn !total leaf photosyn(umolco2/m2/s) [+] + real (kind=kind_phys) , intent(in) :: foln !foliage nitrogen (%) + real (kind=kind_phys) , intent(in) :: btran !soil watertranspiration factor (0 to 1) + real (kind=kind_phys) , intent(in) :: soldn !downward solar radiation + real (kind=kind_phys) , intent(in) :: t2m !air temperature + +! input & output (carbon) + + real (kind=kind_phys) , intent(inout) :: lfmass !leaf mass [g/m2] + real (kind=kind_phys) , intent(inout) :: rtmass !mass of fine roots[g/m2] + real (kind=kind_phys) , intent(inout) :: stmass !stem mass [g/m2] + real (kind=kind_phys) , intent(inout) :: wood !mass of wood (incl.woody roots) [g/m2] + real (kind=kind_phys) , intent(inout) :: stblcp !stable carbon in deepsoil [g/m2] + real (kind=kind_phys) , intent(inout) :: fastcp !short-lived carbon inshallow soil [g/m2] + real (kind=kind_phys) , intent(inout) :: grain !mass of grain [g/m2] + real (kind=kind_phys) , intent(inout) :: xlai !leaf area index [-] + real (kind=kind_phys) , intent(inout) :: xsai !stem area index [-] + real (kind=kind_phys) , intent(inout) :: gdd !growing degree days + +! outout + real (kind=kind_phys) , intent(out) :: gpp !net instantaneous assimilation [g/m2/s c] + real (kind=kind_phys) , intent(out) :: npp !net primary productivity [g/m2/s c] + real (kind=kind_phys) , intent(out) :: nee !net ecosystem exchange[g/m2/s co2] + real (kind=kind_phys) , intent(out) :: autors !net ecosystem respiration [g/m2/s c] + real (kind=kind_phys) , intent(out) :: heters !organic respiration[g/m2/s c] + real (kind=kind_phys) , intent(out) :: totsc !total soil carbon [g/m2c] + real (kind=kind_phys) , intent(out) :: totlb !total living carbon ([g/m2 c] + +! local variables + + integer :: j !do-loop index + real (kind=kind_phys) :: wroot !root zone soil water [-] + real (kind=kind_phys) :: wstres !water stress coeficient [-] (1. for wilting ) + integer :: ipa !planting index + integer :: iha !havestindex(0=on,1=off) + integer, intent(out) :: pgs !plant growth stage + + real (kind=kind_phys) :: psncrop + +! ------------------------------------------------------------------------------------------ + if ( ( vegtyp == parameters%iswater ) .or. ( vegtyp == parameters%isbarren ) .or. & + ( vegtyp == parameters%isice ) .or. (parameters%urban_flag) ) then + xlai = 0. + xsai = 0. + gpp = 0. + npp = 0. + nee = 0. + autors = 0. + heters = 0. + totsc = 0. + totlb = 0. + lfmass = 0. + rtmass = 0. + stmass = 0. + wood = 0. + stblcp = 0. + fastcp = 0. + grain = 0. + return + end if + +! water stress + + + wstres = 1.- btran + + wroot = 0. + do j=1,parameters%nroot + wroot = wroot + smc(j)/parameters%smcmax(j) * dzsnso(j) / (-zsoil(parameters%nroot)) + enddo + + call psn_crop ( parameters, & !in + soldn, xlai, t2m, & !in + psncrop ) !out + + call growing_gdd (parameters, & !in + t2m , dt, julian, & !in + gdd , & !inout + ipa , iha, pgs) !out + + call co2flux_crop (parameters, & !in + dt ,stc(1) ,psn ,tv ,wroot ,wstres ,foln , & !in + ipa ,iha ,pgs , & !in xing + xlai ,xsai ,lfmass ,rtmass ,stmass , & !inout + fastcp ,stblcp ,wood ,grain ,gdd , & !inout + gpp ,npp ,nee ,autors ,heters , & !out + totsc ,totlb ) !out + + end subroutine carbon_crop + +!== begin co2flux_crop ============================================================================= +!>\ingroup NoahMP_LSM +!! the original code from re dickinson et al.(1998) and guo-yue niu (2004), +!! modified by xing liu, 2014. + subroutine co2flux_crop (parameters, & !in + dt ,stc ,psn ,tv ,wroot ,wstres ,foln , & !in + ipa ,iha ,pgs , & !in xing + xlai ,xsai ,lfmass ,rtmass ,stmass , & !inout + fastcp ,stblcp ,wood ,grain ,gdd, & !inout + gpp ,npp ,nee ,autors ,heters , & !out + totsc ,totlb ) !out +! ----------------------------------------------------------------------------------------- +! the original code from re dickinson et al.(1998) and guo-yue niu(2004), +! modified by xing liu, 2014. +! +! ----------------------------------------------------------------------------------------- + implicit none +! ----------------------------------------------------------------------------------------- + +! input + + type (noahmp_parameters), intent(in) :: parameters + real (kind=kind_phys) , intent(in) :: dt !time step (s) + real (kind=kind_phys) , intent(in) :: stc !soil temperature[k] + real (kind=kind_phys) , intent(in) :: psn !total leaf photosynthesis (umolco2/m2/s) + real (kind=kind_phys) , intent(in) :: tv !leaf temperature (k) + real (kind=kind_phys) , intent(in) :: wroot !root zone soil water + real (kind=kind_phys) , intent(in) :: wstres !soil water stress + real (kind=kind_phys) , intent(in) :: foln !foliage nitrogen (%) + integer , intent(in) :: ipa + integer , intent(in) :: iha + integer , intent(in) :: pgs + +! input and output + + real (kind=kind_phys) , intent(inout) :: xlai !leaf area index from leaf carbon [-] + real (kind=kind_phys) , intent(inout) :: xsai !stem area index from leaf carbon [-] + real (kind=kind_phys) , intent(inout) :: lfmass !leaf mass [g/m2] + real (kind=kind_phys) , intent(inout) :: rtmass !mass of fine roots [g/m2] + real (kind=kind_phys) , intent(inout) :: stmass !stem mass [g/m2] + real (kind=kind_phys) , intent(inout) :: fastcp !short lived carbon [g/m2] + real (kind=kind_phys) , intent(inout) :: stblcp !stable carbon pool [g/m2] + real (kind=kind_phys) , intent(inout) :: wood !mass of wood (incl. woody roots) [g/m2] + real (kind=kind_phys) , intent(inout) :: grain !mass of grain (xing) [g/m2] + real (kind=kind_phys) , intent(inout) :: gdd !growing degree days (xing) + +! output + + real (kind=kind_phys) , intent(out) :: gpp !net instantaneous assimilation [g/m2/s] + real (kind=kind_phys) , intent(out) :: npp !net primary productivity [g/m2] + real (kind=kind_phys) , intent(out) :: nee !net ecosystem exchange (autors+heters-gpp) + real (kind=kind_phys) , intent(out) :: autors !net ecosystem resp. (maintance and growth) + real (kind=kind_phys) , intent(out) :: heters !organic respiration + real (kind=kind_phys) , intent(out) :: totsc !total soil carbon (g/m2) + real (kind=kind_phys) , intent(out) :: totlb !total living carbon (g/m2) + +! local + + real (kind=kind_phys) :: cflux !carbon flux to atmosphere [g/m2/s] + real (kind=kind_phys) :: lfmsmn !minimum leaf mass [g/m2] + real (kind=kind_phys) :: rswood !wood respiration [g/m2] + real (kind=kind_phys) :: rsleaf !leaf maintenance respiration per timestep[g/m2] + real (kind=kind_phys) :: rsroot !fine root respiration per time step [g/m2] + real (kind=kind_phys) :: rsgrain !grain respiration [g/m2] + real (kind=kind_phys) :: nppl !leaf net primary productivity [g/m2/s] + real (kind=kind_phys) :: nppr !root net primary productivity [g/m2/s] + real (kind=kind_phys) :: nppw !wood net primary productivity [g/m2/s] + real (kind=kind_phys) :: npps !wood net primary productivity [g/m2/s] + real (kind=kind_phys) :: nppg !grain net primary productivity [g/m2/s] + real (kind=kind_phys) :: dielf !death of leaf mass per time step [g/m2] + + real (kind=kind_phys) :: addnpplf !leaf assimil after resp. losses removed[g/m2] + real (kind=kind_phys) :: addnppst !stem assimil after resp. losses removed[g/m2] + real (kind=kind_phys) :: carbfx !carbon assimilated per model step [g/m2] + real (kind=kind_phys) :: cbhydrafx!carbonhydrate assimilated per model step [g/m2] + real (kind=kind_phys) :: grleaf !growth respiration rate for leaf [g/m2/s] + real (kind=kind_phys) :: grroot !growth respiration rate for root [g/m2/s] + real (kind=kind_phys) :: grwood !growth respiration rate for wood [g/m2/s] + real (kind=kind_phys) :: grstem !growth respiration rate for stem [g/m2/s] + real (kind=kind_phys) :: grgrain !growth respiration rate for stem [g/m2/s] + real (kind=kind_phys) :: leafpt !fraction of carbon allocated to leaves [-] + real (kind=kind_phys) :: lfdel !maximum leaf mass available to change[g/m2/s] + real (kind=kind_phys) :: lftovr !stem turnover per time step [g/m2] + real (kind=kind_phys) :: sttovr !stem turnover per time step [g/m2] + real (kind=kind_phys) :: wdtovr !wood turnover per time step [g/m2] + real (kind=kind_phys) :: grtovr !grainturnover per time step [g/m2] + real (kind=kind_phys) :: rssoil !soil respiration per time step [g/m2] + real (kind=kind_phys) :: rttovr !root carbon loss per time step by turnover[g/m2] + real (kind=kind_phys) :: stablc !decay rate of fast carbon to slow carbon[g/m2/s] + real (kind=kind_phys) :: woodf !calculated wood to root ratio [-] + real (kind=kind_phys) :: nonlef !fraction of carbon to root and wood [-] + real (kind=kind_phys) :: resp !leaf respiration [umol/m2/s] + real (kind=kind_phys) :: rsstem !stem respiration [g/m2/s] + + real (kind=kind_phys) :: fsw !soil water factor for microbial respiration + real (kind=kind_phys) :: fst !soil temperature factor for microbialrespiration + real (kind=kind_phys) :: fnf !foliage nitrogen adjustemt to respiration(<= 1) + real (kind=kind_phys) :: tf !temperature factor + real (kind=kind_phys) :: stdel + real (kind=kind_phys) :: stmsmn + real (kind=kind_phys) :: sapm !stem area per unit mass (m2/g) + real (kind=kind_phys) :: diest + real (kind=kind_phys) :: stconvert !stem to grain conversion [g/m2/s] + real (kind=kind_phys) :: rtconvert !root to grain conversion [g/m2/s] +! -------------------------- constants ------------------------------- + real (kind=kind_phys) :: bf !parameter for present wood allocation [-] + real (kind=kind_phys) :: rswoodc !wood respiration coeficient [1/s] + real (kind=kind_phys) :: stovrc !stem turnover coefficient [1/s] + real (kind=kind_phys) :: rsdryc !degree of drying that reduces soilrespiration [-] + real (kind=kind_phys) :: rtovrc !root turnover coefficient [1/s] + real (kind=kind_phys) :: wstrc !water stress coeficient [-] + real (kind=kind_phys) :: laimin !minimum leaf area index [m2/m2] + real (kind=kind_phys) :: xsamin !minimum leaf area index [m2/m2] + real (kind=kind_phys) :: sc + real (kind=kind_phys) :: sd + real (kind=kind_phys) :: vegfrac + real (kind=kind_phys) :: temp + +! respiration as a function of temperature + + real (kind=kind_phys) :: r,x + r(x) = exp(0.08*(x-298.16)) +! --------------------------------------------------------------------------------- + +! constants + rsdryc = 40.0 !original was 40.0 + rswoodc = 3.0e-10 ! + bf = 0.90 !original was 0.90 ! carbon to roots + wstrc = 100.0 + laimin = 0.05 + xsamin = 0.05 + + sapm = 3.*0.001 ! m2/kg -->m2/g + lfmsmn = laimin/0.035 + stmsmn = xsamin/sapm +! --------------------------------------------------------------------------------- + +! carbon assimilation +! 1 mole -> 12 g carbon or 44 g co2 or 30 g ch20 + + carbfx = psn*12.e-6!*ipa !umol co2 /m2/ s -> g/m2/s c + cbhydrafx = psn*30.e-6!*ipa + +! mainteinance respiration + fnf = min( foln/max(1.e-06,parameters%foln_mx), 1.0 ) + tf = parameters%q10mr**( (tv-298.16)/10. ) + resp = parameters%lfmr25 * tf * fnf * xlai * (1.-wstres) ! umol/m2/s + rsleaf = min((lfmass-lfmsmn)/dt,resp*30.e-6) ! g/m2/s + rsroot = parameters%rtmr25*(rtmass*1e-3)*tf * 30.e-6 ! g/m2/s + rsstem = parameters%stmr25*(stmass*1e-3)*tf * 30.e-6 ! g/m2/s + rsgrain = parameters%grainmr25*(grain*1e-3)*tf * 30.e-6 ! g/m2/s + +! calculate growth respiration for leaf, rtmass and grain + + grleaf = max(0.0,parameters%fra_gr*(parameters%lfpt(pgs)*cbhydrafx - rsleaf)) + grstem = max(0.0,parameters%fra_gr*(parameters%stpt(pgs)*cbhydrafx - rsstem)) + grroot = max(0.0,parameters%fra_gr*(parameters%rtpt(pgs)*cbhydrafx - rsroot)) + grgrain = max(0.0,parameters%fra_gr*(parameters%grainpt(pgs)*cbhydrafx - rsgrain)) + +! leaf turnover, stem turnover, root turnover and leaf death caused by soil +! water and soil temperature stress + + lftovr = parameters%lf_ovrc(pgs)*1.e-6*lfmass + rttovr = parameters%rt_ovrc(pgs)*1.e-6*rtmass + sttovr = parameters%st_ovrc(pgs)*1.e-6*stmass + sc = exp(-0.3*max(0.,tv-parameters%lefreez)) * (lfmass/120.) + sd = exp((wstres-1.)*wstrc) + dielf = lfmass*1.e-6*(parameters%dile_fw(pgs) * sd + parameters%dile_fc(pgs)*sc) + +! allocation of cbhydrafx to leaf, stem, root and grain at each growth stage + + + addnpplf = max(0.,parameters%lfpt(pgs)*cbhydrafx - grleaf-rsleaf) + addnpplf = parameters%lfpt(pgs)*cbhydrafx - grleaf-rsleaf + addnppst = max(0.,parameters%stpt(pgs)*cbhydrafx - grstem-rsstem) + addnppst = parameters%stpt(pgs)*cbhydrafx - grstem-rsstem + + +! avoid reducing leaf mass below its minimum value but conserve mass + + lfdel = (lfmass - lfmsmn)/dt + stdel = (stmass - stmsmn)/dt + lftovr = min(lftovr,lfdel+addnpplf) + sttovr = min(sttovr,stdel+addnppst) + dielf = min(dielf,lfdel+addnpplf-lftovr) + +! net primary productivities + + nppl = max(addnpplf,-lfdel) + nppl = addnpplf + npps = max(addnppst,-stdel) + npps = addnppst + nppr = parameters%rtpt(pgs)*cbhydrafx - rsroot - grroot + nppg = parameters%grainpt(pgs)*cbhydrafx - rsgrain - grgrain + +! masses of plant components + + lfmass = lfmass + (nppl-lftovr-dielf)*dt + stmass = stmass + (npps-sttovr)*dt ! g/m2 + rtmass = rtmass + (nppr-rttovr)*dt + grain = grain + nppg*dt + + gpp = cbhydrafx* 0.4 !!g/m2/s c 0.4=12/30, ch20 to c + + stconvert = 0.0 + rtconvert = 0.0 + if(pgs==6) then + stconvert = stmass*(0.00005*dt/3600.0) + stmass = stmass - stconvert + rtconvert = rtmass*(0.0005*dt/3600.0) + rtmass = rtmass - rtconvert + grain = grain + stconvert + rtconvert + end if + + if(rtmass.lt.0.0) then + rttovr = nppr + rtmass = 0.0 + endif + + if(grain.lt.0.0) then + grain = 0.0 + endif + + ! soil carbon budgets + +! if(pgs == 1 .or. pgs == 2 .or. pgs == 8) then +! fastcp=1000 +! else + fastcp = fastcp + (rttovr+lftovr+sttovr+dielf)*dt +! end if + fst = 2.0**( (stc-283.16)/10. ) + fsw = wroot / (0.20+wroot) * 0.23 / (0.23+wroot) + rssoil = fsw * fst * parameters%mrp* max(0.,fastcp*1.e-3)*12.e-6 + + stablc = 0.1*rssoil + fastcp = fastcp - (rssoil + stablc)*dt + stblcp = stblcp + stablc*dt + +! total carbon flux + + cflux = - carbfx + rsleaf + rsroot + rsstem & + + rssoil + grleaf + grroot ! g/m2/s 0.4=12/30, ch20 to c + +! for outputs + !g/m2/s c + + npp = (nppl + npps+ nppr +nppg)*0.4 !!g/m2/s c 0.4=12/30, ch20 to c + + + autors = rsroot + rsgrain + rsleaf + & !g/m2/s c + grleaf + grroot + grgrain !g/m2/s c + + heters = rssoil !g/m2/s c + nee = (autors + heters - gpp)*44./30. !g/m2/s co2 + totsc = fastcp + stblcp !g/m2 c + + totlb = lfmass + rtmass + grain + +! leaf area index and stem area index + + xlai = max(lfmass*parameters%bio2lai,laimin) + xsai = max(stmass*sapm,xsamin) + + +!after harversting +! if(pgs == 8 ) then +! lfmass = 0.62 +! stmass = 0 +! grain = 0 +! end if + +! if(pgs == 1 .or. pgs == 2 .or. pgs == 8) then + if(pgs == 8 .and. (grain > 0. .or. lfmass > 0 .or. stmass > 0 .or. rtmass > 0)) then + xlai = 0.05 + xsai = 0.05 + lfmass = lfmsmn + stmass = stmsmn + rtmass = 0 + grain = 0 + end if + +end subroutine co2flux_crop + +!== begin growing_gdd ============================================================================== +!>\ingroup NoahMP_LSM + subroutine growing_gdd (parameters, & !in + t2m , dt, julian, & !in + gdd , & !inout + ipa, iha, pgs) !out +!=================================================================================================== + +! input + + type (noahmp_parameters), intent(in) :: parameters + real (kind=kind_phys) , intent(in) :: t2m !air temperature + real (kind=kind_phys) , intent(in) :: dt !time step (s) + real (kind=kind_phys) , intent(in) :: julian !julian day of year (fractional) ( 0 <= julian < yearlen ) + +! input and output + + real (kind=kind_phys) , intent(inout) :: gdd !growing degress days + +! output + + integer , intent(out) :: ipa !planting index index(0=off, 1=on) + integer , intent(out) :: iha !havestindex(0=on,1=off) + integer , intent(out) :: pgs !plant growth stage(1=s1,2=s2,3=s3) + +!local + + real (kind=kind_phys) :: gddday !gap bewtween gdd and gdd8 + real (kind=kind_phys) :: dayofs2 !days in stage2 + real (kind=kind_phys) :: tdiff !temperature difference for growing degree days calculation + real (kind=kind_phys) :: tc + + tc = t2m - 273.15 + +!havestindex(0=on,1=off) + + ipa = 1 + iha = 1 + +!turn on/off the planting + + if(julian < parameters%pltday) ipa = 0 + +!turn on/off the harvesting + if(julian >= parameters%hsday) iha = 0 + +!calculate the growing degree days + + if(tc < parameters%gddtbase) then + tdiff = 0.0 + elseif(tc >= parameters%gddtcut) then + tdiff = parameters%gddtcut - parameters%gddtbase + else + tdiff = tc - parameters%gddtbase + end if + + gdd = (gdd + tdiff * dt / 86400.0) * ipa * iha + + gddday = gdd + + ! decide corn growth stage, based on hybrid-maize + ! pgs = 1 : before planting + ! pgs = 2 : from tassel initiation to silking + ! pgs = 3 : from silking to effective grain filling + ! pgs = 4 : from effective grain filling to pysiological maturity + ! pgs = 5 : gddm=1389 + ! pgs = 6 : + ! pgs = 7 : + ! pgs = 8 : + ! gddm = 1389 + ! gddm = 1555 + ! gddsk = 0.41*gddm +145.4+150 !from hybrid-maize + ! gdds1 = ((gddsk-96)/38.9-4)*21 + ! gdds1 = 0.77*gddsk + ! gdds3 = gddsk+170 + ! gdds3 = 170 + + pgs = 1 ! mb: set pgs = 1 (for initialization during growing season when no gdd) + + if(gddday > 0.0) pgs = 2 + + if(gddday >= parameters%gdds1) pgs = 3 + + if(gddday >= parameters%gdds2) pgs = 4 + + if(gddday >= parameters%gdds3) pgs = 5 + + if(gddday >= parameters%gdds4) pgs = 6 + + if(gddday >= parameters%gdds5) pgs = 7 + + if(julian >= parameters%hsday) pgs = 8 + + if(julian < parameters%pltday) pgs = 1 + +end subroutine growing_gdd + +!== begin psn_crop ================================================================================= +!>\ingroup NoahMP_LSM +subroutine psn_crop ( parameters, & !in + soldn, xlai,t2m, & !in + psncrop ) !out +!=================================================================================================== + +! input + + type (noahmp_parameters), intent(in) :: parameters + real (kind=kind_phys) , intent(in) :: soldn ! downward solar radiation + real (kind=kind_phys) , intent(in) :: xlai ! lai + real (kind=kind_phys) , intent(in) :: t2m ! air temp + real (kind=kind_phys) , intent(out) :: psncrop ! + +!local + + real (kind=kind_phys) :: par ! photosynthetically active radiation (w/m2) 1 w m-2 = 0.0864 mj m-2 day-1 + real (kind=kind_phys) :: amax ! maximum co2 assimulation rate g/co2/s + real (kind=kind_phys) :: l1 ! three gaussian method + real (kind=kind_phys) :: l2 ! three gaussian method + real (kind=kind_phys) :: l3 ! three gaussian method + real (kind=kind_phys) :: i1 ! three gaussian method + real (kind=kind_phys) :: i2 ! three gaussian method + real (kind=kind_phys) :: i3 ! three gaussian method + real (kind=kind_phys) :: a1 ! three gaussian method + real (kind=kind_phys) :: a2 ! three gaussian method + real (kind=kind_phys) :: a3 ! three gaussian method + real (kind=kind_phys) :: a ! co2 assimulation + real (kind=kind_phys) :: tc + + tc = t2m - 273.15 + + par = parameters%i2par * soldn * 0.0036 !w to mj m-2 + + if(tc < parameters%tassim0) then + amax = 1e-10 + elseif(tc >= parameters%tassim0 .and. tc < parameters%tassim1) then + amax = (tc - parameters%tassim0) * parameters%aref / (parameters%tassim1 - parameters%tassim0) + elseif(tc >= parameters%tassim1 .and. tc < parameters%tassim2) then + amax = parameters%aref + else + amax= parameters%aref - 0.2 * (t2m - parameters%tassim2) + endif + + amax = max(amax,0.01) + + if(xlai <= 0.05) then + l1 = 0.1127 * 0.05 !use initial lai(0.05), avoid error + l2 = 0.5 * 0.05 + l3 = 0.8873 * 0.05 + else + l1 = 0.1127 * xlai + l2 = 0.5 * xlai + l3 = 0.8873 * xlai + end if + + i1 = parameters%k * par * exp(-parameters%k * l1) + i2 = parameters%k * par * exp(-parameters%k * l2) + i3 = parameters%k * par * exp(-parameters%k * l3) + + i1 = max(i1,1e-10) + i2 = max(i2,1e-10) + i3 = max(i3,1e-10) + + a1 = amax * (1 - exp(-parameters%epsi * i1 / amax)) + a2 = amax * (1 - exp(-parameters%epsi * i2 / amax)) * 1.6 + a3 = amax * (1 - exp(-parameters%epsi * i3 / amax)) + + if (xlai <= 0.05) then + a = (a1+a2+a3) / 3.6 * 0.05 + elseif (xlai > 0.05 .and. xlai <= 4.0) then + a = (a1+a2+a3) / 3.6 * xlai + else + a = (a1+a2+a3) / 3.6 * 4 + end if + + a = a * parameters%psnrf ! attainable + + psncrop = 6.313 * a ! (1/44) * 1000000)/3600 = 6.313 + +end subroutine psn_crop + !== begin bvocflux ================================================================================= ! subroutine bvocflux(parameters,vocflx, vegtyp, vegfrac, apar, tv ) @@ -8389,32 +9256,32 @@ end subroutine co2flux ! ------------------------ input/output variables ----------------- ! input ! integer ,intent(in) :: vegtyp !vegetation type -! real ,intent(in) :: vegfrac !green vegetation fraction [0.0-1.0] -! real ,intent(in) :: apar !photosynthesis active energy by canopy (w/m2) -! real ,intent(in) :: tv !vegetation canopy temperature (k) +! real (kind=kind_phys) ,intent(in) :: vegfrac !green vegetation fraction [0.0-1.0] +! real (kind=kind_phys) ,intent(in) :: apar !photosynthesis active energy by canopy (w/m2) +! real (kind=kind_phys) ,intent(in) :: tv !vegetation canopy temperature (k) ! ! output -! real ,intent(out) :: vocflx(5) ! voc fluxes [ug c m-2 h-1] +! real (kind=kind_phys) ,intent(out) :: vocflx(5) ! voc fluxes [ug c m-2 h-1] ! ! local variables ! -! real, parameter :: r = 8.314 ! univ. gas constant [j k-1 mol-1] -! real, parameter :: alpha = 0.0027 ! empirical coefficient -! real, parameter :: cl1 = 1.066 ! empirical coefficient -! real, parameter :: ct1 = 95000.0 ! empirical coefficient [j mol-1] -! real, parameter :: ct2 = 230000.0 ! empirical coefficient [j mol-1] -! real, parameter :: ct3 = 0.961 ! empirical coefficient -! real, parameter :: tm = 314.0 ! empirical coefficient [k] -! real, parameter :: tstd = 303.0 ! std temperature [k] -! real, parameter :: bet = 0.09 ! beta empirical coefficient [k-1] +! real (kind=kind_phys), parameter :: r = 8.314 ! univ. gas constant [j k-1 mol-1] +! real (kind=kind_phys), parameter :: alpha = 0.0027 ! empirical coefficient +! real (kind=kind_phys), parameter :: cl1 = 1.066 ! empirical coefficient +! real (kind=kind_phys), parameter :: ct1 = 95000.0 ! empirical coefficient [j mol-1] +! real (kind=kind_phys), parameter :: ct2 = 230000.0 ! empirical coefficient [j mol-1] +! real (kind=kind_phys), parameter :: ct3 = 0.961 ! empirical coefficient +! real (kind=kind_phys), parameter :: tm = 314.0 ! empirical coefficient [k] +! real (kind=kind_phys), parameter :: tstd = 303.0 ! std temperature [k] +! real (kind=kind_phys), parameter :: bet = 0.09 ! beta empirical coefficient [k-1] ! ! integer ivoc ! do-loop index ! integer ityp ! do-loop index -! real epsilon(5) -! real gamma(5) -! real density -! real elai -! real par,cl,reciprod,ct +! real (kind=kind_phys) epsilon(5) +! real (kind=kind_phys) gamma(5) +! real (kind=kind_phys) density +! real (kind=kind_phys) elai +! real (kind=kind_phys) par,cl,reciprod,ct ! ! epsilon : ! @@ -8459,7 +9326,8 @@ end subroutine co2flux !>\ingroup NoahMP_LSM subroutine noahmp_options(idveg ,iopt_crs ,iopt_btr ,iopt_run ,iopt_sfc ,iopt_frz , & - iopt_inf ,iopt_rad ,iopt_alb ,iopt_snf ,iopt_tbot, iopt_stc ) + iopt_inf ,iopt_rad ,iopt_alb ,iopt_snf ,iopt_tbot, iopt_stc, & + iopt_rsf , iopt_soil, iopt_pedo, iopt_crop ) implicit none @@ -8477,6 +9345,10 @@ subroutine noahmp_options(idveg ,iopt_crs ,iopt_btr ,iopt_run ,iopt_sfc integer, intent(in) :: iopt_stc !snow/soil temperature time scheme (only layer 1) ! 1 -> semi-implicit; 2 -> full implicit (original noah) + integer, intent(in) :: iopt_rsf !surface resistance (1->sakaguchi/zeng; 2->seller; 3->mod sellers; 4->1+snow) + integer, intent(in) :: iopt_soil !soil parameters set-up option + integer, intent(in) :: iopt_pedo !pedo-transfer function (1->saxton and rawls) + integer, intent(in) :: iopt_crop !crop model option (0->none; 1->liu et al.) ! ------------------------------------------------------------------------------------------------- @@ -8493,9 +9365,12 @@ subroutine noahmp_options(idveg ,iopt_crs ,iopt_btr ,iopt_run ,iopt_sfc opt_snf = iopt_snf opt_tbot = iopt_tbot opt_stc = iopt_stc + opt_rsf = iopt_rsf + opt_soil = iopt_soil + opt_pedo = iopt_pedo + opt_crop = iopt_crop end subroutine noahmp_options - end module module_sf_noahmplsm diff --git a/physics/module_sf_ruclsm.F90 b/physics/module_sf_ruclsm.F90 index 024f97772..1e0ec2fe2 100644 --- a/physics/module_sf_ruclsm.F90 +++ b/physics/module_sf_ruclsm.F90 @@ -64,8 +64,8 @@ SUBROUTINE LSMRUC( & graupelncv,snowncv,rainncv,raincv, & ZS,RAINBL,SNOW,SNOWH,SNOWC,FRZFRAC,frpcpn, & rhosnf,precipfr, & - Z3D,P8W,T3D,QV3D,QC3D,RHO3D, & - GLW,GSW,EMISS,CHKLOWQ, CHS, & + Z3D,P8W,T3D,QV3D,QC3D,RHO3D,EMISBCK, & + GLW,GSWdn,GSW,EMISS,CHKLOWQ, CHS, & FLQC,FLHC,MAVAIL,CANWAT,VEGFRA,ALB,ZNT, & Z0,SNOALB,ALBBCK,LAI, & landusef, nlcat, & ! mosaic_lu, mosaic_soil, & @@ -185,6 +185,7 @@ SUBROUTINE LSMRUC( & REAL, DIMENSION( ims:ime , jms:jme ), & INTENT(IN ) :: RAINBL, & GLW, & + GSWdn, & GSW, & ALBBCK, & FLHC, & @@ -220,6 +221,7 @@ SUBROUTINE LSMRUC( & ALB, & LAI, & EMISS, & + EMISBCK, & MAVAIL, & SFCEXC, & Z0 , & @@ -506,7 +508,14 @@ SUBROUTINE LSMRUC( & soilice(k)=0. soiliqw(k)=0. enddo - endif ! init=.true., iter=1 + else ! .not. init==true. + DO J=jts,jte + DO i=its,ite + SFCRUNOFF(i,j) = 0. + UDRUNOFF(i,j) = 0. + ENDDO + ENDDO + endif ! init==.true. !----------------------------------------------------------------- @@ -699,11 +708,17 @@ SUBROUTINE LSMRUC( & ENDIF !> - Call soilvegin() to initialize soil and surface properties - CALL SOILVEGIN ( debug_print, & + IF((XLAND(I,J)-1.5).LT.0..and. xice(i,j).lt.xice_threshold)THEN + !-- land + CALL SOILVEGIN ( debug_print, & soilfrac,nscat,shdmin(i,j),shdmax(i,j),mosaic_lu, mosaic_soil,& NLCAT,ILAND,ISOIL,iswater,MYJ,IFOREST,lufrac,VEGFRA(I,J), & EMISSL(I,J),PC(I,J),ZNT(I,J),LAI(I,J),RDLAI2D, & QWRTZ,RHOCS,BCLH,DQM,KSAT,PSIS,QMIN,REF,WILT,i,j ) + + !-- update background emissivity for land points, can have vegetation mosaic effect + EMISBCK(I,J) = EMISSL(I,J) + IF (debug_print ) THEN if(init) & print *,'after SOILVEGIN - z0,znt(1,26),lai(1,26)',z0(i,j),znt(i,j),lai(i,j) @@ -769,6 +784,7 @@ SUBROUTINE LSMRUC( & print *,'NROOT, meltfactor, iforest, ivgtyp, i,j ', nroot,meltfactor,iforest,ivgtyp(I,J),I,J ENDIF + ENDIF ! land !!*** SET ZERO-VALUE FOR SOME OUTPUT DIAGNOSTIC ARRAYS ! if(i.eq.397.and.j.eq.562) then ! print *,'RUC LSM - xland(i,j),xice(i,j),snow(i,j)',i,j,xland(i,j),xice(i,j),snow(i,j) @@ -832,12 +848,13 @@ SUBROUTINE LSMRUC( & ISOIL = 16 ! STATSGO endif ZNT(I,J) = 0.011 - snoalb(i,j) = 0.75 + ! in FV3 albedo and emiss are defined for ice + !snoalb(i,j) = snoalb(i,j) + emissl(i,j) = emisbck(i,j) ! no snow impact, old 0.98 used in WRF dqm = 1. ref = 1. qmin = 0. wilt = 0. - emissl(i,j) = 0.98 patmb=P8w(i,1,j)*1.e-2 qvg (i,j) = QSN(SOILT(i,j),TBQ)/PATMB @@ -893,12 +910,13 @@ SUBROUTINE LSMRUC( & CALL SFCTMP (debug_print, dt,ktau,conflx,i,j, & !--- input variables nzs,nddzs,nroot,meltfactor, & !added meltfactor - iland,isoil,ivgtyp(i,j),isltyp(i,j), & + iland,isoil,ivgtyp(i,j),isltyp(i,j), & PRCPMS, NEWSNMS,SNWE,SNHEI,SNOWFRAC, & RHOSN,RHONEWSN,RHOSNFALL, & snowrat,grauprat,icerat,curat, & PATM,TABS,QVATM,QCATM,RHO, & - GLW(I,J),GSW(I,J),EMISSL(I,J), & + GLW(I,J),GSWdn(i,j),GSW(I,J), & + EMISSL(I,J),EMISBCK(I,J), & QKMS,TKMS,PC(I,J),LMAVAIL(I,J), & canwatr,vegfra(I,J),alb(I,J),znt(I,J), & snoalb(i,j),albbck(i,j),lai(i,j), & !new @@ -1039,7 +1057,7 @@ SUBROUTINE LSMRUC( & endif ENDIF - if(snow(i,j)==0.) EMISSL(i,j) = LEMITBL(IVGTYP(i,j)) + if(snow(i,j)==0.) EMISSL(i,j) = EMISBCK(i,j) EMISS (I,J) = EMISSL(I,J) ! SNOW is in [mm], SNWE is in [m]; CANWAT is in mm, CANWATR is in m SNOW (i,j) = SNWE*1000. @@ -1165,7 +1183,7 @@ SUBROUTINE SFCTMP (debug_print, delt,ktau,conflx,i,j, & !--- input varia RHOSN,RHONEWSN,RHOSNFALL, & snowrat,grauprat,icerat,curat, & PATM,TABS,QVATM,QCATM,rho, & - GLW,GSW,EMISS,QKMS,TKMS,PC, & + GLW,GSWdn,GSW,EMISS,EMISBCK,QKMS,TKMS,PC, & MAVAIL,CST,VEGFRA,ALB,ZNT, & ALB_SNOW,ALB_SNOW_FREE,lai, & MYJ,SEAICE,ISICE, & @@ -1201,6 +1219,7 @@ SUBROUTINE SFCTMP (debug_print, delt,ktau,conflx,i,j, & !--- input varia REAL , & INTENT(IN ) :: GLW, & GSW, & + GSWdn, & PC, & VEGFRA, & ALB_SNOW_FREE, & @@ -1214,6 +1233,7 @@ SUBROUTINE SFCTMP (debug_print, delt,ktau,conflx,i,j, & !--- input varia !--- 2-D variables REAL , & INTENT(INOUT) :: EMISS, & + EMISBCK, & MAVAIL, & SNOWFRAC, & ALB_SNOW, & @@ -1413,11 +1433,11 @@ SUBROUTINE SFCTMP (debug_print, delt,ktau,conflx,i,j, & !--- input varia enddo GSWnew=GSW - GSWin=GSW/(1.-alb) + GSWin=GSWdn !/(1.-alb) ALBice=ALB_SNOW_FREE ALBsn=alb_snow - EMISSN = 0.98 - EMISS_snowfree = LEMITBL(IVGTYP) + EMISSN = 0.99 ! from setemis, from WRF - 0.98 + EMISS_snowfree = EMISBCK ! LEMITBL(IVGTYP) !--- sea ice properties !--- N.N Zubov "Arctic Ice" @@ -1718,8 +1738,9 @@ SUBROUTINE SFCTMP (debug_print, delt,ktau,conflx,i,j, & !--- input varia ALBsn = MAX(keep_snow_albedo*alb_snow, & MIN((albice + (alb_snow - albice) * snowfrac), alb_snow)) Emiss = MAX(keep_snow_albedo*emissn, & + !-- emiss_snowfree=0.96 in setemis MIN((emiss_snowfree + & - (emissn - emiss_snowfree) * snowfrac), emissn)) + (emissn - emiss_snowfree) * snowfrac), emissn)) endif IF (debug_print ) THEN @@ -2569,7 +2590,7 @@ SUBROUTINE SOIL (debug_print, & ! endif alfa=1. ! field capacity -! 20jun18 - beta in Eq. (4) is called soilres here - it limits soil evaporation +! 20jun18 - beta in Eq. (5) is called soilres in the code - it limits soil evaporation ! when soil moisture is below field capacity. [Lee and Pielke, 1992] ! This formulation agrees with obsevations when top layer is < 2 cm thick. ! Soilres = 1 for snow, glaciers and wetland. @@ -2579,7 +2600,10 @@ SUBROUTINE SOIL (debug_print, & ! evaporation, effects sparsely vegetated areas--> cooler during the day ! fc=max(qmin,ref*0.25) ! ! For now we'll go back to ref*0.5 - fc=max(qmin,ref*0.5) +! 3feb21 - in RRFS testing (fv3-based), ref*0.5 gives too much direct +! evaporation. Therefore , it is replaced with ref*0.7. + !fc=max(qmin,ref*0.5) + fc=max(qmin,ref*0.7) fex_fc=1. if((soilmois(1)+qmin) > fc .or. (qvatm-qvg) > 0.) then soilres = 1. @@ -6197,7 +6221,13 @@ SUBROUTINE SOILPROP( debug_print, & !--- Next 3 lines are for Johansen thermal conduct. gamd=(1.-ws)*2700. kdry=(0.135*gamd+64.7)/(2700.-0.947*gamd) - kas=kqwrtz**qwrtz*kzero**(1.-qwrtz) + !kas=kqwrtz**qwrtz*kzero**(1.-qwrtz) + !-- one more option from Christa's paper + if(qwrtz > 0.2) then + kas=kqwrtz**qwrtz*kzero**(1.-qwrtz) + else + kas=kqwrtz**qwrtz*3.**(1.-qwrtz) + endif DO K=1,NZS1 tn=tav(k) - 273.15 @@ -6256,13 +6286,13 @@ SUBROUTINE SOILPROP( debug_print, & if((ws-a).lt.0.12)then diffu(K)=0. else - H=max(0.,(soilmoism(K)-a)/(max(1.e-8,(dqm-a)))) + H=max(0.,(soilmoism(K)+qmin-a)/(max(1.e-8,(dqm-a)))) facd=1. if(a.ne.0.)facd=1.-a/max(1.e-8,soilmoism(K)) ame=max(1.e-8,dqm-riw*soilicem(K)) !--- DIFFU is diffusional conductivity of soil water diffu(K)=-BCLH*KSAT*PSIS/ame* & - (dqm/ame)**3. & + (ws/ame)**3. & *H**(BCLH+2.)*facd endif @@ -6288,7 +6318,7 @@ SUBROUTINE SOILPROP( debug_print, & fach=1. if(soilice(k).ne.0.) & fach=1.-riw*soilice(k)/max(1.e-8,soilmois(k)) - am=max(1.e-8,dqm-riw*soilice(k)) + am=max(1.e-8,ws-riw*soilice(k)) !--- HYDRO is hydraulic conductivity of soil water hydro(K)=min(KSAT,KSAT/am* & (soiliqw(K)/am) & @@ -6512,7 +6542,7 @@ SUBROUTINE VILKA(TN,D1,D2,PP,QS,TS,TT,NSTEP,ii,j,iland,isoil) REAL :: F1,T1,T2,RN INTEGER :: I,I1 - + I=(TN-1.7315E2)/.05+1 T1=173.1+FLOAT(I)*.05 F1=T1+D1*TT(I)-D2 @@ -6523,7 +6553,7 @@ SUBROUTINE VILKA(TN,D1,D2,PP,QS,TS,TT,NSTEP,ii,j,iland,isoil) T1=173.1+FLOAT(I)*.05 F1=T1+D1*TT(I)-D2 RN=F1/(.05+D1*(TT(I+1)-TT(I))) - I=I-INT(RN) + I=I-INT(RN) IF(I.GT.5000.OR.I.LT.1) GOTO 1 IF(I1.NE.I) GOTO 10 TS=T1-.05*RN diff --git a/physics/module_soil_pre.F90 b/physics/module_soil_pre.F90 index 82fe23f24..8eb5a5775 100644 --- a/physics/module_soil_pre.F90 +++ b/physics/module_soil_pre.F90 @@ -42,8 +42,8 @@ SUBROUTINE init_soil_depth_3 ( zs , dzs , num_soil_levels ) IF ( num_soil_levels .EQ. 6) THEN zs = (/ 0.00 , 0.05 , 0.20 , 0.40 , 1.60 , 3.00 /) ELSEIF ( num_soil_levels .EQ. 9) THEN - !zs = (/ 0.00 , 0.01 , 0.04 , 0.10 , 0.30, 0.60, 1.00 , 1.60, 3.00 /) - zs = (/ 0.00 , 0.05 , 0.20 , 0.40 , 0.60, 1.00, 1.60 , 2.20, 3.00 /) + zs = (/ 0.00 , 0.01 , 0.04 , 0.10 , 0.30, 0.60, 1.00 , 1.60, 3.00 /) + !zs = (/ 0.00 , 0.05 , 0.20 , 0.40 , 0.60, 1.00, 1.60 , 2.20, 3.00 /) ENDIF zs2(1) = 0. diff --git a/physics/moninedmf.f b/physics/moninedmf.f index d5cb2ded3..19e055da4 100644 --- a/physics/moninedmf.f +++ b/physics/moninedmf.f @@ -11,16 +11,26 @@ module hedmf !> \section arg_table_hedmf_init Argument Table !! \htmlinclude hedmf_init.html !! - subroutine hedmf_init (moninq_fac,errmsg,errflg) + subroutine hedmf_init (hybedmf,moninq_fac,errmsg,errflg) use machine, only : kind_phys implicit none - real(kind=kind_phys), intent(in ) :: moninq_fac + + logical, intent(in) :: hybedmf + + real(kind=kind_phys), intent(in) :: moninq_fac character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! Initialize CCPP error handling variables errmsg = '' errflg = 0 + ! Consistency checks + if (.not. hybedmf) then + errflg = 1 + write(errmsg,'(*(a))') 'Logic error: hybedmf = .false.' + return + end if + if (moninq_fac == 0) then errflg = 1 write(errmsg,'(*(a))') 'Logic error: moninq_fac == 0', @@ -62,11 +72,12 @@ subroutine hedmf_run (im,km,ntrac,ntcw,dv,du,tau,rtg, & & psk,rbsoil,zorl,u10m,v10m,fm,fh, & & tsea,heat,evap,stress,spd1,kpbl, & & prsi,del,prsl,prslk,phii,phil,delt,dspheat, & - & dusfc,dvsfc,dtsfc,dqsfc,hpbl,hgamt,hgamq,dkt, & + & dusfc,dvsfc,dtsfc,dqsfc,hpbl,hgamt,hgamq,dkt,dku, & & kinver,xkzm_m,xkzm_h,xkzm_s,lprnt,ipr, & & xkzminv,moninq_fac,hurr_pbl,islimsk,var_ric, & - & coef_ric_l,coef_ric_s,lssav,ldiag3d,qdiag3d,ntoz, & - & du3dt_PBL,dv3dt_PBL,dt3dt_PBL,dq3dt_PBL,do3dt_PBL, & + & coef_ric_l,coef_ric_s,ldiag3d,ntqv,rtg_ozone_index,ntoz, & + & dtend,dtidx,index_of_process_pbl,index_of_x_wind, & + & index_of_y_wind,index_of_temperature, & & flag_for_pbl_generic_tend,errmsg,errflg) ! use machine , only : kind_phys @@ -81,42 +92,46 @@ subroutine hedmf_run (im,km,ntrac,ntcw,dv,du,tau,rtg, & ! ! arguments ! - logical, intent(in) :: lprnt, hurr_pbl, lssav, ldiag3d, qdiag3d + logical, intent(in) :: lprnt, hurr_pbl, ldiag3d logical, intent(in) :: flag_for_pbl_generic_tend - integer, intent(in) :: ipr, islimsk(im) - integer, intent(in) :: im, km, ntrac, ntcw, kinver(im), ntoz - integer, intent(out) :: kpbl(im) + integer, intent(in) :: ipr, islimsk(:) + integer, intent(in) :: im, km, ntrac, ntcw, kinver(:), ntoz + integer, intent(out) :: kpbl(:) ! real(kind=kind_phys), intent(in) :: delt, xkzm_m, xkzm_h, xkzm_s real(kind=kind_phys), intent(in) :: xkzminv, moninq_fac, var_ric, & & coef_ric_l, coef_ric_s - real(kind=kind_phys), intent(inout) :: dv(im,km), du(im,km), & - & tau(im,km), rtg(im,km,ntrac) - ! Only allocated if ldiag3d or qdiag3d are true - real(kind=kind_phys), intent(inout), dimension(:,:) :: & - & du3dt_PBL,dv3dt_PBL,dt3dt_PBL,dq3dt_PBL,do3dt_PBL + real(kind=kind_phys), intent(inout) :: dv(:,:), du(:,:), & + & tau(:,:), rtg(:,:,:) + ! dtend is only allocated if ldiag3d or qdiag3d are true + real(kind=kind_phys), intent(inout) :: dtend(:,:,:) + integer, intent(in) :: dtidx(:,:) + integer, intent(in) :: index_of_x_wind, index_of_y_wind, & + & index_of_process_pbl, index_of_temperature, ntqv, rtg_ozone_index real(kind=kind_phys), intent(in) :: & - & u1(im,km), v1(im,km), & - & t1(im,km), q1(im,km,ntrac), & - & swh(im,km), hlw(im,km), & - & xmu(im), psk(im), & - & rbsoil(im), zorl(im), & - & u10m(im), v10m(im), & - & fm(im), fh(im), & - & tsea(im), & - & heat(im), evap(im), & - & stress(im), spd1(im) + & u1(:,:), v1(:,:), & + & t1(:,:), q1(:,:,:), & + & swh(:,:), hlw(:,:), & + & xmu(:), psk(:), & + & rbsoil(:), zorl(:), & + & u10m(:), v10m(:), & + & fm(:), fh(:), & + & tsea(:), & + & heat(:), evap(:), & + & stress(:), spd1(:) real(kind=kind_phys), intent(in) :: & - & prsi(im,km+1), del(im,km), & - & prsl(im,km), prslk(im,km), & - & phii(im,km+1), phil(im,km) + & prsi(:,:), del(:,:), & + & prsl(:,:), prslk(:,:), & + & phii(:,:), phil(:,:) + real(kind=kind_phys), intent(out) :: & + & dusfc(:), dvsfc(:), & + & dtsfc(:), dqsfc(:), & + & hpbl(:) real(kind=kind_phys), intent(out) :: & - & dusfc(im), dvsfc(im), & - & dtsfc(im), dqsfc(im), & - & hpbl(im), dkt(im,km-1) + & dkt(:,:), dku(:,:) real(kind=kind_phys), intent(inout) :: & - & hgamt(im), hgamq(im) + & hgamt(:), hgamq(:) ! logical, intent(in) :: dspheat ! flag for tke dissipative heating @@ -148,8 +163,8 @@ subroutine hedmf_run (im,km,ntrac,ntcw,dv,du,tau,rtg, & & zd(im), zdd(im), thlvx1(im) ! real(kind=kind_phys) rdzt(im,km-1),dktx(im,km-1), & - & zi(im,km+1), zl(im,km), xkzo(im,km-1), & - & dku(im,km-1), xkzmo(im,km-1), & + & zi(im,km+1), zl(im,km), & + & xkzo(im,km-1), xkzmo(im,km-1), & & cku(im,km-1), ckt(im,km-1), & & ti(im,km-1), shr2(im,km-1), & & al(im,km-1), ad(im,km), & @@ -194,6 +209,8 @@ subroutine hedmf_run (im,km,ntrac,ntcw,dv,du,tau,rtg, & real(kind=kind_phys) zstblmax,h1, h2, qlcr, actei, & cldtime real :: ttend_fac + + integer :: idtend1, idtend2 !! for hurricane application real(kind=kind_phys) wspm(im,km-1) @@ -269,6 +286,10 @@ subroutine hedmf_run (im,km,ntrac,ntcw,dv,du,tau,rtg, & rdt = 1. / dt2 km1 = km - 1 kmpbl = km / 2 + + idtend1 = 0 + idtend2 = 0 + !> - Compute physical height of the layer centers and interfaces from the geopotential height (zi and zl) do k=1,km do i=1,im @@ -379,10 +400,14 @@ subroutine hedmf_run (im,km,ntrac,ntcw,dv,du,tau,rtg, & enddo enddo !> - Initialize diffusion coefficients to 0 and calculate the total radiative heating rate (dku, dkt, radx) - do k = 1,km1 + do k = 1,km do i = 1,im dku(i,k) = 0. dkt(i,k) = 0. + enddo + enddo + do k = 1,km1 + do i = 1,im dktx(i,k) = 0. cku(i,k) = 0. ckt(i,k) = 0. @@ -1281,15 +1306,28 @@ subroutine hedmf_run (im,km,ntrac,ntcw,dv,du,tau,rtg, & rtg(i,k,1) = rtg(i,k,1)+qtend dtsfc(i) = dtsfc(i)+cont*del(i,k)*ttend dqsfc(i) = dqsfc(i)+conq*del(i,k)*qtend - if(lssav .and. ldiag3d .and. .not. & - & flag_for_pbl_generic_tend) then - dt3dt_PBL(i,k) = dt3dt_PBL(i,k) + ttend*delt - if(qdiag3d) then - dq3dt_PBL(i,k) = dq3dt_PBL(i,k) + qtend*delt - endif - endif enddo enddo + if(.not.flag_for_pbl_generic_tend) then + idtend1=dtidx(index_of_temperature,index_of_process_pbl) + idtend2=dtidx(ntqv+100,index_of_process_pbl) + if(idtend1>=1) then + do k = 1,km + do i = 1,im + ttend = (a1(i,k)-t1(i,k)) * rdt + dtend(i,k,idtend1) = dtend(i,k,idtend1) + ttend*delt + enddo + enddo + endif + if(idtend2>=1) then + do k = 1,km + do i = 1,im + qtend = (a2(i,k)-q1(i,k,1))*rdt + dtend(i,k,idtend2) = dtend(i,k,idtend2) + qtend*delt + enddo + enddo + endif + endif if(ntrac >= 2) then do kk = 2, ntrac is = (kk-1) * km @@ -1300,16 +1338,19 @@ subroutine hedmf_run (im,km,ntrac,ntcw,dv,du,tau,rtg, & enddo enddo enddo - if(lssav .and. ldiag3d .and. ntoz>0 .and. qdiag3d .and. & - & .not. flag_for_pbl_generic_tend) then - kk = ntoz - is = (kk-1) * km - do k = 1, km - do i = 1, im - qtend = (a2(i,k+is)-q1(i,k,kk)) - do3dt_PBL(i,k) = do3dt_PBL(i,k)+qtend - enddo - enddo + if(.not.flag_for_pbl_generic_tend .and. ldiag3d .and. & + & rtg_ozone_index>0) then + idtend1 = dtidx(100+ntoz,index_of_process_pbl) + if(idtend1>=1) then + kk = rtg_ozone_index + is = (kk-1) * km + do k = 1, km + do i = 1, im + qtend = (a2(i,k+is)-q1(i,k,kk)) + dtend(i,k,idtend1) = dtend(i,k,idtend1)+qtend + enddo + enddo + endif endif endif ! @@ -1402,6 +1443,7 @@ subroutine hedmf_run (im,km,ntrac,ntcw,dv,du,tau,rtg, & ! enddo enddo + ! ! solve tridiagonal problem for momentum ! @@ -1418,11 +1460,6 @@ subroutine hedmf_run (im,km,ntrac,ntcw,dv,du,tau,rtg, & dv(i,k) = dv(i,k) + vtend dusfc(i) = dusfc(i) + conw*del(i,k)*utend dvsfc(i) = dvsfc(i) + conw*del(i,k)*vtend - if(lssav .and. ldiag3d .and. .not. & - & flag_for_pbl_generic_tend) then - du3dt_PBL(i,k) = du3dt_PBL(i,k) + utend*delt - dv3dt_PBL(i,k) = dv3dt_PBL(i,k) + vtend*delt - endif ! ! for dissipative heating for ecmwf model ! @@ -1435,6 +1472,27 @@ subroutine hedmf_run (im,km,ntrac,ntcw,dv,du,tau,rtg, & ! enddo enddo + if(.not.flag_for_pbl_generic_tend) then + idtend1 = dtidx(index_of_x_wind,index_of_process_pbl) + if(idtend1>=1) then + do k = 1,km + do i = 1,im + utend = (a1(i,k)-u1(i,k))*rdt + dtend(i,k,idtend1) = dtend(i,k,idtend1) + utend*delt + enddo + enddo + endif + + idtend2 = dtidx(index_of_y_wind,index_of_process_pbl) + if(idtend2>=1) then + do k = 1,km + do i = 1,im + vtend = (a2(i,k)-v1(i,k))*rdt + dtend(i,k,idtend2) = dtend(i,k,idtend2) + vtend*delt + enddo + enddo + endif + endif ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! diff --git a/physics/moninedmf.meta b/physics/moninedmf.meta index b14dbd2fc..b3fa605b3 100644 --- a/physics/moninedmf.meta +++ b/physics/moninedmf.meta @@ -7,8 +7,16 @@ [ccpp-arg-table] name = hedmf_init type = scheme +[hybedmf] + standard_name = flag_for_hybrid_edmf_pbl_scheme + long_name = flag for hybrid edmf pbl scheme (moninedmf) + units = flag + dimensions = () + type = logical + intent = in + optional = F [moninq_fac] - standard_name = atmosphere_diffusivity_coefficient_factor + standard_name = multiplicative_tuning_parameter_for_atmosphere_diffusivity long_name = multiplicative constant for atmospheric diffusivities units = none dimensions = () @@ -47,7 +55,7 @@ intent = in optional = F [km] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -63,7 +71,7 @@ intent = in optional = F [ntcw] - standard_name = index_for_liquid_cloud_condensate + standard_name = index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array long_name = cloud condensate index in tracer array units = index dimensions = () @@ -71,28 +79,28 @@ intent = in optional = F [dv] - standard_name = tendency_of_y_wind_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_y_wind long_name = updated tendency of the y wind units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [du] - standard_name = tendency_of_x_wind_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_x_wind long_name = updated tendency of the x wind units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [tau] - standard_name = tendency_of_air_temperature_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_air_temperature long_name = updated tendency of the temperature units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -101,7 +109,7 @@ standard_name = tendency_of_vertically_diffused_tracer_concentration long_name = updated tendency of the tracers due to vertical diffusion in PBL scheme units = kg kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_vertical_diffusion_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_vertical_diffusion_tracers) type = real kind = kind_phys intent = inout @@ -110,7 +118,7 @@ standard_name = x_wind long_name = x component of layer wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -119,7 +127,7 @@ standard_name = y_wind long_name = y component of layer wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -128,7 +136,7 @@ standard_name = air_temperature long_name = layer mean air temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -137,25 +145,25 @@ standard_name = vertically_diffused_tracer_concentration long_name = tracer concentration diffused by PBL scheme units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_vertical_diffusion_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_vertical_diffusion_tracers) type = real kind = kind_phys intent = in optional = F [swh] - standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_timestep long_name = total sky shortwave heating rate units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [hlw] - standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step + standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_timestep long_name = total sky longwave heating rate units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -170,7 +178,7 @@ intent = in optional = F [psk] - standard_name = dimensionless_exner_function_at_lowest_model_interface + standard_name = surface_dimensionless_exner_function long_name = dimensionless Exner function at the surface interface units = none dimensions = (horizontal_loop_extent) @@ -242,8 +250,8 @@ intent = in optional = F [heat] - standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness - long_name = kinematic surface upward sensible heat flux + standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness_and_vegetation + long_name = kinematic surface upward sensible heat flux reduced by surface roughness and vegetation units = K m s-1 dimensions = (horizontal_loop_extent) type = real @@ -251,7 +259,7 @@ intent = in optional = F [evap] - standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness + standard_name = surface_upward_specific_humidity_flux long_name = kinematic surface upward latent heat flux units = kg kg-1 m s-1 dimensions = (horizontal_loop_extent) @@ -289,7 +297,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -298,7 +306,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = pres(k) - pres(k+1) units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -307,16 +315,16 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [prslk] - standard_name = dimensionless_exner_function_at_model_layers + standard_name = dimensionless_exner_function long_name = Exner function at layers units = none - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -325,7 +333,7 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -334,13 +342,13 @@ standard_name = geopotential long_name = geopotential at model layer centers units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [delt] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = time step for physics units = s dimensions = () @@ -421,9 +429,18 @@ optional = F [dkt] standard_name = atmosphere_heat_diffusivity - long_name = diffusivity for heat + long_name = atmospheric heat diffusivity units = m2 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension_minus_one) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dku] + standard_name = atmosphere_momentum_diffusivity + long_name = atmospheric momentum diffusivity + units = m2 s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -437,7 +454,7 @@ intent = in optional = F [xkzm_m] - standard_name = atmosphere_momentum_diffusivity_background + standard_name = atmosphere_momentum_diffusivity_due_to_background long_name = background value of momentum diffusivity units = m2 s-1 dimensions = () @@ -446,7 +463,7 @@ intent = in optional = F [xkzm_h] - standard_name = atmosphere_heat_diffusivity_background + standard_name = atmosphere_heat_diffusivity_due_to_background long_name = background value of heat diffusivity units = m2 s-1 dimensions = () @@ -455,7 +472,7 @@ intent = in optional = F [xkzm_s] - standard_name = diffusivity_background_sigma_level + standard_name = sigma_pressure_threshold_at_upper_extent_of_background_diffusion long_name = sigma level threshold for background diffusivity units = none dimensions = () @@ -480,7 +497,7 @@ intent = in optional = F [xkzminv] - standard_name = atmosphere_heat_diffusivity_background_maximum + standard_name = max_atmosphere_heat_diffusivity_due_to_background long_name = maximum background value of heat diffusivity units = m2 s-1 dimensions = () @@ -489,7 +506,7 @@ intent = in optional = F [moninq_fac] - standard_name = atmosphere_diffusivity_coefficient_factor + standard_name = multiplicative_tuning_parameter_for_atmosphere_diffusivity long_name = multiplicative constant for atmospheric diffusivities units = none dimensions = () @@ -514,7 +531,7 @@ intent = in optional = F [var_ric] - standard_name = flag_variable_bulk_richardson_number + standard_name = control_for_variable_bulk_richardson_number long_name = flag for calculating variable bulk richardson number for hurricane PBL units = flag dimensions = () @@ -532,91 +549,98 @@ intent = in optional = F [coef_ric_s] - standard_name = coefficient_for_variable_bulk_richardson_number_over_ocean - long_name = coefficient for calculating variable bulk richardson number for hurricane PBL over ocean + standard_name = coefficient_for_variable_bulk_richardson_number_over_water + long_name = coefficient for calculating variable bulk richardson number for hurricane PBL over water units = none dimensions = () type = real kind = kind_phys -[lssav] - standard_name = flag_diagnostics - long_name = logical flag for storing diagnostics - units = flag - dimensions = () - type = logical intent = in optional = F [ldiag3d] - standard_name = flag_diagnostics_3D + standard_name = flag_for_diagnostics_3D long_name = flag for 3d diagnostic fields units = flag dimensions = () type = logical intent = in optional = F -[qdiag3d] - standard_name = flag_tracer_diagnostics_3D - long_name = flag for 3d tracer diagnostic fields - units = flag +[ntqv] + standard_name = index_of_specific_humidity_in_tracer_concentration_array + long_name = tracer index for water vapor (specific humidity) + units = index dimensions = () - type = logical + type = integer + intent = in + optional = F +[rtg_ozone_index] + standard_name = vertically_diffused_tracer_index_of_ozone + long_name = number of tracers + units = count + dimensions = () + type = integer intent = in optional = F [ntoz] - standard_name = index_for_ozone + standard_name = index_of_ozone_mixing_ratio_in_tracer_concentration_array long_name = tracer index for ozone mixing ratio units = index dimensions = () type = integer intent = in optional = F -[du3dt_PBL] - standard_name = cumulative_change_in_x_wind_due_to_PBL - long_name = cumulative change in x wind due to PBL - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) +[dtend] + standard_name = cumulative_change_of_state_variables + long_name = diagnostic tendencies for state variables + units = various + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_cumulative_change_processes) type = real kind = kind_phys + active = (flag_for_diagnostics_3D) intent = inout optional = F -[dv3dt_PBL] - standard_name = cumulative_change_in_y_wind_due_to_PBL - long_name = cumulative change in y wind due to PBL - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[dtidx] + standard_name = cumulative_change_of_state_variables_outer_index + long_name = index of state-variable and process in last dimension of diagnostic tendencies array AKA cumulative_change_index + units = index + dimensions = (number_of_tracers_plus_one_hundred,number_of_cumulative_change_processes) + type = integer + intent = in optional = F -[dt3dt_PBL] - standard_name = cumulative_change_in_temperature_due_to_PBL - long_name = cumulative change in temperature due to PBL - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[index_of_process_pbl] + standard_name = index_of_subgrid_scale_vertical_mixing_process_in_cumulative_change_index + long_name = index of subgrid scale vertical mixing process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in optional = F -[dq3dt_PBL] - standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL - long_name = cumulative change in water vapor specific humidity due to PBL - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[index_of_x_wind] + standard_name = index_of_x_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in optional = F -[do3dt_PBL] - standard_name = cumulative_change_in_ozone_mixing_ratio_due_to_PBL - long_name = cumulative change in ozone mixing ratio due to PBL - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[index_of_y_wind] + standard_name = index_of_y_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_temperature] + standard_name = index_of_temperature_in_cumulative_change_index + long_name = index of temperature in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in optional = F [flag_for_pbl_generic_tend] - standard_name = flag_for_generic_planetary_boundary_layer_tendency + standard_name = flag_for_generic_tendency_due_to_planetary_boundary_layer long_name = true if GFS_PBL_generic should calculate tendencies units = flag dimensions = () diff --git a/physics/moninshoc.f b/physics/moninshoc.f index eb9a5d963..4e9e60b46 100644 --- a/physics/moninshoc.f +++ b/physics/moninshoc.f @@ -6,7 +6,24 @@ module moninshoc contains - subroutine moninshoc_init () + subroutine moninshoc_init (do_shoc, errmsg, errflg) + + implicit none + logical, intent(in) :: do_shoc + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + ! Consistency checks + if (.not. do_shoc) then + errflg = 1 + write(errmsg,'(*(a))') 'Logic error: do_shoc = .false.' + return + end if + end subroutine moninshoc_init subroutine moninshoc_finalize () @@ -31,10 +48,10 @@ subroutine moninshoc_run (im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, & prsi,del,prsl,prslk,phii,phil,delt, & dusfc,dvsfc,dtsfc,dqsfc,dkt,hpbl, & kinver,xkzm_m,xkzm_h,xkzm_s,xkzminv, - & grav,rd,cp,hvap,fv,ntoz,dt3dt_PBL, - & du3dt_PBL,dv3dt_PBL,dq3dt_PBL,do3dt_PBL, - & gen_tend,ldiag3d,qdiag3d, - & errmsg,errflg) + & grav,rd,cp,hvap,fv,ntoz,dtend,dtidx, + & index_of_temperature,index_of_x_wind, + & index_of_y_wind,index_of_process_pbl, + & gen_tend,ldiag3d,ntqv,errmsg,errflg) ! use machine , only : kind_phys use funcphys , only : fpvs @@ -45,33 +62,34 @@ subroutine moninshoc_run (im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, ! integer, intent(in) :: im, & km, ntrac, ntcw, ncnd, ntke, ntoz - integer, dimension(im), intent(in) :: kinver - + integer, dimension(:), intent(in) :: kinver real(kind=kind_phys), intent(in) :: delt, & xkzm_m, xkzm_h, xkzm_s, xkzminv real(kind=kind_phys), intent(in) :: grav, & rd, cp, hvap, fv - real(kind=kind_phys), dimension(im), intent(in) :: psk, + real(kind=kind_phys), dimension(:), intent(in) :: psk, & rbsoil, zorl, u10m, v10m, fm, fh, tsea, heat, evap, stress, spd1 - real(kind=kind_phys), dimension(im,km), intent(in) :: u1, v1, + real(kind=kind_phys), dimension(:,:), intent(in) :: u1, v1, & t1, tkh, del, prsl, phil, prslk - real(kind=kind_phys), dimension(im,km+1), intent(in) :: prsi, phii - real(kind=kind_phys), dimension(im,km,ntrac), intent(in) :: q1 + real(kind=kind_phys), dimension(:,:), intent(in) :: prsi, phii + real(kind=kind_phys), dimension(:,:,:), intent(in) :: q1 - real(kind=kind_phys), dimension(im,km), intent(inout) :: du, dv, + real(kind=kind_phys), dimension(:,:), intent(inout) :: du, dv, & tau - real(kind=kind_phys), dimension(im,km,ntrac), intent(inout) :: rtg + real(kind=kind_phys), dimension(:,:,:), intent(inout) :: rtg - real(kind=kind_phys), dimension(:,:), intent(inout) :: - & du3dt_PBL, dv3dt_PBL, dt3dt_PBL, dq3dt_PBL, do3dt_PBL + real(kind=kind_phys), dimension(:,:,:), intent(inout) :: dtend + integer, dimension(:,:), intent(in) :: dtidx + integer, intent(in) :: index_of_temperature, index_of_x_wind, + & index_of_y_wind, index_of_process_pbl, ntqv logical, intent(in) :: ldiag3d, - & qdiag3d, gen_tend + & gen_tend - integer, dimension(im), intent(out) :: kpbl - real(kind=kind_phys), dimension(im), intent(out) :: dusfc, + integer, dimension(:), intent(out) :: kpbl + real(kind=kind_phys), dimension(:), intent(out) :: dusfc, & dvsfc, dtsfc, dqsfc, hpbl - real(kind=kind_phys), dimension(im,km), intent(out) :: prnum - real(kind=kind_phys), dimension(im,km-1), intent(out) :: dkt + real(kind=kind_phys), dimension(:,:), intent(out) :: prnum + real(kind=kind_phys), dimension(:,:), intent(out) :: dkt character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -110,6 +128,7 @@ subroutine moninshoc_run (im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, &, prmin=0.25_kp, prmax=4.0_kp, vk=0.4_kp, & cfac=6.5_kp real(kind=kind_phys) :: gravi, cont, conq, gocp, go2 + integer :: idtend gravi = one / grav cont = cp * gravi @@ -121,6 +140,9 @@ subroutine moninshoc_run (im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, errmsg = '' errflg = 0 ! +! Set intent(out) variables + dkt = zero +! !----------------------------------------------------------------------- ! ! compute preliminary variables @@ -449,19 +471,13 @@ subroutine moninshoc_run (im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, enddo enddo if(ldiag3d .and. .not. gen_tend) then - do k = 1,km - do i = 1,im - ttend = (a1(i,k)-t1(i,k)) - dt3dt_PBL(i,k) = dt3dt_PBL(i,k) + ttend - enddo - enddo - if(qdiag3d) then - do k = 1,km - do i = 1,im - qtend = (a2(i,k)-q1(i,k,1)) - dq3dt_PBL(i,k) = dq3dt_PBL(i,k) + qtend - enddo - enddo + idtend = dtidx(index_of_temperature,index_of_process_pbl) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + (a1-t1) + endif + idtend = dtidx(ntqv+100,index_of_process_pbl) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + a2-q1(:,:,1) endif endif do i = 1,im @@ -481,15 +497,18 @@ subroutine moninshoc_run (im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, enddo endif enddo - if(ldiag3d .and. ntoz>0 .and. qdiag3d .and. .not. gen_tend) then - kk = ntoz - is = (kk-1) * km - do k = 1, km - do i = 1, im - qtend = (a2(i,k+is)-q1(i,k,kk)) - do3dt_PBL(i,k) = do3dt_PBL(i,k)+qtend + if(ldiag3d .and. ntoz>0 .and. .not. gen_tend) then + idtend=dtidx(100+ntoz,index_of_process_pbl) + if(idtend>=1) then + kk = ntoz + is = (kk-1) * km + do k = 1, km + do i = 1, im + qtend = (a2(i,k+is)-q1(i,k,kk)) + dtend(i,k,idtend) = dtend(i,k,idtend) + qtend + enddo enddo - enddo + endif endif endif ! @@ -537,14 +556,14 @@ subroutine moninshoc_run (im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, enddo enddo if (ldiag3d .and. .not. gen_tend) then - do k = 1,km - do i = 1,im - utend = (a1(i,k)-u1(i,k)) - vtend = (a2(i,k)-v1(i,k)) - du3dt_PBL(i,k) = du3dt_PBL(i,k) + utend - dv3dt_PBL(i,k) = dv3dt_PBL(i,k) + vtend - enddo - enddo + idtend = dtidx(index_of_x_wind,index_of_process_pbl) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + a1-u1 + endif + idtend = dtidx(index_of_y_wind,index_of_process_pbl) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + a1-v1 + endif endif ! if (ntke > 0) then ! solve tridiagonal problem for momentum and tke diff --git a/physics/moninshoc.meta b/physics/moninshoc.meta index f550c5b59..52d6ba9cd 100644 --- a/physics/moninshoc.meta +++ b/physics/moninshoc.meta @@ -3,6 +3,36 @@ type = scheme dependencies = funcphys.f90,machine.F,tridi.f +######################################################################## +[ccpp-arg-table] + name = moninshoc_init + type = scheme +[do_shoc] + standard_name = flag_for_shoc + long_name = flag for SHOC + units = flag + dimensions = () + type = logical + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + ######################################################################## [ccpp-arg-table] name = moninshoc_run @@ -16,7 +46,7 @@ intent = in optional = F [km] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -32,7 +62,7 @@ intent = in optional = F [ntcw] - standard_name = index_for_liquid_cloud_condensate + standard_name = index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array long_name = cloud condensate index in tracer array units = index dimensions = () @@ -40,36 +70,36 @@ intent = in optional = F [ncnd] - standard_name = number_of_tracers_for_cloud_condensate - long_name = number of tracers for cloud condensate + standard_name = number_of_condensate_species + long_name = number of cloud condensate types units = count dimensions = () type = integer intent = in optional = F [dv] - standard_name = tendency_of_y_wind_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_y_wind long_name = updated tendency of the y wind units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [du] - standard_name = tendency_of_x_wind_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_x_wind long_name = updated tendency of the x wind units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [tau] - standard_name = tendency_of_air_temperature_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_air_temperature long_name = updated tendency of the temperature units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -78,7 +108,7 @@ standard_name = tendency_of_vertically_diffused_tracer_concentration long_name = updated tendency of the tracers due to vertical diffusion in PBL scheme units = kg kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_vertical_diffusion_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_vertical_diffusion_tracers) type = real kind = kind_phys intent = inout @@ -87,7 +117,7 @@ standard_name = x_wind long_name = x component of layer wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -96,7 +126,7 @@ standard_name = y_wind long_name = y component of layer wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -105,7 +135,7 @@ standard_name = air_temperature long_name = layer mean air temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -114,7 +144,7 @@ standard_name = vertically_diffused_tracer_concentration long_name = tracer concentration diffused by PBL scheme units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_vertical_diffusion_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_vertical_diffusion_tracers) type = real kind = kind_phys intent = in @@ -123,7 +153,7 @@ standard_name = atmosphere_heat_diffusivity_from_shoc long_name = diffusivity for heat from the SHOC scheme units = m2 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -132,7 +162,7 @@ standard_name = prandtl_number long_name = turbulent Prandtl number units = none - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -146,7 +176,7 @@ intent = in optional = F [psk] - standard_name = dimensionless_exner_function_at_lowest_model_interface + standard_name = surface_dimensionless_exner_function long_name = dimensionless Exner function at the surface interface units = none dimensions = (horizontal_loop_extent) @@ -218,8 +248,8 @@ intent = in optional = F [heat] - standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness - long_name = kinematic surface upward sensible heat flux + standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness_and_vegetation + long_name = kinematic surface upward sensible heat flux reduced by surface roughness and vegetation units = K m s-1 dimensions = (horizontal_loop_extent) type = real @@ -227,7 +257,7 @@ intent = in optional = F [evap] - standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness + standard_name = surface_upward_specific_humidity_flux long_name = kinematic surface upward latent heat flux units = kg kg-1 m s-1 dimensions = (horizontal_loop_extent) @@ -265,7 +295,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -274,7 +304,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = pres(k) - pres(k+1) units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -283,16 +313,16 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [prslk] - standard_name = dimensionless_exner_function_at_model_layers + standard_name = dimensionless_exner_function long_name = Exner function at layers units = none - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -301,7 +331,7 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -310,13 +340,13 @@ standard_name = geopotential long_name = geopotential at model layer centers units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [delt] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = time step for physics units = s dimensions = () @@ -362,9 +392,9 @@ optional = F [dkt] standard_name = atmosphere_heat_diffusivity - long_name = diffusivity for heat + long_name = atmospheric heat diffusivity units = m2 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension_minus_one) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -387,7 +417,7 @@ intent = in optional = F [xkzm_m] - standard_name = atmosphere_momentum_diffusivity_background + standard_name = atmosphere_momentum_diffusivity_due_to_background long_name = background value of momentum diffusivity units = m2 s-1 dimensions = () @@ -396,7 +426,7 @@ intent = in optional = F [xkzm_h] - standard_name = atmosphere_heat_diffusivity_background + standard_name = atmosphere_heat_diffusivity_due_to_background long_name = background value of heat diffusivity units = m2 s-1 dimensions = () @@ -405,7 +435,7 @@ intent = in optional = F [xkzm_s] - standard_name = diffusivity_background_sigma_level + standard_name = sigma_pressure_threshold_at_upper_extent_of_background_diffusion long_name = sigma level threshold for background diffusivity units = none dimensions = () @@ -414,7 +444,7 @@ intent = in optional = F [xkzminv] - standard_name = atmosphere_heat_diffusivity_background_maximum + standard_name = max_atmosphere_heat_diffusivity_due_to_background long_name = max. background val. diffusivity in inversion layers units = m2 s-1 dimensions = () @@ -432,7 +462,7 @@ intent = in optional = F [rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -468,75 +498,84 @@ intent = in optional = F [ntoz] - standard_name = index_for_ozone + standard_name = index_of_ozone_mixing_ratio_in_tracer_concentration_array long_name = tracer index for ozone mixing ratio units = index dimensions = () type = integer intent = in optional = F -[dt3dt_PBL] - standard_name = cumulative_change_in_temperature_due_to_PBL - long_name = cumulative change in temperature due to PBL - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[du3dt_PBL] - standard_name = cumulative_change_in_x_wind_due_to_PBL - long_name = cumulative change in x wind due to PBL - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) +[dtend] + standard_name = cumulative_change_of_state_variables + long_name = diagnostic tendencies for state variables + units = various + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_cumulative_change_processes) type = real kind = kind_phys - intent = inout -[dv3dt_PBL] - standard_name = cumulative_change_in_y_wind_due_to_PBL - long_name = cumulative change in y wind due to PBL - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[dq3dt_PBL] - standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL - long_name = cumulative change in water vapor specific humidity due to PBL - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[do3dt_PBL] - standard_name = cumulative_change_in_ozone_mixing_ratio_due_to_PBL - long_name = cumulative change in ozone mixing ratio due to PBL - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout + intent = in + optional = F +[dtidx] + standard_name = cumulative_change_of_state_variables_outer_index + long_name = index of state-variable and process in last dimension of diagnostic tendencies array AKA cumulative_change_index + units = index + dimensions = (number_of_tracers_plus_one_hundred,number_of_cumulative_change_processes) + type = integer + intent = in + optional = F +[index_of_temperature] + standard_name = index_of_temperature_in_cumulative_change_index + long_name = index of temperature in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_x_wind] + standard_name = index_of_x_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_y_wind] + standard_name = index_of_y_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_process_pbl] + standard_name = index_of_subgrid_scale_vertical_mixing_process_in_cumulative_change_index + long_name = index of subgrid scale vertical mixing process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in optional = F [gen_tend] - standard_name = flag_for_generic_planetary_boundary_layer_tendency + standard_name = flag_for_generic_tendency_due_to_planetary_boundary_layer long_name = true if GFS_PBL_generic should calculate tendencies units = flag dimensions = () type = logical intent = in [ldiag3d] - standard_name = flag_diagnostics_3D + standard_name = flag_for_diagnostics_3D long_name = flag for 3d diagnostic fields units = flag dimensions = () type = logical intent = in -[qdiag3d] - standard_name = flag_tracer_diagnostics_3D - long_name = flag for 3d tracer diagnostic fields - units = flag +[ntqv] + standard_name = index_of_specific_humidity_in_tracer_concentration_array + long_name = tracer index for water vapor (specific humidity) + units = index dimensions = () - type = logical + type = integer intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/mp_fer_hires.F90 b/physics/mp_fer_hires.F90 index d22f0a18b..9bbda5ad0 100644 --- a/physics/mp_fer_hires.F90 +++ b/physics/mp_fer_hires.F90 @@ -54,9 +54,9 @@ subroutine mp_fer_hires_init(ncol, nlev, dtp, imp_physics, & logical, intent(in) :: restart character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - real(kind_phys), intent(out), optional :: f_ice(1:ncol,1:nlev) - real(kind_phys), intent(out), optional :: f_rain(1:ncol,1:nlev) - real(kind_phys), intent(out), optional :: f_rimef(1:ncol,1:nlev) + real(kind_phys), intent(out) :: f_ice(:,:) + real(kind_phys), intent(out) :: f_rain(:,:) + real(kind_phys), intent(out) :: f_rimef(:,:) ! Local variables @@ -152,27 +152,27 @@ SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & logical, intent(in ) :: spec_adv integer, intent(in ) :: mpirank integer, intent(in ) :: mpiroot - real(kind_phys), intent(in ) :: slmsk(1:ncol) - real(kind_phys), intent(in ) :: prsi(1:ncol,1:nlev+1) - real(kind_phys), intent(in ) :: p_phy(1:ncol,1:nlev) + real(kind_phys), intent(in ) :: slmsk(:) + real(kind_phys), intent(in ) :: prsi(:,:) + real(kind_phys), intent(in ) :: p_phy(:,:) real(kind_phys), intent(in ) :: epsq,r_d,p608,cp,g - real(kind_phys), intent(inout) :: t(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: q(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: cwm(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: train(1:ncol,1:nlev) - real(kind_phys), intent(out ) :: sr(1:ncol) - real(kind_phys), intent(inout) :: f_ice(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: f_rain(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: f_rimef(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: qc(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: qr(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: qi(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: qg(1:ncol,1:nlev) ! QRIMEF - - real(kind_phys), intent(inout) :: prec(1:ncol) - real(kind_phys), intent(inout) :: refl_10cm(1:ncol,1:nlev) + real(kind_phys), intent(inout) :: t(:,:) + real(kind_phys), intent(inout) :: q(:,:) + real(kind_phys), intent(inout) :: cwm(:,:) + real(kind_phys), intent(inout) :: train(:,:) + real(kind_phys), intent(out ) :: sr(:) + real(kind_phys), intent(out ) :: f_ice(:,:) + real(kind_phys), intent(out ) :: f_rain(:,:) + real(kind_phys), intent(out ) :: f_rimef(:,:) + real(kind_phys), intent(inout) :: qc(:,:) + real(kind_phys), intent(inout) :: qr(:,:) + real(kind_phys), intent(inout) :: qi(:,:) + real(kind_phys), intent(inout) :: qg(:,:) ! QRIMEF + + real(kind_phys), intent(inout) :: prec(:) + real(kind_phys), intent(inout) :: refl_10cm(:,:) real(kind_phys), intent(in ) :: rhgrd - real(kind_phys), intent(in ) :: dx(1:ncol) + real(kind_phys), intent(in ) :: dx(:) character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! diff --git a/physics/mp_fer_hires.meta b/physics/mp_fer_hires.meta index 1872b5614..f5adb0318 100644 --- a/physics/mp_fer_hires.meta +++ b/physics/mp_fer_hires.meta @@ -16,7 +16,7 @@ intent = in optional = F [nlev] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -24,7 +24,7 @@ intent = in optional = F [dtp] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics timestep units = s dimensions = () @@ -33,7 +33,7 @@ intent = in optional = F [imp_physics] - standard_name = flag_for_microphysics_scheme + standard_name = control_for_microphysics_scheme long_name = choice of microphysics scheme units = flag dimensions = () @@ -41,7 +41,7 @@ intent = in optional = F [imp_physics_fer_hires] - standard_name = flag_for_fer_hires_microphysics_scheme + standard_name = identifier_for_fer_hires_microphysics_scheme long_name = choice of Ferrier-Aligo microphysics scheme units = flag dimensions = () @@ -60,31 +60,31 @@ standard_name = fraction_of_ice_water_cloud long_name = fraction of ice water cloud units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys intent = out - optional = T + optional = F [f_rain] standard_name = fraction_of_rain_water_cloud long_name = fraction of rain water cloud units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys intent = out - optional = T + optional = F [f_rimef] standard_name = rime_factor long_name = rime factor units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys intent = out - optional = T + optional = F [mpicomm] - standard_name = mpi_comm + standard_name = mpi_communicator long_name = MPI communicator units = index dimensions = () @@ -108,7 +108,7 @@ intent = in optional = F [threads] - standard_name = omp_threads + standard_name = number_of_openmp_threads long_name = number of OpenMP threads available to scheme units = count dimensions = () @@ -153,6 +153,7 @@ type = integer intent = out optional = F + ######################################################################## [ccpp-arg-table] name = mp_fer_hires_run @@ -166,7 +167,7 @@ intent = in optional = F [nlev] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -174,7 +175,7 @@ intent = in optional = F [dt] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics time step units = s dimensions = () @@ -183,7 +184,7 @@ intent = in optional = F [spec_adv] - standard_name = flag_for_individual_cloud_species_advected + standard_name = flag_for_separate_advection_of_condensate_species long_name = flag for individual cloud species advected units = flag dimensions = () @@ -191,7 +192,7 @@ intent = in optional = F [slmsk] - standard_name = sea_land_ice_mask_real + standard_name = area_type long_name = landmask: sea/land/ice=0/1/2 units = flag dimensions = (horizontal_loop_extent) @@ -203,7 +204,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -212,25 +213,25 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [t] - standard_name = air_temperature_updated_by_physics + standard_name = air_temperature_of_new_state long_name = temperature updated by physics units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [q] - standard_name = water_vapor_specific_humidity_updated_by_physics + standard_name = specific_humidity_of_new_state long_name = water vapor specific humidity updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -239,7 +240,7 @@ standard_name = total_cloud_condensate_mixing_ratio_updated_by_physics long_name = total cloud condensate mixing ratio (except water vapor) updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -248,7 +249,7 @@ standard_name = accumulated_change_of_air_temperature_due_to_FA_scheme long_name = accumulated change of air temperature due to FA MP scheme units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -266,7 +267,7 @@ standard_name = fraction_of_ice_water_cloud long_name = fraction of ice water cloud units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -275,7 +276,7 @@ standard_name = fraction_of_rain_water_cloud long_name = fraction of rain water cloud units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -284,43 +285,43 @@ standard_name = rime_factor long_name = rime factor units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [qc] - standard_name = cloud_condensed_water_mixing_ratio_updated_by_physics + standard_name = cloud_liquid_water_mixing_ratio_of_new_state long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F -[qi] - standard_name = ice_water_mixing_ratio_updated_by_physics - long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) updated by physics +[qr] + standard_name = rain_mixing_ratio_of_new_state + long_name = ratio of mass of rain water to mass of dry air plus vapor (without condensates) updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F -[qr] - standard_name = rain_water_mixing_ratio_updated_by_physics - long_name = ratio of mass of rain water to mass of dry air plus vapor (without condensates) updated by physics +[qi] + standard_name = cloud_ice_mixing_ratio_of_new_state + long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [qg] - standard_name = mass_weighted_rime_factor_updated_by_physics + standard_name = mass_weighted_rime_factor_of_new_state long_name = mass weighted rime factor updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -351,7 +352,7 @@ intent = in optional = F [threads] - standard_name = omp_threads + standard_name = number_of_openmp_threads long_name = number of OpenMP threads available to scheme units = count dimensions = () @@ -362,13 +363,13 @@ standard_name = radar_reflectivity_10cm long_name = instantaneous refl_10cm units = dBZ - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [rhgrd] - standard_name = fa_threshold_relative_humidity_for_onset_of_condensation + standard_name = relative_humidity_threshold_for_condensation long_name = relative humidity threshold parameter for condensation for FA scheme units = none dimensions = () @@ -377,7 +378,7 @@ intent = in optional = F [dx] - standard_name = cell_size + standard_name = characteristic_grid_lengthscale long_name = relative dx for the grid cell units = m dimensions = (horizontal_loop_extent) @@ -395,7 +396,7 @@ intent = in optional = F [R_D] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () diff --git a/physics/mp_thompson.F90 b/physics/mp_thompson.F90 index ec19945b0..c31d90b09 100644 --- a/physics/mp_thompson.F90 +++ b/physics/mp_thompson.F90 @@ -10,6 +10,7 @@ module mp_thompson use module_mp_thompson, only : thompson_init, mp_gt_driver, thompson_finalize, calc_effectRad use module_mp_thompson, only : naIN0, naIN1, naCCN0, naCCN1, eps, Nt_c + use module_mp_thompson, only : re_qc_min, re_qc_max, re_qi_min, re_qi_max, re_qs_min, re_qs_max use module_mp_thompson_make_number_concentrations, only: make_IceNumber, make_DropletNumber, make_RainNumber @@ -21,31 +22,36 @@ module mp_thompson logical :: is_initialized = .False. + integer, parameter :: ext_ndiag3d = 37 + contains !> This subroutine is a wrapper around the actual thompson_init(). !! \section arg_table_mp_thompson_init Argument Table !! \htmlinclude mp_thompson_init.html !! - subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, restart, & - imp_physics, imp_physics_thompson, & + subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, con_eps, & + restart, imp_physics, & + imp_physics_thompson, convert_dry_rho,& spechum, qc, qr, qi, qs, qg, ni, nr, & is_aerosol_aware, nc, nwfa2d, nifa2d, & nwfa, nifa, tgrs, prsl, phil, area, & re_cloud, re_ice, re_snow, & mpicomm, mpirank, mpiroot, & - threads, errmsg, errflg) + threads, ext_diag, diag3d, & + errmsg, errflg) implicit none ! Interface variables integer, intent(in ) :: ncol integer, intent(in ) :: nlev - real(kind_phys), intent(in ) :: con_g, con_rd + real(kind_phys), intent(in ) :: con_g, con_rd, con_eps logical, intent(in ) :: restart integer, intent(in ) :: imp_physics integer, intent(in ) :: imp_physics_thompson ! Hydrometeors + logical, intent(in ) :: convert_dry_rho real(kind_phys), intent(inout) :: spechum(:,:) real(kind_phys), intent(inout) :: qc(:,:) real(kind_phys), intent(inout) :: qr(:,:) @@ -76,24 +82,19 @@ subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, restart, & integer, intent(in ) :: mpiroot ! Threading/blocking information integer, intent(in ) :: threads + ! Extended diagnostics + logical, intent(in ) :: ext_diag + real(kind_phys), intent(in ) :: diag3d(:,:,:) ! CCPP error handling character(len=*), intent( out) :: errmsg integer, intent( out) :: errflg - ! Hydrometeors - real(kind_phys) :: qv_mp(1:ncol,1:nlev) !< kg kg-1 (dry mixing ratio) - real(kind_phys) :: qc_mp(1:ncol,1:nlev) !< kg kg-1 (dry mixing ratio) - real(kind_phys) :: qr_mp(1:ncol,1:nlev) !< kg kg-1 (dry mixing ratio) - real(kind_phys) :: qi_mp(1:ncol,1:nlev) !< kg kg-1 (dry mixing ratio) - real(kind_phys) :: qs_mp(1:ncol,1:nlev) !< kg kg-1 (dry mixing ratio) - real(kind_phys) :: qg_mp(1:ncol,1:nlev) !< kg kg-1 (dry mixing ratio) - real(kind_phys) :: ni_mp(1:ncol,1:nlev) !< kg-1 - real(kind_phys) :: nr_mp(1:ncol,1:nlev) !< kg-1 - real(kind_phys) :: nc_mp(1:ncol,1:nlev) !< kg-1 ! - real(kind_phys) :: hgt(1:ncol,1:nlev) ! m - real(kind_phys) :: rho(1:ncol,1:nlev) ! kg m-3 - real(kind_phys) :: orho(1:ncol,1:nlev) ! m3 kg-1 + real(kind_phys) :: qv(1:ncol,1:nlev) ! kg kg-1 (water vapor mixing ratio) + real(kind_phys) :: hgt(1:ncol,1:nlev) ! m + real(kind_phys) :: rho(1:ncol,1:nlev) ! kg m-3 + real(kind_phys) :: orho(1:ncol,1:nlev) ! m3 kg-1 + real(kind_phys) :: nc_local(1:ncol,1:nlev) ! needed because nc is only allocated if is_aerosol_aware is true ! real (kind=kind_phys) :: h_01, airmass, niIN3, niCCN3 integer :: i, k @@ -104,14 +105,6 @@ subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, restart, & if (is_initialized) return - ! DH* temporary - if (mpirank==mpiroot) then - write(0,*) ' ----------------------------------------------------------------------------------------------------------------' - write(0,*) ' --- WARNING --- the CCPP Thompson MP scheme is currently under development, use at your own risk --- WARNING ---' - write(0,*) ' ----------------------------------------------------------------------------------------------------------------' - end if - ! *DH temporary - ! Consistency checks if (imp_physics/=imp_physics_thompson) then write(errmsg,'(*(a))') "Logic error: namelist choice of microphysics is different from Thompson MP" @@ -119,93 +112,79 @@ subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, restart, & return end if - ! Call Thompson init - if (is_aerosol_aware) then - call thompson_init(nwfa2d=nwfa2d, nifa2d=nifa2d, nwfa=nwfa, nifa=nifa, & - mpicomm=mpicomm, mpirank=mpirank, mpiroot=mpiroot, & - threads=threads, errmsg=errmsg, errflg=errflg) - if (errflg /= 0) return - else - call thompson_init(mpicomm=mpicomm, mpirank=mpirank, mpiroot=mpiroot, & - threads=threads, errmsg=errmsg, errflg=errflg) - if (errflg /= 0) return + if (ext_diag) then + if (size(diag3d,dim=3) /= ext_ndiag3d) then + write(errmsg,'(*(a))') "Logic error: number of diagnostic 3d arrays from model does not match requirements" + errflg = 1 + return + end if end if + ! Call Thompson init + call thompson_init(is_aerosol_aware_in=is_aerosol_aware, mpicomm=mpicomm, & + mpirank=mpirank, mpiroot=mpiroot, threads=threads, & + errmsg=errmsg, errflg=errflg) + if (errflg /= 0) return + ! For restart runs, the init is done here if (restart) then is_initialized = .true. return end if - ! Fix initial values of hydrometeors - where(spechum<0) spechum = 0.0 + ! Geopotential height in m2 s-2 to height in m + hgt = phil/con_g + + ! Ensure non-negative mass mixing ratios of all water variables + where(spechum<0) spechum = 1.0E-10 ! COMMENT, gthompsn, spechum should *never* be identically zero. where(qc<0) qc = 0.0 where(qr<0) qr = 0.0 where(qi<0) qi = 0.0 where(qs<0) qs = 0.0 where(qg<0) qg = 0.0 - where(ni<0) ni = 0.0 - where(nr<0) nr = 0.0 - if (is_aerosol_aware) then - ! Fix initial values of aerosols - where(nc<0) nc = 0.0 - where(nwfa<0) nwfa = 0.0 - where(nifa<0) nifa = 0.0 - where(nwfa2d<0) nwfa2d = 0.0 - where(nifa2d<0) nifa2d = 0.0 + !> - Convert specific humidity to water vapor mixing ratio. + !> - Also, hydrometeor variables are mass or number mixing ratio + !> - either kg of species per kg of dry air, or per kg of (dry + vapor). + + qv = spechum/(1.0_kind_phys-spechum) + + if (convert_dry_rho) then + qc = qc/(1.0_kind_phys-spechum) + qr = qr/(1.0_kind_phys-spechum) + qi = qi/(1.0_kind_phys-spechum) + qs = qs/(1.0_kind_phys-spechum) + qg = qg/(1.0_kind_phys-spechum) + + ni = ni/(1.0_kind_phys-spechum) + nr = nr/(1.0_kind_phys-spechum) + if (is_aerosol_aware) then + nc = nc/(1.0_kind_phys-spechum) + nwfa = nwfa/(1.0_kind_phys-spechum) + nifa = nifa/(1.0_kind_phys-spechum) + end if end if - ! Geopotential height in m2 s-2 to height in m - hgt = phil/con_g - - ! Density of air in kg m-3 and inverse density of air - rho = prsl/(con_rd*tgrs) + ! Density of moist air in kg m-3 and inverse density of air + rho = con_eps*prsl/(con_rd*tgrs*(qv+con_eps)) orho = 1.0/rho - ! Prior to calling the functions: make_DropletNumber, make_IceNumber, make_RainNumber, - ! the incoming mixing ratios should be converted to units of mass/num per cubic meter - ! rather than per kg of air. So, to pass back to the model state variables, - ! they also need to be switched back to mass/number per kg of air, because - ! what is returned by the functions is in units of number per cubic meter. - ! They also need to be converted to dry mixing ratios. - - !> - Convert specific humidity/moist mixing ratios to dry mixing ratios - qv_mp = spechum/(1.0_kind_phys-spechum) - qc_mp = qc/(1.0_kind_phys-spechum) - qr_mp = qr/(1.0_kind_phys-spechum) - qi_mp = qi/(1.0_kind_phys-spechum) - qs_mp = qs/(1.0_kind_phys-spechum) - qg_mp = qg/(1.0_kind_phys-spechum) - - !> - Convert number concentrations from moist to dry - ni_mp = ni/(1.0_kind_phys-spechum) - nr_mp = nr/(1.0_kind_phys-spechum) - if (is_aerosol_aware) then - nc_mp = nc/(1.0_kind_phys-spechum) - end if - - ! If qi is in boundary conditions but ni is not, calculate ni from qi, rho and tgrs - if (maxval(qi_mp)>0.0 .and. maxval(ni_mp)==0.0) then - ni_mp = make_IceNumber(qi_mp*rho, tgrs) * orho - end if + ! Ensure we have 1st guess ice number where mass non-zero but no number. + where(qi .LE. 0.0) ni=0.0 + where(qi .GT. 0 .and. ni .LE. 0.0) ni = make_IceNumber(qi*rho, tgrs) * orho + where(qi .EQ. 0.0 .and. ni .GT. 0.0) ni=0.0 - ! If ni is in boundary conditions but qi is not, reset ni to zero - if (maxval(ni_mp)>0.0 .and. maxval(qi_mp)==0.0) ni_mp = 0.0 + ! Ensure we have 1st guess rain number where mass non-zero but no number. + where(qr .LE. 0.0) nr=0.0 + where(qr .GT. 0 .and. nr .LE. 0.0) nr = make_RainNumber(qr*rho, tgrs) * orho + where(qr .EQ. 0.0 .and. nr .GT. 0.0) nr=0.0 - ! If qr is in boundary conditions but nr is not, calculate nr from qr, rho and tgrs - if (maxval(qr_mp)>0.0 .and. maxval(nr_mp)==0.0) then - nr_mp = make_RainNumber(qr_mp*rho, tgrs) * orho - end if - - ! If nr is in boundary conditions but qr is not, reset nr to zero - if (maxval(nr_mp)>0.0 .and. maxval(qr_mp)==0.0) nr_mp = 0.0 !..Check for existing aerosol data, both CCN and IN aerosols. If missing !.. fill in just a basic vertical profile, somewhat boundary-layer following. if (is_aerosol_aware) then - ! CCN + ! Potential cloud condensation nuclei (CCN) if (MAXVAL(nwfa) .lt. eps) then if (mpirank==mpiroot) write(*,*) ' Apparently there are no initial CCN aerosols.' do i = 1, ncol @@ -219,7 +198,7 @@ subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, restart, & niCCN3 = -1.0*ALOG(naCCN1/naCCN0)/h_01 nwfa(i,1) = naCCN1+naCCN0*exp(-((hgt(i,2)-hgt(i,1))/1000.)*niCCN3) airmass = 1./orho(i,1) * (hgt(i,2)-hgt(i,1))*area(i) ! kg - nwfa2d(i) = nwfa(i,1) * 0.000196 * (airmass*2.E-10) + nwfa2d(i) = nwfa(i,1) * 0.000196 * (airmass*5.E-11) do k = 2, nlev nwfa(i,k) = naCCN1+naCCN0*exp(-((hgt(i,k)-hgt(i,1))/1000.)*niCCN3) enddo @@ -227,8 +206,6 @@ subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, restart, & else if (mpirank==mpiroot) write(*,*) ' Apparently initial CCN aerosols are present.' if (MAXVAL(nwfa2d) .lt. eps) then -! Hard-coded switch between new (from WRFv4.0, top) and old (until WRFv3.9.1.1, bottom) surface emission rate calculations -#if 0 !+---+-----------------------------------------------------------------+ !..Scale the lowest level aerosol data into an emissions rate. This is !.. very far from ideal, but need higher emissions where larger amount @@ -239,41 +216,16 @@ subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, restart, & !.. that was tested as ~(20kmx20kmx50m = 2.E10 m**-3) !+---+-----------------------------------------------------------------+ if (mpirank==mpiroot) write(*,*) ' Apparently there are no initial CCN aerosol surface emission rates.' - if (mpirank==mpiroot) write(*,*) ' Use new (WRFv4+) formula to calculate CCN surface emission rates.' do i = 1, ncol airmass = 1./orho(i,1) * (hgt(i,2)-hgt(i,1))*area(i) ! kg - nwfa2d(i) = nwfa(i,1) * 0.000196 * (airmass*2.E-10) - enddo -#else - !+---+-----------------------------------------------------------------+ - !..Scale the lowest level aerosol data into an emissions rate. This is - !.. very far from ideal, but need higher emissions where larger amount - !.. of existing and lesser emissions where not already lots of aerosols - !.. for first-order simplistic approach. Later, proper connection to - !.. emission inventory would be better, but, for now, scale like this: - !.. where: Nwfa=50 per cc, emit 0.875E4 aerosols per kg per second - !.. Nwfa=500 per cc, emit 0.875E5 aerosols per kg per second - !.. Nwfa=5000 per cc, emit 0.875E6 aerosols per kg per second - !.. for a grid with 20km spacing and scale accordingly for other spacings. - !+---+-----------------------------------------------------------------+ - if (mpirank==mpiroot) write(*,*) ' Apparently there are no initial CCN aerosol surface emission rates.' - if (mpirank==mpiroot) write(*,*) ' Use old (pre WRFv4) formula to calculate CCN surface emission rates.' - do i = 1, ncol - if (SQRT(area(i))/20000.0 .ge. 1.0) then - h_01 = 0.875 - else - h_01 = (0.875 + 0.125*((20000.-SQRT(area(i)))/16000.)) * SQRT(area(i))/20000. - endif - nwfa2d(i) = 10.0**(LOG10(nwfa(i,1)*1.E-6)-3.69897) - nwfa2d(i) = nwfa2d(i)*h_01 * 1.E6 + nwfa2d(i) = nwfa(i,1) * 0.000196 * (airmass*5.E-11) enddo -#endif else if (mpirank==mpiroot) write(*,*) ' Apparently initial CCN aerosol surface emission rates are present.' endif endif - ! IN + ! Potential ice nuclei (IN) if (MAXVAL(nifa) .lt. eps) then if (mpirank==mpiroot) write(*,*) ' Apparently there are no initial IN aerosols.' do i = 1, ncol @@ -302,19 +254,23 @@ subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, restart, & endif endif - ! If qc is in boundary conditions but nc is not, calculate nc from qc, rho and nwfa - if (maxval(qc_mp)>0.0 .and. maxval(nc_mp)==0.0) then - nc_mp = make_DropletNumber(qc_mp*rho, nwfa) * orho - end if + ! Ensure we have 1st guess cloud droplet number where mass non-zero but no number. + where(qc .LE. 0.0) nc=0.0 + where(qc .GT. 0 .and. nc .LE. 0.0) nc = make_DropletNumber(qc*rho, nwfa*rho) * orho + where(qc .EQ. 0.0 .and. nc .GT. 0.0) nc = 0.0 + + ! Ensure non-negative aerosol number concentrations. + where(nwfa .LE. 0.0) nwfa = 1.1E6 + where(nifa .LE. 0.0) nifa = naIN1*0.01 - ! If nc is in boundary conditions but qc is not, reset nc to zero - if (maxval(nc_mp)>0.0 .and. maxval(qc_mp)==0.0) nc_mp = 0.0 + ! Copy to local array for calculating cloud effective radii below + nc_local = nc else ! Constant droplet concentration for single moment cloud water as in ! module_mp_thompson.F90, only needed for effective radii calculation - nc_mp = Nt_c/rho + nc_local = Nt_c/rho end if @@ -322,9 +278,14 @@ subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, restart, & if (present(re_cloud) .and. present(re_ice) .and. present(re_snow)) then ! Effective radii [m] are now intent(out), bounds applied in calc_effectRad do i = 1, ncol - call calc_effectRad (tgrs(i,:), prsl(i,:), qv_mp(i,:), qc_mp(i,:), & - nc_mp(i,:), qi_mp(i,:), ni_mp(i,:), qs_mp(i,:), & + call calc_effectRad (tgrs(i,:), prsl(i,:), qv(i,:), qc(i,:), & + nc_local(i,:), qi(i,:), ni(i,:), qs(i,:), & re_cloud(i,:), re_ice(i,:), re_snow(i,:), 1, nlev) + do k = 1, nlev + re_cloud(i,k) = MAX(re_qc_min, MIN(re_cloud(i,k), re_qc_max)) + re_ice(i,k) = MAX(re_qi_min, MIN(re_ice(i,k), re_qi_max)) + re_snow(i,k) = MAX(re_qs_min, MIN(re_snow(i,k), re_qs_max)) + end do end do !! Convert to micron: required for bit-for-bit identical restarts; !! otherwise entering mp_thompson_init and converting mu to m and @@ -341,11 +302,20 @@ subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, restart, & return end if - !> - Convert number concentrations from dry to moist - ni = ni_mp/(1.0_kind_phys+qv_mp) - nr = nr_mp/(1.0_kind_phys+qv_mp) - if (is_aerosol_aware) then - nc = nc_mp/(1.0_kind_phys+qv_mp) + if (convert_dry_rho) then + !qc = qc/(1.0_kind_phys+qv) + !qr = qr/(1.0_kind_phys+qv) + !qi = qi/(1.0_kind_phys+qv) + !qs = qs/(1.0_kind_phys+qv) + !qg = qg/(1.0_kind_phys+qv) + + ni = ni/(1.0_kind_phys+qv) + nr = nr/(1.0_kind_phys+qv) + if (is_aerosol_aware) then + nc = nc/(1.0_kind_phys+qv) + nwfa = nwfa/(1.0_kind_phys+qv) + nifa = nifa/(1.0_kind_phys+qv) + end if end if is_initialized = .true. @@ -360,14 +330,17 @@ end subroutine mp_thompson_init !>\section gen_thompson_hrrr Thompson MP General Algorithm !>@{ subroutine mp_thompson_run(ncol, nlev, con_g, con_rd, & + con_eps, convert_dry_rho, & spechum, qc, qr, qi, qs, qg, ni, nr, & is_aerosol_aware, nc, nwfa, nifa, & nwfa2d, nifa2d, & - tgrs, prsl, phii, omega, dtp, & + tgrs, prsl, phii, omega, dt_inner, & + dtp, first_time_step, istep, nsteps, & prcp, rain, graupel, ice, snow, sr, & - refl_10cm, reset, do_radar_ref, & + refl_10cm, reset_dBZ, do_radar_ref, & re_cloud, re_ice, re_snow, & - mpicomm, mpirank, mpiroot, & + mpicomm, mpirank, mpiroot, blkno, & + ext_diag, diag3d, reset_diag3d, & errmsg, errflg) implicit none @@ -379,17 +352,19 @@ subroutine mp_thompson_run(ncol, nlev, con_g, con_rd, & integer, intent(in ) :: nlev real(kind_phys), intent(in ) :: con_g real(kind_phys), intent(in ) :: con_rd + real(kind_phys), intent(in ) :: con_eps ! Hydrometeors - real(kind_phys), intent(inout) :: spechum(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: qc(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: qr(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: qi(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: qs(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: qg(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: ni(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: nr(1:ncol,1:nlev) + logical, intent(in ) :: convert_dry_rho + real(kind_phys), intent(inout) :: spechum(:,:) + real(kind_phys), intent(inout) :: qc(:,:) + real(kind_phys), intent(inout) :: qr(:,:) + real(kind_phys), intent(inout) :: qi(:,:) + real(kind_phys), intent(inout) :: qs(:,:) + real(kind_phys), intent(inout) :: qg(:,:) + real(kind_phys), intent(inout) :: ni(:,:) + real(kind_phys), intent(inout) :: nr(:,:) ! Aerosols - logical, intent(in) :: is_aerosol_aware, reset + logical, intent(in) :: is_aerosol_aware, reset_dBZ ! The following arrays are not allocated if is_aerosol_aware is false real(kind_phys), optional, intent(inout) :: nc(:,:) real(kind_phys), optional, intent(inout) :: nwfa(:,:) @@ -397,48 +372,50 @@ subroutine mp_thompson_run(ncol, nlev, con_g, con_rd, & real(kind_phys), optional, intent(in ) :: nwfa2d(:) real(kind_phys), optional, intent(in ) :: nifa2d(:) ! State variables and timestep information - real(kind_phys), intent(inout) :: tgrs(1:ncol,1:nlev) - real(kind_phys), intent(in ) :: prsl(1:ncol,1:nlev) - real(kind_phys), intent(in ) :: phii(1:ncol,1:nlev+1) - real(kind_phys), intent(in ) :: omega(1:ncol,1:nlev) + real(kind_phys), intent(inout) :: tgrs(:,:) + real(kind_phys), intent(in ) :: prsl(:,:) + real(kind_phys), intent(in ) :: phii(:,:) + real(kind_phys), intent(in ) :: omega(:,:) real(kind_phys), intent(in ) :: dtp + logical, intent(in ) :: first_time_step + integer, intent(in ) :: istep, nsteps ! Precip/rain/snow/graupel fall amounts and fraction of frozen precip - real(kind_phys), intent( out) :: prcp(1:ncol) - real(kind_phys), intent( out) :: rain(1:ncol) - real(kind_phys), intent( out) :: graupel(1:ncol) - real(kind_phys), intent( out) :: ice(1:ncol) - real(kind_phys), intent( out) :: snow(1:ncol) - real(kind_phys), intent( out) :: sr(1:ncol) + real(kind_phys), intent(inout) :: prcp(:) + real(kind_phys), intent(inout) :: rain(:) + real(kind_phys), intent(inout) :: graupel(:) + real(kind_phys), intent(inout) :: ice(:) + real(kind_phys), intent(inout) :: snow(:) + real(kind_phys), intent( out) :: sr(:) ! Radar reflectivity - real(kind_phys), intent( out) :: refl_10cm(1:ncol,1:nlev) + real(kind_phys), intent( out) :: refl_10cm(:,:) logical, optional, intent(in ) :: do_radar_ref + real, intent(in ) :: dt_inner ! Cloud effective radii - real(kind_phys), optional, intent( out) :: re_cloud(1:ncol,1:nlev) - real(kind_phys), optional, intent( out) :: re_ice(1:ncol,1:nlev) - real(kind_phys), optional, intent( out) :: re_snow(1:ncol,1:nlev) - ! MPI information + real(kind_phys), optional, intent( out) :: re_cloud(:,:) + real(kind_phys), optional, intent( out) :: re_ice(:,:) + real(kind_phys), optional, intent( out) :: re_snow(:,:) + ! MPI and block information + integer, intent(in) :: blkno integer, intent(in) :: mpicomm integer, intent(in) :: mpirank integer, intent(in) :: mpiroot + ! Extended diagnostic output + logical, intent(in) :: ext_diag + real(kind_phys), target, intent(inout) :: diag3d(:,:,:) + logical, intent(in) :: reset_diag3d + ! CCPP error handling character(len=*), intent( out) :: errmsg integer, intent( out) :: errflg ! Local variables + ! Reduced time step if subcycling is used + real(kind_phys) :: dtstep ! Air density real(kind_phys) :: rho(1:ncol,1:nlev) !< kg m-3 - ! Hydrometeors - real(kind_phys) :: qv_mp(1:ncol,1:nlev) !< kg kg-1 (dry mixing ratio) - real(kind_phys) :: qc_mp(1:ncol,1:nlev) !< kg kg-1 (dry mixing ratio) - real(kind_phys) :: qr_mp(1:ncol,1:nlev) !< kg kg-1 (dry mixing ratio) - real(kind_phys) :: qi_mp(1:ncol,1:nlev) !< kg kg-1 (dry mixing ratio) - real(kind_phys) :: qs_mp(1:ncol,1:nlev) !< kg kg-1 (dry mixing ratio) - real(kind_phys) :: qg_mp(1:ncol,1:nlev) !< kg kg-1 (dry mixing ratio) - real(kind_phys) :: ni_mp(1:ncol,1:nlev) !< kg-1 - real(kind_phys) :: nr_mp(1:ncol,1:nlev) !< kg-1 - real(kind_phys) :: nc_mp(1:ncol,1:nlev) !< kg-1 - + ! Water vapor mixing ratio (instead of specific humidity) + real(kind_phys) :: qv(1:ncol,1:nlev) !< kg kg-1 ! Vertical velocity and level width real(kind_phys) :: w(1:ncol,1:nlev) !< m s-1 real(kind_phys) :: dz(1:ncol,1:nlev) !< m @@ -469,6 +446,47 @@ subroutine mp_thompson_run(ncol, nlev, con_g, con_rd, & integer :: ids,ide, jds,jde, kds,kde, & ims,ime, jms,jme, kms,kme, & its,ite, jts,jte, kts,kte + ! Pointer arrays for extended diagnostics + !real(kind_phys), dimension(:,:,:), pointer :: vts1 => null() + !real(kind_phys), dimension(:,:,:), pointer :: txri => null() + !real(kind_phys), dimension(:,:,:), pointer :: txrc => null() + real(kind_phys), dimension(:,:,:), pointer :: prw_vcdc => null() + real(kind_phys), dimension(:,:,:), pointer :: prw_vcde => null() + real(kind_phys), dimension(:,:,:), pointer :: tpri_inu => null() + real(kind_phys), dimension(:,:,:), pointer :: tpri_ide_d => null() + real(kind_phys), dimension(:,:,:), pointer :: tpri_ide_s => null() + real(kind_phys), dimension(:,:,:), pointer :: tprs_ide => null() + real(kind_phys), dimension(:,:,:), pointer :: tprs_sde_d => null() + real(kind_phys), dimension(:,:,:), pointer :: tprs_sde_s => null() + real(kind_phys), dimension(:,:,:), pointer :: tprg_gde_d => null() + real(kind_phys), dimension(:,:,:), pointer :: tprg_gde_s => null() + real(kind_phys), dimension(:,:,:), pointer :: tpri_iha => null() + real(kind_phys), dimension(:,:,:), pointer :: tpri_wfz => null() + real(kind_phys), dimension(:,:,:), pointer :: tpri_rfz => null() + real(kind_phys), dimension(:,:,:), pointer :: tprg_rfz => null() + real(kind_phys), dimension(:,:,:), pointer :: tprs_scw => null() + real(kind_phys), dimension(:,:,:), pointer :: tprg_scw => null() + real(kind_phys), dimension(:,:,:), pointer :: tprg_rcs => null() + real(kind_phys), dimension(:,:,:), pointer :: tprs_rcs => null() + real(kind_phys), dimension(:,:,:), pointer :: tprr_rci => null() + real(kind_phys), dimension(:,:,:), pointer :: tprg_rcg => null() + real(kind_phys), dimension(:,:,:), pointer :: tprw_vcd_c => null() + real(kind_phys), dimension(:,:,:), pointer :: tprw_vcd_e => null() + real(kind_phys), dimension(:,:,:), pointer :: tprr_sml => null() + real(kind_phys), dimension(:,:,:), pointer :: tprr_gml => null() + real(kind_phys), dimension(:,:,:), pointer :: tprr_rcg => null() + real(kind_phys), dimension(:,:,:), pointer :: tprr_rcs => null() + real(kind_phys), dimension(:,:,:), pointer :: tprv_rev => null() + real(kind_phys), dimension(:,:,:), pointer :: tten3 => null() + real(kind_phys), dimension(:,:,:), pointer :: qvten3 => null() + real(kind_phys), dimension(:,:,:), pointer :: qrten3 => null() + real(kind_phys), dimension(:,:,:), pointer :: qsten3 => null() + real(kind_phys), dimension(:,:,:), pointer :: qgten3 => null() + real(kind_phys), dimension(:,:,:), pointer :: qiten3 => null() + real(kind_phys), dimension(:,:,:), pointer :: niten3 => null() + real(kind_phys), dimension(:,:,:), pointer :: nrten3 => null() + real(kind_phys), dimension(:,:,:), pointer :: ncten3 => null() + real(kind_phys), dimension(:,:,:), pointer :: qcten3 => null() ! Initialize the CCPP error handling variables errmsg = '' @@ -481,36 +499,60 @@ subroutine mp_thompson_run(ncol, nlev, con_g, con_rd, & return end if - if (is_aerosol_aware .and. .not. (present(nc) .and. & - present(nwfa) .and. & - present(nifa) .and. & - present(nwfa2d) .and. & - present(nifa2d) )) then - write(errmsg,fmt='(*(a))') 'Logic error in mp_thompson_run:', & - ' aerosol-aware microphysics require all of the', & - ' following optional arguments:', & - ' nc, nwfa, nifa, nwfa2d, nifa2d' - errflg = 1 - return + ! Set reduced time step if subcycling is used + if (nsteps>1) then + dtstep = dtp/real(nsteps, kind=kind_phys) + else + dtstep = dtp + end if + if (first_time_step .and. istep==1 .and. mpirank==mpiroot .and. blkno==1) then + write(*,'(a,i0,a,a,f6.2,a)') 'Thompson MP is using ', nsteps, ' substep(s) per time step', & + ' with an effective time step of ', dtstep, ' seconds' end if - !> - Convert specific humidity/moist mixing ratios to dry mixing ratios - qv_mp = spechum/(1.0_kind_phys-spechum) - qc_mp = qc/(1.0_kind_phys-spechum) - qr_mp = qr/(1.0_kind_phys-spechum) - qi_mp = qi/(1.0_kind_phys-spechum) - qs_mp = qs/(1.0_kind_phys-spechum) - qg_mp = qg/(1.0_kind_phys-spechum) - - !> - Convert number concentrations from moist to dry - ni_mp = ni/(1.0_kind_phys-spechum) - nr_mp = nr/(1.0_kind_phys-spechum) - if (is_aerosol_aware) then - nc_mp = nc/(1.0_kind_phys-spechum) + if (first_time_step .and. istep==1) then + if (is_aerosol_aware .and. .not. (present(nc) .and. & + present(nwfa) .and. & + present(nifa) .and. & + present(nwfa2d) .and. & + present(nifa2d) )) then + write(errmsg,fmt='(*(a))') 'Logic error in mp_thompson_run:', & + ' aerosol-aware microphysics require all of the', & + ' following optional arguments:', & + ' nc, nwfa, nifa, nwfa2d, nifa2d' + errflg = 1 + return + end if + end if + + !> - Convert specific humidity to water vapor mixing ratio. + !> - Also, hydrometeor variables are mass or number mixing ratio + !> - either kg of species per kg of dry air, or per kg of (dry + vapor). + + ! DH* - do this only if istep == 1? Would be ok if it was + ! guaranteed that nothing else in the same subcycle group + ! was using these arrays, but it is somewhat dangerous. + qv = spechum/(1.0_kind_phys-spechum) + + if (convert_dry_rho) then + qc = qc/(1.0_kind_phys-spechum) + qr = qr/(1.0_kind_phys-spechum) + qi = qi/(1.0_kind_phys-spechum) + qs = qs/(1.0_kind_phys-spechum) + qg = qg/(1.0_kind_phys-spechum) + + ni = ni/(1.0_kind_phys-spechum) + nr = nr/(1.0_kind_phys-spechum) + if (is_aerosol_aware) then + nc = nc/(1.0_kind_phys-spechum) + nwfa = nwfa/(1.0_kind_phys-spechum) + nifa = nifa/(1.0_kind_phys-spechum) + end if end if + ! *DH !> - Density of air in kg m-3 - rho = prsl/(con_rd*tgrs) + rho = con_eps*prsl/(con_rd*tgrs*(qv+con_eps)) !> - Convert omega in Pa s-1 to vertical velocity w in m s-1 w = -omega/(rho*con_g) @@ -580,74 +622,297 @@ subroutine mp_thompson_run(ncol, nlev, con_g, con_rd, & kme = nlev kte = nlev + ! Set pointers for extended diagnostics + set_extended_diagnostic_pointers: if (ext_diag) then + if (reset_diag3d) then + diag3d = 0.0 + end if + !vts1 => diag3d(:,:,X:X) + !txri => diag3d(:,:,X:X) + !txrc => diag3d(:,:,X:X) + prw_vcdc => diag3d(:,:,1:1) + prw_vcde => diag3d(:,:,2:2) + tpri_inu => diag3d(:,:,3:3) + tpri_ide_d => diag3d(:,:,4:4) + tpri_ide_s => diag3d(:,:,5:5) + tprs_ide => diag3d(:,:,6:6) + tprs_sde_d => diag3d(:,:,7:7) + tprs_sde_s => diag3d(:,:,8:8) + tprg_gde_d => diag3d(:,:,9:9) + tprg_gde_s => diag3d(:,:,10:10) + tpri_iha => diag3d(:,:,11:11) + tpri_wfz => diag3d(:,:,12:12) + tpri_rfz => diag3d(:,:,13:13) + tprg_rfz => diag3d(:,:,14:14) + tprs_scw => diag3d(:,:,15:15) + tprg_scw => diag3d(:,:,16:16) + tprg_rcs => diag3d(:,:,17:17) + tprs_rcs => diag3d(:,:,18:18) + tprr_rci => diag3d(:,:,19:19) + tprg_rcg => diag3d(:,:,20:20) + tprw_vcd_c => diag3d(:,:,21:21) + tprw_vcd_e => diag3d(:,:,22:22) + tprr_sml => diag3d(:,:,23:23) + tprr_gml => diag3d(:,:,24:24) + tprr_rcg => diag3d(:,:,25:25) + tprr_rcs => diag3d(:,:,26:26) + tprv_rev => diag3d(:,:,27:27) + tten3 => diag3d(:,:,28:28) + qvten3 => diag3d(:,:,29:29) + qrten3 => diag3d(:,:,30:30) + qsten3 => diag3d(:,:,31:31) + qgten3 => diag3d(:,:,32:32) + qiten3 => diag3d(:,:,33:33) + niten3 => diag3d(:,:,34:34) + nrten3 => diag3d(:,:,35:35) + ncten3 => diag3d(:,:,36:36) + qcten3 => diag3d(:,:,37:37) + end if set_extended_diagnostic_pointers + !> - Call mp_gt_driver() with or without aerosols if (is_aerosol_aware) then - call mp_gt_driver(qv=qv_mp, qc=qc_mp, qr=qr_mp, qi=qi_mp, qs=qs_mp, qg=qg_mp, & - ni=ni_mp, nr=nr_mp, nc=nc_mp, & - nwfa=nwfa, nifa=nifa, nwfa2d=nwfa2d, nifa2d=nifa2d, & - tt=tgrs, p=prsl, w=w, dz=dz, dt_in=dtp, & - rainnc=rain_mp, rainncv=delta_rain_mp, & - snownc=snow_mp, snowncv=delta_snow_mp, & - icenc=ice_mp, icencv=delta_ice_mp, & - graupelnc=graupel_mp, graupelncv=delta_graupel_mp, sr=sr, & - refl_10cm=refl_10cm, & - diagflag=diagflag, do_radar_ref=do_radar_ref_mp, & - re_cloud=re_cloud, re_ice=re_ice, re_snow=re_snow, & - has_reqc=has_reqc, has_reqi=has_reqi, has_reqs=has_reqs, & - rand_perturb_on=rand_perturb_on, kme_stoch=kme_stoch, & - ! DH* 2020-06-05 not passing this optional argument, see - ! comment in module_mp_thompson.F90 / mp_gt_driver - !rand_pert=rand_pert, & - ids=ids, ide=ide, jds=jds, jde=jde, kds=kds, kde=kde, & - ims=ims, ime=ime, jms=jms, jme=jme, kms=kms, kme=kme, & - its=its, ite=ite, jts=jts, jte=jte, kts=kts, kte=kte, & - errmsg=errmsg, errflg=errflg, reset=reset) - + if (do_effective_radii) then + call mp_gt_driver(qv=qv, qc=qc, qr=qr, qi=qi, qs=qs, qg=qg, ni=ni, nr=nr, & + nc=nc, nwfa=nwfa, nifa=nifa, nwfa2d=nwfa2d, nifa2d=nifa2d, & + tt=tgrs, p=prsl, w=w, dz=dz, dt_in=dtstep, dt_inner=dt_inner, & + rainnc=rain_mp, rainncv=delta_rain_mp, & + snownc=snow_mp, snowncv=delta_snow_mp, & + icenc=ice_mp, icencv=delta_ice_mp, & + graupelnc=graupel_mp, graupelncv=delta_graupel_mp, sr=sr, & + refl_10cm=refl_10cm, & + diagflag=diagflag, do_radar_ref=do_radar_ref_mp, & + re_cloud=re_cloud, re_ice=re_ice, re_snow=re_snow, & + has_reqc=has_reqc, has_reqi=has_reqi, has_reqs=has_reqs, & + rand_perturb_on=rand_perturb_on, kme_stoch=kme_stoch, & + ! DH* 2020-06-05 not passing this optional argument, see + ! comment in module_mp_thompson.F90 / mp_gt_driver + !rand_pert=rand_pert, & + ids=ids, ide=ide, jds=jds, jde=jde, kds=kds, kde=kde, & + ims=ims, ime=ime, jms=jms, jme=jme, kms=kms, kme=kme, & + its=its, ite=ite, jts=jts, jte=jte, kts=kts, kte=kte, & + reset_dBZ=reset_dBZ, istep=istep, nsteps=nsteps, & + first_time_step=first_time_step, errmsg=errmsg, errflg=errflg, & + ! Extended diagnostics + ext_diag=ext_diag, & + ! vts1=vts1, txri=txri, txrc=txrc, & + prw_vcdc=prw_vcdc, & + prw_vcde=prw_vcde, tpri_inu=tpri_inu, tpri_ide_d=tpri_ide_d, & + tpri_ide_s=tpri_ide_s, tprs_ide=tprs_ide, & + tprs_sde_d=tprs_sde_d, & + tprs_sde_s=tprs_sde_s, tprg_gde_d=tprg_gde_d, & + tprg_gde_s=tprg_gde_s, tpri_iha=tpri_iha, & + tpri_wfz=tpri_wfz, tpri_rfz=tpri_rfz, tprg_rfz=tprg_rfz, & + tprs_scw=tprs_scw, tprg_scw=tprg_scw, tprg_rcs=tprg_rcs, & + tprs_rcs=tprs_rcs, & + tprr_rci=tprr_rci, tprg_rcg=tprg_rcg, tprw_vcd_c=tprw_vcd_c, & + tprw_vcd_e=tprw_vcd_e, tprr_sml=tprr_sml, tprr_gml=tprr_gml, & + tprr_rcg=tprr_rcg, tprr_rcs=tprr_rcs, & + tprv_rev=tprv_rev, tten3=tten3, & + qvten3=qvten3, qrten3=qrten3, qsten3=qsten3, qgten3=qgten3, & + qiten3=qiten3, niten3=niten3, nrten3=nrten3, ncten3=ncten3, & + qcten3=qcten3) + else + call mp_gt_driver(qv=qv, qc=qc, qr=qr, qi=qi, qs=qs, qg=qg, ni=ni, nr=nr, & + nc=nc, nwfa=nwfa, nifa=nifa, nwfa2d=nwfa2d, nifa2d=nifa2d, & + tt=tgrs, p=prsl, w=w, dz=dz, dt_in=dtstep, dt_inner=dt_inner, & + rainnc=rain_mp, rainncv=delta_rain_mp, & + snownc=snow_mp, snowncv=delta_snow_mp, & + icenc=ice_mp, icencv=delta_ice_mp, & + graupelnc=graupel_mp, graupelncv=delta_graupel_mp, sr=sr, & + refl_10cm=refl_10cm, & + diagflag=diagflag, do_radar_ref=do_radar_ref_mp, & + has_reqc=has_reqc, has_reqi=has_reqi, has_reqs=has_reqs, & + rand_perturb_on=rand_perturb_on, kme_stoch=kme_stoch, & + ! DH* 2020-06-05 not passing this optional argument, see + ! comment in module_mp_thompson.F90 / mp_gt_driver + !rand_pert=rand_pert, & + ids=ids, ide=ide, jds=jds, jde=jde, kds=kds, kde=kde, & + ims=ims, ime=ime, jms=jms, jme=jme, kms=kms, kme=kme, & + its=its, ite=ite, jts=jts, jte=jte, kts=kts, kte=kte, & + reset_dBZ=reset_dBZ, istep=istep, nsteps=nsteps, & + first_time_step=first_time_step, errmsg=errmsg, errflg=errflg, & + ! Extended diagnostics + ext_diag=ext_diag, & + ! vts1=vts1, txri=txri, txrc=txrc, & + prw_vcdc=prw_vcdc, & + prw_vcde=prw_vcde, tpri_inu=tpri_inu, tpri_ide_d=tpri_ide_d, & + tpri_ide_s=tpri_ide_s, tprs_ide=tprs_ide, & + tprs_sde_d=tprs_sde_d, & + tprs_sde_s=tprs_sde_s, tprg_gde_d=tprg_gde_d, & + tprg_gde_s=tprg_gde_s, tpri_iha=tpri_iha, & + tpri_wfz=tpri_wfz, tpri_rfz=tpri_rfz, tprg_rfz=tprg_rfz, & + tprs_scw=tprs_scw, tprg_scw=tprg_scw, tprg_rcs=tprg_rcs, & + tprs_rcs=tprs_rcs, & + tprr_rci=tprr_rci, tprg_rcg=tprg_rcg, tprw_vcd_c=tprw_vcd_c, & + tprw_vcd_e=tprw_vcd_e, tprr_sml=tprr_sml, tprr_gml=tprr_gml, & + tprr_rcg=tprr_rcg, tprr_rcs=tprr_rcs, & + tprv_rev=tprv_rev, tten3=tten3, & + qvten3=qvten3, qrten3=qrten3, qsten3=qsten3, qgten3=qgten3, & + qiten3=qiten3, niten3=niten3, nrten3=nrten3, ncten3=ncten3, & + qcten3=qcten3) + end if else - call mp_gt_driver(qv=qv_mp, qc=qc_mp, qr=qr_mp, qi=qi_mp, qs=qs_mp, qg=qg_mp, & - ni=ni_mp, nr=nr_mp, & - tt=tgrs, p=prsl, w=w, dz=dz, dt_in=dtp, & - rainnc=rain_mp, rainncv=delta_rain_mp, & - snownc=snow_mp, snowncv=delta_snow_mp, & - icenc=ice_mp, icencv=delta_ice_mp, & - graupelnc=graupel_mp, graupelncv=delta_graupel_mp, sr=sr, & - refl_10cm=refl_10cm, & - diagflag=diagflag, do_radar_ref=do_radar_ref_mp, & - re_cloud=re_cloud, re_ice=re_ice, re_snow=re_snow, & - has_reqc=has_reqc, has_reqi=has_reqi, has_reqs=has_reqs, & - rand_perturb_on=rand_perturb_on, kme_stoch=kme_stoch, & - ! DH* 2020-06-05 not passing this optional argument, see - ! comment in module_mp_thompson.F90 / mp_gt_driver - !rand_pert=rand_pert, & - ids=ids, ide=ide, jds=jds, jde=jde, kds=kds, kde=kde, & - ims=ims, ime=ime, jms=jms, jme=jme, kms=kms, kme=kme, & - its=its, ite=ite, jts=jts, jte=jte, kts=kts, kte=kte, & - errmsg=errmsg, errflg=errflg, reset=reset) + if (do_effective_radii) then + call mp_gt_driver(qv=qv, qc=qc, qr=qr, qi=qi, qs=qs, qg=qg, ni=ni, nr=nr, & + tt=tgrs, p=prsl, w=w, dz=dz, dt_in=dtstep, dt_inner=dt_inner, & + rainnc=rain_mp, rainncv=delta_rain_mp, & + snownc=snow_mp, snowncv=delta_snow_mp, & + icenc=ice_mp, icencv=delta_ice_mp, & + graupelnc=graupel_mp, graupelncv=delta_graupel_mp, sr=sr, & + refl_10cm=refl_10cm, & + diagflag=diagflag, do_radar_ref=do_radar_ref_mp, & + re_cloud=re_cloud, re_ice=re_ice, re_snow=re_snow, & + has_reqc=has_reqc, has_reqi=has_reqi, has_reqs=has_reqs, & + rand_perturb_on=rand_perturb_on, kme_stoch=kme_stoch, & + ! DH* 2020-06-05 not passing this optional argument, see + ! comment in module_mp_thompson.F90 / mp_gt_driver + !rand_pert=rand_pert, & + ids=ids, ide=ide, jds=jds, jde=jde, kds=kds, kde=kde, & + ims=ims, ime=ime, jms=jms, jme=jme, kms=kms, kme=kme, & + its=its, ite=ite, jts=jts, jte=jte, kts=kts, kte=kte, & + reset_dBZ=reset_dBZ, istep=istep, nsteps=nsteps, & + first_time_step=first_time_step, errmsg=errmsg, errflg=errflg, & + ! Extended diagnostics + ext_diag=ext_diag, & + ! vts1=vts1, txri=txri, txrc=txrc, & + prw_vcdc=prw_vcdc, & + prw_vcde=prw_vcde, tpri_inu=tpri_inu, tpri_ide_d=tpri_ide_d, & + tpri_ide_s=tpri_ide_s, tprs_ide=tprs_ide, & + tprs_sde_d=tprs_sde_d, & + tprs_sde_s=tprs_sde_s, tprg_gde_d=tprg_gde_d, & + tprg_gde_s=tprg_gde_s, tpri_iha=tpri_iha, & + tpri_wfz=tpri_wfz, tpri_rfz=tpri_rfz, tprg_rfz=tprg_rfz, & + tprs_scw=tprs_scw, tprg_scw=tprg_scw, tprg_rcs=tprg_rcs, & + tprs_rcs=tprs_rcs, & + tprr_rci=tprr_rci, tprg_rcg=tprg_rcg, tprw_vcd_c=tprw_vcd_c, & + tprw_vcd_e=tprw_vcd_e, tprr_sml=tprr_sml, tprr_gml=tprr_gml, & + tprr_rcg=tprr_rcg, tprr_rcs=tprr_rcs, & + tprv_rev=tprv_rev, tten3=tten3, & + qvten3=qvten3, qrten3=qrten3, qsten3=qsten3, qgten3=qgten3, & + qiten3=qiten3, niten3=niten3, nrten3=nrten3, ncten3=ncten3, & + qcten3=qcten3) + else + call mp_gt_driver(qv=qv, qc=qc, qr=qr, qi=qi, qs=qs, qg=qg, ni=ni, nr=nr, & + tt=tgrs, p=prsl, w=w, dz=dz, dt_in=dtstep, dt_inner=dt_inner, & + rainnc=rain_mp, rainncv=delta_rain_mp, & + snownc=snow_mp, snowncv=delta_snow_mp, & + icenc=ice_mp, icencv=delta_ice_mp, & + graupelnc=graupel_mp, graupelncv=delta_graupel_mp, sr=sr, & + refl_10cm=refl_10cm, & + diagflag=diagflag, do_radar_ref=do_radar_ref_mp, & + has_reqc=has_reqc, has_reqi=has_reqi, has_reqs=has_reqs, & + rand_perturb_on=rand_perturb_on, kme_stoch=kme_stoch, & + ! DH* 2020-06-05 not passing this optional argument, see + ! comment in module_mp_thompson.F90 / mp_gt_driver + !rand_pert=rand_pert, & + ids=ids, ide=ide, jds=jds, jde=jde, kds=kds, kde=kde, & + ims=ims, ime=ime, jms=jms, jme=jme, kms=kms, kme=kme, & + its=its, ite=ite, jts=jts, jte=jte, kts=kts, kte=kte, & + reset_dBZ=reset_dBZ, istep=istep, nsteps=nsteps, & + first_time_step=first_time_step, errmsg=errmsg, errflg=errflg, & + ! Extended diagnostics + ext_diag=ext_diag, & + ! vts1=vts1, txri=txri, txrc=txrc, & + prw_vcdc=prw_vcdc, & + prw_vcde=prw_vcde, tpri_inu=tpri_inu, tpri_ide_d=tpri_ide_d, & + tpri_ide_s=tpri_ide_s, tprs_ide=tprs_ide, & + tprs_sde_d=tprs_sde_d, & + tprs_sde_s=tprs_sde_s, tprg_gde_d=tprg_gde_d, & + tprg_gde_s=tprg_gde_s, tpri_iha=tpri_iha, & + tpri_wfz=tpri_wfz, tpri_rfz=tpri_rfz, tprg_rfz=tprg_rfz, & + tprs_scw=tprs_scw, tprg_scw=tprg_scw, tprg_rcs=tprg_rcs, & + tprs_rcs=tprs_rcs, & + tprr_rci=tprr_rci, tprg_rcg=tprg_rcg, tprw_vcd_c=tprw_vcd_c, & + tprw_vcd_e=tprw_vcd_e, tprr_sml=tprr_sml, tprr_gml=tprr_gml, & + tprr_rcg=tprr_rcg, tprr_rcs=tprr_rcs, & + tprv_rev=tprv_rev, tten3=tten3, & + qvten3=qvten3, qrten3=qrten3, qsten3=qsten3, qgten3=qgten3, & + qiten3=qiten3, niten3=niten3, nrten3=nrten3, ncten3=ncten3, & + qcten3=qcten3) + end if end if if (errflg/=0) return - !> - Convert dry mixing ratios to specific humidity/moist mixing ratios - spechum = qv_mp/(1.0_kind_phys+qv_mp) - qc = qc_mp/(1.0_kind_phys+qv_mp) - qr = qr_mp/(1.0_kind_phys+qv_mp) - qi = qi_mp/(1.0_kind_phys+qv_mp) - qs = qs_mp/(1.0_kind_phys+qv_mp) - qg = qg_mp/(1.0_kind_phys+qv_mp) - - !> - Convert number concentrations from dry to moist - ni = ni_mp/(1.0_kind_phys+qv_mp) - nr = nr_mp/(1.0_kind_phys+qv_mp) - if (is_aerosol_aware) then - nc = nc_mp/(1.0_kind_phys+qv_mp) + ! DH* - do this only if istep == nsteps? Would be ok if it was + ! guaranteed that nothing else in the same subcycle group + ! was using these arrays, but it is somewhat dangerous. + + !> - Convert water vapor mixing ratio back to specific humidity + spechum = qv/(1.0_kind_phys+qv) + + if (convert_dry_rho) then + qc = qc/(1.0_kind_phys+qv) + qr = qr/(1.0_kind_phys+qv) + qi = qi/(1.0_kind_phys+qv) + qs = qs/(1.0_kind_phys+qv) + qg = qg/(1.0_kind_phys+qv) + + ni = ni/(1.0_kind_phys+qv) + nr = nr/(1.0_kind_phys+qv) + if (is_aerosol_aware) then + nc = nc/(1.0_kind_phys+qv) + nwfa = nwfa/(1.0_kind_phys+qv) + nifa = nifa/(1.0_kind_phys+qv) + end if end if + ! *DH !> - Convert rainfall deltas from mm to m (on physics timestep); add to inout variables ! "rain" in Thompson MP refers to precipitation (total of liquid rainfall+snow+graupel+ice) - prcp = max(0.0, delta_rain_mp/1000.0_kind_phys) - graupel = max(0.0, delta_graupel_mp/1000.0_kind_phys) - ice = max(0.0, delta_ice_mp/1000.0_kind_phys) - snow = max(0.0, delta_snow_mp/1000.0_kind_phys) - rain = max(0.0, (delta_rain_mp - (delta_graupel_mp + delta_ice_mp + delta_snow_mp))/1000.0_kind_phys) + prcp = prcp + max(0.0, delta_rain_mp/1000.0_kind_phys) + graupel = graupel + max(0.0, delta_graupel_mp/1000.0_kind_phys) + ice = ice + max(0.0, delta_ice_mp/1000.0_kind_phys) + snow = snow + max(0.0, delta_snow_mp/1000.0_kind_phys) + rain = rain + max(0.0, (delta_rain_mp - (delta_graupel_mp + delta_ice_mp + delta_snow_mp))/1000.0_kind_phys) + + ! Recompute sr at last subcycling step + if (nsteps>1 .and. istep == nsteps) then + ! Unlike inside mp_gt_driver, rain does not contain frozen precip + sr = (snow + graupel + ice)/(rain + snow + graupel + ice +1.e-12) + end if + + unset_extended_diagnostic_pointers: if (ext_diag) then + !vts1 => null() + !txri => null() + !txrc => null() + prw_vcdc => null() + prw_vcde => null() + tpri_inu => null() + tpri_ide_d => null() + tpri_ide_s => null() + tprs_ide => null() + tprs_sde_d => null() + tprs_sde_s => null() + tprg_gde_d => null() + tprg_gde_s => null() + tpri_iha => null() + tpri_wfz => null() + tpri_rfz => null() + tprg_rfz => null() + tprs_scw => null() + tprg_scw => null() + tprg_rcs => null() + tprs_rcs => null() + tprr_rci => null() + tprg_rcg => null() + tprw_vcd_c => null() + tprw_vcd_e => null() + tprr_sml => null() + tprr_gml => null() + tprr_rcg => null() + tprr_rcs => null() + tprv_rev => null() + tten3 => null() + qvten3 => null() + qrten3 => null() + qsten3 => null() + qgten3 => null() + qiten3 => null() + niten3 => null() + nrten3 => null() + ncten3 => null() + qcten3 => null() + end if unset_extended_diagnostic_pointers end subroutine mp_thompson_run !>@} diff --git a/physics/mp_thompson.meta b/physics/mp_thompson.meta index 4cfee6afc..ab00e6524 100644 --- a/physics/mp_thompson.meta +++ b/physics/mp_thompson.meta @@ -16,7 +16,7 @@ intent = in optional = F [nlev] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () @@ -33,7 +33,7 @@ intent = in optional = F [con_rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -41,6 +41,15 @@ kind = kind_phys intent = in optional = F +[con_eps] + standard_name = ratio_of_dry_air_to_water_vapor_gas_constants + long_name = rd/rv + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F [restart] standard_name = flag_for_restart long_name = flag for restart (warmstart) or coldstart @@ -50,7 +59,7 @@ intent = in optional = F [imp_physics] - standard_name = flag_for_microphysics_scheme + standard_name = control_for_microphysics_scheme long_name = choice of microphysics scheme units = flag dimensions = () @@ -58,54 +67,62 @@ intent = in optional = F [imp_physics_thompson] - standard_name = flag_for_thompson_microphysics_scheme + standard_name = identifier_for_thompson_microphysics_scheme long_name = choice of Thompson microphysics scheme units = flag dimensions = () type = integer intent = in optional = F +[convert_dry_rho] + standard_name = flag_for_converting_hydrometeors_from_moist_to_dry_air + long_name = flag for converting hydrometeors from moist to dry air + units = flag + dimensions = () + type = logical + intent = in + optional = F [spechum] - standard_name = water_vapor_specific_humidity + standard_name = specific_humidity long_name = water vapor specific humidity units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [qc] - standard_name = cloud_condensed_water_mixing_ratio + standard_name = cloud_liquid_water_mixing_ratio long_name = cloud water mixing ratio wrt dry+vapor (no condensates) units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [qr] - standard_name = rain_water_mixing_ratio + standard_name = rain_mixing_ratio long_name = rain water mixing ratio wrt dry+vapor (no condensates) units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [qi] - standard_name = ice_water_mixing_ratio + standard_name = cloud_ice_mixing_ratio long_name = ice water mixing ratio wrt dry+vapor (no condensates) units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [qs] - standard_name = snow_water_mixing_ratio + standard_name = snow_mixing_ratio long_name = snow water mixing ratio wrt dry+vapor (no condensates) units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -114,25 +131,25 @@ standard_name = graupel_mixing_ratio long_name = graupel mixing ratio wrt dry+vapor (no condensates) units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [ni] - standard_name = ice_number_concentration + standard_name = mass_number_concentration_of_cloud_ice_water_crystals_in_air long_name = ice number concentration units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [nr] - standard_name = rain_number_concentration + standard_name = mass_number_concentration_of_rain_water_in_air long_name = rain number concentration units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -146,16 +163,16 @@ intent = in optional = F [nc] - standard_name = cloud_droplet_number_concentration + standard_name = mass_number_concentration_of_cloud_liquid_water_particles_in_air long_name = cloud droplet number concentration units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = T [nwfa2d] - standard_name = tendency_of_water_friendly_aerosols_at_surface + standard_name = tendency_of_hygroscopic_aerosols_at_surface_adjacent_layer long_name = instantaneous fake water-friendly surface aerosol source units = kg-1 s-1 dimensions = (horizontal_dimension) @@ -164,7 +181,7 @@ intent = inout optional = T [nifa2d] - standard_name = tendency_of_ice_friendly_aerosols_at_surface + standard_name = tendency_of_nonhygroscopic_ice_nucleating_aerosols_at_surface_adjacent_layer long_name = instantaneous fake ice-friendly surface aerosol source units = kg-1 s-1 dimensions = (horizontal_dimension) @@ -173,19 +190,19 @@ intent = inout optional = T [nwfa] - standard_name = water_friendly_aerosol_number_concentration + standard_name = mass_number_concentration_of_hygroscopic_aerosols long_name = number concentration of water-friendly aerosols units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = T [nifa] - standard_name = ice_friendly_aerosol_number_concentration + standard_name = mass_number_concentration_of_nonhygroscopic_ice_nucleating_aerosols long_name = number concentration of ice-friendly aerosols units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -194,7 +211,7 @@ standard_name = air_temperature long_name = model layer mean temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -203,7 +220,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -212,7 +229,7 @@ standard_name = geopotential long_name = geopotential at model layer centers units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -227,34 +244,34 @@ intent = in optional = F [re_cloud] - standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle_in_um + standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle long_name = eff. radius of cloud liquid water particle in micrometer units = m - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys - intent = inout + intent = out optional = T [re_ice] - standard_name = effective_radius_of_stratiform_cloud_ice_particle_in_um + standard_name = effective_radius_of_stratiform_cloud_ice_particle long_name = eff. radius of cloud ice water particle in micrometer units = m - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys - intent = inout + intent = out optional = T [re_snow] - standard_name = effective_radius_of_stratiform_cloud_snow_particle_in_um + standard_name = effective_radius_of_stratiform_cloud_snow_particle long_name = effective radius of cloud snow particle in micrometer units = m - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys - intent = inout + intent = out optional = T [mpicomm] - standard_name = mpi_comm + standard_name = mpi_communicator long_name = MPI communicator units = index dimensions = () @@ -278,13 +295,30 @@ intent = in optional = F [threads] - standard_name = omp_threads + standard_name = number_of_openmp_threads long_name = number of OpenMP threads available to scheme units = count dimensions = () type = integer intent = in optional = F +[ext_diag] + standard_name = flag_for_extended_diagnostic_output_from_thompson_microphysics + long_name = flag for extended diagnostic output from thompson microphysics + units = flag + dimensions = () + type = logical + intent = in + optional = F +[diag3d] + standard_name = extended_diagnostics_output_from_thompson_microphysics + long_name = set of 3d arrays for extended diagnostics output from thompson microphysics + units = none + dimensions = (horizontal_dimension,vertical_layer_dimension,number_of_3d_diagnostic_output_arrays_from_thompson_microphysics) + type = real + kind = kind_phys + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP @@ -316,7 +350,7 @@ intent = in optional = F [nlev] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () @@ -333,7 +367,7 @@ intent = in optional = F [con_rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -341,74 +375,91 @@ kind = kind_phys intent = in optional = F +[con_eps] + standard_name = ratio_of_dry_air_to_water_vapor_gas_constants + long_name = rd/rv + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[convert_dry_rho] + standard_name = flag_for_converting_hydrometeors_from_moist_to_dry_air + long_name = flag for converting hydrometeors from moist to dry air + units = flag + dimensions = () + type = logical + intent = in + optional = F [spechum] - standard_name = water_vapor_specific_humidity_updated_by_physics + standard_name = specific_humidity_of_new_state long_name = water vapor specific humidity units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [qc] - standard_name = cloud_condensed_water_mixing_ratio_updated_by_physics + standard_name = cloud_liquid_water_mixing_ratio_of_new_state long_name = cloud water mixing ratio wrt dry+vapor (no condensates) units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [qr] - standard_name = rain_water_mixing_ratio_updated_by_physics + standard_name = rain_mixing_ratio_of_new_state long_name = rain water mixing ratio wrt dry+vapor (no condensates) units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [qi] - standard_name = ice_water_mixing_ratio_updated_by_physics + standard_name = cloud_ice_mixing_ratio_of_new_state long_name = ice water mixing ratio wrt dry+vapor (no condensates) units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [qs] - standard_name = snow_water_mixing_ratio_updated_by_physics + standard_name = snow_mixing_ratio_of_new_state long_name = snow water mixing ratio wrt dry+vapor (no condensates) units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [qg] - standard_name = graupel_mixing_ratio_updated_by_physics + standard_name = graupel_mixing_ratio_of_new_state long_name = graupel mixing ratio wrt dry+vapor (no condensates) units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [ni] - standard_name = ice_number_concentration_updated_by_physics + standard_name = mass_number_concentration_of_cloud_ice_water_crystals_in_air_of_new_state long_name = ice number concentration units = kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [nr] - standard_name = rain_number_concentration_updated_by_physics + standard_name = mass_number_concentration_of_rain_of_new_state long_name = rain number concentration units = kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -422,34 +473,34 @@ intent = in optional = F [nc] - standard_name = cloud_droplet_number_concentration_updated_by_physics + standard_name = mass_number_concentration_of_cloud_liquid_water_particles_in_air_of_new_state long_name = cloud droplet number concentration units = kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = T [nwfa] - standard_name = water_friendly_aerosol_number_concentration_updated_by_physics + standard_name = mass_number_concentration_of_hygroscopic_aerosols_of_new_state long_name = number concentration of water-friendly aerosols units = kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = T [nifa] - standard_name = ice_friendly_aerosol_number_concentration_updated_by_physics + standard_name = mass_number_concentration_of_nonhygroscopic_ice_nucleating_aerosols_of_new_state long_name = number concentration of ice-friendly aerosols units = kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = T [nwfa2d] - standard_name = tendency_of_water_friendly_aerosols_at_surface + standard_name = tendency_of_hygroscopic_aerosols_at_surface_adjacent_layer long_name = instantaneous fake water-friendly surface aerosol source units = kg-1 s-1 dimensions = (horizontal_loop_extent) @@ -458,7 +509,7 @@ intent = in optional = T [nifa2d] - standard_name = tendency_of_ice_friendly_aerosols_at_surface + standard_name = tendency_of_nonhygroscopic_ice_nucleating_aerosols_at_surface_adjacent_layer long_name = instantaneous fake ice-friendly surface aerosol source units = kg-1 s-1 dimensions = (horizontal_loop_extent) @@ -467,10 +518,10 @@ intent = in optional = T [tgrs] - standard_name = air_temperature_updated_by_physics + standard_name = air_temperature_of_new_state long_name = model layer mean temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -479,7 +530,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -488,22 +539,22 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in optional = F [omega] - standard_name = omega + standard_name = lagrangian_tendency_of_air_pressure long_name = layer mean vertical velocity units = Pa s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [dtp] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics timestep units = s dimensions = () @@ -511,6 +562,39 @@ kind = kind_phys intent = in optional = F +[dt_inner] + standard_name = time_step_for_inner_loop + long_name = time step for inner loop + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[first_time_step] + standard_name = flag_for_first_timestep + long_name = flag for first time step for time integration loop (cold/warmstart) + units = flag + dimensions = () + type = logical + intent = in + optional = F +[istep] + standard_name = ccpp_loop_counter + long_name = loop counter for subcycling loops in CCPP + units = index + dimensions = () + type = integer + intent = in + optional = F +[nsteps] + standard_name = ccpp_loop_extent + long_name = loop extent for subcycling loops in CCPP + units = count + dimensions = () + type = integer + intent = in + optional = F [prcp] standard_name = lwe_thickness_of_explicit_precipitation_amount long_name = explicit precipitation (rain, ice, snow, graupel) on physics timestep @@ -569,12 +653,12 @@ standard_name = radar_reflectivity_10cm long_name = instantaneous refl_10cm units = dBZ - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F -[reset] +[reset_dBZ] standard_name = flag_for_resetting_radar_reflectivity_calculation long_name = flag for resetting radar reflectivity calculation units = flag @@ -591,34 +675,34 @@ intent = in optional = F [re_cloud] - standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle_in_um + standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle long_name = eff. radius of cloud liquid water particle in micrometer (meter here) units = m - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = T [re_ice] - standard_name = effective_radius_of_stratiform_cloud_ice_particle_in_um + standard_name = effective_radius_of_stratiform_cloud_ice_particle long_name = eff. radius of cloud ice water particle in micrometer (meter here) units = m - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = T [re_snow] - standard_name = effective_radius_of_stratiform_cloud_snow_particle_in_um + standard_name = effective_radius_of_stratiform_cloud_snow_particle long_name = effective radius of cloud snow particle in micrometer (meter here) units = m - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = T [mpicomm] - standard_name = mpi_comm + standard_name = mpi_communicator long_name = MPI communicator units = index dimensions = () @@ -641,6 +725,39 @@ type = integer intent = in optional = F +[blkno] + standard_name = ccpp_block_number + long_name = number of block for explicit data blocking in CCPP + units = index + dimensions = () + type = integer + intent = in + optional = F +[ext_diag] + standard_name = flag_for_extended_diagnostic_output_from_thompson_microphysics + long_name = flag for extended diagnostic output from thompson microphysics + units = flag + dimensions = () + type = logical + intent = in + optional = F +[diag3d] + standard_name = extended_diagnostics_output_from_thompson_microphysics + long_name = set of 3d arrays for extended diagnostics output from thompson microphysics + units = none + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_3d_diagnostic_output_arrays_from_thompson_microphysics) + type = real + kind = kind_phys + intent = inout + optional = F +[reset_diag3d] + standard_name = flag_reset_extended_diagnostics_output_arrays_from_thompson_microphysics + long_name = flag for resetting extended diagnostics output arrays from thompson microphysics + units = flag + dimensions = () + type = logical + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/mp_thompson_post.F90 b/physics/mp_thompson_post.F90 index cca74951d..c53f61b0c 100644 --- a/physics/mp_thompson_post.F90 +++ b/physics/mp_thompson_post.F90 @@ -57,14 +57,14 @@ subroutine mp_thompson_post_run(ncol, nlev, tgrs_save, tgrs, prslk, dtp, ttendli implicit none ! Interface variables - integer, intent(in) :: ncol - integer, intent(in) :: nlev - real(kind_phys), dimension(1:ncol,1:nlev), intent(in) :: tgrs_save - real(kind_phys), dimension(1:ncol,1:nlev), intent(inout) :: tgrs - real(kind_phys), dimension(1:ncol,1:nlev), intent(in) :: prslk - real(kind_phys), intent(in) :: dtp - real(kind_phys), intent(in) :: ttendlim - integer, intent(in) :: kdt + integer, intent(in) :: ncol + integer, intent(in) :: nlev + real(kind_phys), dimension(:,:), intent(in) :: tgrs_save + real(kind_phys), dimension(:,:), intent(inout) :: tgrs + real(kind_phys), dimension(:,:), intent(in) :: prslk + real(kind_phys), intent(in) :: dtp + real(kind_phys), intent(in) :: ttendlim + integer, intent(in) :: kdt ! MPI information integer, intent(in ) :: mpicomm integer, intent(in ) :: mpirank diff --git a/physics/mp_thompson_post.meta b/physics/mp_thompson_post.meta index 248705b30..e37f9bc5f 100644 --- a/physics/mp_thompson_post.meta +++ b/physics/mp_thompson_post.meta @@ -8,7 +8,7 @@ name = mp_thompson_post_init type = scheme [ttendlim] - standard_name = limit_for_temperature_tendency_for_microphysics + standard_name = max_tendency_of_air_potential_temperature_due_to_large_scale_precipitation long_name = temperature tendency limiter per physics time step units = K s-1 dimensions = () @@ -47,7 +47,7 @@ intent = in optional = F [nlev] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () @@ -58,31 +58,31 @@ standard_name = air_temperature_save long_name = air temperature before entering a physics scheme units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [tgrs] - standard_name = air_temperature_updated_by_physics + standard_name = air_temperature_of_new_state long_name = model layer mean temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [prslk] - standard_name = dimensionless_exner_function_at_model_layers + standard_name = dimensionless_exner_function long_name = dimensionless Exner function at model layer centers units = none - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [dtp] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics timestep units = s dimensions = () @@ -91,7 +91,7 @@ intent = in optional = F [ttendlim] - standard_name = limit_for_temperature_tendency_for_microphysics + standard_name = max_tendency_of_air_potential_temperature_due_to_large_scale_precipitation long_name = temperature tendency limiter per physics time step units = K s-1 dimensions = () @@ -100,7 +100,7 @@ intent = in optional = F [kdt] - standard_name = index_of_time_step + standard_name = index_of_timestep long_name = current forecast iteration units = index dimensions = () @@ -108,7 +108,7 @@ intent = in optional = F [mpicomm] - standard_name = mpi_comm + standard_name = mpi_communicator long_name = MPI communicator units = index dimensions = () diff --git a/physics/mp_thompson_pre.F90 b/physics/mp_thompson_pre.F90 index 4087ac815..957c1f118 100644 --- a/physics/mp_thompson_pre.F90 +++ b/physics/mp_thompson_pre.F90 @@ -28,8 +28,8 @@ subroutine mp_thompson_pre_run(ncol, nlev, tgrs, tgrs_save, errmsg, errflg) ! Interface variables integer, intent(in ) :: ncol integer, intent(in ) :: nlev - real(kind_phys), intent(in ) :: tgrs(1:ncol,1:nlev) - real(kind_phys), intent( out) :: tgrs_save(1:ncol,1:nlev) + real(kind_phys), intent(in ) :: tgrs(:,:) + real(kind_phys), intent( out) :: tgrs_save(:,:) ! CCPP error handling character(len=*), intent( out) :: errmsg diff --git a/physics/mp_thompson_pre.meta b/physics/mp_thompson_pre.meta index e695d0a11..25339f39b 100644 --- a/physics/mp_thompson_pre.meta +++ b/physics/mp_thompson_pre.meta @@ -16,7 +16,7 @@ intent = in optional = F [nlev] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () @@ -24,10 +24,10 @@ intent = in optional = F [tgrs] - standard_name = air_temperature_updated_by_physics + standard_name = air_temperature_of_new_state long_name = model layer mean temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -36,7 +36,7 @@ standard_name = air_temperature_save long_name = air temperature before entering a physics scheme units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out diff --git a/physics/namelist_soilveg_ruc.F90 b/physics/namelist_soilveg_ruc.F90 index c40b859bf..1e05122c4 100644 --- a/physics/namelist_soilveg_ruc.F90 +++ b/physics/namelist_soilveg_ruc.F90 @@ -1,3 +1,5 @@ +!>\file namelist_soilveg_ruc.F90 +!>\ingroup RUC_lsm module namelist_soilveg_ruc implicit none save diff --git a/physics/noahmp_tables.f90 b/physics/noahmp_tables.f90 index 7bab292fb..9cb25b3f3 100644 --- a/physics/noahmp_tables.f90 +++ b/physics/noahmp_tables.f90 @@ -11,19 +11,15 @@ module noahmp_tables implicit none - integer :: i integer, private, parameter :: mvt = 30 ! use 30 instead of 27 integer, private, parameter :: mband = 2 integer, private, parameter :: msc = 8 integer, private, parameter :: max_soiltyp = 30 - integer, private, parameter :: slcats = 30 - real :: slope_table(9) !slope factor for soil drainage - -! crops - integer, private, parameter :: ncrop = 5 integer, private, parameter :: nstage = 8 + integer :: i + integer, private, parameter :: slcats = 30 ! mptable.tbl vegetation parameters @@ -31,10 +27,15 @@ module noahmp_tables integer :: iswater_table = 17 integer :: isbarren_table = 16 integer :: isice_table = 15 - integer :: eblforest_table = 2 + integer :: iscrop_table = 12 + integer :: eblforest_table = 2 + integer :: natural_table = 14 + integer :: low_density_residential_table = 31 + integer :: high_density_residential_table = 32 + integer :: high_intensity_industrial_table = 33 ! - real :: ch2op_table(mvt) !maximum intercepted h2o per unit lai+sai (mm) + real :: ch2op_table(mvt) !< maximum intercepted h2o per unit lai+sai (mm) data ( ch2op_table(i),i=1,mvt) / 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, & & 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, & @@ -42,14 +43,14 @@ module noahmp_tables & 0.1, 0.1, 0.0, 0.0, 0.0, 0.0, & & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - real :: dleaf_table(mvt) !characteristic leaf dimension (m) + real :: dleaf_table(mvt) !< characteristic leaf dimension (m) data ( dleaf_table(i),i=1,mvt) / 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, & & 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, & & 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, & & 0.04, 0.04, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: z0mvt_table(mvt) !momentum roughness length (m) + real :: z0mvt_table(mvt) !< momentum roughness length (m) data ( z0mvt_table(i),i=1,mvt) / 1.09, 1.10, 0.85, 0.80, 0.80, 0.20, & & 0.06, 0.60, 0.50, 0.12, 0.30, 0.15, & & 1.00, 0.14, 0.00, 0.00, 0.00, 0.30, & @@ -58,28 +59,28 @@ module noahmp_tables ! - real :: hvt_table(mvt) !top of canopy (m) + real :: hvt_table(mvt) !< top of canopy (m) data ( hvt_table(i),i=1,mvt) / 20.0, 20.0, 18.0, 16.0, 16.0, 1.10, & & 1.10, 13.0, 10.0, 1.00, 5.00, 2.00, & & 15.0, 1.50, 0.00, 0.00, 0.00, 4.00, & & 2.00, 0.50, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: hvb_table(mvt) !bottom of canopy (m) + real :: hvb_table(mvt) !< bottom of canopy (m) data ( hvb_table(i),i=1,mvt) / 8.50, 8.00, 7.00, 11.5, 10.0, 0.10, & & 0.10, 0.10, 0.10, 0.05, 0.10, 0.10, & & 1.00, 0.10, 0.00, 0.00, 0.00, 0.30, & & 0.20, 0.10, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: den_table(mvt) !tree density (no. of trunks per m2) + real :: den_table(mvt) !< tree density (no. of trunks per m2) data ( den_table (i),i=1,mvt) / 0.28, 0.02, 0.28, 0.10, 0.10, 10.0, & & 10.0, 10.0, 0.02, 100., 5.05, 25.0, & & 0.01, 25.0, 0.00, 0.01, 0.01, 1.00, & & 1.00, 1.00, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / ! - real :: rc_table(mvt) !tree crown radius (m) + real :: rc_table(mvt) !< tree crown radius (m) data ( rc_table (i),i=1,mvt) / 1.20, 3.60, 1.20, 1.40, 1.40, 0.12, & & 0.12, 0.12, 3.00, 0.03, 0.75, 0.08, & @@ -87,16 +88,24 @@ module noahmp_tables & 0.30, 0.30, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: mfsno_table(mvt) !snowmelt curve parameter () - data ( mfsno_table(i),i=1,mvt) / 2.50, 2.50, 2.50, 2.50, 2.50, 2.50, & - & 2.50, 2.50, 2.50, 2.50, 2.50, 2.50, & - & 2.50, 2.50, 2.50, 2.50, 2.50, 2.50, & - & 2.50, 2.50, 0.00, 0.00, 0.00, 0.00, & + real :: mfsno_table(mvt) !< snowmelt curve parameter () + data ( mfsno_table(i),i=1,mvt) / 1.00, 1.00, 1.00, 1.00, 1.00, 2.00, & + & 2.00, 2.00, 2.00, 2.00, 3.00, 3.00, & + & 4.00, 4.00, 2.50, 3.00, 3.00, 3.50, & + & 3.50, 3.50, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / + real :: scffac_table(mvt) !< snow cover factor (m) + data (scffac_table(i),i=1,mvt) / 0.005, 0.005, 0.005, 0.005, 0.005, & + & 0.008, 0.008, 0.010, 0.010, 0.010, & + & 0.010, 0.007, 0.021, 0.013, 0.015, & + & 0.008, 0.015, 0.015, 0.015, 0.015, & + & 0.000, 0.000, 0.000, 0.000, 0.000, & + & 0.000, 0.000, 0.000, 0.000, 0.000 / + ! - real :: saim_table(mvt,12) !monthly stem area index, one-sided + real :: saim_table(mvt,12) !< monthly stem area index, one-sided data (saim_table (i,1),i=1,mvt) / 0.4, 0.5, 0.3, 0.4, 0.4, 0.3, & & 0.2, 0.4, 0.3, 0.3, 0.3, 0.3, & @@ -180,7 +189,7 @@ module noahmp_tables & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / !! lai - real :: laim_table(mvt,12) !monthly leaf area index, one-sided + real :: laim_table(mvt,12) !< monthly leaf area index, one-sided data (laim_table (i,1),i=1,mvt) / 4.0, 4.5, 0.0, 0.0, 2.0, 0.0, & & 0.0, 0.2, 0.3, 0.4, 0.2, 0.0, & @@ -262,35 +271,35 @@ module noahmp_tables & 0.6, 0.0, 0.0, 0.0, 0.0, 0.0, & & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - real :: sla_table(mvt) !single-side leaf area per kg [m2/kg] + real :: sla_table(mvt) !< single-side leaf area per kg [m2/kg] data ( sla_table (i),i=1,mvt) / 80, 80, 80, 80, 80, 60, & & 60, 60, 50, 60, 80, 80, & & 60, 80, 0, 0, 0, 80, & & 80, 80, 0, 0, 0, 0, & & 0, 0, 0, 0, 0, 0 / - real :: dilefc_table(mvt) !coeficient for leaf stress death [1/s] + real :: dilefc_table(mvt) !< coeficient for leaf stress death [1/s] data (dilefc_table (i),i=1,mvt) / 1.20, 0.50, 1.80, 0.60, 0.80, 0.20, & & 0.20, 0.20, 0.50, 0.20, 0.4, 0.50, & & 0.00, 0.35, 0.00, 0.00, 0.00, 0.30, & & 0.40, 0.30, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: dilefw_table(mvt) !coeficient for leaf stress death [1/s] + real :: dilefw_table(mvt) !< coeficient for leaf stress death [1/s] data (dilefw_table(i),i=1,mvt) / 0.20, 4.00, 0.20, 0.20, 0.20, 0.20, & & 0.20, 0.20, 0.50, 0.10, 0.2, 0.20, & & 0.00, 0.20, 0.00, 0.00, 0.00, 0.20, & & 0.20, 0.20, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: fragr_table(mvt) !fraction of growth respiration !original was 0.3 + real :: fragr_table(mvt) !< fraction of growth respiration !original was 0.3 data ( fragr_table(i),i=1,mvt) / 0.10, 0.20, 0.10, 0.20, 0.10, 0.20, & & 0.20, 0.20, 0.20, 0.20, 0.1, 0.20, & & 0.00, 0.20, 0.00, 0.10, 0.00, 0.10, & & 0.10, 0.10, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: ltovrc_table(mvt) !leaf turnover [1/s] + real :: ltovrc_table(mvt) !< leaf turnover [1/s] data ( ltovrc_table(i),i=1,mvt) / 0.5, 0.55, 0.2, 0.55, 0.5, 0.65, & & 0.65, 0.65, 0.65, 0.50, 1.4, 1.6, & & 0.0, 1.2, 0.0, 0.0, 0.0, 1.3, & @@ -298,21 +307,21 @@ module noahmp_tables & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / ! - real :: c3psn_table(mvt) !photosynthetic pathway: 0. = c4, 1. = c3 + real :: c3psn_table(mvt) !< photosynthetic pathway: 0. = c4, 1. = c3 data ( c3psn_table (i),i=1,mvt) / 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, & & 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, & & 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, & & 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, & & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - real :: kc25_table(mvt) !co2 michaelis-menten constant at 25c (pa) + real :: kc25_table(mvt) !< co2 michaelis-menten constant at 25c (pa) data ( kc25_table (i),i=1,mvt) / 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, & & 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, & & 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, & & 30.0, 30.0, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: akc_table(mvt) !q10 for kc25 + real :: akc_table(mvt) !< q10 for kc25 data ( akc_table (i),i=1,mvt) / 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, & & 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, & & 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, & @@ -320,7 +329,7 @@ module noahmp_tables & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - real :: ko25_table(mvt) !o2 michaelis-menten constant at 25c (pa) + real :: ko25_table(mvt) !< o2 michaelis-menten constant at 25c (pa) data ( ko25_table (i),i=1,mvt) / 3.e4, 3.e4, 3.e4, 3.e4, 3.e4, 3.e4, & & 3.e4, 3.e4, 3.e4, 3.e4, 3.e4, 3.e4, & & 3.e4, 3.e4, 3.e4, 3.e4, 3.e4, 3.e4, & @@ -328,14 +337,14 @@ module noahmp_tables & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: ako_table(mvt) !q10 for ko25 + real :: ako_table(mvt) !< q10 for ko25 data ( ako_table (i),i=1,mvt) / 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, & & 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, & & 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, & & 1.2, 1.2, 0.0, 0.0, 0.0, 0.0, & & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - real :: vcmx25_table(mvt) !maximum rate of carboxylation at 25c (umol co2/m**2/s) + real :: vcmx25_table(mvt) !< maximum rate of carboxylation at 25c (umol co2/m**2/s) data ( vcmx25_table(i),i=1,mvt) / 50.0, 60.0, 60.0, 60.0, 55.0, 40.0, & & 40.0, 40.0, 40.0, 40.0, 50.0, 80.0, & & 0.00, 60.0, 0.00, 0.00, 0.00, 50.0, & @@ -343,7 +352,7 @@ module noahmp_tables & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: avcmx_table(mvt) !q10 for vcmx25 + real :: avcmx_table(mvt) !< q10 for vcmx25 data ( avcmx_table (i),i=1,mvt) / 2.4, 2.4, 2.4, 2.4, 2.4, 2.4, & & 2.4, 2.4, 2.4, 2.4, 2.4, 2.4, & & 2.4, 2.4, 2.4, 2.4, 2.4, 2.4, & @@ -352,70 +361,70 @@ module noahmp_tables - real :: bp_table(mvt) !minimum leaf conductance (umol/m**2/s) + real :: bp_table(mvt) !< minimum leaf conductance (umol/m**2/s) data ( bp_table (i),i=1,mvt) / 2.e3, 2.e3, 2.e3, 2.e3, 2.e3, 2.e3, & & 2.e3, 2.e3, 2.e3, 2.e3, 2.e3, 2.e3, & & 1.e15, 2.e3,1.e15, 2.e3,1.e15, 2.e3, & & 2.e3, 2.e3, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: mp_table(mvt) !slope of conductance-to-photosynthesis relationship + real :: mp_table(mvt) !< slope of conductance-to-photosynthesis relationship data ( mp_table (i),i=1,mvt) / 6., 9., 6., 9., 9., 9., & & 9., 9., 9., 9., 9., 9., & & 9., 9., 9., 9., 9., 9., & & 9., 9., 0.0, 0.0, 0.0, 0.0, & & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - real :: qe25_table(mvt) !quantum efficiency at 25c (umol co2 / umo photon) + real :: qe25_table(mvt) !< quantum efficiency at 25c (umol co2 / umo photon) data ( qe25_table (i),i=1,mvt) / 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, & & 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, & & 0.00, 0.06, 0.00, 0.06, 0.00, 0.06, & & 0.06, 0.06, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: aqe_table(mvt) !q10 for qe25 + real :: aqe_table(mvt) !< q10 for qe25 data ( aqe_table (i),i=1,mvt) / 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, & & 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, & & 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, & & 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, & & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - real :: rmf25_table(mvt) !leaf maintenance respiration at 25c (umol co2/m**2/s) + real :: rmf25_table(mvt) !< leaf maintenance respiration at 25c (umol co2/m**2/s) data ( rmf25_table (i),i=1,mvt) / 3.00, 0.65, 4.00, 3.00, 3.00, 0.26, & & 0.26, 0.26, 0.80, 1.80, 3.2, 1.00, & & 0.00, 1.45, 0.00, 0.00, 0.00, 3.00, & & 3.00, 3.00, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: rms25_table(mvt) !stem maintenance respiration at 25c (umol co2/kg bio/s) + real :: rms25_table(mvt) !< stem maintenance respiration at 25c (umol co2/kg bio/s) data ( rms25_table (i),i=1,mvt) / 0.90, 0.30, 0.64, 0.10, 0.80, 0.10, & & 0.10, 0.10, 0.32, 0.10, 0.10, 0.10, & & 0.00, 0.10, 0.00, 0.00, 0.00, 0.10, & & 0.10, 0.00, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: rmr25_table(mvt) !root maintenance respiration at 25c (umol co2/kg bio/s) + real :: rmr25_table(mvt) !< root maintenance respiration at 25c (umol co2/kg bio/s) data ( rmr25_table (i),i=1,mvt) / 0.36, 0.05, 0.05, 0.01, 0.03, 0.00, & & 0.00, 0.00, 0.01, 1.20, 0.0, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 2.11, & & 2.11, 0.00, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: arm_table(mvt) !q10 for maintenance respiration + real :: arm_table(mvt) !< q10 for maintenance respiration data ( arm_table (i),i=1,mvt) / 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, & & 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, & & 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, & & 2.0, 2.0, 0.0, 0.0, 0.0, 0.0, & & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - real :: folnmx_table(mvt) !foliage nitrogen concentration when f(n)=1 (%) + real :: folnmx_table(mvt) !< foliage nitrogen concentration when f(n)=1 (%) data (folnmx_table (i),i=1,mvt) / 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, & & 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, & & 0.00, 1.5, 0.00, 1.5, 0.00, 1.5, & & 1.5, 1.5, 0.0, 0.0, 0.0, 0.0, & & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - real :: tmin_table(mvt) !minimum temperature for photosynthesis (k) + real :: tmin_table(mvt) !< minimum temperature for photosynthesis (k) data ( tmin_table (i),i=1,mvt) / 265, 273, 268, 273, 268, 273, & & 273, 273, 273, 273, 268, 273, & & 0, 273, 0, 0, 0, 268, & @@ -424,14 +433,14 @@ module noahmp_tables ! - real :: xl_table(mvt) !leaf/stem orientation index + real :: xl_table(mvt) !< leaf/stem orientation index data ( xl_table (i),i=1,mvt) / 0.010,0.010,0.010,0.250,0.250,0.010, & & 0.010, 0.010, 0.010, -0.30, -0.025, -0.30, & & 0.000, -0.30, 0.000, 0.000, 0.000, 0.250, & & 0.250, 0.250, 0.000, 0.000, 0.000, 0.000, & & 0.001, 0.001, 0.000, 0.000, 0.000, 0.000 / ! - real :: rhol_table(mvt,mband) !leaf reflectance: 1=vis, 2=nir + real :: rhol_table(mvt,mband) !< leaf reflectance: 1=vis, 2=nir data ( rhol_table (i,1),i=1,mvt) / 0.07, 0.10, 0.07, 0.10, 0.10, 0.07, & & 0.07, 0.07, 0.10, 0.11, 0.105, 0.11, & @@ -447,7 +456,7 @@ module noahmp_tables & 0.45, 0.45, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: rhos_table(mvt,mband) !stem reflectance: 1=vis, 2=nir + real :: rhos_table(mvt,mband) !< stem reflectance: 1=vis, 2=nir data ( rhos_table (i,1),i=1,mvt) / 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, & & 0.16, 0.16, 0.16, 0.36, 0.26, 0.36, & @@ -463,7 +472,7 @@ module noahmp_tables ! &_______________________________________________________________________& - real :: taul_table(mvt,mband) !leaf transmittance: 1=vis, 2=nir + real :: taul_table(mvt,mband) !< leaf transmittance: 1=vis, 2=nir ! data ( taul_table (i,1),i=1,mvt) / 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, & & 0.05, 0.05, 0.05, 0.07, 0.06, 0.07, & @@ -477,7 +486,7 @@ module noahmp_tables & 0.25, 0.25, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: taus_table(mvt,mband) !stem transmittance: 1=vis, 2=nir + real :: taus_table(mvt,mband) !< stem transmittance: 1=vis, 2=nir data(taus_table (i,1),i=1,mvt) / 0.001,0.001,0.001,0.001,0.001, 0.001, & & 0.001, 0.001, 0.001, 0.220, 0.1105,0.220, & & 0.000, 0.220, 0.000, 0.000, 0.000, 0.001, & @@ -492,7 +501,7 @@ module noahmp_tables & 0.001, 0.001, 0.000, 0.000, 0.000, 0.000 / - real :: mrp_table(mvt) !microbial respiration parameter (umol co2 /kg c/ s) + real :: mrp_table(mvt) !< microbial respiration parameter (umol co2 /kg c/ s) data ( mrp_table (i),i=1,mvt) / 0.37, 0.23, 0.37, 0.40, 0.30, 0.19, & & 0.19, 0.19, 0.40, 0.17,0.285, 0.23, & & 0.00, 0.23, 0.00, 0.00, 0.00, 0.23, & @@ -500,29 +509,29 @@ module noahmp_tables & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / ! - real :: cwpvt_table(mvt) !empirical canopy wind parameter - data ( cwpvt_table (i),i=1,mvt) / 0.18, 0.18, 0.18, 0.18, 0.18, 0.18, & - & 0.18, 0.18, 0.18, 0.18, 0.18, 0.18, & - & 0.18, 0.18, 0.18, 0.18, 0.18, 0.18, & - & 0.18, 0.18, 0.00, 0.00, 0.00, 0.00, & + real :: cwpvt_table(mvt) !< empirical canopy wind parameter + data ( cwpvt_table (i),i=1,mvt) / 0.18, 0.67, 0.18, 0.67, 0.29, 1.00, & + & 2.00, 1.30, 1.00, 5.00, 1.17, 1.67, & + & 1.67, 1.67, 0.18, 0.18, 0.18, 0.67, & + & 1.00, 0.18, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: wrrat_table(mvt) !wood to non-wood ratio + real :: wrrat_table(mvt) !< wood to non-wood ratio data ( wrrat_table (i),i=1,mvt) / 30.0, 30.0, 30.0, 30.0, 30.0, 3.00, & & 3.00, 3.00, 3.00, 0.00, 15.0, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 3.00, & & 3.00, 0.00, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: wdpool_table(mvt) !wood pool (switch 1 or 0) depending on woody or not [-] + real :: wdpool_table(mvt) !< wood pool (switch 1 or 0) depending on woody or not [-] data ( wdpool_table(i),i=1,mvt) / 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, & & 1.00, 1.00, 1.00, 0.00, 0.5, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 1.00, & & 1.00, 0.00, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: tdlef_table(mvt) !characteristic t for leaf freezing [k] + real :: tdlef_table(mvt) !< characteristic t for leaf freezing [k] data ( tdlef_table (i),i=1,mvt) / 278, 278, 268, 278, 268, 278, & & 278, 278, 278, 278, 268, 278, & & 278, 278, 0, 0, 0, 268, & @@ -530,28 +539,28 @@ module noahmp_tables & 0, 0, 0, 0, 0, 0 / - real :: nroot_table(mvt) !number of soil layers with root present + real :: nroot_table(mvt) !< number of soil layers with root present data ( nroot_table (i),i=1,mvt) / 4, 4, 4, 4, 4, 3, & & 3, 3, 3, 3, 2, 3, & & 1, 3, 1, 1, 0, 3, & & 3, 2, 0, 0, 0, 0, & & 0, 0, 0, 0, 0, 0 / - real :: rgl_table(mvt) !parameter used in radiation stress function + real :: rgl_table(mvt) !< parameter used in radiation stress function data ( rgl_table (i),i=1,mvt) / 30.0, 30.0, 30.0, 30.0, 30.0, 100.0,& & 100.0, 100.0, 65.0, 100.0, 65.0, 100.0, & & 999.0, 100.0, 999.0, 999.0, 30.0, 100.0, & & 100.0, 100.0, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: rs_table(mvt) !minimum stomatal resistance [s m-1] + real :: rs_table(mvt) !< minimum stomatal resistance [s m-1] data ( rs_table (i),i=1,mvt) / 125.0, 150.0,150.0,100.0,125.0,300.0,& & 170.0,300.0, 70.0, 40.0, 70.0, 40.0, & & 200.0, 40.0, 999.0,999.0,100.0,150.0, & & 150.0, 200.0,0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: hs_table(mvt) !parameter used in vapor pressure deficit function + real :: hs_table(mvt) !< parameter used in vapor pressure deficit function data ( hs_table (i),i=1,mvt) / 47.35,41.69,47.35,54.53,51.93,42.00, & & 39.18, 42.00, 54.53, 36.35, 55.97, 36.25, & & 999.0, 36.25, 999.0, 999.0, 51.75, 42.00, & @@ -559,14 +568,14 @@ module noahmp_tables & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: topt_table(mvt) !optimum transpiration air temperature [k] + real :: topt_table(mvt) !< optimum transpiration air temperature [k] data ( topt_table (i),i=1,mvt) / 298.0,298.0,298.0,298.0,298.0,298.0, & & 298.0, 298.0, 298.0, 298.0, 298.0, 298.0, & & 298.0, 298.0, 298.0, 298.0, 298.0, 298.0, & & 298.0, 298.0, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: rsmax_table(mvt) !maximal stomatal resistance [s m-1] + real :: rsmax_table(mvt) !< maximal stomatal resistance [s m-1] data ( rsmax_table (i),i=1,mvt) / 5000., 5000.,5000.,5000.,5000.,5000.,& & 5000., 5000., 5000., 5000., 5000., 5000., & & 5000., 5000., 5000., 5000., 5000., 5000., & @@ -635,15 +644,15 @@ module noahmp_tables real :: bexp_table(max_soiltyp) - data (bexp_table(i), i=1,slcats) /2.79, 4.26, 4.74, 5.33, 5.33, 5.25,& + data (bexp_table(i), i=1,slcats) /2.79, 4.26, 4.74, 5.33, 3.86, 5.25,& & 6.77, 8.72, 8.17, 10.73, 10.39, 11.55, & & 5.25, 0.0, 2.79, 4.26, 11.55, 2.79, & & 2.79, 0.00, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / real :: smcdry_table(max_soiltyp) - data (smcdry_table(i), i=1,slcats) /0.010, 0.028, 0.047, 0.084, 0.084,& - & 0.066, 0.067, 0.120, 0.103, 0.100, 0.126, 0.138, & + data (smcdry_table(i), i=1,slcats) /0.010, 0.028, 0.047, 0.084, 0.061,& + & 0.066, 0.069, 0.120, 0.103, 0.100, 0.126, 0.138, & & 0.066, 0.0, 0.006, 0.028, 0.030, 0.006, & & 0.010, 0.000, 0.000, 0.000, 0.000, 0.000, & & 0.000, 0.000, 0.000, 0.000, 0.000, 0.000 / @@ -658,7 +667,7 @@ module noahmp_tables real :: smcmax_table(max_soiltyp) - data (smcmax_table(i), i=1,slcats) /0.339, 0.421, 0.434, 0.476, 0.476,& + data (smcmax_table(i), i=1,slcats) /0.339, 0.421, 0.434, 0.476, 0.484,& & 0.439, 0.404, 0.464, 0.465, 0.406, 0.468, 0.468, & & 0.439, 1.000, 0.200, 0.421, 0.468, 0.200, & & 0.339, 0.339, 0.000, 0.000, 0.000, 0.000, & @@ -666,15 +675,15 @@ module noahmp_tables real :: smcref_table(max_soiltyp) - data (smcref_table(i), i=1,slcats) /0.236, 0.383, 0.383, 0.360, 0.383, & - & 0.329, 0.314, 0.387, 0.382, 0.338, 0.404, 0.412, & + data (smcref_table(i), i=1,slcats) /0.192, 0.283, 0.312, 0.360, 0.347, & + & 0.329, 0.315, 0.387, 0.382, 0.338, 0.404, 0.412, & & 0.329, 0.000, 0.170, 0.283, 0.454, 0.170, & - & 0.236, 0.000, 0.000, 0.000, 0.000, 0.000, & + & 0.192, 0.000, 0.000, 0.000, 0.000, 0.000, & & 0.000, 0.000, 0.000, 0.000, 0.000, 0.000 / real :: psisat_table(max_soiltyp) - data (psisat_table(i), i=1,slcats) /0.069, 0.036, 0.141, 0.759, 0.759, & + data (psisat_table(i), i=1,slcats) /0.069, 0.036, 0.141, 0.759, 0.955, & & 0.355, 0.135, 0.617, 0.263, 0.098, 0.324, 0.468, & & 0.355, 0.00, 0.069, 0.036, 0.468, 0.069, & & 0.069, 0.00, 0.00, 0.00, 0.00, 0.00, & @@ -683,7 +692,7 @@ module noahmp_tables real :: dksat_table(max_soiltyp) data (dksat_table(i), i=1,slcats) /4.66e-5, 1.41e-5, 5.23e-6, 2.81e-6, & - & 2.81e-6, 3.38e-6, 4.45e-6, 2.03e-6, 2.45e-6,7.22e-6, & + & 2.18e-6, 3.38e-6, 4.45e-6, 2.03e-6, 2.45e-6,7.22e-6, & & 1.34e-6, 9.74e-7, 3.38e-6, 0.00, 1.41e-4, & & 1.41e-5, 9.74e-7, 1.41e-4, 4.66e-5,0.0, & & 0.00, 0.00, 0.00, 0.00, 0.00, & @@ -691,18 +700,18 @@ module noahmp_tables real :: dwsat_table(max_soiltyp) - data (dwsat_table(i), i=1,slcats) /0.608e-6, 0.514e-5, 0.805e-5, & - & 0.239e-4, 0.239e-4,0.143e-4, 0.99e-5, 0.237e-4, 0.113e-4, 0.187e-4, & - & 0.964e-5, 0.112e-4,0.143e-4,0.00, 0.136e-3, 0.514e-5, & - & 0.112e-4, 0.136e-3, 0.608e-6, 0.00, 0.00, & - & 0.00, 0.00, 0.00, 0.00, & + data (dwsat_table(i), i=1,slcats) / 2.65e-5, 5.14e-6, 8.05e-6, & + & 2.39e-5, 1.66e-5, 1.43e-5, 1.01e-5, 2.35e-5, 1.13e-5, 1.87e-5, & + & 9.64e-6, 1.12e-5, 1.43e-5, 0.00, 1.36e-4, 5.14e-6, & + & 1.12e-5, 1.36e-4, 2.65e-5, 0.00, 0.00, & + & 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00 / real :: smcwlt_table(max_soiltyp) - data (smcwlt_table(i), i=1,slcats) /0.010, 0.028, 0.047, 0.084, 0.084,& - & 0.066, 0.067, 0.120, 0.103, 0.100, 0.126, 0.138, & - & 0.066, 0.00, 0.006, 0.028, 0.03, 0.006, & + data (smcwlt_table(i), i=1,slcats) /0.010, 0.028, 0.047, 0.084, 0.061,& + & 0.066, 0.069, 0.120, 0.103, 0.100, 0.126, 0.138, & + & 0.066, 0.000, 0.006, 0.028, 0.030, 0.006, & & 0.010, 0.000, 0.000, 0.000, 0.000, 0.000, & & 0.000, 0.000, 0.000, 0.000, 0.000, 0.000 / @@ -717,40 +726,41 @@ module noahmp_tables ! genparm.tbl parameters + real :: slope_table(9) !< slope factor for soil drainage data (slope_table(i), i=1,9) /0.1, 0.6, 1.0, 0.35, 0.55, 0.8, & & 0.63, 0.0, 0.0 / - real :: csoil_table = 2.00e+6 !soil heat capacity [j m-3 k-1] - real :: refdk_table = 2.0e-6 !parameter in the surface runoff parameterization - real :: refkdt_table = 3.0 !parameter in the surface runoff parameterization - real :: frzk_table =0.15 !frozen ground parameter - real :: zbot_table = -8.0 !depth [m] of lower boundary soil temperature - real :: czil_table = 0.075 !parameter used in the calculation of the roughness length for heat + real :: csoil_table = 2.00e+6 !< soil heat capacity [j m-3 k-1] + real :: refdk_table = 2.0e-6 !< parameter in the surface runoff parameterization + real :: refkdt_table = 3.0 !< parameter in the surface runoff parameterization + real :: frzk_table =0.15 !< frozen ground parameter + real :: zbot_table = -8.0 !< depth [m] of lower boundary soil temperature + real :: czil_table = 0.1 !< parameter used in the calculation of the roughness length for heat ! mptable.tbl radiation parameters ! &_______________________________________________________________________& - real :: albsat_table(msc,mband) !saturated soil albedos: 1=vis, 2=nir + real :: albsat_table(msc,mband) !< saturated soil albedos: 1=vis, 2=nir data(albsat_table(i,1),i=1,8)/0.15,0.11,0.10,0.09,0.08,0.07,0.06,0.05/ data(albsat_table(i,2),i=1,8)/0.30,0.22,0.20,0.18,0.16,0.14,0.12,0.10/ - real :: albdry_table(msc,mband) !dry soil albedos: 1=vis, 2=nir + real :: albdry_table(msc,mband) !< dry soil albedos: 1=vis, 2=nir data(albdry_table(i,1),i=1,8)/0.27,0.22,0.20,0.18,0.16,0.14,0.12,0.10/ data(albdry_table(i,2),i=1,8)/0.54,0.44,0.40,0.36,0.32,0.28,0.24,0.20/ - real :: albice_table(mband) !albedo land ice: 1=vis, 2=nir + real :: albice_table(mband) !< albedo land ice: 1=vis, 2=nir data (albice_table(i),i=1,mband) /0.80, 0.55/ - real :: alblak_table(mband) !albedo frozen lakes: 1=vis, 2=nir + real :: alblak_table(mband) !< albedo frozen lakes: 1=vis, 2=nir data (alblak_table(i),i=1,mband) /0.60, 0.40/ - real :: omegas_table(mband) !two-stream parameter omega for snow + real :: omegas_table(mband) !< two-stream parameter omega for snow data (omegas_table(i),i=1,mband) /0.8, 0.4/ - real :: betads_table = 0.5 !two-stream parameter betad for snow - real :: betais_table = 0.5 !two-stream parameter betad for snow + real :: betads_table = 0.5 !< two-stream parameter betad for snow + real :: betais_table = 0.5 !< two-stream parameter betad for snow - real :: eg_table(2) !emissivity + real :: eg_table(2) !< emissivity data eg_table /0.97, 0.98 / real :: betads, betais @@ -759,14 +769,30 @@ module noahmp_tables ! mptable.tbl global parameters - real :: co2_table = 395.e-06 !co2 partial pressure - real :: o2_table = 0.209 !o2 partial pressure - real :: timean_table = 10.5 !gridcell mean topgraphic index (global mean) - real :: fsatmx_table = 0.38 !maximum surface saturated fraction (global mean) - real :: z0sno_table = 0.002 !snow surface roughness length (m) (0.002) - real :: ssi_table = 0.03 !liquid water holding capacity for snowpack (m3/m3) (0.03) - real :: swemx_table = 1.00 !new snow mass to fully cover old snow (mm) - real :: rsurf_snow_table = 50.0 !surface resistance for snow(s/m) + real :: co2_table = 395.e-06 !< co2 partial pressure + real :: o2_table = 0.209 !< o2 partial pressure + real :: timean_table = 10.5 !< gridcell mean topgraphic index (global mean) + real :: fsatmx_table = 0.38 !< maximum surface saturated fraction (global mean) + + real :: z0sno_table = 0.002 !< snow surface roughness length (m) (0.002) + real :: ssi_table = 0.03 !< liquid water holding capacity for snowpack (m3/m3) (0.03) + real :: snow_ret_fac_table = 5.e-5 !< snowpack water release timescale factor (1/s) + real :: swemx_table = 1.00 !< new snow mass to fully cover old snow (mm) + + real :: tau0_table = 1.e6 !< tau0 from yang97 eqn. 10a + real :: grain_growth_table = 5000. !< growth from vapor diffusion yang97 eqn. 10b + real :: extra_growth_table = 10. !< extra growth near freezing yang97 eqn. 10c + real :: dirt_soot_table = 0.3 !< dirt and soot term yang97 eqn. 10d + real :: bats_cosz_table = 2.0 !< zenith angle snow albedo adjustment; b in yang97 eqn. 15 + real :: bats_vis_new_table = 0.95 !< new snow visible albedo + real :: bats_nir_new_table = 0.65 !< new snow nir albedo + real :: bats_vis_age_table = 0.2 !< age factor for diffuse visible snow albedo yang97 eqn. 17 + real :: bats_nir_age_table = 0.5 !< age factor for diffuse nir snow albedo yang97 eqn. 18 + real :: bats_vis_dir_table = 0.4 !< cosz factor for direct visible snow albedo yang97 eqn. 15 + real :: bats_nir_dir_table = 0.4 !< cosz factor for direct nir snow albedo yang97 eqn. 16 + real :: rsurf_snow_table = 50.0 !< surface resistance for snow(s/m) + real :: rsurf_exp_table = 5.0 !< exponent in the shape parameter for soil resistance option 1 + real :: snow_emis_table = 0.95 !< surface emissivity ! Noah mp crops @@ -780,77 +806,77 @@ module noahmp_tables ! &_______________________________________________________________________& - integer :: pltday_table(ncrop) ! planting date + integer :: pltday_table(ncrop) !< planting date data (pltday_table(i), i=1,5) /130,111,111,111,111/ - integer :: hsday_table(ncrop) ! harvest date + integer :: hsday_table(ncrop) !< harvest date data (hsday_table(i),i=1,5) /280,300,300,300,300/ - real :: plantpop_table(ncrop) ! plant density [per ha] - used? + real :: plantpop_table(ncrop) !< plant density [per ha] - used? data (plantpop_table(i),i=1,5) /78.0,78.0,78.0,78.0,78.0/ - real :: irri_table(ncrop) ! irrigation strategy 0= non-irrigation 1=irrigation (no water-stress) + real :: irri_table(ncrop) !< irrigation strategy 0= non-irrigation 1=irrigation (no water-stress) data (irri_table(i),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - real :: gddtbase_table(ncrop) ! base temperature for gdd accumulation [c] + real :: gddtbase_table(ncrop) !< base temperature for gdd accumulation [c] data (gddtbase_table(i),i=1,5) /10.0,10.0,10.0,10.0,10.0/ - real :: gddtcut_table(ncrop) ! upper temperature for gdd accumulation [c] + real :: gddtcut_table(ncrop) !< upper temperature for gdd accumulation [c] data (gddtcut_table(i),i=1,5) /30.0,30.0,30.0,30.0,30.0/ - real :: gdds1_table(ncrop) ! gdd from seeding to emergence + real :: gdds1_table(ncrop) !< gdd from seeding to emergence data (gdds1_table(i),i=1,5) /60.0,50.0,50.0,50.0,50.0/ - real :: gdds2_table(ncrop) ! gdd from seeding to initial vegetative + real :: gdds2_table(ncrop) !< gdd from seeding to initial vegetative data (gdds2_table(i),i=1,5) /675.0,718.0,718.0,718.0,718.0/ - real :: gdds3_table(ncrop) ! gdd from seeding to post vegetative + real :: gdds3_table(ncrop) !< gdd from seeding to post vegetative data (gdds3_table(i),i=1,5) /1183.0,933.0,933.0,933.0,933.0/ - real :: gdds4_table(ncrop) ! gdd from seeding to intial reproductive + real :: gdds4_table(ncrop) !< gdd from seeding to intial reproductive data (gdds4_table(i),i=1,5) /1253.0,1103.0,1103.0,1103.0,1103.0/ - real :: gdds5_table(ncrop) ! gdd from seeding to pysical maturity + real :: gdds5_table(ncrop) !< gdd from seeding to pysical maturity data (gdds5_table(i),i=1,5) /1605.0,1555.0,1555.0,1555.0,1555.0/ - integer :: c3c4_table(ncrop) ! photosynthetic pathway: 1. = c3 2. = c4 + integer :: c3c4_table(ncrop) !< photosynthetic pathway: 1. = c3 2. = c4 data (c3c4_table(i),i=1,5) /2.0,1.0,2.0,2.0,2.0/ - real :: aref_table(ncrop) ! reference maximum co2 assimulation rate + real :: aref_table(ncrop) !< reference maximum co2 assimulation rate data (aref_table(i),i=1,5) /7.0,7.0,7.0,7.0,7.0/ - real :: psnrf_table(ncrop) ! co2 assimulation reduction factor(0-1) (caused by non-modeling part,e.g.pest,weeds) + real :: psnrf_table(ncrop) !< co2 assimulation reduction factor(0-1) (caused by non-modeling part,e.g.pest,weeds) data (psnrf_table(i),i=1,5) /0.85,0.85,0.85,0.85,0.85/ - real :: i2par_table(ncrop) ! fraction of incoming solar radiation to photosynthetically active radiation + real :: i2par_table(ncrop) !< fraction of incoming solar radiation to photosynthetically active radiation data (i2par_table(i),i=1,5) / 0.5,0.5,0.5,0.5,0.5/ - real :: tassim0_table(ncrop) ! minimum temperature for co2 assimulation [c] + real :: tassim0_table(ncrop) !< minimum temperature for co2 assimulation [c] data (tassim0_table(i),i=1,5) /8.0,8.0,8.0,8.0,8.0/ - real :: tassim1_table(ncrop) ! co2 assimulation linearly increasing until temperature reaches t1 [c] + real :: tassim1_table(ncrop) !< co2 assimulation linearly increasing until temperature reaches t1 [c] data (tassim1_table(i),i=1,5) /18.0,18.0,18.0,18.0,18.0/ - real :: tassim2_table(ncrop) ! co2 assmilation rate remain at aref until temperature reaches t2 [c] + real :: tassim2_table(ncrop) !< co2 assmilation rate remain at aref until temperature reaches t2 [c] data (tassim2_table(i),i=1,5) /30.0,30.0,30.0,30.0,30.0/ - real :: k_table(ncrop) ! light extinction coefficient + real :: k_table(ncrop) !< light extinction coefficient data ( k_table(i),i=1,5) /0.55,0.55,0.55,0.55,0.55/ - real :: epsi_table(ncrop) ! initial light use efficiency + real :: epsi_table(ncrop) !< initial light use efficiency data (epsi_table(i),i=1,5) /12.5,12.5,12.5,12.5,12.5/ - real :: q10mr_table(ncrop) ! q10 for maintainance respiration + real :: q10mr_table(ncrop) !< q10 for maintainance respiration data (q10mr_table(i),i=1,5) /2.0,2.0,2.0,2.0,2.0/ - real :: foln_mx_table(ncrop) ! foliage nitrogen concentration when f(n)=1 (%) + real :: foln_mx_table(ncrop) !< foliage nitrogen concentration when f(n)=1 (%) data (foln_mx_table(i),i=1,5) /1.5,1.5,1.5,1.5,1.5/ - real :: lefreez_table(ncrop) ! characteristic t for leaf freezing [k] + real :: lefreez_table(ncrop) !< characteristic t for leaf freezing [k] data (lefreez_table(i),i=1,5) /268,268,268,268,268/ - real :: dile_fc_table(ncrop,nstage) ! coeficient for temperature leaf stress death [1/s] + real :: dile_fc_table(ncrop,nstage) !< coeficient for temperature leaf stress death [1/s] data (dile_fc_table(i,1),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (dile_fc_table(i,2),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (dile_fc_table(i,3),i=1,5) /0.0,0.0,0.0,0.0,0.0/ @@ -860,7 +886,7 @@ module noahmp_tables data (dile_fc_table(i,7),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (dile_fc_table(i,8),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - real :: dile_fw_table(ncrop,nstage) ! coeficient for water leaf stress death [1/s] + real :: dile_fw_table(ncrop,nstage) !< coeficient for water leaf stress death [1/s] data (dile_fw_table(i,1),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (dile_fw_table(i,2),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (dile_fw_table(i,3),i=1,5) /0.0,0.0,0.0,0.0,0.0/ @@ -870,10 +896,10 @@ module noahmp_tables data (dile_fw_table(i,7),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (dile_fw_table(i,8),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - real :: fra_gr_table(ncrop) ! fraction of growth respiration + real :: fra_gr_table(ncrop) !< fraction of growth respiration data (fra_gr_table(i),i=1,5) /0.2,0.2,0.2,0.2,0.2/ - real :: lf_ovrc_table(ncrop,nstage) ! fraction of leaf turnover [1/s] + real :: lf_ovrc_table(ncrop,nstage) !< fraction of leaf turnover [1/s] data (lf_ovrc_table(i,1),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (lf_ovrc_table(i,2),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (lf_ovrc_table(i,3),i=1,5) /0.0,0.0,0.0,0.0,0.0/ @@ -883,7 +909,7 @@ module noahmp_tables data (lf_ovrc_table(i,7),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (lf_ovrc_table(i,8),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - real :: st_ovrc_table(ncrop,nstage) ! fraction of stem turnover [1/s] + real :: st_ovrc_table(ncrop,nstage) !< fraction of stem turnover [1/s] data (st_ovrc_table(i,1),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (st_ovrc_table(i,2),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (st_ovrc_table(i,3),i=1,5) /0.0,0.0,0.0,0.0,0.0/ @@ -893,7 +919,7 @@ module noahmp_tables data (st_ovrc_table(i,7),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (st_ovrc_table(i,8),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - real :: rt_ovrc_table(ncrop,nstage) ! fraction of root tunrover [1/s] + real :: rt_ovrc_table(ncrop,nstage) !< fraction of root tunrover [1/s] data (rt_ovrc_table(i,1),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (rt_ovrc_table(i,2),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (rt_ovrc_table(i,3),i=1,5) /0.0,0.0,0.0,0.0,0.0/ @@ -903,19 +929,19 @@ module noahmp_tables data (rt_ovrc_table(i,7),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (rt_ovrc_table(i,8),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - real :: lfmr25_table(ncrop) ! leaf maintenance respiration at 25c [umol co2/m**2 /s] + real :: lfmr25_table(ncrop) !< leaf maintenance respiration at 25c [umol co2/m**2 /s] data (lfmr25_table(i),i=1,5) /1.0,1.0,1.0,1.0,1.0/ - real :: stmr25_table(ncrop) ! stem maintenance respiration at 25c [umol co2/kg bio/s] + real :: stmr25_table(ncrop) !< stem maintenance respiration at 25c [umol co2/kg bio/s] data (stmr25_table(i),i=1,5) /0.05,0.1,0.1,0.1,0.1/ - real :: rtmr25_table(ncrop) ! root maintenance respiration at 25c [umol co2/kg bio/s] + real :: rtmr25_table(ncrop) !< root maintenance respiration at 25c [umol co2/kg bio/s] data (rtmr25_table(i),i=1,5) /0.05,0.0,0.0,0.0,0.0/ - real :: grainmr25_table(ncrop) ! grain maintenance respiration at 25c [umol co2/kg bio/s] + real :: grainmr25_table(ncrop) !< grain maintenance respiration at 25c [umol co2/kg bio/s] data (grainmr25_table(i),i=1,5) /0.0,0.1,0.1,0.1,0.1/ - real :: lfpt_table(ncrop,nstage) ! fraction of carbohydrate flux to leaf + real :: lfpt_table(ncrop,nstage) !< fraction of carbohydrate flux to leaf data (lfpt_table(i,1),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (lfpt_table(i,2),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (lfpt_table(i,3),i=1,5) /0.4,0.4,0.4,0.4,0.4/ @@ -926,7 +952,7 @@ module noahmp_tables data (lfpt_table(i,8),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - real :: stpt_table(ncrop,nstage) ! fraction of carbohydrate flux to stem + real :: stpt_table(ncrop,nstage) !< fraction of carbohydrate flux to stem data (stpt_table(i,1),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (stpt_table(i,2),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (stpt_table(i,3),i=1,5) /0.2,0.2,0.2,0.2,0.2/ @@ -937,7 +963,7 @@ module noahmp_tables data (stpt_table(i,8),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - real :: rtpt_table(ncrop,nstage) ! fraction of carbohydrate flux to root + real :: rtpt_table(ncrop,nstage) !< fraction of carbohydrate flux to root data (rtpt_table(i,1),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (rtpt_table(i,2),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (rtpt_table(i,3),i=1,5) /0.34,0.4,0.4,0.4,0.4/ @@ -947,7 +973,7 @@ module noahmp_tables data (rtpt_table(i,7),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (rtpt_table(i,8),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - real :: grainpt_table(ncrop,nstage) ! fraction of carbohydrate flux to grain + real :: grainpt_table(ncrop,nstage) !< fraction of carbohydrate flux to grain data (grainpt_table(i,1),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (grainpt_table(i,2),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (grainpt_table(i,3),i=1,5) /0.0,0.0,0.0,0.0,0.0/ @@ -957,8 +983,64 @@ module noahmp_tables data (grainpt_table(i,7),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (grainpt_table(i,8),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - real :: bio2lai_table(ncrop) ! leaf are per living leaf biomass [m^2/kg] + real :: bio2lai_table(ncrop) !< leaf are per living leaf biomass [m^2/kg] data (bio2lai_table(i),i=1,5) /0.035,0.015,0.015,0.015,0.015/ +! mptable.tbl optional parameters + + !------------------------------------------------------------------------------ + ! Saxton and Rawls 2006 Pedo-transfer function coefficients + !------------------------------------------------------------------------------ + + real :: sr2006_theta_1500t_a = -0.024 !< sand coefficient + real :: sr2006_theta_1500t_b = 0.487 !< clay coefficient + real :: sr2006_theta_1500t_c = 0.006 !< orgm coefficient + real :: sr2006_theta_1500t_d = 0.005 !< sand*orgm coefficient + real :: sr2006_theta_1500t_e = -0.013 !< clay*orgm coefficient + real :: sr2006_theta_1500t_f = 0.068 !< sand*clay coefficient + real :: sr2006_theta_1500t_g = 0.031 !< constant adjustment + + real :: sr2006_theta_1500_a = 0.14 !< theta_1500t coefficient + real :: sr2006_theta_1500_b = -0.02 !< constant adjustment + + real :: sr2006_theta_33t_a = -0.251 !< sand coefficient + real :: sr2006_theta_33t_b = 0.195 !< clay coefficient + real :: sr2006_theta_33t_c = 0.011 !< orgm coefficient + real :: sr2006_theta_33t_d = 0.006 !< sand*orgm coefficient + real :: sr2006_theta_33t_e = -0.027 !< clay*orgm coefficient + real :: sr2006_theta_33t_f = 0.452 !< sand*clay coefficient + real :: sr2006_theta_33t_g = 0.299 !< constant adjustment + + real :: sr2006_theta_33_a = 1.283 !< theta_33t*theta_33t coefficient + real :: sr2006_theta_33_b = -0.374 !< theta_33t coefficient + real :: sr2006_theta_33_c = -0.015 !< constant adjustment + + real :: sr2006_theta_s33t_a = 0.278 !< sand coefficient + real :: sr2006_theta_s33t_b = 0.034 !< clay coefficient + real :: sr2006_theta_s33t_c = 0.022 !< orgm coefficient + real :: sr2006_theta_s33t_d = -0.018 !< sand*orgm coefficient + real :: sr2006_theta_s33t_e = -0.027 !< clay*orgm coefficient + real :: sr2006_theta_s33t_f = -0.584 !< sand*clay coefficient + real :: sr2006_theta_s33t_g = 0.078 !< constant adjustment + + real :: sr2006_theta_s33_a = 0.636 !< theta_s33t coefficient + real :: sr2006_theta_s33_b = -0.107 !< constant adjustment + + real :: sr2006_psi_et_a = -21.67 !< sand coefficient + real :: sr2006_psi_et_b = -27.93 !< clay coefficient + real :: sr2006_psi_et_c = -81.97 !< theta_s33 coefficient + real :: sr2006_psi_et_d = 71.12 !< sand*theta_s33 coefficient + real :: sr2006_psi_et_e = 8.29 !< clay*theta_s33 coefficient + real :: sr2006_psi_et_f = 14.05 !< sand*clay coefficient + real :: sr2006_psi_et_g = 27.16 !< constant adjustment + + real :: sr2006_psi_e_a = 0.02 !< psi_et*psi_et coefficient + real :: sr2006_psi_e_b = -0.113 !< psi_et coefficient + real :: sr2006_psi_e_c = -0.7 !< constant adjustment + + real :: sr2006_smcmax_a = -0.097 !< sand adjustment + real :: sr2006_smcmax_b = 0.043 !< constant adjustment + + end module noahmp_tables diff --git a/physics/ozne_def.meta b/physics/ozne_def.meta index 27698eec6..8776b9f80 100644 --- a/physics/ozne_def.meta +++ b/physics/ozne_def.meta @@ -26,4 +26,4 @@ dimensions = (vertical_dimension_of_ozone_forcing_data) type = real kind = kind_phys - active = (index_for_ozone>0) + active = (index_of_ozone_mixing_ratio_in_tracer_concentration_array>0) diff --git a/physics/ozphys.f b/physics/ozphys.f index 3d3c1d004..f0229717a 100644 --- a/physics/ozphys.f +++ b/physics/ozphys.f @@ -46,8 +46,10 @@ end subroutine ozphys_finalize !> @{ subroutine ozphys_run ( & & im, levs, ko3, dt, oz, tin, po3, & - & prsl, prdout, oz_coeff, delp, ldiag3d, qdiag3d, & - & ozp1, ozp2, ozp3, ozp4, con_g, me, errmsg, errflg) + & prsl, prdout, oz_coeff, delp, ldiag3d, & + & ntoz, dtend, dtidx, index_of_process_prod_loss, & + & index_of_process_ozmix, index_of_process_temp, & + & index_of_process_overhead_ozone, con_g, me, errmsg, errflg) ! ! this code assumes that both prsl and po3 are from bottom to top ! as are all other variables @@ -57,23 +59,23 @@ subroutine ozphys_run ( & ! ! Interface variables integer, intent(in) :: im, levs, ko3, oz_coeff, me - real(kind=kind_phys), intent(inout) :: & - & oz(im,levs) - ! These arrays may not be allocated and need assumed array sizes - real(kind=kind_phys), intent(inout) :: & - & ozp1(:,:), ozp2(:,:), ozp3(:,:), ozp4(:,:) + real(kind=kind_phys), intent(inout) :: oz(:,:) + real(kind=kind_phys), intent(inout) :: dtend(:,:,:) + integer, intent(in) :: dtidx(:,:), ntoz, & + & index_of_process_prod_loss, index_of_process_ozmix, & + & index_of_process_temp, index_of_process_overhead_ozone real(kind=kind_phys), intent(in) :: & - & dt, po3(ko3), prdout(im,ko3,oz_coeff), & - & prsl(im,levs), tin(im,levs), delp(im,levs), & + & dt, po3(:), prdout(:,:,:), & + & prsl(:,:), tin(:,:), delp(:,:), & & con_g real :: gravi - logical, intent(in) :: ldiag3d, qdiag3d + logical, intent(in) :: ldiag3d character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! ! Local variables - integer k,kmax,kmin,l,i,j + integer k,kmax,kmin,l,i,j, idtend(4) logical flg(im) real(kind=kind_phys) pmax, pmin, tem, temp real(kind=kind_phys) wk1(im), wk2(im), wk3(im), prod(im,oz_coeff), @@ -86,6 +88,17 @@ subroutine ozphys_run ( & ! save input oz in ozi ozi = oz gravi=1.0/con_g + + + if(ldiag3d) then + idtend(1) = dtidx(100+ntoz,index_of_process_prod_loss) ! was ozp1 + idtend(2) = dtidx(100+ntoz,index_of_process_ozmix) ! was ozp2 + idtend(3) = dtidx(100+ntoz,index_of_process_temp) ! was ozp3 + idtend(4) = dtidx(100+ntoz,index_of_process_overhead_ozone) ! was ozp4 + else + idtend=0 + endif + ! !> - Calculate vertical integrated column ozone values. if (oz_coeff > 2) then @@ -152,11 +165,13 @@ subroutine ozphys_run ( & oz(i,l) = (ozib(i) + prod(i,1)*dt) / (1.0 + prod(i,2)*dt) enddo ! - if (ldiag3d .and. qdiag3d) then ! ozone change diagnostics - do i=1,im - ozp1(i,l) = ozp1(i,l) + prod(i,1)*dt - ozp2(i,l) = ozp2(i,l) + (oz(i,l) - ozib(i)) - enddo + if(idtend(1)>=1) then + dtend(:,l,idtend(1)) = dtend(:,l,idtend(1)) + ! was ozp1 + & prod(:,1)*dt + endif + if(idtend(2)>=1) then + dtend(:,l,idtend(2)) = dtend(:,l,idtend(2)) + ! was ozp2 + & (oz(:,l) - ozib(:)) endif endif !> - Calculate the 4 terms of prognostic ozone change during time \a dt: @@ -173,16 +188,23 @@ subroutine ozphys_run ( & ! &,' ozib=',ozib(i),' l=',l,' tin=',tin(i,l),'colo3=',colo3(i,l+1) oz(i,l) = (ozib(i) + tem*dt) / (1.0 + prod(i,2)*dt) enddo - if(ldiag3d .and. qdiag3d) then - do i=1,im - ozp1(i,l) = ozp1(i,l) + prod(i,1)*dt - ozp2(i,l) = ozp2(i,l) + (oz(i,l) - ozib(i)) - ozp3(i,l) = ozp3(i,l) + prod(i,3)*tin(i,l)*dt - ozp4(i,l) = ozp4(i,l) + prod(i,4)*colo3(i,l+1)*dt - enddo + if(idtend(1)>=1) then + dtend(:,l,idtend(1)) = dtend(:,l,idtend(1)) + ! was ozp1 + & prod(:,1)*dt + endif + if(idtend(2)>=1) then + dtend(:,l,idtend(2)) = dtend(:,l,idtend(2)) + ! was ozp2 + & (oz(:,l)-ozib(:)) + endif + if(idtend(3)>=1) then + dtend(:,l,idtend(3)) = dtend(:,l,idtend(3)) + ! was ozp3 + & prod(:,3)*tin(:,l)*dt + endif + if(idtend(4)>=1) then + dtend(:,l,idtend(4)) = dtend(:,l,idtend(4)) + ! was ozp4 + & prod(:,4)*colo3(:,l+1)*dt endif endif - enddo ! vertical loop ! return diff --git a/physics/ozphys.meta b/physics/ozphys.meta index 2edfc04e8..4a3c2d3c5 100644 --- a/physics/ozphys.meta +++ b/physics/ozphys.meta @@ -8,7 +8,7 @@ name = ozphys_init type = scheme [oz_phys] - standard_name = flag_for_ozone_physics + standard_name = flag_for_nrl_2006_ozone_scheme long_name = flag for old (2006) ozone physics units = flag dimensions = () @@ -46,7 +46,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical layers units = count dimensions = () @@ -62,7 +62,7 @@ intent = in optional = F [dt] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics time step units = s dimensions = () @@ -71,19 +71,19 @@ intent = in optional = F [oz] - standard_name = ozone_concentration_updated_by_physics + standard_name = ozone_concentration_of_new_state long_name = ozone concentration updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [tin] - standard_name = air_temperature_updated_by_physics + standard_name = air_temperature_of_new_state long_name = updated air temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -101,7 +101,7 @@ standard_name = air_pressure long_name = mid-layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -127,62 +127,76 @@ standard_name = air_pressure_difference_between_midlayers long_name = difference between mid-layer pressures units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [ldiag3d] - standard_name = flag_diagnostics_3D + standard_name = flag_for_diagnostics_3D long_name = flag for calculating 3-D diagnostic fields units = flag dimensions = () type = logical intent = in optional = F -[qdiag3d] - standard_name = flag_tracer_diagnostics_3D - long_name = flag for 3d tracer diagnostic fields - units = flag - dimensions = () - type = logical - intent = in - optional = F -[ozp1] - standard_name = cumulative_change_in_ozone_concentration_due_to_production_and_loss_rate - long_name = cumulative change in ozone concentration due to production and loss rate - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) +[dtend] + standard_name = cumulative_change_of_state_variables + long_name = diagnostic tendencies for state variables + units = various + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_cumulative_change_processes) type = real kind = kind_phys + active = (flag_for_diagnostics_3D) intent = inout optional = F -[ozp2] - standard_name = cumulative_change_in_ozone_concentration_due_to_ozone_mixing_ratio - long_name = cumulative change in ozone concentration due to ozone mixing ratio - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[dtidx] + standard_name = cumulative_change_of_state_variables_outer_index + long_name = index of state-variable and process in last dimension of diagnostic tendencies array AKA cumulative_change_index + units = index + dimensions = (number_of_tracers_plus_one_hundred,number_of_cumulative_change_processes) + type = integer + intent = in optional = F -[ozp3] - standard_name = cumulative_change_in_ozone_concentration_due_to_temperature - long_name = cumulative change in ozone concentration due to temperature - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[ntoz] + standard_name = index_of_ozone_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for ozone mixing ratio + units = index + dimensions = () + type = integer + intent = in optional = F -[ozp4] - standard_name = cumulative_change_in_ozone_concentration_due_to_overhead_ozone_column - long_name = cumulative change in ozone concentration due to overhead ozone column - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[index_of_process_prod_loss] + standard_name = index_of_production_and_loss_process_in_cumulative_change_index + long_name = index of production and loss effect in photochemistry process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_process_ozmix] + standard_name = index_of_ozone_mixing_ratio_process_in_cumulative_change_index + long_name = index of ozone mixing ratio effect in photochemistry process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_process_temp] + standard_name = index_of_temperature_process_in_cumulative_change_index + long_name = index of temperature effect in photochemistry process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_process_overhead_ozone] + standard_name = index_of_overhead_process_in_cumulative_change_index + long_name = index of overhead ozone effect in photochemistry process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in optional = F [con_g] standard_name = gravitational_acceleration diff --git a/physics/ozphys_2015.f b/physics/ozphys_2015.f index cc60ed2b4..9711b45b4 100644 --- a/physics/ozphys_2015.f +++ b/physics/ozphys_2015.f @@ -49,11 +49,10 @@ end subroutine ozphys_2015_finalize !! climatological T and O3 are in location 5 and 6 of prdout array !!\author June 2015 - Shrinivas Moorthi subroutine ozphys_2015_run ( & - & im, levs, ko3, dt, oz, tin, po3, & - & prsl, prdout, pl_coeff, delp, & - & ldiag3d, qdiag3d, & - & ozp1,ozp2,ozp3,ozp4,con_g, & - & me, errmsg, errflg) + & im, levs, ko3, dt, oz, tin, po3, prsl, prdout, pl_coeff, & + & delp, ldiag3d, dtend, dtidx, ntoz, index_of_process_prod_loss& + & , index_of_process_ozmix, index_of_process_temp, & + & index_of_process_overhead_ozone, con_g, me, errmsg, errflg) ! ! use machine , only : kind_phys @@ -62,20 +61,20 @@ subroutine ozphys_2015_run ( & real(kind=kind_phys),intent(in) :: con_g real :: gravi integer, intent(in) :: im, levs, ko3, pl_coeff,me - real(kind=kind_phys), intent(in) :: po3(ko3), & - & prsl(im,levs), tin(im,levs), & - & delp(im,levs), & - & prdout(im,ko3,pl_coeff), dt - ! These arrays may not be allocated and need assumed array sizes - real(kind=kind_phys), intent(inout) :: & - & ozp1(:,:), ozp2(:,:), ozp3(:,:),ozp4(:,:) + real(kind=kind_phys), intent(in) :: po3(:), & + & prsl(:,:), tin(:,:), & + & delp(:,:), & + & prdout(:,:,:), dt + real(kind=kind_phys), intent(inout) :: dtend(:,:,:) + integer, intent(in) :: dtidx(:,:), ntoz, & + & index_of_process_prod_loss, index_of_process_ozmix, & + & index_of_process_temp, index_of_process_overhead_ozone real(kind=kind_phys), intent(inout) :: oz(im,levs) - character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - integer k,kmax,kmin,l,i,j + integer k,kmax,kmin,l,i,j, idtend(4) logical ldiag3d, flg(im), qdiag3d real(kind=kind_phys) pmax, pmin, tem, temp real(kind=kind_phys) wk1(im), wk2(im), wk3(im),prod(im,pl_coeff), & @@ -86,6 +85,15 @@ subroutine ozphys_2015_run ( & errmsg = '' errflg = 0 + if(ldiag3d) then + idtend(1) = dtidx(100+ntoz,index_of_process_prod_loss) ! was ozp1 + idtend(2) = dtidx(100+ntoz,index_of_process_ozmix) ! was ozp2 + idtend(3) = dtidx(100+ntoz,index_of_process_temp) ! was ozp3 + idtend(4) = dtidx(100+ntoz,index_of_process_overhead_ozone) ! was ozp4 + else + idtend=0 + endif + !ccpp: save input oz in ozi ozi = oz gravi=1.0/con_g @@ -159,14 +167,21 @@ subroutine ozphys_2015_run ( & !ccpp ozo(i,l) = (ozib(i) + tem*dt) / (1.0 - prod(i,2)*dt) oz(i,l) = (ozib(i) + tem*dt) / (1.0 - prod(i,2)*dt) enddo - if (ldiag3d .and. qdiag3d) then ! ozone change diagnostics - do i=1,im - ozp1(i,l) = ozp1(i,l) + (prod(i,1)-prod(i,2)*prod(i,6))*dt - ozp2(i,l) = ozp2(i,l) + (oz(i,l) - ozib(i)) - ozp3(i,l) = ozp3(i,l) + prod(i,3)*(tin(i,l)-prod(i,5))*dt - ozp4(i,l) = ozp4(i,l) + prod(i,4) - & * (colo3(i,l)-coloz(i,l))*dt - enddo + if(idtend(1)>=1) then + dtend(:,l,idtend(1)) = dtend(:,l,idtend(1)) + ! was ozp1 + & (prod(:,1)-prod(:,2)*prod(:,6))*dt + endif + if(idtend(2)>=1) then + dtend(:,l,idtend(2)) = dtend(:,l,idtend(2)) + ! was ozp2 + & (oz(:,l) - ozib(:)) + endif + if(idtend(3)>=1) then + dtend(:,l,idtend(3)) = dtend(:,l,idtend(3)) + ! was ozp3 + & prod(:,3)*(tin(:,l)-prod(:,5))*dt + endif + if(idtend(4)>=1) then + dtend(:,l,idtend(4)) = dtend(:,l,idtend(4)) + ! was ozp4 + & prod(:,4) * (colo3(:,l)-coloz(:,l))*dt endif enddo ! vertical loop ! diff --git a/physics/ozphys_2015.meta b/physics/ozphys_2015.meta index 11f1dfa0c..750c27d98 100644 --- a/physics/ozphys_2015.meta +++ b/physics/ozphys_2015.meta @@ -8,7 +8,7 @@ name = ozphys_2015_init type = scheme [oz_phys_2015] - standard_name = flag_for_2015_ozone_physics + standard_name = flag_for_nrl_2015_ozone_scheme long_name = flag for new (2015) ozone physics units = flag dimensions = () @@ -46,7 +46,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical layers units = count dimensions = () @@ -62,7 +62,7 @@ intent = in optional = F [dt] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics time step units = s dimensions = () @@ -71,19 +71,19 @@ intent = in optional = F [oz] - standard_name = ozone_concentration_updated_by_physics + standard_name = ozone_concentration_of_new_state long_name = ozone concentration updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [tin] - standard_name = air_temperature_updated_by_physics + standard_name = air_temperature_of_new_state long_name = updated air temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -101,7 +101,7 @@ standard_name = air_pressure long_name = mid-layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -127,62 +127,75 @@ standard_name = air_pressure_difference_between_midlayers long_name = difference between mid-layer pressures units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [ldiag3d] - standard_name = flag_diagnostics_3D + standard_name = flag_for_diagnostics_3D long_name = flag for calculating 3-D diagnostic fields units = flag dimensions = () type = logical intent = in optional = F -[qdiag3d] - standard_name = flag_tracer_diagnostics_3D - long_name = flag for 3d tracer diagnostic fields - units = flag - dimensions = () - type = logical - intent = in - optional = F -[ozp1] - standard_name = cumulative_change_in_ozone_concentration_due_to_production_and_loss_rate - long_name = cumulative change in ozone concentration due to production and loss rate - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) +[dtend] + standard_name = cumulative_change_of_state_variables + long_name = diagnostic tendencies for state variables + units = various + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_cumulative_change_processes) type = real kind = kind_phys intent = inout optional = F -[ozp2] - standard_name = cumulative_change_in_ozone_concentration_due_to_ozone_mixing_ratio - long_name = cumulative change in ozone concentration due to ozone mixing ratio - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[dtidx] + standard_name = cumulative_change_of_state_variables_outer_index + long_name = index of state-variable and process in last dimension of diagnostic tendencies array AKA cumulative_change_index + units = index + dimensions = (number_of_tracers_plus_one_hundred,number_of_cumulative_change_processes) + type = integer + intent = in optional = F -[ozp3] - standard_name = cumulative_change_in_ozone_concentration_due_to_temperature - long_name = cumulative change in ozone concentration due to temperature - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[ntoz] + standard_name = index_of_ozone_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for ozone mixing ratio + units = index + dimensions = () + type = integer + intent = in optional = F -[ozp4] - standard_name = cumulative_change_in_ozone_concentration_due_to_overhead_ozone_column - long_name = cumulative change in ozone concentration due to overhead ozone column - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[index_of_process_prod_loss] + standard_name = index_of_production_and_loss_process_in_cumulative_change_index + long_name = index of production and loss effect in photochemistry process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_process_ozmix] + standard_name = index_of_ozone_mixing_ratio_process_in_cumulative_change_index + long_name = index of ozone mixing ratio effect in photochemistry process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_process_temp] + standard_name = index_of_temperature_process_in_cumulative_change_index + long_name = index of temperature effect in photochemistry process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_process_overhead_ozone] + standard_name = index_of_overhead_process_in_cumulative_change_index + long_name = index of overhead ozone effect in photochemistry process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in optional = F [con_g] standard_name = gravitational_acceleration diff --git a/physics/phys_tend.F90 b/physics/phys_tend.F90 index 333c22e2a..b444f2d97 100644 --- a/physics/phys_tend.F90 +++ b/physics/phys_tend.F90 @@ -19,81 +19,82 @@ end subroutine phys_tend_finalize !> \section arg_table_phys_tend_run Argument Table !! \htmlinclude phys_tend_run.html !! - subroutine phys_tend_run(ldiag3d, qdiag3d, & - du3dt_pbl, du3dt_orogwd, du3dt_deepcnv, du3dt_congwd, & - du3dt_rdamp, du3dt_shalcnv, du3dt_phys, & - dv3dt_pbl, dv3dt_orogwd, dv3dt_deepcnv, dv3dt_congwd, & - dv3dt_rdamp, dv3dt_shalcnv, dv3dt_phys, & - dt3dt_lw, dt3dt_sw, dt3dt_pbl, dt3dt_deepcnv, & - dt3dt_shalcnv, dt3dt_mp, dt3dt_orogwd, dt3dt_rdamp, & - dt3dt_congwd, dt3dt_phys, & - dq3dt_pbl, dq3dt_deepcnv, dq3dt_shalcnv, dq3dt_mp, & - dq3dt_o3pbl, dq3dt_o3prodloss, dq3dt_o3mix, & - dq3dt_o3tmp, dq3dt_o3column, dq3dt_phys, dq3dt_o3phys, & - errmsg, errflg) + subroutine phys_tend_run(ldiag3d, dtend, dtidx, ntracp100, & + index_of_process_physics, index_of_process_photochem, & + nprocess, nprocess_summed, is_photochem, ntoz, errmsg, errflg) ! Interface variables - logical, intent(in) :: ldiag3d, qdiag3d - real(kind=kind_phys), intent(in ) :: du3dt_pbl(:,:) - real(kind=kind_phys), intent(in ) :: du3dt_orogwd(:,:) - real(kind=kind_phys), intent(in ) :: du3dt_deepcnv(:,:) - real(kind=kind_phys), intent(in ) :: du3dt_congwd(:,:) - real(kind=kind_phys), intent(in ) :: du3dt_rdamp(:,:) - real(kind=kind_phys), intent(in ) :: du3dt_shalcnv(:,:) - real(kind=kind_phys), intent( out) :: du3dt_phys(:,:) - real(kind=kind_phys), intent(in ) :: dv3dt_pbl(:,:) - real(kind=kind_phys), intent(in ) :: dv3dt_orogwd(:,:) - real(kind=kind_phys), intent(in ) :: dv3dt_deepcnv(:,:) - real(kind=kind_phys), intent(in ) :: dv3dt_congwd(:,:) - real(kind=kind_phys), intent(in ) :: dv3dt_rdamp(:,:) - real(kind=kind_phys), intent(in ) :: dv3dt_shalcnv(:,:) - real(kind=kind_phys), intent( out) :: dv3dt_phys(:,:) - real(kind=kind_phys), intent(in ) :: dt3dt_lw(:,:) - real(kind=kind_phys), intent(in ) :: dt3dt_sw(:,:) - real(kind=kind_phys), intent(in ) :: dt3dt_pbl(:,:) - real(kind=kind_phys), intent(in ) :: dt3dt_deepcnv(:,:) - real(kind=kind_phys), intent(in ) :: dt3dt_shalcnv(:,:) - real(kind=kind_phys), intent(in ) :: dt3dt_mp(:,:) - real(kind=kind_phys), intent(in ) :: dt3dt_orogwd(:,:) - real(kind=kind_phys), intent(in ) :: dt3dt_rdamp(:,:) - real(kind=kind_phys), intent(in ) :: dt3dt_congwd(:,:) - real(kind=kind_phys), intent( out) :: dt3dt_phys(:,:) - real(kind=kind_phys), intent(in ) :: dq3dt_pbl(:,:) - real(kind=kind_phys), intent(in ) :: dq3dt_deepcnv(:,:) - real(kind=kind_phys), intent(in ) :: dq3dt_shalcnv(:,:) - real(kind=kind_phys), intent(in ) :: dq3dt_mp(:,:) - real(kind=kind_phys), intent(in ) :: dq3dt_o3pbl(:,:) - real(kind=kind_phys), intent(in ) :: dq3dt_o3prodloss(:,:) - real(kind=kind_phys), intent(in ) :: dq3dt_o3mix(:,:) - real(kind=kind_phys), intent(in ) :: dq3dt_o3tmp(:,:) - real(kind=kind_phys), intent(in ) :: dq3dt_o3column(:,:) - real(kind=kind_phys), intent( out) :: dq3dt_phys(:,:) - real(kind=kind_phys), intent( out) :: dq3dt_o3phys(:,:) + logical, intent(in) :: ldiag3d, is_photochem(:) + real(kind=kind_phys), optional, intent(inout) :: dtend(:,:,:) + integer, intent(in) :: dtidx(:,:), index_of_process_physics, ntoz, & + ntracp100, nprocess, nprocess_summed, index_of_process_photochem character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg + integer :: ichem, iphys, itrac + logical :: all_true(nprocess) + ! Initialize CCPP error handling variables errmsg = '' errflg = 0 - if (.not.ldiag3d .and. .not.qdiag3d) return - - du3dt_phys = du3dt_pbl + du3dt_orogwd + du3dt_deepcnv + & - du3dt_congwd + du3dt_rdamp + du3dt_shalcnv - - dv3dt_phys = dv3dt_pbl + dv3dt_orogwd + dv3dt_deepcnv + & - dv3dt_congwd + dv3dt_rdamp + dv3dt_shalcnv - - dt3dt_phys = dt3dt_lw + dt3dt_sw + dt3dt_pbl + & - dt3dt_deepcnv + dt3dt_shalcnv + dt3dt_mp + & - dt3dt_orogwd + dt3dt_rdamp + dt3dt_congwd - - dq3dt_phys = dq3dt_pbl + dq3dt_deepcnv + & - dq3dt_shalcnv + dq3dt_mp - - dq3dt_o3phys = dq3dt_o3pbl + dq3dt_o3prodloss & - + dq3dt_o3mix + dq3dt_o3tmp + dq3dt_o3column - + if(.not.ldiag3d) then + return + endif + + all_true = .true. + + ! Total photochemical tendencies + itrac=ntoz+100 + ichem = dtidx(itrac,index_of_process_photochem) + if(ichem>=1) then + call sum_it(ichem,itrac,is_photochem) + endif + + + do itrac=2,ntracp100 + ! Total physics tendencies + iphys = dtidx(itrac,index_of_process_physics) + if(iphys>=1) then + call sum_it(iphys,itrac,all_true) + endif + enddo + + contains + + subroutine sum_it(isum,itrac,sum_me) + implicit none + integer, intent(in) :: isum ! third index of dtend of summary process + integer, intent(in) :: itrac ! tracer or state variable being summed + logical, intent(in) :: sum_me(nprocess) ! false = skip this process + logical :: first + integer :: idtend, iprocess + + first=.true. + do iprocess=1,nprocess + if(iprocess>nprocess_summed) then + exit ! Don't sum up the sums. + else if(.not.sum_me(iprocess)) then + cycle ! We were asked to skip this one. + endif + idtend = dtidx(itrac,iprocess) + if(idtend>=1) then + ! This tendency was calculated for this tracer, so + ! accumulate it into the total tendency. + if(first) then + dtend(:,:,isum) = dtend(:,:,idtend) + first=.false. + else + dtend(:,:,isum) = dtend(:,:,isum) + dtend(:,:,idtend) + endif + endif + enddo + if(first) then + ! No tendencies were calculated, so sum is 0: + dtend(:,:,isum) = 0 + endif + end subroutine sum_it + end subroutine phys_tend_run end module phys_tend diff --git a/physics/phys_tend.meta b/physics/phys_tend.meta index 3af255148..1ab3e8588 100644 --- a/physics/phys_tend.meta +++ b/physics/phys_tend.meta @@ -8,336 +8,86 @@ name = phys_tend_run type = scheme [ldiag3d] - standard_name = flag_diagnostics_3D + standard_name = flag_for_diagnostics_3D long_name = flag for 3d diagnostic fields units = flag dimensions = () type = logical intent = in optional = F -[qdiag3d] - standard_name = flag_tracer_diagnostics_3D - long_name = flag for 3d tracer diagnostic fields - units = flag - dimensions = () - type = logical - intent = in - optional = F -[du3dt_pbl] - standard_name = cumulative_change_in_x_wind_due_to_PBL - long_name = cumulative change in x wind due to PBL - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[du3dt_orogwd] - standard_name = cumulative_change_in_x_wind_due_to_orographic_gravity_wave_drag - long_name = cumulative change in x wind due to orographic gravity wave drag - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[du3dt_deepcnv] - standard_name = cumulative_change_in_x_wind_due_to_deep_convection - long_name = cumulative change in x wind due to deep convection - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[du3dt_congwd] - standard_name = cumulative_change_in_x_wind_due_to_convective_gravity_wave_drag - long_name = cumulative change in x wind due to convective gravity wave drag - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[du3dt_rdamp] - standard_name = cumulative_change_in_x_wind_due_to_rayleigh_damping - long_name = cumulative change in x wind due to Rayleigh damping - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[du3dt_shalcnv] - standard_name = cumulative_change_in_x_wind_due_to_shallow_convection - long_name = cumulative change in x wind due to shallow convection - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[du3dt_phys] - standard_name = cumulative_change_in_x_wind_due_to_physics - long_name = cumulative change in x wind due to physics - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) +[dtend] + standard_name = cumulative_change_of_state_variables + long_name = diagnostic tendencies for state variables + units = various + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_cumulative_change_processes) type = real kind = kind_phys - intent = out + intent = inout optional = F -[dv3dt_pbl] - standard_name = cumulative_change_in_y_wind_due_to_PBL - long_name = cumulative change in y wind due to PBL - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[dv3dt_orogwd] - standard_name = cumulative_change_in_y_wind_due_to_orographic_gravity_wave_drag - long_name = cumulative change in y wind due to orographic gravity wave drag - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[dv3dt_deepcnv] - standard_name = cumulative_change_in_y_wind_due_to_deep_convection - long_name = cumulative change in y wind due to deep convection - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[dv3dt_congwd] - standard_name = cumulative_change_in_y_wind_due_to_convective_gravity_wave_drag - long_name = cumulative change in y wind due to convective gravity wave drag - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[dv3dt_rdamp] - standard_name = cumulative_change_in_y_wind_due_to_rayleigh_damping - long_name = cumulative change in y wind due to Rayleigh damping - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[dv3dt_shalcnv] - standard_name = cumulative_change_in_y_wind_due_to_shallow_convection - long_name = cumulative change in y wind due to shallow convection - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[dv3dt_phys] - standard_name = cumulative_change_in_y_wind_due_to_physics - long_name = cumulative change in y wind due to physics - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = out - optional = F -[dt3dt_lw] - standard_name = cumulative_change_in_temperature_due_to_longwave_radiation - long_name = cumulative change in temperature due to longwave radiation - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[dt3dt_sw] - standard_name = cumulative_change_in_temperature_due_to_shortwave_radiation - long_name = cumulative change in temperature due to shortwave radiation - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[dt3dt_pbl] - standard_name = cumulative_change_in_temperature_due_to_PBL - long_name = cumulative change in temperature due to PBL - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[dt3dt_deepcnv] - standard_name = cumulative_change_in_temperature_due_to_deep_convection - long_name = cumulative change in temperature due to deep convection - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[dt3dt_shalcnv] - standard_name = cumulative_change_in_temperature_due_to_shallow_convection - long_name = cumulative change in temperature due to shallow convection - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[dt3dt_mp] - standard_name = cumulative_change_in_temperature_due_to_microphysics - long_name = cumulative change in temperature due to microphysics - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[dt3dt_orogwd] - standard_name = cumulative_change_in_temperature_due_to_orographic_gravity_wave_drag - long_name = cumulative change in temperature due to orographic gravity wave drag - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[dt3dt_rdamp] - standard_name = cumulative_change_in_temperature_due_to_rayleigh_damping - long_name = cumulative change in temperature due to Rayleigh damping - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[dt3dt_congwd] - standard_name = cumulative_change_in_temperature_due_to_convective_gravity_wave_drag - long_name = cumulative change in temperature due to convective gravity wave drag - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[dt3dt_phys] - standard_name = cumulative_change_in_temperature_due_to_physics - long_name = cumulative change in temperature due to physics - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = out - optional = F -[dq3dt_pbl] - standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL - long_name = cumulative change in water vapor specific humidity due to PBL - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[dq3dt_deepcnv] - standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_deep_convection - long_name = cumulative change in water vapor specific humidity due to deep convection - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys +[dtidx] + standard_name = cumulative_change_of_state_variables_outer_index + long_name = index of state-variable and process in last dimension of diagnostic tendencies array AKA cumulative_change_index + units = index + dimensions = (number_of_tracers_plus_one_hundred,number_of_cumulative_change_processes) + type = integer intent = in optional = F -[dq3dt_shalcnv] - standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_shallow_convection - long_name = cumulative change in water vapor specific humidity due to shallow convection - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys +[ntracp100] + standard_name = number_of_tracers_plus_one_hundred + long_name = number of tracers plus one hundred + units = count + dimensions = () + type = integer intent = in optional = F -[dq3dt_mp] - standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_microphysics - long_name = cumulative change in water vapor specific humidity due to microphysics - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys +[index_of_process_physics] + standard_name = index_of_all_physics_process_in_cumulative_change_index + long_name = index of all physics transport process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer intent = in optional = F -[dq3dt_o3pbl] - standard_name = cumulative_change_in_ozone_mixing_ratio_due_to_PBL - long_name = cumulative change in ozone mixing ratio due to PBL - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys +[index_of_process_photochem] + standard_name = index_of_photochemistry_process_in_cumulative_change_index + long_name = index of photochemistry process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer intent = in optional = F -[dq3dt_o3prodloss] - standard_name = cumulative_change_in_ozone_concentration_due_to_production_and_loss_rate - long_name = cumulative change in ozone concentration due to production and loss rate - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys +[nprocess] + standard_name = number_of_cumulative_change_processes + long_name = number of processes that cause changes in state variables + units = count + dimensions = () + type = integer intent = in optional = F -[dq3dt_o3mix] - standard_name = cumulative_change_in_ozone_concentration_due_to_ozone_mixing_ratio - long_name = cumulative change in ozone concentration due to ozone mixing ratio - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys +[nprocess_summed] + standard_name = number_of_physics_causes_of_tracer_changes + long_name = number of causes in dtidx per tracer summed for total physics tendency + units = count + dimensions = () + type = integer intent = in optional = F -[dq3dt_o3tmp] - standard_name = cumulative_change_in_ozone_concentration_due_to_temperature - long_name = cumulative change in ozone concentration due to temperature - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys +[is_photochem] + standard_name = flags_for_photochemistry_processes_to_sum + long_name = flags for photochemistry processes to sum as the total photochemistry process cumulative change + units = flag + dimensions = (number_of_cumulative_change_processes) + type = logical intent = in optional = F -[dq3dt_o3column] - standard_name = cumulative_change_in_ozone_concentration_due_to_overhead_ozone_column - long_name = cumulative change in ozone concentration due to overhead ozone column - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys +[ntoz] + standard_name = index_of_ozone_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for ozone mixing ratio + units = index + dimensions = () + type = integer intent = in optional = F -[dq3dt_phys] - standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_physics - long_name = cumulative change in water vapor specific humidity due to physics - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = out - optional = F -[dq3dt_o3phys] - standard_name = cumulative_change_in_ozone_concentration_due_to_physics - long_name = cumulative change in ozone concentration due to physics - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = out - optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/precpd.f b/physics/precpd.f index 6af066afc..929d78f9c 100644 --- a/physics/precpd.f +++ b/physics/precpd.f @@ -4,9 +4,44 @@ !> This module contains the CCPP-compliant zhao_carr_precpd scheme. module zhaocarr_precpd + + implicit none + public :: zhaocarr_precpd_init, zhaocarr_precpd_run, & + & zhaocarr_precpd_finalize + private + logical :: is_initialized = .False. contains - subroutine zhaocarr_precpd_init () + subroutine zhaocarr_precpd_init (imp_physics, & + & imp_physics_zhao_carr, & + & imp_physics_zhao_carr_pdf, & + & errmsg, errflg) + implicit none + + ! Interface variables + integer, intent(in ) :: imp_physics + integer, intent(in ) :: imp_physics_zhao_carr, & + & imp_physics_zhao_carr_pdf + ! CCPP error handling + character(len=*), intent( out) :: errmsg + integer, intent( out) :: errflg + + ! Initialize the CCPP error handling variables + errmsg = '' + errflg = 0 + + if (is_initialized) return + + ! Consistency checks + if (imp_physics/=imp_physics_zhao_carr .and. & + & imp_physics/=imp_physics_zhao_carr_pdf) then + write(errmsg,'(*(a))') "Logic error: namelist choice of & + & microphysics is different from Zhao-Carr MP" + errflg = 1 + return + end if + + is_initialized = .true. end subroutine zhaocarr_precpd_init !> \defgroup precip GFS precpd Main @@ -99,13 +134,13 @@ subroutine zhaocarr_precpd_run (im,km,dt,del,prsl,q,cwm,t,rn & real (kind=kind_phys), intent(in) :: grav, hvap, hfus, ttp, cp, & & eps, epsm1 real (kind=kind_phys), intent(in) :: dt - real (kind=kind_phys), intent(in) :: del(im,km), prsl(im,km) - real (kind=kind_phys), intent(inout) :: q(im,km), t(im,km), & - & cwm(im,km) - real (kind=kind_phys), intent(out) :: rn(im), sr(im), rainp(im,km) - real (kind=kind_phys), intent(in) :: u00k(im,km) - real (kind=kind_phys), intent(in) :: psautco(2), prautco(2), & - & evpco, wminco(2), wk1(im) + real (kind=kind_phys), intent(in) :: del(:,:), prsl(:,:) + real (kind=kind_phys), intent(inout) :: q(:,:), t(:,:), & + & cwm(:,:) + real (kind=kind_phys), intent(out) :: rn(:), sr(:), rainp(:,:) + real (kind=kind_phys), intent(in) :: u00k(:,:) + real (kind=kind_phys), intent(in) :: psautco(:), prautco(:), & + & evpco, wminco(:), wk1(:) logical, intent(in) :: lprnt character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg diff --git a/physics/precpd.meta b/physics/precpd.meta index a1012a659..d754851c7 100644 --- a/physics/precpd.meta +++ b/physics/precpd.meta @@ -3,6 +3,52 @@ type = scheme dependencies = funcphys.f90,machine.F,physcons.F90 +######################################################################## +[ccpp-arg-table] + name = zhaocarr_precpd_init + type = scheme +[imp_physics] + standard_name = control_for_microphysics_scheme + long_name = choice of microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imp_physics_zhao_carr] + standard_name = identifier_for_zhao_carr_microphysics_scheme + long_name = choice of Zhao-Carr microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imp_physics_zhao_carr_pdf] + standard_name = identifier_for_zhao_carr_pdf_microphysics_scheme + long_name = choice of Zhao-Carr microphysics scheme with PDF clouds + units = flag + dimensions = () + type = integer + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + ######################################################################## [ccpp-arg-table] name = zhaocarr_precpd_run @@ -16,7 +62,7 @@ intent = in optional = F [km] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -24,7 +70,7 @@ intent = in optional = F [dt] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics time step units = s dimensions = () @@ -36,7 +82,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = pressure level thickness units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -45,34 +91,34 @@ standard_name = air_pressure long_name = layer mean pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [q] - standard_name = water_vapor_specific_humidity_updated_by_physics + standard_name = specific_humidity_of_new_state long_name = water vapor specific humidity units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [cwm] - standard_name = cloud_condensed_water_mixing_ratio_updated_by_physics + standard_name = cloud_liquid_water_mixing_ratio_of_new_state long_name = moist cloud condensed water mixing ratio units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [t] - standard_name = air_temperature_updated_by_physics + standard_name = air_temperature_of_new_state long_name = layer mean air temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -162,7 +208,7 @@ standard_name = tendency_of_rain_water_mixing_ratio_due_to_microphysics long_name = tendency of rain water mixing ratio due to microphysics units = kg kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -171,13 +217,13 @@ standard_name = critical_relative_humidity long_name = critical relative humidity units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [psautco] - standard_name = coefficient_from_cloud_ice_to_snow + standard_name = autoconversion_to_snow_coefficient long_name = conversion coefficient from cloud ice to snow units = none dimensions = (2) @@ -186,7 +232,7 @@ intent = in optional = F [prautco] - standard_name = coefficient_from_cloud_water_to_rain + standard_name = autoconversion_to_rain_coefficient long_name = conversion coefficient from cloud water to rain units = none dimensions = (2) @@ -195,7 +241,7 @@ intent = in optional = F [evpco] - standard_name = coefficient_for_evaporation_of_rainfall + standard_name = precipitation_evaporation_coefficient long_name = coefficient for evaporation of rainfall units = none dimensions = () @@ -204,7 +250,7 @@ intent = in optional = F [wminco] - standard_name = cloud_condensed_water_conversion_threshold + standard_name = cloud_condensate_autoconversion_threshold_coefficient long_name = conversion coefficient from cloud liquid and ice to precipitation units = none dimensions = (2) diff --git a/physics/radiation_aerosols.f b/physics/radiation_aerosols.f index f732c37ef..e7fd3631b 100644 --- a/physics/radiation_aerosols.f +++ b/physics/radiation_aerosols.f @@ -127,7 +127,6 @@ !> \ingroup rad !! \defgroup module_radiation_aerosols module_radiation_aerosols -!> @{ !! This module contains climatological atmospheric aerosol schemes for !! radiation computations. !! @@ -561,7 +560,7 @@ subroutine aer_init & laswflg= (mod(iaerflg,10) > 0) ! control flag for sw tropospheric aerosol lalwflg= (mod(iaerflg/10,10) > 0) ! control flag for lw tropospheric aerosol - lavoflg= (iaerflg >= 100) ! control flag for stratospheric volcanic aeros + lavoflg= (mod(iaerflg/100,10) >0) ! control flag for stratospheric volcanic aeros !> -# Call wrt_aerlog() to write aerosol parameter configuration to output logs. @@ -766,8 +765,6 @@ end subroutine wrt_aerlog !> This subroutine defines the one wavenumber solar fluxes based on toa !! solar spectral distribution, and define the one wavenumber IR fluxes !! based on black-body emission distribution at a predefined temperature. -!>\section gel_set_spec General Algorithm -!-------------------------------- subroutine set_spectrum !................................ ! --- inputs: (module constants) @@ -915,7 +912,6 @@ end subroutine aer_init !! !!\section gen_clim_aerinit General Algorithm !!@{ -!----------------------------------- subroutine clim_aerinit & & ( solfwv, eirfwv, me & ! --- inputs & ) ! --- outputs @@ -4446,6 +4442,8 @@ subroutine aeropt asy1 = f_zero sca1 = f_zero ssa1 = f_zero + asy = f_zero + ssa = f_zero do m = 1, kcm1 cm = max(aerms(k,m),0.0) * dz1(k) ext1 = ext1 + cm*extrhi_grt(m,ib) @@ -4525,4 +4523,3 @@ end subroutine aer_property_gocart !..........................................! end module module_radiation_aerosols ! !==========================================! -!> @} diff --git a/physics/radiation_clouds.f b/physics/radiation_clouds.f index 056bede28..dacf6e38e 100644 --- a/physics/radiation_clouds.f +++ b/physics/radiation_clouds.f @@ -3189,7 +3189,7 @@ subroutine progcld6 & endif ! Call subroutine get_alpha_exp to define alpha parameter for exponential cloud overlap options - if ( iovr == 4 .or. iovr == 5) then + if ( iovr == 3 .or. iovr == 4 .or. iovr == 5) then call get_alpha_exp(ix, nLay, dzlay, de_lgth, alpha) else de_lgth(:) = 0. diff --git a/physics/radiation_surface.f b/physics/radiation_surface.f index f0cbdd18a..78525c1de 100644 --- a/physics/radiation_surface.f +++ b/physics/radiation_surface.f @@ -87,13 +87,12 @@ !! - setemis(): set up surface emissivity for lw radiation !! !! SW surface albedo (namelist control parameter - \b IALB=1) -!!\n IALB=0: surface vegetation type based climatology scheme (monthly -!! data in \f$1^o\f$ horizontal resolution) !!\n IALB=1: MODIS retrievals based monthly mean climatology +!!\n IALB=2: use surface albedo from land model !! !! LW surface emissivity (namelist control parameter - \b IEMS=1) -!!\n IEMS=0: black-body emissivity (=1.0) !!\n IEMS=1: surface type based climatology in \f$1^o\f$ horizontal resolution +!!\n IEMS=2: use surface emissivity from land model !! !!\version NCEP-Radiation_surface v5.1 Nov 2012 @@ -101,6 +100,9 @@ !! emissivity for LW radiation. module module_radiation_surface ! +!! \section arg_table_module_radiation_surface +!! \htmlinclude module_radiation_surface.html +!! use physparam, only : ialbflg, iemsflg, semis_file, & & kind_phys use physcons, only : con_t0c, con_ttp, con_pi, con_tice @@ -122,11 +124,13 @@ module module_radiation_surface integer, parameter, public :: JMXEMS = 180 !< number of latitude points in global emis-type map real (kind=kind_phys), parameter :: f_zero = 0.0 real (kind=kind_phys), parameter :: f_one = 1.0 + real (kind=kind_phys), parameter :: epsln = 1.0e-6 real (kind=kind_phys), parameter :: rad2dg= 180.0 / con_pi integer, allocatable :: idxems(:,:) !< global surface emissivity index array - integer :: iemslw = 0 !< global surface emissivity control flag set up in 'sfc_init' + integer :: iemslw = 1 !< global surface emissivity control flag set up in 'sfc_init' ! public sfc_init, setalb, setemis + public f_zero, f_one, epsln ! ================= contains @@ -140,9 +144,8 @@ module module_radiation_surface !! @{ !----------------------------------- subroutine sfc_init & - & ( me )! --- inputs: -! --- outputs: ( none ) - + & ( me, errmsg, errflg )! --- inputs/outputs: +! ! =================================================================== ! ! ! ! this program is the initialization program for surface radiation ! @@ -161,13 +164,13 @@ subroutine sfc_init & ! ! ! external module variables: ! ! ialbflg - control flag for surface albedo schemes ! -! =0: climatology, based on surface veg types ! -! =1: ! +! =1: use modis based surface albedo ! +! =2: use surface albedo from land model ! ! iemsflg - control flag for sfc emissivity schemes (ab:2-dig)! ! a:=0 set sfc air/ground t same for lw radiation ! ! =1 set sfc air/ground t diff for lw radiation ! -! b:=0 use fixed sfc emissivity=1.0 (black-body) ! -! =1 use varying climtology sfc emiss (veg based) ! +! b:=1 use varying climtology sfc emiss (veg based) ! +! =2 use surface emissivity from land model ! ! ! ! ==================== end of description ===================== ! ! @@ -177,6 +180,8 @@ subroutine sfc_init & integer, intent(in) :: me ! --- outputs: ( none ) + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg ! --- locals: integer :: i, k @@ -185,48 +190,49 @@ subroutine sfc_init & character :: cline*80 ! !===> ... begin here +! + errmsg = '' + errflg = 0 ! if ( me == 0 ) print *, VTAGSFC ! print out version tag !> - Initialization of surface albedo section !! \n physparam::ialbflg -!! - = 0: using climatology surface albedo scheme for SW !! - = 1: using MODIS based land surface albedo for SW +!! - = 2: using albedo from land model - if ( ialbflg == 0 ) then + if ( ialbflg == 1 ) then if ( me == 0 ) then - print *,' - Using climatology surface albedo scheme for sw' + print *,' - Using MODIS based land surface albedo for sw' endif - else if ( ialbflg == 1 ) then + elseif ( ialbflg == 2 ) then ! use albedo from land model if ( me == 0 ) then - print *,' - Using MODIS based land surface albedo for sw' + print *,' - Using Albedo From Land Model' endif else - print *,' !! ERROR in Albedo Scheme Setting, IALB=',ialbflg - stop + + errmsg = 'module_radiation_surface: invalid ialbflg option' + errflg = 1 + return + endif ! end if_ialbflg_block !> - Initialization of surface emissivity section !! \n physparam::iemsflg -!! - = 0: fixed SFC emissivity at 1.0 !! - = 1: input SFC emissivity type map from "semis_file" +!! - = 2: input SFC emissivity from land model iemslw = mod(iemsflg, 10) ! emissivity control - if ( iemslw == 0 ) then ! fixed sfc emis at 1.0 - - if ( me == 0 ) then - print *,' - Using Fixed Surface Emissivity = 1.0 for lw' - endif - elseif ( iemslw == 1 ) then ! input sfc emiss type map + if ( iemslw == 1 ) then ! input sfc emiss type map ! --- allocate data space if ( .not. allocated(idxems) ) then - allocate ( idxems(IMXEMS,JMXEMS) ) + allocate ( idxems(IMXEMS,JMXEMS) ) endif ! --- check to see if requested emissivity data file existed @@ -265,9 +271,18 @@ subroutine sfc_init & close(NIRADSF) endif ! end if_file_exist_block + elseif ( iemslw == 2 ) then ! use emiss from land model + + if ( me == 0 ) then + print *,' - Using Surface Emissivity From Land Model' + endif + else - print *,' !! ERROR in Emissivity Scheme Setting, IEMS=',iemsflg - stop + + errmsg = 'module_radiation_surface: invalid iemslw option' + errflg = 1 + return + endif ! end if_iemslw_block ! @@ -317,10 +332,13 @@ end subroutine sfc_init !! @{ !----------------------------------- subroutine setalb & - & ( slmsk,snowf,sncovr,snoalb,zorlf,coszf,tsknf,tairf,hprif, & ! --- inputs: + & ( slmsk,lsm,lsm_noahmp,lsm_ruc,snowf, & ! --- inputs: + & sncovr,sncovr_ice,snoalb,zorlf,coszf, & + & tsknf,tairf,hprif,frac_grid,min_seaice, & & alvsf,alnsf,alvwf,alnwf,facsf,facwf,fice,tisfc, & - & IMAX, & - & albPpert, pertalb, & ! sfc-perts, mgehne + & lsmalbdvis, lsmalbdnir, lsmalbivis, lsmalbinir, & + & icealbdvis, icealbdnir, icealbivis, icealbinir, & + & IMAX, albPpert, pertalb, fracl, fraco, fraci, icy, & & sfcalb & ! --- outputs: & ) @@ -343,6 +361,8 @@ subroutine setalb & ! snowf (IMAX) - snow depth water equivalent in mm ! ! sncovr(IMAX) - ialgflg=0: not used ! ! ialgflg=1: snow cover over land in fraction ! +! sncovr_ice(IMAX) - ialgflg=0: not used ! +! ialgflg=1: snow cover over ice in fraction ! ! snoalb(IMAX) - ialbflg=0: not used ! ! ialgflg=1: max snow albedo over land in fraction ! ! zorlf (IMAX) - surface roughness in cm ! @@ -385,17 +405,27 @@ subroutine setalb & ! --- inputs integer, intent(in) :: IMAX + integer, intent(in) :: lsm, lsm_noahmp, lsm_ruc + logical, intent(in) :: frac_grid real (kind=kind_phys), dimension(:), intent(in) :: & & slmsk, snowf, zorlf, coszf, tsknf, tairf, hprif, & & alvsf, alnsf, alvwf, alnwf, facsf, facwf, fice, tisfc, & - & sncovr, snoalb, albPpert ! sfc-perts, mgehne - real (kind=kind_phys), intent(in) :: pertalb ! sfc-perts, mgehne + & icealbdvis, icealbdnir, icealbivis, icealbinir, & + & sncovr, sncovr_ice, snoalb, albPpert ! sfc-perts, mgehne + real (kind=kind_phys), intent(in) :: pertalb ! sfc-perts, mgehne + real (kind=kind_phys), intent(in) :: min_seaice + real (kind=kind_phys), dimension(:), intent(in) :: & + & fracl, fraco, fraci + real (kind=kind_phys), dimension(:),intent(inout) :: & + & lsmalbdvis, lsmalbdnir, lsmalbivis, lsmalbinir + + logical, dimension(:), intent(in) :: & + & icy ! --- outputs real (kind=kind_phys), dimension(IMAX,NF_ALBD), intent(out) :: & & sfcalb -! real (kind=kind_phys), dimension(:,:), intent(out) :: sfcalb ! --- locals: real (kind=kind_phys) :: asnvb, asnnb, asnvd, asnnd, asevb & @@ -403,6 +433,11 @@ subroutine setalb & &, asnow, argh, hrgh, fsno0, fsno1, flnd0, fsea0, csnow & &, a1, a2, b1, b2, b3, ab1bm, ab2bm, m, s, alpha, beta, albtmp + real (kind=kind_phys) :: asevb_wat,asenb_wat,asevd_wat,asend_wat, & + & asevb_ice,asenb_ice,asevd_ice,asend_ice + + real (kind=kind_phys) :: alndnb, alndnd, alndvb, alndvd + real (kind=kind_phys) ffw, dtgd integer :: i, k, kk, iflag @@ -410,216 +445,215 @@ subroutine setalb & ! !===> ... begin here ! - -!> - If use climatological albedo scheme: - if ( ialbflg == 0 ) then ! use climatological albedo scheme +!> - Use modis based albedo for land area: + if ( ialbflg == 1 ) then do i = 1, IMAX -!> - Modified snow albedo scheme - units convert to m (originally -!! snowf in mm; zorlf in cm) - - asnow = 0.02*snowf(i) - argh = min(0.50, max(.025, 0.01*zorlf(i))) - hrgh = min(f_one, max(0.20, 1.0577-1.1538e-3*hprif(i) ) ) - fsno0 = asnow / (argh + asnow) * hrgh - if (nint(slmsk(i))==0 .and. tsknf(i)>con_tice) fsno0 = f_zero - fsno1 = f_one - fsno0 - flnd0 = min(f_one, facsf(i)+facwf(i)) - fsea0 = max(f_zero, f_one-flnd0) - fsno = fsno0 - fsea = fsea0 * fsno1 - flnd = flnd0 * fsno1 - -!> - Calculate diffused sea surface albedo - - if (tsknf(i) >= 271.5) then - asevd = 0.06 - asend = 0.06 - elseif (tsknf(i) < 271.1) then - asevd = 0.70 - asend = 0.65 - else - a1 = (tsknf(i) - 271.1)**2 - asevd = 0.7 - 4.0*a1 - asend = 0.65 - 3.6875*a1 - endif - -!> - Calculate diffused snow albedo. - - if (nint(slmsk(i)) == 2) then - ffw = f_one - fice(i) - if (ffw < f_one) then - dtgd = max(f_zero, min(5.0, (con_ttp-tisfc(i)) )) - b1 = 0.03 * dtgd + !-- water albedo + asevd_wat = 0.06 + asend_wat = 0.06 + asevb_wat = asevd_wat + asenb_wat = asevd_wat + + ! direct albedo CZA dependence over water + if (fraco(i) > f_zero .and. coszf(i) > 0.0001) then + asevb_wat = max (asevd_wat, 0.026/(coszf(i)**1.7 + 0.065) & + & + 0.15 * (coszf(i)-0.1) * (coszf(i)-0.5) & + & * (coszf(i)-f_one)) + asenb_wat = asevb_wat + endif + + if (icy(i)) then + !-- Computation of ice albedo + asnow = 0.02*snowf(i) + argh = min(0.50, max(.025, 0.01*zorlf(i))) + hrgh = min(f_one,max(0.20,1.0577-1.1538e-3*hprif(i))) + fsno0 = asnow / (argh + asnow) * hrgh ! snow fraction on ice + ! diffused + if (tsknf(i) > 271.1 .and. tsknf(i) < 271.5) then + !tgs: looks like albedo reduction from puddles on ice + a1 = (tsknf(i) - 271.1)**2 + asevd_ice = 0.7 - 4.0*a1 + asend_ice = 0.65 - 3.6875*a1 else - b1 = f_zero + asevd_ice = 0.70 + asend_ice = 0.65 endif + ! direct + asevb_ice = asevd_ice + asenb_ice = asend_ice + + if (fsno0 > f_zero) then + ! Snow on ice + dtgd = max(f_zero, min(5.0, (con_ttp-tisfc(i)) )) + b1 = 0.03 * dtgd + asnvd = (asevd_ice + b1) ! diffused snow albedo + asnnd = (asend_ice + b1) + if (coszf(i) > 0.0001 .and. coszf(i) < 0.5) then ! direct snow albedo + csnow = 0.5 * (3.0 / (f_one+4.0*coszf(i)) - f_one) + asnvb = min( 0.98, asnvd+(f_one-asnvd)*csnow ) + asnnb = min( 0.98, asnnd+(f_one-asnnd)*csnow ) + else + asnvb = asnvd + asnnb = asnnd + endif + + ! composite ice and snow albedos + asevd_ice = asevd_ice * (1. - fsno0) + asnvd * fsno0 + asend_ice = asend_ice * (1. - fsno0) + asnnd * fsno0 + asevb_ice = asevb_ice * (1. - fsno0) + asnvb * fsno0 + asenb_ice = asenb_ice * (1. - fsno0) + asnnb * fsno0 + endif ! snow + else + ! icy = false, fill in values + asevd_ice = 0.70 + asend_ice = 0.65 + asevb_ice = 0.70 + asenb_ice = 0.65 + endif ! end icy + + if (fracl(i) > f_zero) then +!> - Use snow cover input directly for land model, no +!! conversion needed. + + fsno0 = sncovr(i) ! snow fraction on land - b3 = 0.06 * ffw - asnvd = (0.70 + b1) * fice(i) + b3 - asnnd = (0.60 + b1) * fice(i) + b3 - asevd = 0.70 * fice(i) + b3 - asend = 0.60 * fice(i) + b3 - else - asnvd = 0.90 - asnnd = 0.75 - endif - -!> - Calculate direct snow albedo. - - if (coszf(i) < 0.5) then - csnow = 0.5 * (3.0 / (f_one+4.0*coszf(i)) - f_one) - asnvb = min( 0.98, asnvd+(1.0-asnvd)*csnow ) - asnnb = min( 0.98, asnnd+(1.0-asnnd)*csnow ) - else - asnvb = asnvd - asnnb = asnnd - endif - -!> - Calculate direct sea surface albedo. - - if (coszf(i) > 0.0001) then - rfcs = 1.4 / (f_one + 0.8*coszf(i)) - rfcw = 1.1 / (f_one + 0.2*coszf(i)) - - if (tsknf(i) >= con_t0c) then - asevb = max(asevd, 0.026/(coszf(i)**1.7+0.065) & - & + 0.15 * (coszf(i)-0.1) * (coszf(i)-0.5) & - & * (coszf(i)-f_one)) - asenb = asevb + fsno1 = f_one - fsno0 + flnd0 = min(f_one, facsf(i)+facwf(i)) + flnd = flnd0 * fsno1 ! snow-free fraction + fsno = f_one - flnd ! snow-covered fraction + + !> - use Fanglin's zenith angle treatment. + if (coszf(i) > 0.0001) then + rfcs = 1.775/(1.0+1.55*coszf(i)) else - asevb = asevd - asenb = asend + !- no sun + rfcs = f_one endif - else - rfcs = f_one - rfcw = f_one - asevb = asevd - asenb = asend - endif - - a1 = alvsf(i) * facsf(i) - b1 = alvwf(i) * facwf(i) - a2 = alnsf(i) * facsf(i) - b2 = alnwf(i) * facwf(i) - ab1bm = a1*rfcs + b1*rfcw - ab2bm = a2*rfcs + b2*rfcw - sfcalb(i,1) = min(0.99, ab2bm) *flnd + asenb*fsea + asnnb*fsno - sfcalb(i,2) = (a2 + b2) * 0.96 *flnd + asend*fsea + asnnd*fsno - sfcalb(i,3) = min(0.99, ab1bm) *flnd + asevb*fsea + asnvb*fsno - sfcalb(i,4) = (a1 + b1) * 0.96 *flnd + asevd*fsea + asnvd*fsno + !- zenith dependence is applied only to direct beam albedo + ab1bm = min(0.99, alnsf(i)*rfcs) + ab2bm = min(0.99, alvsf(i)*rfcs) + + alndnb = ab1bm *flnd + snoalb(i) * fsno + alndnd = alnwf(i)*flnd + snoalb(i) * fsno + alndvb = ab2bm *flnd + snoalb(i) * fsno + alndvd = alvwf(i)*flnd + snoalb(i) * fsno + lsmalbdnir(i) = min(0.99,max(0.01,alndnb)) + lsmalbinir(i) = min(0.99,max(0.01,alndnd)) + lsmalbdvis(i) = min(0.99,max(0.01,alndvb)) + lsmalbivis(i) = min(0.99,max(0.01,alndvd)) + else + !-- fill in values for land albedo + alndnb = 0. + alndnd = 0. + alndvb = 0. + alndvd = 0. + endif ! end land + + !-- Composite mean surface albedo from land, open water and + !-- ice fractions + sfcalb(i,1) = min(0.99,max(0.01,alndnb))*fracl(i) & ! direct beam NIR + & + asenb_wat*fraco(i) + asenb_ice*fraci(i) + sfcalb(i,2) = min(0.99,max(0.01,alndnd))*fracl(i) & ! diffuse NIR + & + asend_wat*fraco(i) + asend_ice*fraci(i) + sfcalb(i,3) = min(0.99,max(0.01,alndvb))*fracl(i) & ! direct beam visible + & + asevb_wat*fraco(i) + asevb_ice*fraci(i) + sfcalb(i,4) = min(0.99,max(0.01,alndvd))*fracl(i) & ! diffuse visible + & + asevd_wat*fraco(i) + asevd_ice*fraci(i) enddo ! end_do_i_loop -!> - If use modis based albedo for land area: - else - +!> -# use land model output for land area: Noah MP, RUC (land and ice). + elseif ( ialbflg == 2 ) then do i = 1, IMAX -!> - Calculate snow cover input directly for land model, no -!! conversion needed. - - fsno0 = sncovr(i) - - if (nint(slmsk(i))==0 .and. tsknf(i)>con_tice) fsno0 = f_zero - - if (nint(slmsk(i)) == 2) then - asnow = 0.02*snowf(i) - argh = min(0.50, max(.025, 0.01*zorlf(i))) - hrgh = min(f_one, max(0.20, 1.0577-1.1538e-3*hprif(i) ) ) - fsno0 = asnow / (argh + asnow) * hrgh - endif - - fsno1 = f_one - fsno0 - flnd0 = min(f_one, facsf(i)+facwf(i)) - fsea0 = max(f_zero, f_one-flnd0) - fsno = fsno0 - fsea = fsea0 * fsno1 - flnd = flnd0 * fsno1 - -!> - Calculate diffused sea surface albedo. - - if (tsknf(i) >= 271.5) then - asevd = 0.06 - asend = 0.06 - elseif (tsknf(i) < 271.1) then - asevd = 0.70 - asend = 0.65 - else - a1 = (tsknf(i) - 271.1)**2 - asevd = 0.7 - 4.0*a1 - asend = 0.65 - 3.6875*a1 - endif - -!> - Calculate diffused snow albedo, land area use input max snow -!! albedo. - - if (nint(slmsk(i)) == 2) then - ffw = f_one - fice(i) - if (ffw < f_one) then - dtgd = max(f_zero, min(5.0, (con_ttp-tisfc(i)) )) - b1 = 0.03 * dtgd - else - b1 = f_zero - endif + !-- water albedo + asevd_wat = 0.06 + asend_wat = 0.06 + asevb_wat = asevd_wat + asenb_wat = asevd_wat + + ! direct albedo CZA dependence over water + if (fraco(i) > f_zero .and. coszf(i) > 0.0001) then + asevb_wat = max (asevd_wat, 0.026/(coszf(i)**1.7 + 0.065) & + & + 0.15 * (coszf(i)-0.1) * (coszf(i)-0.5) & + & * (coszf(i)-f_one)) + asenb_wat = asevb_wat + endif - b3 = 0.06 * ffw - asnvd = (0.70 + b1) * fice(i) + b3 - asnnd = (0.60 + b1) * fice(i) + b3 - asevd = 0.70 * fice(i) + b3 - asend = 0.60 * fice(i) + b3 - else - asnvd = snoalb(i) - asnnd = snoalb(i) - endif - -!> - Calculate direct snow albedo. - - if (nint(slmsk(i)) == 2) then - if (coszf(i) < 0.5) then - csnow = 0.5 * (3.0 / (f_one+4.0*coszf(i)) - f_one) - asnvb = min( 0.98, asnvd+(f_one-asnvd)*csnow ) - asnnb = min( 0.98, asnnd+(f_one-asnnd)*csnow ) - else - asnvb = asnvd - asnnb = asnnd - endif - else - asnvb = snoalb(i) - asnnb = snoalb(i) - endif - -!> - Calculate direct sea surface albedo, use fanglin's zenith angle -!! treatment. - - if (coszf(i) > 0.0001) then - -! rfcs = 1.89 - 3.34*coszf(i) + 4.13*coszf(i)*coszf(i) & -! & - 2.02*coszf(i)*coszf(i)*coszf(i) - rfcs = 1.775/(1.0+1.55*coszf(i)) - - if (tsknf(i) >= con_t0c) then - asevb = max(asevd, 0.026/(coszf(i)**1.7+0.065) & - & + 0.15 * (coszf(i)-0.1) * (coszf(i)-0.5) & - & * (coszf(i)-f_one)) - asenb = asevb + !-- ice albedo + !tgs: this part of the code needs the input from the ice + ! model. Otherwise it uses the backup albedo computation + ! from ialbflg = 1. + if (icy(i)) then + if(lsm == lsm_ruc ) then + !-- use ice albedo from the RUC ice model + asevd_ice = icealbivis(i) + asend_ice = icealbinir(i) + asevb_ice = icealbdvis(i) + asenb_ice = icealbdnir(i) else - asevb = asevd - asenb = asend - endif - else - rfcs = f_one - asevb = asevd - asenb = asend - endif - - ab1bm = min(0.99, alnsf(i)*rfcs) - ab2bm = min(0.99, alvsf(i)*rfcs) - sfcalb(i,1) = ab1bm *flnd + asenb*fsea + asnnb*fsno - sfcalb(i,2) = alnwf(i) *flnd + asend*fsea + asnnd*fsno - sfcalb(i,3) = ab2bm *flnd + asevb*fsea + asnvb*fsno - sfcalb(i,4) = alvwf(i) *flnd + asevd*fsea + asnvd*fsno + !-- Computation of ice albedo + asnow = 0.02*snowf(i) + argh = min(0.50, max(.025, 0.01*zorlf(i))) + hrgh = min(f_one,max(0.20,1.0577-1.1538e-3*hprif(i))) + fsno0 = asnow / (argh + asnow) * hrgh + ! diffused + if (tsknf(i) > 271.1 .and. tsknf(i) < 271.5) then + !tgs: looks like albedo reduction from puddles on ice + a1 = (tsknf(i) - 271.1)**2 + asevd_ice = 0.7 - 4.0*a1 + asend_ice = 0.65 - 3.6875*a1 + else + asevd_ice = 0.70 + asend_ice = 0.65 + endif + ! direct + asevb_ice = asevd_ice + asenb_ice = asend_ice + + if (fsno0 > f_zero) then + ! Snow on ice + dtgd = max(f_zero, min(5.0, (con_ttp-tisfc(i)) )) + b1 = 0.03 * dtgd + asnvd = (asevd_ice + b1) ! diffused snow albedo + asnnd = (asend_ice + b1) + + if (coszf(i) > 0.0001 .and. coszf(i) < 0.5) then ! direct snow albedo + csnow = 0.5 * (3.0 / (f_one+4.0*coszf(i)) - f_one) + asnvb = min( 0.98, asnvd+(f_one-asnvd)*csnow ) + asnnb = min( 0.98, asnnd+(f_one-asnnd)*csnow ) + else + asnvb = asnvd + asnnb = asnnd + endif + + ! composite ice and snow albedos + asevd_ice = asevd_ice * (1. - fsno0) + asnvd * fsno0 + asend_ice = asend_ice * (1. - fsno0) + asnnd * fsno0 + asevb_ice = asevb_ice * (1. - fsno0) + asnvb * fsno0 + asenb_ice = asenb_ice * (1. - fsno0) + asnnb * fsno0 + endif ! snow + endif ! ice option from LSM or otherwise + else + ! icy = false, fill in values + asevd_ice = 0.70 + asend_ice = 0.65 + asevb_ice = 0.70 + asenb_ice = 0.65 + endif ! end icy + + !-- Composite mean surface albedo from land, open water and + !-- ice fractions + sfcalb(i,1) = min(0.99,max(0.01,lsmalbdnir(i)))*fracl(i) & ! direct beam NIR + & + asenb_wat*fraco(i) + asenb_ice*fraci(i) + sfcalb(i,2) = min(0.99,max(0.01,lsmalbinir(i)))*fracl(i) & ! diffuse NIR + & + asend_wat*fraco(i) + asend_ice*fraci(i) + sfcalb(i,3) = min(0.99,max(0.01,lsmalbdvis(i)))*fracl(i) & ! direct beam visible + & + asevb_wat*fraco(i) + asevb_ice*fraci(i) + sfcalb(i,4) = min(0.99,max(0.01,lsmalbivis(i)))*fracl(i) & ! diffuse visible + & + asevd_wat*fraco(i) + asevd_ice*fraci(i) enddo ! end_do_i_loop @@ -659,7 +693,6 @@ end subroutine setalb !! or -pi -> +pi ranges !!\param xlat (IMAX), latitude in radiance, default to pi/2 -> !! -pi/2 range, otherwise see in-line comment -!!\param slmsk (IMAX), sea(0),land(1),ice(2) mask on fcst model grid !!\param snowf (IMAX), snow depth water equivalent in mm !!\param sncovr (IMAX), snow cover over land !!\param zorlf (IMAX), surface roughness in cm @@ -672,9 +705,11 @@ end subroutine setalb !! @{ !----------------------------------- subroutine setemis & - & ( xlon,xlat,slmsk,snowf,sncovr,zorlf,tsknf,tairf,hprif, & ! --- inputs: - & IMAX, & - & sfcemis & ! --- outputs: + & ( lsm,lsm_noahmp,lsm_ruc,vtype,frac_grid, & ! --- inputs: + & min_seaice,xlon,xlat,slmsk,snowf,sncovr,sncovr_ice, & + & zorlf,tsknf,tairf,hprif, & + & semis_lnd,semis_ice,IMAX,fracl,fraco,fraci,icy, & + & semisbase, sfcemis & ! --- outputs: & ) ! =================================================================== ! @@ -695,14 +730,16 @@ subroutine setemis & ! slmsk (IMAX) - sea(0),land(1),ice(2) mask on fcst model grid ! ! snowf (IMAX) - snow depth water equivalent in mm ! ! sncovr(IMAX) - ialbflg=1: snow cover over land in fraction ! +! sncovr_ice(IMAX) - snow cover over ice in fraction ! ! zorlf (IMAX) - surface roughness in cm ! ! tsknf (IMAX) - ground surface temperature in k ! ! tairf (IMAX) - lowest model layer air temperature in k ! ! hprif (IMAX) - topographic sdv in m ! +! semis_lnd (IMAX) - emissivity from lsm ! ! IMAX - array horizontal dimension ! ! ! ! outputs: ! -! sfcemis(IMAX) - surface emissivity ! +! sfcemis(IMAX) - surface emissivity ! ! ! ! ------------------------------------------------------------------- ! ! ! @@ -716,22 +753,37 @@ subroutine setemis & ! ! ! ==================== end of description ===================== ! ! + use set_soilveg_ruc_mod, only: set_soilveg_ruc + use namelist_soilveg_ruc + implicit none ! --- inputs integer, intent(in) :: IMAX + integer, intent(in) :: lsm, lsm_noahmp, lsm_ruc + logical, intent(in) :: frac_grid + real (kind=kind_phys), dimension(:), intent(in) :: vtype + real (kind=kind_phys), intent(in) :: min_seaice real (kind=kind_phys), dimension(:), intent(in) :: & - & xlon,xlat, slmsk, snowf,sncovr, zorlf, tsknf, tairf, hprif + & xlon,xlat, slmsk, snowf,sncovr, sncovr_ice, & + & zorlf, tsknf, tairf, hprif, semis_lnd, semis_ice + real (kind=kind_phys), dimension(:), intent(in) :: & + & fracl, fraco, fraci + logical, dimension(:), intent(in) :: & + & icy ! --- outputs + real (kind=kind_phys), dimension(:), intent(out) :: semisbase real (kind=kind_phys), dimension(:), intent(out) :: sfcemis ! --- locals: integer :: i, i1, i2, j1, j2, idx + integer :: ivgtyp real (kind=kind_phys) :: dltg, hdlt, tmp1, tmp2, & - & asnow, argh, hrgh, fsno, fsno0, fsno1 + & asnow, argh, hrgh, fsno + real (kind=kind_phys) :: sfcemis_land, sfcemis_ice ! --- reference emiss value for diff surface emiss index ! 1-open water, 2-grass/shrub land, 3-bare soil, tundra, @@ -743,32 +795,29 @@ subroutine setemis & ! !===> ... begin here ! -!> -# Set sfcemis default to 1.0 or by surface type and condition. - if ( iemslw == 0 ) then ! sfc emiss default to 1.0 - - sfcemis(:) = f_one - return - - else ! emiss set by sfc type and condition +!> -# Set emissivity by surface type and conditions + if ( iemslw == 1 ) then dltg = 360.0 / float(IMXEMS) hdlt = 0.5 * dltg ! --- ... mapping input data onto model grid ! note: this is a simple mapping method, an upgrade is needed if -! the model grid is much corcer than the 1-deg data resolution +! the model grid is much coarser than the 1-deg data resolution lab_do_IMAX : do i = 1, IMAX - if ( nint(slmsk(i)) == 0 ) then ! sea point - - sfcemis(i) = emsref(1) - - else if ( nint(slmsk(i)) == 2 ) then ! sea-ice - - sfcemis(i) = emsref(7) + if (fracl(i) < epsln) then ! no land + if ( abs(fraco(i)-f_one) < epsln ) then ! open water point + sfcemis(i) = emsref(1) + elseif ( abs(fraci(i)-f_one) > epsln ) then ! complete sea/lake ice + sfcemis(i) = emsref(7) + else + !-- fractional sea ice + sfcemis(i) = fraco(i)*emsref(1) + fraci(i)*emsref(7) + endif - else ! land + else ! land or fractional grid ! --- map grid in longitude direction i2 = 1 @@ -799,37 +848,71 @@ subroutine setemis & endif enddo lab_do_JMXEMS - idx = max( 2, idxems(i2,j2) ) if ( idx >= 7 ) idx = 2 - sfcemis(i) = emsref(idx) + if (abs(fracl(i)-f_one) < epsln) then + sfcemis(i) = emsref(idx) + else + sfcemis(i) = fracl(i)*emsref(idx) + fraco(i)*emsref(1) & + & + fraci(i)*emsref(7) + endif + semisbase(i) = sfcemis(i) endif ! end if_slmsk_block -!> -# Check for snow covered area. - - if ( ialbflg==1 .and. nint(slmsk(i))==1 ) then ! input land area snow cover +!> - Check for snow covered area. + if ( sncovr(i) > f_zero ) then ! input land/ice area snow cover - fsno0 = sncovr(i) - fsno1 = f_one - fsno0 - sfcemis(i) = sfcemis(i)*fsno1 + emsref(8)*fsno0 + fsno = sncovr(i) + sfcemis(i) = sfcemis(i)*(f_one - fsno) + emsref(8)*fsno else ! compute snow cover from snow depth if ( snowf(i) > f_zero ) then asnow = 0.02*snowf(i) argh = min(0.50, max(.025, 0.01*zorlf(i))) hrgh = min(f_one, max(0.20, 1.0577-1.1538e-3*hprif(i) ) ) - fsno0 = asnow / (argh + asnow) * hrgh - if (nint(slmsk(i)) == 0 .and. tsknf(i) > 271.2) & - & fsno0=f_zero - fsno1 = f_one - fsno0 - sfcemis(i) = sfcemis(i)*fsno1 + emsref(8)*fsno0 + fsno = asnow / (argh + asnow) * hrgh + + if (abs(fraco(i)-f_one) < epsln) fsno = f_zero ! no snow over open water + sfcemis(i) = sfcemis(i)*(f_one - fsno) + emsref(8)*fsno endif endif ! end if_ialbflg enddo lab_do_IMAX + elseif ( iemslw == 2 ) then ! sfc emiss updated in land model: Noah MP or RUC + + do i = 1, IMAX + + !-- ice emissivity + sfcemis_ice = emsref(7) + + if ( icy(i) ) then + !-- complete or fractional ice + if (lsm == lsm_noahmp) then + if ( snowf(i) > f_zero ) then + asnow = 0.02*snowf(i) + argh = min(0.50, max(.025,0.01*zorlf(i))) + hrgh = min(f_one,max(0.20,1.0577-1.1538e-3*hprif(i))) + fsno = asnow / (argh + asnow) * hrgh + sfcemis_ice = sfcemis_ice*(f_one-fsno)+emsref(8)*fsno + endif + elseif (lsm == lsm_ruc) then + sfcemis_ice = semis_ice(i) ! output from lsm (with snow effect) + endif ! lsm check + endif ! icy + + !-- land emissivity + !-- from Noah MP or RUC lsms + sfcemis_land = semis_lnd(i) ! albedo with snow effect from LSM + + !-- Composite emissivity from land, water and ice fractions. + sfcemis(i) = fracl(i)*sfcemis_land + fraco(i)*emsref(1) & + & + fraci(i)*sfcemis_ice + + enddo ! i + endif ! end if_iemslw_block !chk print *,' In setemis, iemsflg, sfcemis =',iemsflg,sfcemis diff --git a/physics/radiation_surface.meta b/physics/radiation_surface.meta new file mode 100644 index 000000000..beab83ce9 --- /dev/null +++ b/physics/radiation_surface.meta @@ -0,0 +1,15 @@ +[ccpp-table-properties] + name = module_radiation_surface + type = module + dependencies = + +######################################################################## +[ccpp-arg-table] + name = module_radiation_surface + type = module +[nf_albd] + standard_name = number_of_components_for_surface_albedo + long_name = number of IR/VIS/UV compinents for surface albedo + units = none + dimensions = () + type = integer diff --git a/physics/radiation_tools.F90 b/physics/radiation_tools.F90 new file mode 100644 index 000000000..c6524aab6 --- /dev/null +++ b/physics/radiation_tools.F90 @@ -0,0 +1,97 @@ +module radiation_tools + use machine, only: & + kind_phys ! Working type + implicit none + + real(kind_phys) :: & + rrtmgp_minP, & ! Minimum pressure allowed in RRTMGP + rrtmgp_minT ! Minimum temperature allowed in RRTMGP +contains + + ! ######################################################################################### + ! ######################################################################################### + subroutine cmp_tlev(nCol,nLev,minP,p_lay,t_lay,p_lev,tsfc,t_lev) + ! Inputs + integer, intent(in) :: & + nCol,nLev + real(kind_phys),intent(in) :: & + minP + real(kind_phys),dimension(nCol),intent(in) :: & + tsfc + real(kind_phys),dimension(nCol,nLev),intent(in) :: & + p_lay,t_lay + real(kind_phys),dimension(nCol,nLev+1),intent(in) :: & + p_lev + + ! Outputs + real(kind_phys),dimension(nCol,nLev+1),intent(out) :: & + t_lev + + ! Local + integer :: iCol,iLay, iSFC, iTOA + logical :: top_at_1 + real(kind_phys), dimension(nCol,nLev) :: tem2da, tem2db + + top_at_1 = (p_lev(1,1) .lt. p_lev(1, nLev)) + if (top_at_1) then + iSFC = nLev + iTOA = 1 + else + iSFC = 1 + iTOA = nLev + endif + + if (iTOA .eq. 1) then + tem2da(1:nCol,2:iSFC) = log(p_lay(1:nCol,2:iSFC)) + tem2db(1:nCol,2:iSFC) = log(p_lev(1:nCol,2:iSFC)) + do iCol = 1, nCol + tem2da(iCol,1) = log(p_lay(iCol,1) ) + tem2db(iCol,1) = log(max(minP, p_lev(iCol,1)) ) + tem2db(iCol,iSFC) = log(p_lev(iCol,iSFC) ) + enddo + t_lev(1:NCOL,1) = t_lay(1:NCOL,iTOA) + do iLay = 2, iSFC + do iCol = 1, nCol + t_lev(iCol,iLay) = t_lay(iCol,iLay) + (t_lay(iCol,iLay-1) - t_lay(iCol,iLay))& + * (tem2db(iCol,iLay) - tem2da(iCol,iLay)) & + / (tem2da(iCol,iLay-1) - tem2da(iCol,iLay)) + enddo + enddo + t_lev(1:NCOL,iSFC+1) = tsfc(1:NCOL) + else + tem2da(1:nCol,2:iTOA) = log(p_lay(1:nCol,2:iTOA)) + tem2db(1:nCol,2:iTOA) = log(p_lev(1:nCol,2:iTOA)) + do iCol = 1, nCol + tem2da(iCol,1) = log(p_lay(iCol,1)) + tem2db(iCol,1) = log(p_lev(iCol,1)) + tem2db(iCol,iTOA) = log(max(minP, p_lev(iCol,iTOA)) ) + enddo + + t_lev(1:NCOL,1) = tsfc(1:NCOL) + do iLay = 1, iTOA-1 + do iCol = 1, nCol + t_lev(iCol,iLay+1) = t_lay(iCol,iLay) + (t_lay(iCol,iLay+1) - t_lay(iCol,iLay))& + * (tem2db(iCol,iLay+1) - tem2da(iCol,iLay)) & + / (tem2da(iCol,iLay+1) - tem2da(iCol,iLay)) + enddo + enddo + t_lev(1:NCOL,iTOA+1) = t_lay(1:NCOL,iTOA) + endif + + end subroutine cmp_tlev + + ! ######################################################################################### + ! SUBROUTINE check_error_msg + ! ######################################################################################### + subroutine check_error_msg(routine_name, error_msg) + character(len=*), intent(in) :: & + error_msg, routine_name + + if(error_msg /= "") then + print*,"ERROR("//trim(routine_name)//"): " + print*,trim(error_msg) + return + end if + end subroutine check_error_msg + +end module radiation_tools diff --git a/physics/radlw_main.F90 b/physics/radlw_main.F90 index f1811ed51..89609c283 100644 --- a/physics/radlw_main.F90 +++ b/physics/radlw_main.F90 @@ -613,26 +613,26 @@ subroutine rrtmg_lw_run & logical, intent(in) :: lprnt - real (kind=kind_phys), dimension(npts,nlp1), intent(in) :: plvl, & + real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, & & tlvl - real (kind=kind_phys), dimension(npts,nlay), intent(in) :: plyr, & + real (kind=kind_phys), dimension(:,:), intent(in) :: plyr, & & tlyr, qlyr, olyr, dzlyr, delpin - real (kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_co2,& + real (kind=kind_phys),dimension(:,:),intent(in)::gasvmr_co2, & & gasvmr_n2o, gasvmr_ch4, gasvmr_o2, gasvmr_co, gasvmr_cfc11, & & gasvmr_cfc12, gasvmr_cfc22, gasvmr_ccl4 - real (kind=kind_phys), dimension(npts,nlay),intent(in):: cld_cf - real (kind=kind_phys), dimension(npts,nlay),intent(in),optional:: & + real (kind=kind_phys), dimension(:,:),intent(in):: cld_cf + real (kind=kind_phys), dimension(:,:),intent(in),optional:: & & cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice, & & cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow, & & cld_od - real (kind=kind_phys), dimension(npts), intent(in) :: sfemis, & + real (kind=kind_phys), dimension(:), intent(in) :: sfemis, & & sfgtmp, de_lgth real (kind=kind_phys), dimension(npts,nlay), intent(in) :: alpha - real (kind=kind_phys), dimension(npts,nlay,nbands),intent(in):: & + real (kind=kind_phys), dimension(:,:,:),intent(in):: & & aeraod, aerssa !mz* HWRF -- OUTPUT from mcica_subcol_lw @@ -661,22 +661,22 @@ subroutine rrtmg_lw_run & !mz ! --- outputs: - real (kind=kind_phys), dimension(npts,nlay), intent(inout) :: hlwc - real (kind=kind_phys), dimension(npts,nlay), intent(inout) :: & + real (kind=kind_phys), dimension(:,:), intent(inout) :: hlwc + real (kind=kind_phys), dimension(:,:), intent(inout) :: & & cldtau - type (topflw_type), dimension(npts), intent(inout) :: topflx - type (sfcflw_type), dimension(npts), intent(inout) :: sfcflx + type (topflw_type), dimension(:), intent(inout) :: topflx + type (sfcflw_type), dimension(:), intent(inout) :: sfcflx character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg !! --- optional outputs: - real (kind=kind_phys), dimension(npts,nlay,nbands),optional, & + real (kind=kind_phys), dimension(:,:,:),optional, & & intent(inout) :: hlwb - real (kind=kind_phys), dimension(npts,nlay), optional, & + real (kind=kind_phys), dimension(:,:), optional, & & intent(inout) :: hlw0 - type (proflw_type), dimension(npts,nlp1), optional, & + type (proflw_type), dimension(:,:), optional, & & intent(inout) :: flxprf logical, intent(in) :: lslwr @@ -1250,7 +1250,7 @@ subroutine rrtmg_lw_run & endif !mz* HWRF: calculate taucmc with mcica - if (iovr == 4) then + if (iovr == 4) then call cldprmc(nlay, inflglw, iceflglw, liqflglw, & & cldfmc, ciwpmc, & & clwpmc, cswpmc, reicmc, relqmc, resnmc, & @@ -8854,25 +8854,25 @@ subroutine cldprmc(nlayers, inflag, iceflag, liqflag, cldfmc, & abscosno(ig) = 0.0_rb elseif (iceflag .eq. 0) then - if (radice .lt. 10.0_rb) stop 'ICE RADIUS TOO SMALL' - abscoice(ig) = absice0(1) + absice0(2)/radice +! if (radice .lt. 10.0_rb) stop 'ICE RADIUS TOO SMALL' + abscoice(ig) = absice0(1) + absice0(2)/max(radice,10.0_rb) abscosno(ig) = 0.0_rb elseif (iceflag .eq. 1) then - if (radice .lt. 13.0_rb .or. radice .gt. 130._rb) stop& - & 'ICE RADIUS OUT OF BOUNDS' +! if (radice .lt. 13.0_rb .or. radice .gt. 130._rb) stop& +! & 'ICE RADIUS OUT OF BOUNDS' ncbands = 5 ib = icb(ngb(ig)) - abscoice(ig) = absice1(1,ib) + absice1(2,ib)/radice + abscoice(ig) = absice1(1,ib) + absice1(2,ib)/min(max(radice,13.0_rb),130._rb) abscosno(ig) = 0.0_rb ! For iceflag=2 option, ice particle effective radius is limited to 5.0 to 131.0 microns elseif (iceflag .eq. 2) then - if (radice .lt. 5.0_rb .or. radice .gt. 131.0_rb) stop& - & 'ICE RADIUS OUT OF BOUNDS' +! if (radice .lt. 5.0_rb .or. radice .gt. 131.0_rb) stop& +! & 'ICE RADIUS OUT OF BOUNDS' ncbands = 16 - factor = (radice - 2._rb)/3._rb + factor = (min(max(radice,5.0_rb),131._rb) - 2._rb)/3._rb index = int(factor) if (index .eq. 43) index = 42 fint = factor - float(index) @@ -8885,15 +8885,15 @@ subroutine cldprmc(nlayers, inflag, iceflag, liqflag, cldfmc, & ! For iceflag=3 option, ice particle generalized effective size is limited to 5.0 to 140.0 microns elseif (iceflag .ge. 3) then - if (radice .lt. 5.0_rb .or. radice .gt. 140.0_rb) then - write(errmsg,'(a,i5,i5,f8.2,f8.2)' ) & - & 'ERROR: ICE GENERALIZED EFFECTIVE SIZE OUT OF BOUNDS' & - & ,ig, lay, ciwpmc(ig,lay), radice - errflg = 1 - return - end if +! if (radice .lt. 5.0_rb .or. radice .gt. 140.0_rb) then +! write(errmsg,'(a,i5,i5,f8.2,f8.2)' ) & +! & 'ERROR: ICE GENERALIZED EFFECTIVE SIZE OUT OF BOUNDS' & +! & ,ig, lay, ciwpmc(ig,lay), radice +! errflg = 1 +! return +! end if ncbands = 16 - factor = (radice - 2._rb)/3._rb + factor = (min(max(radice,5.0_rb),140._rb) - 2._rb)/3._rb index = int(factor) if (index .eq. 46) index = 45 fint = factor - float(index) @@ -8908,15 +8908,15 @@ subroutine cldprmc(nlayers, inflag, iceflag, liqflag, cldfmc, & !..Incorporate additional effects due to snow. if (cswpmc(ig,lay).gt.0.0_rb .and. iceflag .eq. 5) then radsno = resnmc(lay) - if (radsno .lt. 5.0_rb .or. radsno .gt. 140.0_rb) then - write(errmsg,'(a,i5,i5,f8.2,f8.2)' ) & - & 'ERROR: SNOW GENERALIZED EFFECTIVE SIZE OUT OF BOUNDS' & - & ,ig, lay, cswpmc(ig,lay), radsno - errflg = 1 - return - end if +! if (radsno .lt. 5.0_rb .or. radsno .gt. 140.0_rb) then +! write(errmsg,'(a,i5,i5,f8.2,f8.2)' ) & +! & 'ERROR: SNOW GENERALIZED EFFECTIVE SIZE OUT OF BOUNDS' & +! & ,ig, lay, cswpmc(ig,lay), radsno +! errflg = 1 +! return +! end if ncbands = 16 - factor = (radsno - 2._rb)/3._rb + factor = (min(max(radsno,5.0_rb),140.0_rb) - 2._rb)/3._rb index = int(factor) if (index .eq. 46) index = 45 fint = factor - float(index) @@ -8937,14 +8937,14 @@ subroutine cldprmc(nlayers, inflag, iceflag, liqflag, cldfmc, & elseif (liqflag .eq. 1) then radliq = relqmc(lay) - if (radliq .lt. 2.5_rb .or. radliq .gt. 60._rb) then - write(errmsg,'(a,i5,i5,f8.2,f8.2)' ) & -& 'ERROR: LIQUID EFFECTIVE SIZE OUT OF BOUNDS' & -& ,ig, lay, clwpmc(ig,lay), radliq - errflg = 1 - return - end if - index = int(radliq - 1.5_rb) +! if (radliq .lt. 2.5_rb .or. radliq .gt. 60._rb) then +! write(errmsg,'(a,i5,i5,f8.2,f8.2)' ) & +!& 'ERROR: LIQUID EFFECTIVE SIZE OUT OF BOUNDS' & +!& ,ig, lay, clwpmc(ig,lay), radliq +! errflg = 1 +! return +! end if + index = int(min(max(radliq,2.5_rb),60._rb) - 1.5_rb) if (index .eq. 0) index = 1 if (index .eq. 58) index = 57 fint = radliq - 1.5_rb - float(index) diff --git a/physics/radlw_main.meta b/physics/radlw_main.meta index 9b2eae7b6..ca4b96466 100644 --- a/physics/radlw_main.meta +++ b/physics/radlw_main.meta @@ -62,88 +62,88 @@ intent = in optional = F [gasvmr_co2] - standard_name = volume_mixing_ratio_co2 + standard_name = volume_mixing_ratio_of_co2 long_name = volume mixing ratio co2 - units = kg kg-1 + units = m3 m-3 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in optional = F [gasvmr_n2o] - standard_name = volume_mixing_ratio_n2o + standard_name = volume_mixing_ratio_of_n2o long_name = volume mixing ratio no2 - units = kg kg-1 + units = m3 m-3 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in optional = F [gasvmr_ch4] - standard_name = volume_mixing_ratio_ch4 + standard_name = volume_mixing_ratio_of_ch4 long_name = volume mixing ratio ch4 - units = kg kg-1 + units = m3 m-3 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in optional = F [gasvmr_o2] - standard_name = volume_mixing_ratio_o2 + standard_name = volume_mixing_ratio_of_o2 long_name = volume mixing ratio o2 - units = kg kg-1 + units = m3 m-3 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in optional = F [gasvmr_co] - standard_name = volume_mixing_ratio_co + standard_name = volume_mixing_ratio_of_co long_name = volume mixing ratio co - units = kg kg-1 + units = m3 m-3 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in optional = F [gasvmr_cfc11] - standard_name = volume_mixing_ratio_cfc11 + standard_name = volume_mixing_ratio_of_cfc11 long_name = volume mixing ratio cfc11 - units = kg kg-1 + units = m3 m-3 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in optional = F [gasvmr_cfc12] - standard_name = volume_mixing_ratio_cfc12 + standard_name = volume_mixing_ratio_of_cfc12 long_name = volume mixing ratio cfc12 - units = kg kg-1 + units = m3 m-3 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in optional = F [gasvmr_cfc22] - standard_name = volume_mixing_ratio_cfc22 + standard_name = volume_mixing_ratio_of_cfc22 long_name = volume mixing ratio cfc22 - units = kg kg-1 + units = m3 m-3 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in optional = F [gasvmr_ccl4] - standard_name = volume_mixing_ratio_ccl4 + standard_name = volume_mixing_ratio_of_ccl4 long_name = volume mixing ratio ccl4 - units = kg kg-1 + units = m3 m-3 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in optional = F [icseed] - standard_name = seed_random_numbers_lw + standard_name = random_number_seed_for_mcica_longwave long_name = seed for random number generation for longwave radiation units = none dimensions = (horizontal_loop_extent) @@ -264,7 +264,7 @@ intent = in optional = F [lslwr] - standard_name = flag_to_calc_lw + standard_name = flag_for_calling_longwave_radiation long_name = flag to calculate LW irradiances units = flag dimensions = () @@ -289,7 +289,7 @@ intent = inout optional = F [sfcflx] - standard_name = lw_fluxes_sfc + standard_name = surface_lw_fluxes_assuming_total_and_clear_sky_on_radiation_timestep long_name = longwave total sky fluxes at the Earth surface units = W m-2 dimensions = (horizontal_loop_extent) diff --git a/physics/radsw_main.F90 b/physics/radsw_main.F90 index 8ebbb3ab1..0f5a8b110 100644 --- a/physics/radsw_main.F90 +++ b/physics/radsw_main.F90 @@ -701,60 +701,60 @@ subroutine rrtmg_sw_run & logical, intent(in) :: lprnt, lsswr - real (kind=kind_phys), dimension(npts,nlp1), intent(in) :: & + real (kind=kind_phys), dimension(:,:), intent(in) :: & & plvl, tlvl - real (kind=kind_phys), dimension(npts,nlay), intent(in) :: & + real (kind=kind_phys), dimension(:,:), intent(in) :: & & plyr, tlyr, qlyr, olyr, dzlyr, delpin - real (kind=kind_phys),dimension(npts),intent(in):: sfcalb_nir_dir - real (kind=kind_phys),dimension(npts),intent(in):: sfcalb_nir_dif - real (kind=kind_phys),dimension(npts),intent(in):: sfcalb_uvis_dir - real (kind=kind_phys),dimension(npts),intent(in):: sfcalb_uvis_dif - - real(kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_co2 - real(kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_n2o - real(kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_ch4 - real(kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_o2 - real(kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_co - real(kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_cfc11 - real(kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_cfc12 - real(kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_cfc22 - real(kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_ccl4 - - real (kind=kind_phys), dimension(npts,nlay),intent(in):: cld_cf - real (kind=kind_phys), dimension(npts,nlay),intent(in),optional:: & + real (kind=kind_phys),dimension(:),intent(in):: sfcalb_nir_dir + real (kind=kind_phys),dimension(:),intent(in):: sfcalb_nir_dif + real (kind=kind_phys),dimension(:),intent(in):: sfcalb_uvis_dir + real (kind=kind_phys),dimension(:),intent(in):: sfcalb_uvis_dif + + real(kind=kind_phys),dimension(:,:),intent(in)::gasvmr_co2 + real(kind=kind_phys),dimension(:,:),intent(in)::gasvmr_n2o + real(kind=kind_phys),dimension(:,:),intent(in)::gasvmr_ch4 + real(kind=kind_phys),dimension(:,:),intent(in)::gasvmr_o2 + real(kind=kind_phys),dimension(:,:),intent(in)::gasvmr_co + real(kind=kind_phys),dimension(:,:),intent(in)::gasvmr_cfc11 + real(kind=kind_phys),dimension(:,:),intent(in)::gasvmr_cfc12 + real(kind=kind_phys),dimension(:,:),intent(in)::gasvmr_cfc22 + real(kind=kind_phys),dimension(:,:),intent(in)::gasvmr_ccl4 + + real (kind=kind_phys), dimension(:,:),intent(in):: cld_cf + real (kind=kind_phys), dimension(:,:),intent(in),optional:: & & cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice, & & cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow, & & cld_od, cld_ssa, cld_asy - real(kind=kind_phys),dimension(npts,nlay,nbdsw),intent(in)::aeraod - real(kind=kind_phys),dimension(npts,nlay,nbdsw),intent(in)::aerssa - real(kind=kind_phys),dimension(npts,nlay,nbdsw),intent(in)::aerasy + real(kind=kind_phys),dimension(:,:,:),intent(in)::aeraod + real(kind=kind_phys),dimension(:,:,:),intent(in)::aerssa + real(kind=kind_phys),dimension(:,:,:),intent(in)::aerasy real (kind=kind_phys), intent(in) :: cosz(npts), solcon, & & de_lgth(npts) real (kind=kind_phys), dimension(npts,nlay), intent(in) :: alpha ! --- outputs: - real (kind=kind_phys), dimension(npts,nlay), intent(inout) :: hswc - real (kind=kind_phys), dimension(npts,nlay), intent(inout) :: & + real (kind=kind_phys), dimension(:,:), intent(inout) :: hswc + real (kind=kind_phys), dimension(:,:), intent(inout) :: & & cldtau - type (topfsw_type), dimension(npts), intent(inout) :: topflx - type (sfcfsw_type), dimension(npts), intent(inout) :: sfcflx + type (topfsw_type), dimension(:), intent(inout) :: topflx + type (sfcfsw_type), dimension(:), intent(inout) :: sfcflx character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg !! --- optional outputs: - real (kind=kind_phys), dimension(npts,nlay,nbdsw), optional, & + real (kind=kind_phys), dimension(:,:,:), optional, & & intent(inout) :: hswb - real (kind=kind_phys), dimension(npts,nlay), optional, & + real (kind=kind_phys), dimension(:,:), optional, & & intent(inout) :: hsw0 - type (profsw_type), dimension(npts,nlp1), optional, & + type (profsw_type), dimension(:,:), optional, & & intent(inout) :: flxprf - type (cmpfsw_type), dimension(npts), optional, & + type (cmpfsw_type), dimension(:), optional, & & intent(inout) :: fdncmp ! --- locals: @@ -2946,8 +2946,13 @@ subroutine spcvrtc & else ! for non-conservative scattering za1 = zgam1*zgam4 + zgam2*zgam3 za2 = zgam1*zgam3 + zgam2*zgam4 - zrk = sqrt ( (zgam1 - zgam2) * (zgam1 + zgam2) ) - zrk2= 2.0 * zrk + zrk = (zgam1 - zgam2) * (zgam1 + zgam2) + if (zrk > eps1) then + zrk = sqrt(zrk) + else + zrk = f_zero + endif + zrk2= zrk + zrk zrp = zrk * cosz zrp1 = f_one + zrp @@ -2993,7 +2998,8 @@ subroutine spcvrtc & ze1r45 = zr4*zexp1 + zr5*zexm1 ! ... collimated beam - if (ze1r45>=-eps1 .and. ze1r45<=eps1) then +! if (ze1r45>=-eps1 .and. ze1r45<=eps1) then + if (abs(ze1r45) <= eps1) then zrefb(kp) = eps1 ztrab(kp) = zexm2 else @@ -3005,7 +3011,11 @@ subroutine spcvrtc & endif ! ... diffuse beam - zden1 = zr4 / (ze1r45 * zrkg1) + if (ze1r45 >= f_zero) then + zden1 = zr4 / max(eps1, ze1r45*zrkg1) + else + zden1 = zr4 / min(-eps1, ze1r45*zrkg1) + endif zrefd(kp) = max(f_zero, min(f_one, & & zgam2*(zexp1 - zexm1)*zden1 )) ztrad(kp) = max(f_zero, min(f_one, zrk2*zden1 )) @@ -3171,8 +3181,13 @@ subroutine spcvrtc & else ! for non-conservative scattering za1 = zgam1*zgam4 + zgam2*zgam3 za2 = zgam1*zgam3 + zgam2*zgam4 - zrk = sqrt ( (zgam1 - zgam2) * (zgam1 + zgam2) ) - zrk2= 2.0 * zrk + zrk = (zgam1 - zgam2) * (zgam1 + zgam2) + if (zrk > eps1) then + zrk = sqrt(zrk) + else + zrk = f_zero + endif + zrk2= zrk + zrk zrp = zrk * cosz zrp1 = f_one + zrp @@ -3218,7 +3233,8 @@ subroutine spcvrtc & ze1r45 = zr4*zexp1 + zr5*zexm1 ! ... collimated beam - if ( ze1r45>=-eps1 .and. ze1r45<=eps1 ) then +! if ( ze1r45>=-eps1 .and. ze1r45<=eps1 ) then + if ( abs(ze1r45) <= eps1 ) then zrefb(kp) = eps1 ztrab(kp) = zexm2 else @@ -3230,7 +3246,11 @@ subroutine spcvrtc & endif ! ... diffuse beam - zden1 = zr4 / (ze1r45 * zrkg1) + if (ze1r45 >= f_zero) then + zden1 = zr4 / max(eps1, ze1r45*zrkg1) + else + zden1 = zr4 / min(-eps1, ze1r45*zrkg1) + endif zrefd(kp) = max(f_zero, min(f_one, & & zgam2*(zexp1 - zexm1)*zden1 )) ztrad(kp) = max(f_zero, min(f_one, zrk2*zden1 )) @@ -3723,8 +3743,13 @@ subroutine spcvrtm & else ! for non-conservative scattering za1 = zgam1*zgam4 + zgam2*zgam3 za2 = zgam1*zgam3 + zgam2*zgam4 - zrk = sqrt ( (zgam1 - zgam2) * (zgam1 + zgam2) ) - zrk2= 2.0 * zrk + zrk = (zgam1 - zgam2) * (zgam1 + zgam2) + if (zrk > eps1) then + zrk = sqrt(zrk) + else + zrk = f_zero + endif + zrk2= zrk + zrk zrp = zrk * cosz zrp1 = f_one + zrp @@ -3770,7 +3795,8 @@ subroutine spcvrtm & ze1r45 = zr4*zexp1 + zr5*zexm1 ! ... collimated beam - if (ze1r45>=-eps1 .and. ze1r45<=eps1) then +! if (ze1r45>=-eps1 .and. ze1r45<=eps1) then + if (abs(ze1r45) <= eps1) then zrefb(kp) = eps1 ztrab(kp) = zexm2 else @@ -3782,7 +3808,11 @@ subroutine spcvrtm & endif ! ... diffuse beam - zden1 = zr4 / (ze1r45 * zrkg1) + if (ze1r45 >= f_zero) then + zden1 = zr4 / max(eps1, ze1r45*zrkg1) + else + zden1 = zr4 / min(-eps1, ze1r45*zrkg1) + endif zrefd(kp) = max(f_zero, min(f_one, & & zgam2*(zexp1 - zexm1)*zden1 )) ztrad(kp) = max(f_zero, min(f_one, zrk2*zden1 )) @@ -3935,8 +3965,13 @@ subroutine spcvrtm & else ! for non-conservative scattering za1 = zgam1*zgam4 + zgam2*zgam3 za2 = zgam1*zgam3 + zgam2*zgam4 - zrk = sqrt ( (zgam1 - zgam2) * (zgam1 + zgam2) ) - zrk2= 2.0 * zrk + zrk = (zgam1 - zgam2) * (zgam1 + zgam2) + if (zrk > eps1) then + zrk = sqrt(zrk) + else + zrk = f_zero + endif + zrk2= zrk + zrk zrp = zrk * cosz zrp1 = f_one + zrp @@ -3982,7 +4017,8 @@ subroutine spcvrtm & ze1r45 = zr4*zexp1 + zr5*zexm1 ! ... collimated beam - if ( ze1r45>=-eps1 .and. ze1r45<=eps1 ) then +! if ( ze1r45>=-eps1 .and. ze1r45<=eps1 ) then + if ( abs(ze1r45) <= eps1 ) then zrefb(kp) = eps1 ztrab(kp) = zexm2 else @@ -3994,7 +4030,11 @@ subroutine spcvrtm & endif ! ... diffuse beam - zden1 = zr4 / (ze1r45 * zrkg1) + if (ze1r45 >= f_zero) then + zden1 = zr4 / max(eps1, ze1r45*zrkg1) + else + zden1 = zr4 / min(-eps1, ze1r45*zrkg1) + endif zrefd(kp) = max(f_zero, min(f_one, & & zgam2*(zexp1 - zexm1)*zden1 )) ztrad(kp) = max(f_zero, min(f_one, zrk2*zden1 )) diff --git a/physics/radsw_main.meta b/physics/radsw_main.meta index 6a25f5466..b8b6a150b 100644 --- a/physics/radsw_main.meta +++ b/physics/radsw_main.meta @@ -62,88 +62,88 @@ intent = in optional = F [gasvmr_co2] - standard_name = volume_mixing_ratio_co2 + standard_name = volume_mixing_ratio_of_co2 long_name = volume mixing ratio co2 - units = kg kg-1 + units = m3 m-3 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in optional = F [gasvmr_n2o] - standard_name = volume_mixing_ratio_n2o + standard_name = volume_mixing_ratio_of_n2o long_name = volume mixing ratio no2 - units = kg kg-1 + units = m3 m-3 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in optional = F [gasvmr_ch4] - standard_name = volume_mixing_ratio_ch4 + standard_name = volume_mixing_ratio_of_ch4 long_name = volume mixing ratio ch4 - units = kg kg-1 + units = m3 m-3 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in optional = F [gasvmr_o2] - standard_name = volume_mixing_ratio_o2 + standard_name = volume_mixing_ratio_of_o2 long_name = volume mixing ratio o2 - units = kg kg-1 + units = m3 m-3 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in optional = F [gasvmr_co] - standard_name = volume_mixing_ratio_co + standard_name = volume_mixing_ratio_of_co long_name = volume mixing ratio co - units = kg kg-1 + units = m3 m-3 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in optional = F [gasvmr_cfc11] - standard_name = volume_mixing_ratio_cfc11 + standard_name = volume_mixing_ratio_of_cfc11 long_name = volume mixing ratio cfc11 - units = kg kg-1 + units = m3 m-3 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in optional = F [gasvmr_cfc12] - standard_name = volume_mixing_ratio_cfc12 + standard_name = volume_mixing_ratio_of_cfc12 long_name = volume mixing ratio cfc12 - units = kg kg-1 + units = m3 m-3 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in optional = F [gasvmr_cfc22] - standard_name = volume_mixing_ratio_cfc22 + standard_name = volume_mixing_ratio_of_cfc22 long_name = volume mixing ratio cfc22 - units = kg kg-1 + units = m3 m-3 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in optional = F [gasvmr_ccl4] - standard_name = volume_mixing_ratio_ccl4 + standard_name = volume_mixing_ratio_of_ccl4 long_name = volume mixing ratio ccl4 - units = kg kg-1 + units = m3 m-3 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in optional = F [icseed] - standard_name = seed_random_numbers_sw + standard_name = random_number_seed_for_mcica_shortwave long_name = seed for random number generation for shortwave radiation units = none dimensions = (horizontal_loop_extent) @@ -250,7 +250,7 @@ intent = in optional = F [cosz] - standard_name = cosine_of_zenith_angle + standard_name = cosine_of_solar_zenith_angle_for_daytime_points_on_radiation_timestep long_name = cosine of the solar zenit angle units = none dimensions = (horizontal_loop_extent) @@ -325,7 +325,7 @@ intent = in optional = F [lsswr] - standard_name = flag_to_calc_sw + standard_name = flag_for_calling_shortwave_radiation long_name = flag to calculate SW irradiances units = flag dimensions = () @@ -350,7 +350,7 @@ intent = inout optional = F [sfcflx] - standard_name = sw_fluxes_sfc + standard_name = surface_sw_fluxes_assuming_total_and_clear_sky_on_radiation_timestep long_name = shortwave total sky fluxes at the Earth surface units = W m-2 dimensions = (horizontal_loop_extent) diff --git a/physics/rascnv.F90 b/physics/rascnv.F90 index 1c311e4cf..79a5dce40 100644 --- a/physics/rascnv.F90 +++ b/physics/rascnv.F90 @@ -2,6 +2,7 @@ !! This file contains the entire Relaxed Arakawa-Schubert convection !! parameteriztion +!>\defgroup rascnv_schm Relaxed Arakawa-Schubert Convection Scheme module rascnv USE machine , ONLY : kind_phys @@ -30,21 +31,25 @@ module rascnv &, FOUR_P2=4.0e2_kp, ONE_M10=1.0e-10_kp& &, ONE_M6=1.0e-6_kp, ONE_M5=1.0e-5_kp & &, ONE_M2=1.0e-2_kp, ONE_M1=1.0e-1_kp & - &, oneolog10=one/log(10.0_kp) & - &, facmb = 0.01_kp & ! conversion factor from Pa to hPa (or mb) - &, cmb2pa = 100.0_kp ! Conversion from hPa to Pa -! - real(kind=kind_phys), parameter :: frac=0.5_kp, crtmsf=0.0_kp & - &, rhfacs=0.75_kp, rhfacl=0.75_kp & - &, face=5.0_kp, delx=10000.0_kp& - &, ddfac=face*delx*0.001_kp & - &, max_neg_bouy=0.15_kp & -! &, max_neg_bouy=pt25_kp & - &, testmb=0.1_kp, testmbi=one/testmb & - &, dpd=0.5_kp, rknob=1.0_kp, eknob=1.0_kp + &, oneolog10=one/log(10.0_kp) & + &, rain_min=1.0e-13_kp & + &, facmb=0.01_kp & ! conversion factor from Pa to hPa (or mb) + &, cmb2pa=100.0_kp ! Conversion from hPa to Pa +! +! real (kind=kind_phys), parameter :: frac=0.5_kp, crtmsf=0.0_kp & + real (kind=kind_phys), parameter :: frac=0.1_kp, crtmsf=0.0_kp & + &, tfrac_max=0.15_kp & + &, rhfacs=0.75_kp, rhfacl=0.75_kp & + &, face=5.0_kp, delx=10000.0_kp & + &, ddfac=face*delx*0.001_kp & + &, max_neg_bouy=0.15_kp & +! &, max_neg_bouy=pt25_kp & + &, testmb=0.1_kp, testmbi=one/testmb & + &, dpd=0.5_kp, rknob=1.0_kp, eknob=1.0_kp !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - logical, parameter :: do_aw=.true., cumfrc=.true. & +! logical, parameter :: aw_scal=.false., cumfrc=.true. & + logical, parameter :: aw_scal=.true., cumfrc=.true. & &, updret=.false., vsmooth=.false. & &, wrkfun=.false., crtfun=.true. & &, calkbl=.true., botop=.true., revap=.true. & @@ -67,24 +72,24 @@ module rascnv ! ! For Tilting Angle Specification ! - real(kind=kind_phys) REFP(6), REFR(6), TLAC(8), PLAC(8), TLBPL(7) & - &, drdp(5) + real(kind=kind_phys) :: REFP(6), REFR(6), TLAC(8), PLAC(8), & + TLBPL(7), drdp(5) ! DATA PLAC/100.0, 200.0, 300.0, 400.0, 500.0, 600.0, 700.0, 800.0/ DATA TLAC/ 35.0, 25.0, 20.0, 17.5, 15.0, 12.5, 10.0, 7.5/ DATA REFP/500.0, 300.0, 250.0, 200.0, 150.0, 100.0/ DATA REFR/ 1.0, 2.0, 3.0, 4.0, 6.0, 8.0/ ! - real(kind=kind_phys) AC(16), AD(16) + real(kind=kind_phys) :: AC(16), AD(16) ! integer, parameter :: nqrp=500001 - real(kind=kind_phys) C1XQRP, C2XQRP, TBQRP(NQRP), TBQRA(NQRP) & - &, TBQRB(NQRP) + real(kind=kind_phys) :: C1XQRP, C2XQRP, TBQRP(NQRP), & + TBQRA(NQRP), TBQRB(NQRP) ! integer, parameter :: nvtp=10001 - real(kind=kind_phys) C1XVTP, C2XVTP, TBVTP(NVTP) + real(kind=kind_phys) :: C1XVTP, C2XVTP, TBVTP(NVTP) ! - real(kind=kind_phys) afc, facdt, & + real(kind=kind_phys) :: afc, facdt, & grav, cp, alhl, alhf, rgas, rkap, nu, pi, & t0c, rv, cvap, cliq, csol, ttp, eps, epsm1,& ! @@ -93,13 +98,13 @@ module rascnv deg2rad, PIINV, testmboalhl, & rvi, facw, faci, hsub, tmix, DEN - contains ! ----------------------------------------------------------------------- ! CCPP entry points for gfdl cloud microphysics ! ----------------------------------------------------------------------- +!>\ingroup rascnv_schm !>\brief The subroutine initializes rascnv !! !> \section arg_table_rascnv_init Argument Table @@ -118,12 +123,13 @@ subroutine rascnv_init(me, dt, con_g, con_cp, con_rd, & con_g, con_cp, con_rd, con_rv, con_hvap, & con_hfus, con_fvirt, con_t0c, con_cvap, con_cliq, & con_csol, con_ttp, con_eps, con_epsm1 + character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! real(kind=kind_phys), parameter :: actp=1.7_kp, facm=1.00_kp ! - real(kind=kind_phys) PH(15), A(15) + real(kind=kind_phys) :: PH(15), A(15) ! DATA PH/150.0, 200.0, 250.0, 300.0, 350.0, 400.0, 450.0, 500.0 & &, 550.0, 600.0, 650.0, 700.0, 750.0, 800.0, 850.0/ @@ -134,8 +140,6 @@ subroutine rascnv_init(me, dt, con_g, con_cp, con_rd, & ! real(kind=kind_phys) tem, actop, tem1, tem2 integer i, l - logical first - data first/.true./ ! ! Initialize CCPP error handling variables errmsg = '' @@ -169,6 +173,12 @@ subroutine rascnv_init(me, dt, con_g, con_cp, con_rd, & ! VTP = 36.34*SQRT(1.2)* (0.001)**0.1364 ! AFC = -(1.01097e-4_kp*DT)*(3600.0_kp/DT)**0.57777778_kp +! + if (fix_ncld_hr) then + facdt = delt_c / dt + else + facdt = one / 3600.0_kp + endif ! grav = con_g ; cp = con_cp ; alhl = con_hvap alhf = con_hfus ; rgas = con_rd @@ -186,9 +196,9 @@ subroutine rascnv_init(me, dt, con_g, con_cp, con_rd, & picon = half*pi*onebg ; zfac = 0.28888889e-4_kp * ONEBG testmboalhl = testmb/alhl ! - rvi = one/rv ; facw=CVAP-CLIQ - faci = CVAP-CSOL ; hsub=alhl+alhf - tmix = TTP-20.0_kp ; DEN=one/(TTP-TMIX) + rvi = one / rv ; facw = CVAP - CLIQ + faci = CVAP - CSOL ; hsub = alhl + alhf + tmix = TTP - 20.0_kp ; DEN = one / (TTP-TMIX) ! if (me == 0) write(0,*) ' NO DOWNDRAFT FOR CLOUD TYPES' & @@ -283,10 +293,11 @@ end subroutine rascnv_finalize !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!>\ingroup rascnv_schm !! \section arg_table_rascnv_run Argument Table !! \htmlinclude rascnv_run.html !! - subroutine rascnv_run(IM, k, ntr, dt, dtf & + subroutine rascnv_run(IM, k, itc, ntc, ntr, dt, dtf & &, ccwf, area, dxmin, dxinv & &, psauras, prauras, wminras, dlqf, flipv & &, me, rannum, nrcm, mp_phys, mp_phys_mg & @@ -316,39 +327,41 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & ! ! Implicit none -! - LOGICAL FLIPV ! ! input ! - integer, intent(in) :: im, k, ntr, me, nrcm, ntk, kdt & + logical, intent(in) :: flipv +! + integer, intent(in) :: im, k, itc, ntc, ntr, me, nrcm, ntk, kdt & &, mp_phys, mp_phys_mg - integer, dimension(im) :: kbot, ktop, kcnv, kpbl -! - real(kind=kind_phys), intent(in) :: dxmin, dxinv, ccwf(2) & - &, psauras(2), prauras(2) & - &, wminras(2), dlqf(2) -! - real(kind=kind_phys), dimension(im,k) :: tin, qin, uin, vin & - &, prsl, prslk, phil - real(kind=kind_phys), dimension(im,k+1) :: prsi, prsik, phii - real(kind=kind_phys), dimension(im,k) :: ud_mf, dd_mf, dt_mf & - &, rhc, qlcn, qicn, w_upi & - &, cnv_mfd & - &, cnv_dqldt, clcn & - &, cnv_fice, cnv_ndrop & - &, cnv_nice, cf_upi - real(kind=kind_phys), dimension(im) :: area, cdrag & - &, rainc, ddvel - real(kind=kind_phys), dimension(im,nrcm):: rannum - real(kind=kind_phys) ccin(im,k,ntr+2) - real(kind=kind_phys) trcmin(ntr+2) - - real(kind=kind_phys) DT, dtf, qw0, qi0 + integer, dimension(:), intent(out) :: kbot, ktop + integer, dimension(:), intent(inout) :: kcnv + integer, dimension(:), intent(in) :: kpbl +! + real(kind=kind_phys), intent(in) :: dxmin, dxinv, ccwf(:) & + &, psauras(:), prauras(:) & + &, wminras(:), dlqf(:) +! + real(kind=kind_phys), dimension(:,:), intent(in) :: prsi, prsik, phii + + real(kind=kind_phys), dimension(:,:), intent(inout) :: tin, qin, uin, vin + real(kind=kind_phys), dimension(:,:), intent(in) :: prsl, prslk, phil & + &, rhc + real(kind=kind_phys), dimension(:,:), intent(out) :: ud_mf, dd_mf, dt_mf + real(kind=kind_phys), dimension(:,:), intent(inout) :: qlcn, qicn, w_upi & + &, cnv_mfd & + &, cnv_dqldt, clcn & + &, cnv_fice, cnv_ndrop & + &, cnv_nice, cf_upi + real(kind=kind_phys), dimension(:) , intent(in) :: area, cdrag + real(kind=kind_phys), dimension(:) , intent(out) :: rainc, ddvel + real(kind=kind_phys), dimension(:,:), intent(in) :: rannum + real(kind=kind_phys), intent(inout) :: ccin(:,:,:) + real(kind=kind_phys), intent(in) :: dt, dtf ! ! Added for aerosol scavenging for GOCART ! - real(kind=kind_phys), intent(in) :: fscav(ntr) + real(kind=kind_phys), intent(in) :: fscav(:) ! &, ctei_r(im), ctei_rm character(len=*), intent(out) :: errmsg @@ -356,6 +369,7 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & ! ! locals ! + real(kind=kind_phys) :: trcmin(ntr+2) real(kind=kind_phys), dimension(k) :: toi, qoi, tcu, qcu & &, pcu, clw, cli, qii, qli& &, phi_l, prsm,psjm & @@ -377,21 +391,25 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & ! integer :: nrcmax ! Maximum # of random clouds per 1200s ! Integer KCR, KFX, NCMX, NC, KTEM, I, ii, Lm1, l & - &, ntrc, ia, ll, km1, kp1, ipt, lv, KBL, n & + &, ntrc, ll, km1, kp1, ipt, lv, KBL, n & &, KRMIN, KRMAX, KFMAX, kblmx, irnd,ib & &, kblmn, ksfc, ncrnd - real(kind=kind_phys) sgcs(k,im) + real(kind=kind_phys) sgcs(k) ! ! Scavenging related parameters ! real fscav_(ntr+2) ! Fraction scavenged per km ! - fscav_ = zero ! By default no scavenging - if (ntr > 0) then - do i=1,ntr - fscav_(i) = fscav(i) - enddo - endif + fscav_ = -999.0_kp ! By default no scavenging + if (itc > 0 .and. ntc > 0) then + if (ntr >= itc + ntc - 3) then + fscav_(itc:ntc) = fscav + else + errmsg = 'Error in rascnv_run: test ntr >= itc + ntc - 3 FAILED' + errflg = 1 + return + end if + end if trcmin = -99999.0_kp if (ntk-2 > 0) trcmin(ntk-2) = 1.0e-4_kp @@ -425,7 +443,7 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & endif ! !!!!! initialization for microphysics ACheng - if(mp_phys == 10) then + if(mp_phys == mp_phys_mg) then do l=1,K do i=1,im QLCN(i,l) = zero @@ -466,7 +484,6 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & c0i = (psauras(1)*tem1 + psauras(2)*tem2) * tem c0 = (prauras(1)*tem1 + prauras(2)*tem2) * tem if (ccwfac == zero) ccwfac = half - ! ! ctei = .false. ! if (ctei_r(ipt) > ctei_rm) ctei = .true. @@ -482,11 +499,12 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & KFMAX = KRMAX kblmx = 1 kblmn = 1 + sgcs(k) = one DO L=1,KM1 ll = l if (flipv) ll = kp1 -l ! Input variables are bottom to top! SGC = prsl(ipt,ll) * tem - sgcs(l,ipt) = sgc + sgcs(l) = sgc IF (SGC <= 0.050_kp) KRMIN = L ! IF (SGC <= 0.700_kp) KRMAX = L ! IF (SGC <= 0.800_kp) KRMAX = L @@ -510,10 +528,8 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & ! NCRND = min(nrcmax, (KRMAX-KRMIN+1)) * (DTF/360) + 0.50001 ! & + 0.50001 ! NCRND = min(nrcmax, (KRMAX-KRMIN+1)) * min(1.0,DTF/360) + 0.1 - facdt = delt_c / dt else NCRND = min(nrcmax, (KRMAX-KRMIN+1)) - facdt = one / 3600.0_kp endif NCRND = min(nrcm,max(NCRND, 1)) ! @@ -669,7 +685,8 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & if (advups) then ! For first order upstream for updraft alfint(:,:) = one elseif (advtvd) then ! TVD flux limiter scheme for updraft - alfint(:,:) = one +! alfint(:,:) = one + alfint(:,:) = half l = krmin lm1 = l - 1 dtvd(1,1) = cp*(toi(l)-toi(lm1)) + phi_l(l)-phi_l(lm1) & @@ -779,7 +796,6 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & ! IB = IC(NC) ! cloud top level index if (ib > kbl-1) cycle - ! !**************************************************************************** ! if (advtvd) then ! TVD flux limiter scheme for updraft @@ -858,12 +874,12 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & rainp = rain CALL CLOUD(K, KP1, IB, ntrc, kblmx, kblmn & - &, FRAC, MAX_NEG_BOUY, vsmooth, do_aw & + &, FRAC, MAX_NEG_BOUY, vsmooth, aw_scal & &, REVAP, WRKFUN, CALKBL, CRTFUN & &, DT, KDT, TLA, DPD & &, ALFINT, rhfacl, rhfacs, area(ipt) & &, ccwfac, CDRAG(ipt), trcfac & - &, alfind, rhc_l, phi_l, phi_h, PRS, PRSM,sgcs(1,ipt) & + &, alfind, rhc_l, phi_l, phi_h, PRS, PRSM,sgcs & &, TOI, QOI, UVI, QLI, QII, KBL, DDVEL(ipt) & &, TCU, QCU, RCU, PCU, FLX, FLXD, RAIN, WFNC, fscav_ & &, trcmin, ntk-2, c0, wminras(1), c0i, wminras(2) & @@ -880,15 +896,15 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & ll = kp1 - ib dt_mf(ipt,ll) = dt_mf(ipt,ll) + flx(ib) - if (mp_phys == 10) then ! Anning Cheng for microphysics 11/14/2015 + if (mp_phys == mp_phys_mg) then ! Anning Cheng for microphysics 11/14/2015 CNV_MFD(ipt,ll) = CNV_MFD(ipt,ll) + flx(ib)/dt -! CNV_DQLDT(ipt,ll) = CNV_DQLDT(ipt,ll) -! & + max(0.,(QLI(ib)+QII(ib)-qiid-qlid))/dt +!! CNV_DQLDT(ipt,ll) = CNV_DQLDT(ipt,ll) +!! & + max(0.,(QLI(ib)+QII(ib)-qiid-qlid))/dt CNV_DQLDT(ipt,ll) = CNV_DQLDT(ipt,ll) + flx(ib)* & & max(0.,(QLI(ib)+QII(ib)-qiid-qlid))/dt -! & max(0.,(QLI(ib)+QII(ib)))/dt/3. +!! & max(0.,(QLI(ib)+QII(ib)))/dt/3. if(flx(ib)<0) write(*,*)"AAA666", flx(ib),QLI(ib),QII(ib) & & ,ipt,ll endif @@ -901,16 +917,17 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & enddo dt_mf(ipt,ib) = dt_mf(ipt,ib) + flx(ib) - if (mp_phys == 10) then ! Anning Cheng for microphysics 11/14/2015 + if (mp_phys == mp_phys_mg) then ! Anning Cheng for microphysics 11/14/2015 CNV_MFD(ipt,ib) = CNV_MFD(ipt,ib) + flx(ib)/dt -! CNV_DQLDT(ipt,ib) = CNV_DQLDT(ipt,ib) -! & + max(0.,(QLI(ib)+QII(ib)-qiid-qlid))/dt +!! CNV_DQLDT(ipt,ib) = CNV_DQLDT(ipt,ib) +!! & + max(0.,(QLI(ib)+QII(ib)-qiid-qlid))/dt CNV_DQLDT(ipt,ib) = CNV_DQLDT(ipt,ib) + flx(ib)* & & max(zero,(QLI(ib)+QII(ib)-qiid-qlid))/dt -! & max(0.,(QLI(ib)+QII(ib)))/dt/3. +!! & max(0.,(QLI(ib)+QII(ib)))/dt/3. if(flx(ib)<0) write(*,*)"AAA666", flx(ib),QLI(ib),QII(ib) & & ,ipt,ib endif + endif ! ! @@ -931,6 +948,7 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & ENDDO ! End of the NC loop! ! RAINC(ipt) = rain * 0.001_kp ! Output rain is in meters + if (rainc(ipt) < rain_min) rainc(ipt) = zero ktop(ipt) = kp1 kbot(ipt) = 0 @@ -944,9 +962,9 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & ! clw(i) = max(clw(i), zero) ! cli(i) = max(cli(i), zero) - if (sgcs(l,ipt) < 0.93_kp .and. abs(tcu(l)) > one_m10) then -! if (sgcs(l,ipt) < 0.90_kp .and. tcu(l) .ne. zero) then -! if (sgcs(l,ipt) < 0.85_kp .and. tcu(l) .ne. zero) then + if (sgcs(l) < 0.93_kp .and. abs(tcu(l)) > one_m10) then +! if (sgcs(l) < 0.90_kp .and. tcu(l) .ne. zero) then +! if (sgcs(l) < 0.85_kp .and. tcu(l) .ne. zero) then kcnv(ipt) = 1 endif ! New test for convective clouds ! added in 08/21/96 @@ -967,7 +985,7 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & vin(ipt,ll) = uvi(l,ntr+2) ! V momentum !! for 2M microphysics, always output these variables - if (mp_phys == 10) then + if (mp_phys == mp_phys_mg) then if (advcld) then QLCN(ipt,ll) = max(qli(l)-ccin(ipt,ll,2), zero) QICN(ipt,ll) = max(qii(l)-ccin(ipt,ll,1), zero) @@ -1018,7 +1036,7 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & vin(ipt,l) = uvi(l,ntr+2) ! V momentum !! for 2M microphysics, always output these variables - if (mp_phys == 10) then + if (mp_phys == mp_phys_mg) then if (advcld) then QLCN(ipt,l) = max(qli(l)-ccin(ipt,l,2), zero) QICN(ipt,l) = max(qii(l)-ccin(ipt,l,1), zero) @@ -1069,9 +1087,11 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & ! RETURN end subroutine rascnv_run + +!>\ingroup rascnv_schm SUBROUTINE CLOUD( & & K, KP1, KD, NTRC, KBLMX, kblmn & - &, FRACBL, MAX_NEG_BOUY, vsmooth, do_aw & + &, FRACBL, MAX_NEG_BOUY, vsmooth, aw_scal & &, REVAP, WRKFUN, CALKBL, CRTFUN & &, DT, KDT, TLA, DPD & &, ALFINT, RHFACL, RHFACS, area, ccwf, cd, trcfac & @@ -1145,7 +1165,8 @@ SUBROUTINE CLOUD( & &, RHRAM=0.05_kp & ! PBL RELATIVE HUMIDITY RAMP ! &, RHRAM=0.15_kp !& ! PBL RELATIVE HUMIDITY RAMP &, HCRITD=4000.0_kp & ! Critical Moist Static Energy for Deep clouds - &, HCRITS=2000.0_kp & ! Critical Moist Static Energy for Shallow clouds +! &, HCRITS=2000.0_kp & ! Critical Moist Static Energy for Shallow clouds + &, HCRITS=2500.0_kp & ! Critical Moist Static Energy for Shallow clouds &, pcrit_lcl=250.0_kp & ! Critical pressure difference between boundary layer top ! layer top and lifting condensation level (hPa) ! &, hpert_fac=1.01_kp !& ! Perturbation on hbl when ctei=.true. @@ -1153,7 +1174,9 @@ SUBROUTINE CLOUD( & &, qudfac=quad_lam*half & &, shalfac=3.0_kp & ! &, qudfac=quad_lam*pt25, shalfac=3.0_kp !& ! Yogesh's - &, c0ifac=0.07_kp & ! following Han et al, 2016 MWR +! &, c0ifac=0.07_kp & ! following Han et al, 2016 MWR +! &, c0ifac=0.001_kp & ! following Han et al, 2017 Weather and Forecasting + &, c0ifac=0.0_kp & &, dpnegcr = 150.0_kp ! &, dpnegcr = 100.0_kp ! &, dpnegcr = 200.0_kp @@ -1172,7 +1195,7 @@ SUBROUTINE CLOUD( & ! LOGICAL REVAP, WRKFUN, CALKBL, CRTFUN, CALCUP, ctei LOGICAL REVAP, WRKFUN, CALKBL, CRTFUN, CALCUP - logical vsmooth, do_aw + logical vsmooth, aw_scal INTEGER K, KP1, KD, NTRC, kblmx, kblmn, ntk @@ -1405,7 +1428,8 @@ SUBROUTINE CLOUD( & hmax = hol(kmax) elseif (kmax < k) then do l=kmax+1,k - if (abs(hol(kmax)-hol(l)) > half * hcrit) then +! if (abs(hol(kmax)-hol(l)) > half * hcrit) then + if (abs(hol(kmax)-hol(l)) > hcrit) then kmxb = l - 1 exit endif @@ -1435,7 +1459,6 @@ SUBROUTINE CLOUD( & endif enddo endif - ! klcl = kd1 if (kmax > kd1) then @@ -1446,6 +1469,7 @@ SUBROUTINE CLOUD( & endif enddo endif + ! if (klcl == kd .or. klcl < ktem) return ! This is to handle mid-level convection from quasi-uniform h @@ -1464,7 +1488,6 @@ SUBROUTINE CLOUD( & tem = min(50.0_kp,max(10.0_kp,(prl(kmaxp1)-prl(kd))*0.10_kp)) if (prl(kmaxp1) - prl(ii) > tem .and. ii > kbl) kbl = ii - if (kbl .ne. ii) then if (PRL(kmaxp1)-PRL(KBL) > bldmax) kbl = max(kbl,ii) endif @@ -1503,13 +1526,11 @@ SUBROUTINE CLOUD( & ! KBL = min(kmax,MAX(KBL,KD+2)) KB1 = KBL - 1 -!! - +! if (PRL(Kmaxp1)-PRL(KBL) > bldmax .or. kb1 <= kd ) then ! & .or. PRL(Kmaxp1)-PRL(KBL) < bldmin) then return endif -! ! PRIS = ONE / (PRL(KP1)-PRL(KBL)) PRISM = ONE / (PRL(Kmaxp1)-PRL(KBL)) @@ -1606,7 +1627,7 @@ SUBROUTINE CLOUD( & ENDDO ENDDO ! -! if (ntk > 0 .and. do_aw) then +! if (ntk > 0 .and. aw_scal) then if (ntk > 0) then if (rbl(ntk) > zero) then wcbase = min(two, max(wcbase, sqrt(twoo3*rbl(ntk)))) @@ -1671,7 +1692,8 @@ SUBROUTINE CLOUD( & QLL(KD ) = ALHF * GAF(KD) * QIL(KD) + ONE ! st1 = qil(kd) - st2 = c0i * st1 * exp(c0ifac*min(tol(kd)-t0c,zero)) + st2 = c0i * st1 + if (c0ifac > 1.0e-6_kp) st2 = st2 * exp(c0ifac*min(tol(kd)-t0c,zero)) tem = c0 * (one-st1) tem2 = st2*qi0 + tem*qw0 ! @@ -1693,7 +1715,8 @@ SUBROUTINE CLOUD( & AKC(L) = one / AKT(L) ! st1 = half * (qil(l)+qil(lp1)) - st2 = c0i * st1 * exp(c0ifac*min(tol(lp1)-t0c,zero)) + st2 = c0i * st1 + if (c0ifac > 1.0e-6_kp) st2 = st2 * exp(c0ifac*min(tol(lp1)-t0c,zero)) tem = c0 * (one-st1) tem2 = st2*qi0 + tem*qw0 ! @@ -1734,7 +1757,6 @@ SUBROUTINE CLOUD( & ALM = ALHF*QIL(KD) - LTL(KD) * VTF(KD) ! HSU = HST(KD) + LTL(KD) * NU * (QOL(KD)-QST(KD)) - ! !===> VERTICAL INTEGRALS NEEDED TO COMPUTE THE ENTRAINMENT PARAMETER ! @@ -1772,7 +1794,7 @@ SUBROUTINE CLOUD( & ! clp = one st2 = hbl - hsu - +! if (tx2 == zero) then alm = - st2 / tx1 if (alm > almax) alm = -100.0_kp @@ -1790,7 +1812,6 @@ SUBROUTINE CLOUD( & endif endif - ! ! CLIP CASE: ! NON-ENTRAINIG CLOUD DETRAINS IN LOWER HALF OF TOP LAYER. @@ -1887,7 +1908,6 @@ SUBROUTINE CLOUD( & ETAI(L) = one / ETA(L) ENDDO ETAI(KBL) = one - ! !===> CLOUD WORKFUNCTION ! @@ -2046,7 +2066,6 @@ SUBROUTINE CLOUD( & TEM = max(0.05_kp, MIN(CD*200.0_kp, MAX_NEG_BOUY)) IF (.not. cnvflg .and. WFN > ACR .and. & & dpneg < dpnegcr .and. AKM <= TEM) CALCUP = .TRUE. - ! !===> IF NO SOUNDING MEETS THIRD CONDITION, RETURN ! @@ -2145,7 +2164,6 @@ SUBROUTINE CLOUD( & GMS(KD) = (DS + st1 - tem1*det*alhl-tem*alhf) * PRI(KD) GMH(KD) = PRI(KD) * (HCC-ETA(KD)*HOS + DH) - ! ! TENDENCY FOR SUSPENDED ENVIRONMENTAL ICE AND/OR LIQUID WATER ! @@ -2185,7 +2203,6 @@ SUBROUTINE CLOUD( & GMH(L) = DH * PRI(L) GMS(L) = DS * PRI(L) - ! GHD(L) = TEM5 * PRI(L) GSD(L) = (TEM5 - ALHL * TEM6) * PRI(L) @@ -2241,7 +2258,6 @@ SUBROUTINE CLOUD( & ! avh = avh + tx1*(prs(l+1)-prs(l)) ENDDO - ! !*********************************************************************** !*********************************************************************** @@ -2303,8 +2319,7 @@ SUBROUTINE CLOUD( & ! hbl = hbl * hpert_fac ! qbl = qbl * hpert_fac ! endif - - + !*********************************************************************** !===> CLOUD WORKFUNCTION FOR MODIFIED SOUNDING, THEN KERNEL (AKM) @@ -2386,7 +2401,6 @@ SUBROUTINE CLOUD( & AMBMAX = (PRL(KMAXP1)-PRL(KBL))*(FRACBL*GRAVCON) AMB = MAX(MIN(AMB, AMBMAX),ZERO) - !*********************************************************************** !*************************RESULTS*************************************** !*********************************************************************** @@ -2400,7 +2414,7 @@ SUBROUTINE CLOUD( & ! tx1 = one - amb * eta(kd) / (rho(kd)*wvl(kd)) ! sigf(kd) = max(zero, min(one, tx1 * tx1)) ! endif - if (do_aw) then + if (aw_scal) then tx1 = (0.2_kp / max(alm, 1.0e-5_kp)) tx2 = one - min(one, pi * tx1 * tx1 / area) @@ -2426,6 +2440,10 @@ SUBROUTINE CLOUD( & else sigf(kd:k) = one endif + + tx1 = max(1.0e-6_kp, abs(gms(kd) * onebcp * sigf(kd))) + amb = min(tx1*amb, tfrac_max*toi(kd)) / tx1 + ! avt = zero avq = zero @@ -2530,7 +2548,7 @@ SUBROUTINE CLOUD( & clfrac = max(ZERO, min(half, rknob*clf(tem)*tem1)) cldfrd = clfrac - +! DO L=KD,KBL ! Testing on 20070926 ! for L=KD,K IF (L >= IDH .AND. DDFT) THEN @@ -2576,7 +2594,6 @@ SUBROUTINE CLOUD( & & TEM4 = POTEVAP * (one - EXP( tx4*TX1**0.57777778_kp )) ACTEVAP = MIN(TX1, TEM4*CLFRAC) - if (tx1 < rainmin*dt) actevap = min(tx1, potevap) ! tem4 = zero @@ -2606,7 +2623,6 @@ SUBROUTINE CLOUD( & ENDDO CUP = CUP + TX1 + DOF * AMB * sigf(kbl) ENDIF - ! ! Convective transport (mixing) of passive tracers ! @@ -2699,6 +2715,7 @@ SUBROUTINE CLOUD( & RETURN end subroutine cloud +!>\ingroup rascnv_schm SUBROUTINE DDRFT( & & K, KP1, KD & &, TLA, ALFIND, wcbase & @@ -3300,6 +3317,7 @@ SUBROUTINE DDRFT( & ! endif ELSE ERRQ = TX2 ! Further iteration ! + ! if (itr == itrmu .and. ERRQ > ERRMIN*10 & ! & .and. ntla == 1) ERRQ = 10.0 ENDIF @@ -3461,9 +3479,7 @@ SUBROUTINE DDRFT( & ! VT(1) = GMS(L-1) * QRP(L-1) ** 0.1364 VT(1) = GMS(L-1) * QRPF(QRP(L-1)) RNT = ROR(L-1) * (WVL(L-1)+VT(1))*QRP(L-1) - ! - ! TEM = MAX(ALM, 2.5E-4) * MAX(ETA(L), 1.0) TEM = MAX(ALM,ONE_M6) * MAX(ETA(L), ONE) ! TEM = MAX(ALM, 1.0E-5) * MAX(ETA(L), 1.0) @@ -3620,6 +3636,7 @@ SUBROUTINE DDRFT( & ENDIF ERRH = HOD(L) - TEM1 ERRQ = ABS(ERRH/HOD(L)) + ABS(ERRE/MAX(ETD(L),ONE_M5)) + DOF = DDZ VT(2) = QQQ ! @@ -3678,6 +3695,7 @@ SUBROUTINE DDRFT( & ! Compute Buoyancy TEM1 = WA(3) + (HOD(L)-WA(1)-ALHL*(QOD(L)-WA(2))) & & * onebcp + TEM1 = TEM1 * (one + NU*QOD(L)) ROR(L) = CMPOR * PRL(L) / TEM1 TEM1 = TEM1 * DOFW @@ -3689,6 +3707,7 @@ SUBROUTINE DDRFT( & TEM1 = WVL(L) WVL(L) = VT(2) * (ETD(L-1)*WVL(L-1) - FACG & & * (BUY(L-1)*QRT(L-1)+BUY(L)*QRB(L-1))) + ! if (wvl(l) < zero) then ! WVL(L) = max(wvl(l), 0.1*tem1) @@ -3707,9 +3726,12 @@ SUBROUTINE DDRFT( & ! ERRQ = ERRQ + ABS(ERRW/MAX(WVL(L),ONE_M5)) + ! IF (ITR >= MIN(ITRMIN,ITRMD/2)) THEN IF (ITR >= MIN(ITRMND,ITRMD/2)) THEN + IF (ETD(L-1) == zero .AND. ERRQ > 0.2_kp) THEN + ROR(L) = BUD(KD) ETD(L) = zero WVL(L) = zero @@ -3878,7 +3900,6 @@ SUBROUTINE DDRFT( & if (tx5 > zero) idnm = idnm + 1 endif ENDIF - ! ! If downdraft properties are not obtainable, (i.e.solution does ! not converge) , no downdraft is assumed @@ -3971,6 +3992,7 @@ SUBROUTINE DDRFT( & RETURN end subroutine ddrft +!>\ingroup rascnv_schm SUBROUTINE QSATCN(TT,P,Q,DQDT) ! USE FUNCPHYS , ONLY : fpvs @@ -4002,6 +4024,7 @@ SUBROUTINE QSATCN(TT,P,Q,DQDT) return end subroutine qsatcn +!>\ingroup rascnv_schm SUBROUTINE ANGRAD(PRES, ALM, AL2, TLA) implicit none @@ -4052,6 +4075,7 @@ SUBROUTINE ANGRAD(PRES, ALM, AL2, TLA) RETURN end subroutine angrad +!>\ingroup rascnv_schm SUBROUTINE SETQRP implicit none @@ -4076,6 +4100,7 @@ SUBROUTINE SETQRP RETURN end subroutine setqrp +!>\ingroup rascnv_schm SUBROUTINE QRABF(QRP,QRAF,QRBF) implicit none ! @@ -4092,10 +4117,11 @@ SUBROUTINE QRABF(QRP,QRAF,QRBF) RETURN end subroutine qrabf +!>\ingroup rascnv_schm SUBROUTINE SETVTP implicit none - real(kind=kind_phys), parameter :: vtpexp=-0.3636_kp, one=1.0_kp + real(kind=kind_phys), parameter :: vtpexp=-0.3636_kp real(kind=kind_phys) xinc,x,xmax,xmin integer jx ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -4112,6 +4138,7 @@ SUBROUTINE SETVTP RETURN end subroutine setvtp ! +!>\ingroup rascnv_schm real(kind=kind_phys) FUNCTION QRPF(QRP) ! implicit none @@ -4128,6 +4155,7 @@ real(kind=kind_phys) FUNCTION QRPF(QRP) RETURN end function qrpf +!>\ingroup rascnv_schm real(kind=kind_phys) FUNCTION VTPF(ROR) ! implicit none @@ -4142,6 +4170,7 @@ real(kind=kind_phys) FUNCTION VTPF(ROR) RETURN end function vtpf +!>\ingroup rascnv_schm real(kind=kind_phys) FUNCTION CLF(PRATE) ! implicit none diff --git a/physics/rascnv.meta b/physics/rascnv.meta index f0ab36f19..3f61ac1c0 100644 --- a/physics/rascnv.meta +++ b/physics/rascnv.meta @@ -1,7 +1,7 @@ [ccpp-table-properties] name = rascnv type = scheme - dependencies = + dependencies = funcphys.f90,machine.F ######################################################################## [ccpp-arg-table] @@ -16,7 +16,7 @@ intent = in optional = F [dt] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics time step units = s dimensions = () @@ -43,7 +43,7 @@ intent = in optional = F [con_rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -203,13 +203,29 @@ intent = in optional = F [k] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () type = integer intent = in optional = F +[itc] + standard_name = number_of_aerosol_tracers_for_convection + long_name = number of aerosol tracers transported/scavenged by convection + units = count + dimensions = () + type = integer + intent = in + optional = F +[ntc] + standard_name = number_of_chemical_tracers + long_name = number of chemical tracers + units = count + dimensions = () + type = integer + intent = in + optional = F [ntr] standard_name = number_of_tracers_for_samf long_name = number of tracers for scale-aware mass flux schemes @@ -219,7 +235,7 @@ intent = in optional = F [dt] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics time step units = s dimensions = () @@ -228,7 +244,7 @@ intent = in optional = F [dtf] - standard_name = time_step_for_dynamics + standard_name = timestep_for_dynamics long_name = dynamics timestep units = s dimensions = () @@ -237,7 +253,7 @@ intent = in optional = F [ccwf] - standard_name = multiplication_factor_for_critical_cloud_workfunction + standard_name = tunable_parameter_for_critical_cloud_workfunction_in_relaxed_arakawa_schubert_deep_convection long_name = multiplication factor for tical_cloud_workfunction units = none dimensions = (2) @@ -255,7 +271,7 @@ intent = in optional = F [dxmin] - standard_name = minimum_scaling_factor_for_critical_relative_humidity + standard_name = min_grid_scale long_name = minimum scaling factor for critical relative humidity units = m2 rad-2 dimensions = () @@ -264,7 +280,7 @@ intent = in optional = F [dxinv] - standard_name = inverse_scaling_factor_for_critical_relative_humidity + standard_name = reciprocal_of_grid_scale_range long_name = inverse scaling factor for critical relative humidity units = rad2 m-2 dimensions = () @@ -273,7 +289,7 @@ intent = in optional = F [psauras] - standard_name = coefficient_from_cloud_ice_to_snow_ras + standard_name = autoconversion_to_snow_coefficient_for_deep_convection long_name = conversion coefficient from cloud ice to snow in ras units = none dimensions = (2) @@ -282,7 +298,7 @@ intent = in optional = F [prauras] - standard_name = coefficient_from_cloud_water_to_rain_ras + standard_name = autoconversion_to_rain_coefficient_for_deep_convection long_name = conversion coefficient from cloud water to rain in ras units = none dimensions = (2) @@ -291,7 +307,7 @@ intent = in optional = F [wminras] - standard_name = cloud_condensed_water_ice_conversion_threshold_ras + standard_name = cloud_condensate_autoconversion_threshold_coefficient_for_deep_convection long_name = conversion coefficient from cloud liquid and ice to precipitation in ras units = none dimensions = (2) @@ -300,7 +316,7 @@ intent = in optional = F [dlqf] - standard_name = condensate_fraction_detrained_in_updraft_layers + standard_name = cloud_condensate_detrainment_coefficient long_name = condensate fraction detrained with in a updraft layers units = none dimensions = (2) @@ -325,16 +341,16 @@ intent = in optional = F [rannum] - standard_name = random_number_array + standard_name = random_number long_name = random number array (0-1) units = none - dimensions = (horizontal_loop_extent,array_dimension_of_random_number) + dimensions = (horizontal_loop_extent,number_of_random_numbers) type = real kind = kind_phys intent = in optional = F [nrcm] - standard_name = array_dimension_of_random_number + standard_name = number_of_random_numbers long_name = second dimension of random number stream for RAS units = count dimensions = () @@ -342,7 +358,7 @@ intent = in optional = F [mp_phys] - standard_name = flag_for_microphysics_scheme + standard_name = control_for_microphysics_scheme long_name = choice of microphysics scheme units = flag dimensions = () @@ -350,7 +366,7 @@ intent = in optional = F [mp_phys_mg] - standard_name = flag_for_morrison_gettelman_microphysics_scheme + standard_name = identifier_for_morrison_gettelman_microphysics_scheme long_name = choice of Morrison-Gettelman microphysics scheme units = flag dimensions = () @@ -366,7 +382,7 @@ intent = in optional = F [kdt] - standard_name = index_of_time_step + standard_name = index_of_timestep long_name = current forecast iteration units = index dimensions = () @@ -377,43 +393,43 @@ standard_name = critical_relative_humidity long_name = critical relative humidity units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [tin] - standard_name = air_temperature_updated_by_physics + standard_name = air_temperature_of_new_state long_name = updated temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [qin] - standard_name = water_vapor_specific_humidity_updated_by_physics + standard_name = specific_humidity_of_new_state long_name = updated vapor specific humidity units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [uin] - standard_name = x_wind_updated_by_physics + standard_name = x_wind_of_new_state long_name = updated x-direction wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [vin] - standard_name = y_wind_updated_by_physics + standard_name = y_wind_of_new_state long_name = updated y-direction wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -422,13 +438,13 @@ standard_name = convective_transportable_tracers long_name = array to contain cloud water and other convective trans. tracers units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,tracer_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers_for_convective_transport) type = real kind = kind_phys intent = inout optional = F [fscav] - standard_name = coefficients_for_aerosol_scavenging + standard_name = chemical_tracer_scavenging_fractions long_name = array of aerosol scavenging coefficients units = none dimensions = (number_of_chemical_tracers) @@ -440,7 +456,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -449,25 +465,25 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [prsik] - standard_name = dimensionless_exner_function_at_model_interfaces + standard_name = dimensionless_exner_function_at_interface long_name = dimensionless Exner function at model layer interfaces units = none - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [prslk] - standard_name = dimensionless_exner_function_at_model_layers + standard_name = dimensionless_exner_function long_name = dimensionless Exner function at model layer centers units = none - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -476,7 +492,7 @@ standard_name = geopotential long_name = geopotential at model layer centers units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -485,7 +501,7 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -541,7 +557,7 @@ intent = inout optional = F [ddvel] - standard_name = surface_wind_enhancement_due_to_convection + standard_name = enhancement_to_wind_speed_at_surface_adjacent_layer_due_to_convection long_name = surface wind enhancement due to convection units = m s-1 dimensions = (horizontal_loop_extent) @@ -553,7 +569,7 @@ standard_name = instantaneous_atmosphere_updraft_convective_mass_flux long_name = (updraft mass flux) * dt units = kg m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -562,7 +578,7 @@ standard_name = instantaneous_atmosphere_downdraft_convective_mass_flux long_name = (downdraft mass flux) * dt units = kg m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -571,7 +587,7 @@ standard_name = instantaneous_atmosphere_detrainment_convective_mass_flux long_name = (detrainment mass flux) * dt units = kg m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -580,7 +596,7 @@ standard_name = mass_fraction_of_convective_cloud_liquid_water long_name = mass fraction of convective cloud liquid water units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -589,7 +605,7 @@ standard_name = mass_fraction_of_convective_cloud_ice long_name = mass fraction of convective cloud ice water units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -598,7 +614,7 @@ standard_name = vertical_velocity_for_updraft long_name = vertical velocity for updraft units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -607,7 +623,7 @@ standard_name = convective_cloud_fraction_for_microphysics long_name = convective cloud fraction for microphysics units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -616,7 +632,7 @@ standard_name = detrained_mass_flux long_name = detrained mass flux units = kg m-2 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -625,7 +641,7 @@ standard_name = tendency_of_cloud_water_due_to_convective_microphysics long_name = tendency of cloud water due to convective microphysics units = kg m-2 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -634,7 +650,7 @@ standard_name = convective_cloud_volume_fraction long_name = convective cloud volume fraction units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -643,7 +659,7 @@ standard_name = ice_fraction_in_convective_tower long_name = ice fraction in convective tower units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -652,7 +668,7 @@ standard_name = number_concentration_of_cloud_liquid_water_particles_for_detrainment long_name = droplet number concentration in convective detrainment units = m-3 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -661,7 +677,7 @@ standard_name = number_concentration_of_ice_crystals_for_detrainment long_name = crystal number concentration in convective detrainment units = m-3 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/rayleigh_damp.f b/physics/rayleigh_damp.f index 8d05f8b0b..70ed997a2 100644 --- a/physics/rayleigh_damp.f +++ b/physics/rayleigh_damp.f @@ -22,10 +22,10 @@ end subroutine rayleigh_damp_init !>\section gen_ray_damp_run GFS rayleigh_damp_runGeneral Algorithm !> @{ subroutine rayleigh_damp_run ( & - & lsidea,IM,KM,A,B,C,U1,V1,DT,CP, & - & LEVR,pgr,PRSL,PRSLRD0,ral_ts, & - & ldiag3d,du3dt,dv3dt,dt3dt, & - & errmsg,errflg) + & lsidea,IM,KM,A,B,C,U1,V1,DT,CP,LEVR,pgr,PRSL,PRSLRD0,ral_ts, & + & ldiag3d,dtend,dtidx,index_of_process_rayleigh_damping, & + & index_of_temperature,index_of_x_wind,index_of_y_wind, & + & errmsg,errflg) ! ! ******************************************************************** ! -----> I M P L E M E N T A T I O N V E R S I O N <---------- @@ -69,12 +69,13 @@ subroutine rayleigh_damp_run ( & logical,intent(in) :: lsidea,ldiag3d integer,intent(in) :: im, km,levr real(kind=kind_phys),intent(in) :: DT, CP, PRSLRD0, ral_ts - real(kind=kind_phys),intent(in) :: pgr(im), PRSL(IM,KM) - real(kind=kind_phys),intent(in) :: U1(IM,KM), V1(IM,KM) - real(kind=kind_phys),intent(inout) :: A(IM,KM), B(IM,KM), C(IM,KM) - real(kind=kind_phys),intent(inout) :: du3dt(:,:) - real(kind=kind_phys),intent(inout) :: dv3dt(:,:) - real(kind=kind_phys),intent(inout) :: dt3dt(:,:) + real(kind=kind_phys),intent(in) :: pgr(:), PRSL(:,:) + real(kind=kind_phys),intent(in) :: U1(:,:), V1(:,:) + real(kind=kind_phys),intent(inout) :: A(:,:), B(:,:), C(:,:) + real(kind=kind_phys),optional, intent(inout) :: dtend(:,:,:) + integer, intent(in) :: dtidx(:,:), & + & index_of_process_rayleigh_damping, index_of_temperature, & + & index_of_x_wind, index_of_y_wind character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -83,7 +84,18 @@ subroutine rayleigh_damp_run ( & real(kind=kind_phys) DTAUX, DTAUY, wrk1, rtrd1, rfactrd, wrk2 &, ENG0, ENG1, tem1, tem2, dti, hfbcpdt, rtrd real(kind=kind_phys) tx1(im), deltaA, deltaB, deltaC - integer i, k + integer i, k, uidx,vidx,tidx + + if(ldiag3d) then + uidx=dtidx(index_of_x_wind,index_of_process_rayleigh_damping) + vidx=dtidx(index_of_y_wind,index_of_process_rayleigh_damping) + tidx=dtidx(index_of_temperature, & + & index_of_process_rayleigh_damping) + else + uidx=0 + vidx=0 + tidx=0 + endif ! ! Initialize CCPP error handling variables errmsg = '' @@ -121,10 +133,14 @@ subroutine rayleigh_damp_run ( & A(I,K) = A(I,K) + deltaA B(I,K) = B(I,K) + deltaB C(I,K) = C(I,K) + deltaC - IF(ldiag3d) THEN - dv3dt(I,K) = dv3dt(I,K) + deltaA - du3dt(I,K) = du3dt(I,K) + deltaB - dt3dt(I,K) = dt3dt(I,K) + deltaC + IF(vidx>=1) THEN + dtend(i,k,vidx) = dtend(i,k,vidx) + deltaA + ENDIF + IF(uidx>=1) THEN + dtend(i,k,uidx) = dtend(i,k,uidx) + deltaB + ENDIF + IF(tidx>=1) THEN + dtend(i,k,tidx) = dtend(i,k,tidx) + deltaC ENDIF ENDDO ENDDO diff --git a/physics/rayleigh_damp.meta b/physics/rayleigh_damp.meta index e53cfa75d..badb23e76 100644 --- a/physics/rayleigh_damp.meta +++ b/physics/rayleigh_damp.meta @@ -8,7 +8,7 @@ name = rayleigh_damp_run type = scheme [lsidea] - standard_name = flag_idealized_physics + standard_name = flag_for_integrated_dynamics_through_earths_atmosphere long_name = flag for idealized physics units = flag dimensions = () @@ -24,7 +24,7 @@ intent = in optional = F [km] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical layers units = count dimensions = () @@ -32,28 +32,28 @@ intent = in optional = F [A] - standard_name = tendency_of_y_wind_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_y_wind long_name = meridional wind tendency due to model physics units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [B] - standard_name = tendency_of_x_wind_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_x_wind long_name = zonal wind tendency due to model physics units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [C] - standard_name = tendency_of_air_temperature_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_air_temperature long_name = air temperature tendency due to model physics units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -62,7 +62,7 @@ standard_name = x_wind long_name = zonal wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -71,13 +71,13 @@ standard_name = y_wind long_name = meridional wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [dt] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics time step units = s dimensions = () @@ -95,7 +95,7 @@ intent = in optional = F [levr] - standard_name = number_of_vertical_layers_for_radiation_calculations + standard_name = vertical_dimension_for_radiation long_name = number of vertical layers for radiation calculations units = count dimensions = () @@ -115,13 +115,13 @@ standard_name = air_pressure long_name = mid-layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [prslrd0] - standard_name = pressure_cutoff_for_rayleigh_damping + standard_name = air_pressure_at_bottom_extent_of_rayleigh_damping long_name = pressure level above which to apply Rayleigh damping units = Pa dimensions = () @@ -130,7 +130,7 @@ intent = in optional = F [ral_ts] - standard_name = time_scale_for_rayleigh_damping + standard_name = timescale_for_rayleigh_damping long_name = time scale for Rayleigh damping units = d dimensions = () @@ -139,39 +139,62 @@ intent = in optional = F [ldiag3d] - standard_name = flag_diagnostics_3D + standard_name = flag_for_diagnostics_3D long_name = flag for calculating 3-D diagnostic fields units = flag dimensions = () type = logical intent = in optional = F -[du3dt] - standard_name = cumulative_change_in_x_wind_due_to_rayleigh_damping - long_name = cumulative change in zonal wind due to Rayleigh damping - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) +[dtend] + standard_name = cumulative_change_of_state_variables + long_name = diagnostic tendencies for state variables + units = various + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_cumulative_change_processes) type = real kind = kind_phys + active = (flag_for_diagnostics_3D) intent = inout optional = F -[dv3dt] - standard_name = cumulative_change_in_y_wind_due_to_rayleigh_damping - long_name = cumulative change in meridional wind due to Rayleigh damping - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[dtidx] + standard_name = cumulative_change_of_state_variables_outer_index + long_name = index of state-variable and process in last dimension of diagnostic tendencies array AKA cumulative_change_index + units = index + dimensions = (number_of_tracers_plus_one_hundred,number_of_cumulative_change_processes) + type = integer + intent = in optional = F -[dt3dt] - standard_name = cumulative_change_in_temperature_due_to_rayleigh_damping - long_name = cumulative change in temperature due to Rayleigh damping - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[index_of_process_rayleigh_damping] + standard_name = index_of_rayleigh_damping_process_in_cumulative_change_index + long_name = index of rayleigh damping process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_temperature] + standard_name = index_of_temperature_in_cumulative_change_index + long_name = index of temperature in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_x_wind] + standard_name = index_of_x_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_y_wind] + standard_name = index_of_y_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in optional = F [errmsg] standard_name = ccpp_error_message diff --git a/physics/rrtmg_lw_cloud_optics.F90 b/physics/rrtmg_lw_cloud_optics.F90 index 02f32096a..1dd225514 100644 --- a/physics/rrtmg_lw_cloud_optics.F90 +++ b/physics/rrtmg_lw_cloud_optics.F90 @@ -4,22 +4,22 @@ module mo_rrtmg_lw_cloud_optics implicit none - ! Parameter used for RRTMG cloud-optics + !< Parameter used for RRTMG cloud-optics integer,parameter :: & nBandsLW_RRTMG = 16 - ! ipat is bands index for ebert & curry ice cloud (for iflagice=1) + !< ipat is bands index for ebert & curry ice cloud (for iflagice=1) integer,dimension(nBandsLW_RRTMG),parameter :: & ipat = (/ 1, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 /) real(kind_phys), parameter :: & - absrain = 0.33e-3, & ! Rain drop absorption coefficient \f$(m^{2}/g)\f$ . - abssnow0 = 1.5, & ! Snow flake absorption coefficient (micron), fu coeff - abssnow1 = 2.34e-3 ! Snow flake absorption coefficient \f$(m^{2}/g)\f$, ncar coef + absrain = 0.33e-3, & !< Rain drop absorption coefficient \f$(m^{2}/g)\f$ . + abssnow0 = 1.5, & !< Snow flake absorption coefficient (micron), fu coeff + abssnow1 = 2.34e-3 !< Snow flake absorption coefficient \f$(m^{2}/g)\f$, ncar coef - ! Reset diffusivity angle for Bands 2-3 and 5-9 to vary (between 1.50 - ! and 1.80) as a function of total column water vapor. the function - ! has been defined to minimize flux and cooling rate errors in these bands - ! over a wide range of precipitable water values. - ! *NOTE* This is done in GFS_rrtmgp_lw_pre.F90:_run() + !< Reset diffusivity angle for Bands 2-3 and 5-9 to vary (between 1.50 + !! and 1.80) as a function of total column water vapor. the function + !! has been defined to minimize flux and cooling rate errors in these bands + !! over a wide range of precipitable water values. + !! *NOTE* This is done in GFS_rrtmgp_lw_pre.F90:_run() real (kind_phys), dimension(nbandsLW_RRTMG) :: & a0 = (/ 1.66, 1.55, 1.58, 1.66, 1.54, 1.454, 1.89, 1.33, & 1.668, 1.66, 1.66, 1.66, 1.66, 1.66, 1.66, 1.66 /), & @@ -28,11 +28,11 @@ module mo_rrtmg_lw_cloud_optics a2 = (/ 0.00, -12.0, -11.7, 0.00, -0.72, -0.243, 0.19, -0.062, & 0.414, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 /) real(kind_phys),parameter :: & - diffusivityLow = 1.50, & ! Minimum diffusivity angle for bands 2-3 and 5-9 - diffusivityHigh = 1.80, & ! Maximum diffusivity angle for bands 2-3 and 5-9 - diffusivityB1410 = 1.66 ! Diffusivity for bands 1, 4, and 10 + diffusivityLow = 1.50, & !< Minimum diffusivity angle for bands 2-3 and 5-9 + diffusivityHigh = 1.80, & !< Maximum diffusivity angle for bands 2-3 and 5-9 + diffusivityB1410 = 1.66 !< Diffusivity for bands 1, 4, and 10 - ! RRTMG LW cloud property coefficients + !< RRTMG LW cloud property coefficients real(kind_phys) , dimension(58,nBandsLW_RRTMG),parameter :: & absliq1 = reshape(source=(/ & 1.64047e-03, 6.90533e-02, 7.72017e-02, 7.78054e-02, 7.69523e-02, & !1 @@ -557,26 +557,26 @@ subroutine rrtmg_lw_cloud_optics(ncol, nlay, nBandsLW, cld_lwp, cld_ref_liq, cld ilwcice, tau_cld, tau_precip) ! Inputs integer,intent(in) :: & - nBandsLW, & ! Number of spectral bands - ncol, & ! Number of horizontal gridpoints - nlay, & ! Number of vertical layers + nBandsLW, & !< Number of spectral bands + ncol, & !< Number of horizontal gridpoints + nlay, & !< Number of vertical layers ilwcliq, & ! ilwcice real(kind_phys), dimension(ncol,nlay), intent(in) :: & - cld_frac, & ! Cloud-fraction (1) - cld_lwp, & ! Cloud liquid water path (g/m2) - cld_ref_liq, & ! Effective radius (liquid) (micron) - cld_iwp, & ! Cloud ice water path (g/m2) - cld_ref_ice, & ! Effective radius (ice) (micron) - cld_rwp, & ! Cloud rain water path (g/m2) - cld_ref_rain, & ! Effective radius (rain-drop) (micron) - cld_swp, & ! Cloud snow-water path (g/m2) - cld_ref_snow ! Effective radius (snow-flake) (micron) + cld_frac, & !< Cloud-fraction (1) + cld_lwp, & !< Cloud liquid water path (g/m2) + cld_ref_liq, & !< Effective radius (liquid) (micron) + cld_iwp, & !< Cloud ice water path (g/m2) + cld_ref_ice, & !< Effective radius (ice) (micron) + cld_rwp, & !< Cloud rain water path (g/m2) + cld_ref_rain, & !< Effective radius (rain-drop) (micron) + cld_swp, & !< Cloud snow-water path (g/m2) + cld_ref_snow !< Effective radius (snow-flake) (micron) ! Outputs real(kind_phys),dimension(ncol,nlay,nBandsLW),intent(out) :: & - tau_cld, & ! Cloud optical-depth (1) - tau_precip ! Precipitation optical-depth (1) + tau_cld, & !< Cloud optical-depth (1) + tau_precip !< Precipitation optical-depth (1) ! Local variables integer :: ij,ik,ib,index,ia diff --git a/physics/rrtmg_lw_post.F90 b/physics/rrtmg_lw_post.F90 index bb84c2137..39601b269 100644 --- a/physics/rrtmg_lw_post.F90 +++ b/physics/rrtmg_lw_post.F90 @@ -1,5 +1,5 @@ -!>\file rrtmg_lw_post -!!This file contains +!>\file rrtmg_lw_post.F90 +!!This file contains GFS RRTMG scheme post. module rrtmg_lw_post contains diff --git a/physics/rrtmg_lw_post.meta b/physics/rrtmg_lw_post.meta index 813f1f9c3..4e9ac0f4d 100644 --- a/physics/rrtmg_lw_post.meta +++ b/physics/rrtmg_lw_post.meta @@ -16,7 +16,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () @@ -32,7 +32,7 @@ intent = in optional = F [lm] - standard_name = number_of_vertical_layers_for_radiation_calculations + standard_name = vertical_dimension_for_radiation long_name = number of vertical layers for radiation calculation units = count dimensions = () @@ -48,7 +48,7 @@ intent = in optional = F [lslwr] - standard_name = flag_to_calc_lw + standard_name = flag_for_calling_longwave_radiation long_name = logical flags for lw radiation calls units = flag dimensions = () @@ -56,7 +56,7 @@ intent = in optional = F [lwhtr] - standard_name = flag_for_output_of_longwave_heating_rate + standard_name = flag_for_output_of_tendency_of_air_temperature_due_to_longwave_heating_on_radiation_timestep_assuming_clear_sky long_name = flag to output lw heating rate (Radtend%lwhc) units = flag dimensions = () @@ -91,7 +91,7 @@ intent = in optional = F [sfcflw] - standard_name = lw_fluxes_sfc + standard_name = surface_lw_fluxes_assuming_total_and_clear_sky_on_radiation_timestep long_name = lw radiation fluxes at sfc units = W m-2 dimensions = (horizontal_loop_extent) @@ -99,7 +99,7 @@ intent = in optional = F [tsflw] - standard_name = surface_midlayer_air_temperature_in_longwave_radiation + standard_name = air_temperature_at_surface_adjacent_layer_on_radiation_timestep long_name = surface air temp during lw calculation units = K dimensions = (horizontal_loop_extent) @@ -108,7 +108,7 @@ intent = inout optional = F [sfcdlw] - standard_name = surface_downwelling_longwave_flux_on_radiation_time_step + standard_name = surface_downwelling_longwave_flux_on_radiation_timestep long_name = total sky sfc downward lw flux units = W m-2 dimensions = (horizontal_loop_extent) @@ -117,19 +117,19 @@ intent = inout optional = F [htrlw] - standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step + standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_timestep long_name = total sky lw heating rate units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [lwhc] - standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step + standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_timestep long_name = clear sky lw heating rates units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/rrtmg_lw_pre.F90 b/physics/rrtmg_lw_pre.F90 index d96a1f486..3ace48c0b 100644 --- a/physics/rrtmg_lw_pre.F90 +++ b/physics/rrtmg_lw_pre.F90 @@ -7,42 +7,25 @@ module rrtmg_lw_pre !>\defgroup rrtmg_lw_pre GFS RRTMG scheme pre !! @{ subroutine rrtmg_lw_pre_init () - end subroutine rrtmg_lw_pre_init + end subroutine rrtmg_lw_pre_init !> \section arg_table_rrtmg_lw_pre_run Argument Table !! \htmlinclude rrtmg_lw_pre_run.html !! - subroutine rrtmg_lw_pre_run (im, lslwr, xlat, xlon, slmsk, snowd, sncovr,& - zorl, hprime, tsfg, tsfa, semis, errmsg, errflg) - - use machine, only: kind_phys - use module_radiation_surface, only: setemis + subroutine rrtmg_lw_pre_run (errmsg, errflg) implicit none - - integer, intent(in) :: im - logical, intent(in) :: lslwr - real(kind=kind_phys), dimension(im), intent(in) :: xlat, xlon, slmsk, & - snowd, sncovr, zorl, hprime, tsfg, tsfa - real(kind=kind_phys), dimension(im), intent(out) :: semis - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg + + character(len=*), intent( out) :: errmsg + integer, intent( out) :: errflg ! Initialize CCPP error handling variables errmsg = '' errflg = 0 - if (lslwr) then -!> - Call module_radiation_surface::setemis(),to setup surface -!! emissivity for LW radiation. - call setemis (xlon, xlat, slmsk, snowd, sncovr, zorl, tsfg, tsfa, & - hprime, im, & ! --- inputs - semis) ! --- outputs - endif - end subroutine rrtmg_lw_pre_run - subroutine rrtmg_lw_pre_finalize () - end subroutine rrtmg_lw_pre_finalize + subroutine rrtmg_lw_pre_finalize () + end subroutine rrtmg_lw_pre_finalize !! @} - end module rrtmg_lw_pre + end module rrtmg_lw_pre diff --git a/physics/rrtmg_lw_pre.meta b/physics/rrtmg_lw_pre.meta index bfb0bd61f..fb84cb4c9 100644 --- a/physics/rrtmg_lw_pre.meta +++ b/physics/rrtmg_lw_pre.meta @@ -1,118 +1,12 @@ [ccpp-table-properties] name = rrtmg_lw_pre type = scheme - dependencies = iounitdef.f,machine.F,radiation_surface.f + dependencies = ######################################################################## [ccpp-arg-table] name = rrtmg_lw_pre_run type = scheme -[im] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent - units = count - dimensions = () - type = integer - intent = in - optional = F -[lslwr] - standard_name = flag_to_calc_lw - long_name = logical flags for lw radiation calls - units = flag - dimensions = () - type = logical - intent = in - optional = F -[xlat] - standard_name = latitude - long_name = latitude - units = radian - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[xlon] - standard_name = longitude - long_name = longitude - units = radian - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[slmsk] - standard_name = sea_land_ice_mask_real - long_name = landmask: sea/land/ice=0/1/2 - units = flag - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[snowd] - standard_name = surface_snow_thickness_water_equivalent - long_name = water equivalent snow depth - units = mm - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[sncovr] - standard_name = surface_snow_area_fraction_over_land - long_name = surface snow area fraction - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[zorl] - standard_name = surface_roughness_length - long_name = surface roughness length - units = cm - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[hprime] - standard_name = standard_deviation_of_subgrid_orography - long_name = standard deviation of subgrid orography - units = m - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[tsfg] - standard_name = surface_ground_temperature_for_radiation - long_name = surface ground temperature for radiation - units = K - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[tsfa] - standard_name = surface_air_temperature_for_radiation - long_name = lowest model layer air temperature for radiation - units = K - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[semis] - standard_name = surface_longwave_emissivity - long_name = surface lw emissivity in fraction - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = out - optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP @@ -130,4 +24,3 @@ type = integer intent = out optional = F - diff --git a/physics/rrtmg_sw_post.F90 b/physics/rrtmg_sw_post.F90 index d9946f695..72e149fe1 100644 --- a/physics/rrtmg_sw_post.F90 +++ b/physics/rrtmg_sw_post.F90 @@ -1,5 +1,5 @@ -!>\file rrtmg_sw_post -!! This file contains +!>\file rrtmg_sw_post.F90 +!! This file contains GFS RRTMG scheme post. module rrtmg_sw_post contains @@ -24,22 +24,22 @@ subroutine rrtmg_sw_post_run (im, levr, levs, ltp, nday, lm, kd, lsswr, & implicit none integer, intent(in) :: im, levr, levs, & - ltp, nday, lm, kd + ltp, nday, lm, kd logical, intent(in) :: lsswr, swhtr - real(kind=kind_phys), dimension(im), intent(in) :: sfcalb1, sfcalb2, & + real(kind=kind_phys), dimension(:), intent(in) :: sfcalb1, sfcalb2, & sfcalb3, sfcalb4 - real(kind=kind_phys), dimension(im, levr+LTP), intent(in) :: htswc, htsw0 + real(kind=kind_phys), dimension(:,:), intent(in) :: htswc, htsw0 - real(kind=kind_phys), dimension(im), intent(inout) :: nirbmdi, nirdfdi, & + real(kind=kind_phys), dimension(:), intent(inout) :: nirbmdi, nirdfdi, & visbmdi, visdfdi, & nirbmui, nirdfui, & visbmui, visdfui, & sfcdsw, sfcnsw - real(kind=kind_phys), dimension(im,levs), intent(inout) :: htrsw, swhc + real(kind=kind_phys), dimension(:,:), intent(inout) :: htrsw, swhc - type(cmpfsw_type), dimension(im), intent(inout) :: scmpsw - type(sfcfsw_type), dimension(im), intent(inout) :: sfcfsw - type(topfsw_type), dimension(im), intent(inout) :: topfsw + type(cmpfsw_type), dimension(:), intent(inout) :: scmpsw + type(sfcfsw_type), dimension(:), intent(inout) :: sfcfsw + type(topfsw_type), dimension(:), intent(inout) :: topfsw character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg diff --git a/physics/rrtmg_sw_post.meta b/physics/rrtmg_sw_post.meta index 66fecb5fd..81f066f53 100644 --- a/physics/rrtmg_sw_post.meta +++ b/physics/rrtmg_sw_post.meta @@ -24,7 +24,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () @@ -48,7 +48,7 @@ intent = in optional = F [lm] - standard_name = number_of_vertical_layers_for_radiation_calculations + standard_name = vertical_dimension_for_radiation long_name = number of vertical layers for radiation calculation units = count dimensions = () @@ -64,7 +64,7 @@ intent = in optional = F [lsswr] - standard_name = flag_to_calc_sw + standard_name = flag_for_calling_shortwave_radiation long_name = logical flags for sw radiation calls units = flag dimensions = () @@ -72,7 +72,7 @@ intent = in optional = F [swhtr] - standard_name = flag_for_output_of_shortwave_heating_rate + standard_name = flag_for_output_of_tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_timestep_assuming_clear_sky long_name = flag to output sw heating rate (Radtend%swhc) units = flag dimensions = () @@ -134,7 +134,7 @@ intent = in optional = F [nirbmdi] - standard_name = surface_downwelling_direct_near_infrared_shortwave_flux_on_radiation_time_step + standard_name = surface_downwelling_direct_nir_shortwave_flux_on_radiation_timestep long_name = sfc nir beam sw downward flux units = W m-2 dimensions = (horizontal_loop_extent) @@ -143,7 +143,7 @@ intent = inout optional = F [nirdfdi] - standard_name = surface_downwelling_diffuse_near_infrared_shortwave_flux_on_radiation_time_step + standard_name = surface_downwelling_diffuse_nir_shortwave_flux_on_radiation_timestep long_name = sfc nir diff sw downward flux units = W m-2 dimensions = (horizontal_loop_extent) @@ -152,7 +152,7 @@ intent = inout optional = F [visbmdi] - standard_name = surface_downwelling_direct_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step + standard_name = surface_downwelling_direct_uv_and_vis_shortwave_flux_on_radiation_timestep long_name = sfc uv+vis beam sw downward flux units = W m-2 dimensions = (horizontal_loop_extent) @@ -161,7 +161,7 @@ intent = inout optional = F [visdfdi] - standard_name = surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step + standard_name = surface_downwelling_diffuse_uv_and_vis_shortwave_flux_on_radiation_timestep long_name = sfc uv+vis diff sw downward flux units = W m-2 dimensions = (horizontal_loop_extent) @@ -170,7 +170,7 @@ intent = inout optional = F [nirbmui] - standard_name = surface_upwelling_direct_near_infrared_shortwave_flux_on_radiation_time_step + standard_name = surface_upwelling_direct_nir_shortwave_flux_on_radiation_timestep long_name = sfc nir beam sw upward flux units = W m-2 dimensions = (horizontal_loop_extent) @@ -179,7 +179,7 @@ intent = inout optional = F [nirdfui] - standard_name = surface_upwelling_diffuse_near_infrared_shortwave_flux_on_radiation_time_step + standard_name = surface_upwelling_diffuse_nir_shortwave_flux_on_radiation_timestep long_name = sfc nir diff sw upward flux units = W m-2 dimensions = (horizontal_loop_extent) @@ -188,7 +188,7 @@ intent = inout optional = F [visbmui] - standard_name = surface_upwelling_direct_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step + standard_name = surface_upwelling_direct_uv_and_vis_shortwave_flux_on_radiation_timestep long_name = sfc uv+vis beam sw upward flux units = W m-2 dimensions = (horizontal_loop_extent) @@ -197,7 +197,7 @@ intent = inout optional = F [visdfui] - standard_name = surface_upwelling_diffuse_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step + standard_name = surface_upwelling_diffuse_uv_and_vis_shortwave_flux_on_radiation_timestep long_name = sfc uv+vis diff sw upward flux units = W m-2 dimensions = (horizontal_loop_extent) @@ -206,7 +206,7 @@ intent = inout optional = F [sfcdsw] - standard_name = surface_downwelling_shortwave_flux_on_radiation_time_step + standard_name = surface_downwelling_shortwave_flux_on_radiation_timestep long_name = total sky sfc downward sw flux units = W m-2 dimensions = (horizontal_loop_extent) @@ -215,7 +215,7 @@ intent = inout optional = F [sfcnsw] - standard_name = surface_net_downwelling_shortwave_flux_on_radiation_time_step + standard_name = surface_net_downwelling_shortwave_flux_on_radiation_timestep long_name = total sky sfc netsw flx into ground units = W m-2 dimensions = (horizontal_loop_extent) @@ -224,19 +224,19 @@ intent = inout optional = F [htrsw] - standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_timestep long_name = total sky sw heating rate units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [swhc] - standard_name = tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_timestep long_name = clear sky sw heating rates units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -250,7 +250,7 @@ intent = inout optional = F [sfcfsw] - standard_name = sw_fluxes_sfc + standard_name = surface_sw_fluxes_assuming_total_and_clear_sky_on_radiation_timestep long_name = sw radiation fluxes at sfc units = W m-2 dimensions = (horizontal_loop_extent) diff --git a/physics/rrtmg_sw_pre.F90 b/physics/rrtmg_sw_pre.F90 index f54a5a963..cc329f180 100644 --- a/physics/rrtmg_sw_pre.F90 +++ b/physics/rrtmg_sw_pre.F90 @@ -12,42 +12,22 @@ end subroutine rrtmg_sw_pre_init !> \section arg_table_rrtmg_sw_pre_run Argument Table !! \htmlinclude rrtmg_sw_pre_run.html !! - subroutine rrtmg_sw_pre_run (im, lndp_type, n_var_lndp, lsswr, lndp_var_list, lndp_prt_list, tsfg, tsfa, coszen, & - alb1d, slmsk, snowd, sncovr, snoalb, zorl, hprime, alvsf, alnsf, alvwf,& - alnwf, facsf, facwf, fice, tisfc, sfalb, nday, idxday, sfcalb1, & - sfcalb2, sfcalb3, sfcalb4, errmsg, errflg) + subroutine rrtmg_sw_pre_run (im, lsswr, coszen, nday, idxday, errmsg, errflg) use machine, only: kind_phys - use module_radiation_surface, only: NF_ALBD, setalb - implicit none - integer, intent(in) :: im, lndp_type, n_var_lndp - character(len=3) , dimension(:), intent(in) :: lndp_var_list + integer, intent(in) :: im logical, intent(in) :: lsswr - real(kind=kind_phys), dimension(:), intent(in) :: lndp_prt_list - real(kind=kind_phys), dimension(im), intent(in) :: tsfg, tsfa, coszen - real(kind=kind_phys), dimension(im), intent(in) :: alb1d - real(kind=kind_phys), dimension(im), intent(in) :: slmsk, snowd, & - sncovr, snoalb, & - zorl, hprime, & - alvsf, alnsf, & - alvwf, alnwf, & - facsf, facwf, & - fice, tisfc - real(kind=kind_phys), dimension(im), intent(inout) :: sfalb + real(kind=kind_phys), dimension(:), intent(in) :: coszen integer, intent(out) :: nday - integer, dimension(im), intent(out) :: idxday - real(kind=kind_phys), dimension(im), intent(out) :: sfcalb1, sfcalb2, & - sfcalb3, sfcalb4 + integer, dimension(:), intent(out) :: idxday character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg + ! Local variables integer :: i - real(kind=kind_phys), dimension(im,NF_ALBD) :: sfcalb - - real(kind=kind_phys) :: lndp_alb ! Initialize CCPP error handling variables errmsg = '' @@ -55,9 +35,9 @@ subroutine rrtmg_sw_pre_run (im, lndp_type, n_var_lndp, lsswr, lndp_var_list, ln ! --- ... start radiation calculations ! remember to set heating rate unit to k/sec! + !> -# Start SW radiation calculations if (lsswr) then - !> - Check for daytime points for SW radiation. nday = 0 idxday = 0 @@ -67,40 +47,11 @@ subroutine rrtmg_sw_pre_run (im, lndp_type, n_var_lndp, lsswr, lndp_var_list, ln idxday(nday) = i endif enddo - -! set albedo pert, if requested. - lndp_alb = -999. - if (lndp_type==1) then - do i =1,n_var_lndp - if (lndp_var_list(i) == 'alb') then - lndp_alb = lndp_prt_list(i) - endif - enddo - endif - -!> - Call module_radiation_surface::setalb() to setup surface albedo. -!! for SW radiation. - - call setalb (slmsk, snowd, sncovr, snoalb, zorl, coszen, tsfg, tsfa, & ! --- inputs - hprime, alvsf, alnsf, alvwf, alnwf, facsf, facwf, fice, & - tisfc, IM, alb1d, lndp_alb, & ! mg, sfc-perts - sfcalb) ! --- outputs - -!> -# Approximate mean surface albedo from vis- and nir- diffuse values. - sfalb(:) = max(0.01, 0.5 * (sfcalb(:,2) + sfcalb(:,4))) else nday = 0 idxday = 0 - sfcalb = 0.0 endif - do i = 1, im - sfcalb1(i) = sfcalb(i,1) - sfcalb2(i) = sfcalb(i,2) - sfcalb3(i) = sfcalb(i,3) - sfcalb4(i) = sfcalb(i,4) - enddo - end subroutine rrtmg_sw_pre_run subroutine rrtmg_sw_pre_finalize () diff --git a/physics/rrtmg_sw_pre.meta b/physics/rrtmg_sw_pre.meta index b965b5381..9edf59e73 100644 --- a/physics/rrtmg_sw_pre.meta +++ b/physics/rrtmg_sw_pre.meta @@ -15,68 +15,16 @@ type = integer intent = in optional = F -[lndp_type] - standard_name = index_for_stochastic_land_surface_perturbation_type - long_name = index for stochastic land surface perturbations type - units = index - dimensions = () - type = integer - intent = in - optional = F -[n_var_lndp] - standard_name = number_of_land_surface_variables_perturbed - long_name = number of land surface variables perturbed - units = count - dimensions = () - type = integer - intent = in - optional = F [lsswr] - standard_name = flag_to_calc_sw + standard_name = flag_for_calling_shortwave_radiation long_name = logical flags for sw radiation calls units = flag dimensions = () type = logical intent = in optional = F -[lndp_var_list] - standard_name = variables_to_be_perturbed_for_landperts - long_name = variables to be perturbed for landperts - units = none - dimensions = (number_of_land_surface_variables_perturbed) - type = character - kind = len=3 - intent = in - optional = F -[lndp_prt_list] - standard_name = magnitude_of_perturbations_for_landperts - long_name = magnitude of perturbations for landperts - units = variable - dimensions = (number_of_land_surface_variables_perturbed) - type = real - kind = kind_phys - intent = in - optional = F -[tsfg] - standard_name = surface_ground_temperature_for_radiation - long_name = surface ground temperature for radiation - units = K - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[tsfa] - standard_name = surface_air_temperature_for_radiation - long_name = lowest model layer air temperature for radiation - units = K - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F [coszen] - standard_name = cosine_of_zenith_angle + standard_name = cosine_of_solar_zenith_angle_for_daytime_points_on_radiation_timestep long_name = mean cos of zenith angle over rad call period units = none dimensions = (horizontal_loop_extent) @@ -84,150 +32,6 @@ kind = kind_phys intent = in optional = F -[alb1d] - standard_name = surface_albedo_perturbation - long_name = surface albedo perturbation - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[slmsk] - standard_name = sea_land_ice_mask_real - long_name = landmask: sea/land/ice=0/1/2 - units = flag - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[snowd] - standard_name = surface_snow_thickness_water_equivalent - long_name = water equivalent snow depth - units = mm - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[sncovr] - standard_name = surface_snow_area_fraction_over_land - long_name = surface snow area fraction - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[snoalb] - standard_name = upper_bound_on_max_albedo_over_deep_snow - long_name = maximum snow albedo - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[zorl] - standard_name = surface_roughness_length - long_name = surface roughness length - units = cm - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[hprime] - standard_name = standard_deviation_of_subgrid_orography - long_name = standard deviation of subgrid orography - units = m - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[alvsf] - standard_name = mean_vis_albedo_with_strong_cosz_dependency - long_name = mean vis albedo with strong cosz dependency - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[alnsf] - standard_name = mean_nir_albedo_with_strong_cosz_dependency - long_name = mean nir albedo with strong cosz dependency - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[alvwf] - standard_name = mean_vis_albedo_with_weak_cosz_dependency - long_name = mean vis albedo with weak cosz dependency - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[alnwf] - standard_name = mean_nir_albedo_with_weak_cosz_dependency - long_name = mean nir albedo with weak cosz dependency - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[facsf] - standard_name = fractional_coverage_with_strong_cosz_dependency - long_name = fractional coverage with strong cosz dependency - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[facwf] - standard_name = fractional_coverage_with_weak_cosz_dependency - long_name = fractional coverage with weak cosz dependency - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[fice] - standard_name = sea_ice_concentration - long_name = ice fraction over open water - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[tisfc] - standard_name = sea_ice_temperature - long_name = sea ice surface skin temperature - units = K - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[sfalb] - standard_name = surface_diffused_shortwave_albedo - long_name = mean surface diffused sw albedo - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = inout - optional = F [nday] standard_name = daytime_points_dimension long_name = daytime points dimension @@ -244,42 +48,6 @@ type = integer intent = out optional = F -[sfcalb1] - standard_name = surface_albedo_due_to_near_IR_direct - long_name = surface albedo due to near IR direct beam - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = out - optional = F -[sfcalb2] - standard_name = surface_albedo_due_to_near_IR_diffused - long_name = surface albedo due to near IR diffused beam - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = out - optional = F -[sfcalb3] - standard_name = surface_albedo_due_to_UV_and_VIS_direct - long_name = surface albedo due to UV+VIS direct beam - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = out - optional = F -[sfcalb4] - standard_name = surface_albedo_due_to_UV_and_VIS_diffused - long_name = surface albedo due to UV+VIS diffused beam - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = out - optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/rrtmgp_aux.F90 b/physics/rrtmgp_aux.F90 deleted file mode 100644 index d39705e7a..000000000 --- a/physics/rrtmgp_aux.F90 +++ /dev/null @@ -1,23 +0,0 @@ -module rrtmgp_aux - use machine, only: & - kind_phys ! Working type - implicit none - - real(kind_phys) :: & - rrtmgp_minP, & ! Minimum pressure allowed in RRTMGP - rrtmgp_minT ! Minimum temperature allowed in RRTMGP -contains - ! ######################################################################################### - ! SUBROUTINE check_error_msg - ! ######################################################################################### - subroutine check_error_msg(routine_name, error_msg) - character(len=*), intent(in) :: & - error_msg, routine_name - - if(error_msg /= "") then - print*,"ERROR("//trim(routine_name)//"): " - print*,trim(error_msg) - return - end if - end subroutine check_error_msg -end module rrtmgp_aux diff --git a/physics/rrtmgp_lw_aerosol_optics.F90 b/physics/rrtmgp_lw_aerosol_optics.F90 index 2047deaf4..df0e77163 100644 --- a/physics/rrtmgp_lw_aerosol_optics.F90 +++ b/physics/rrtmgp_lw_aerosol_optics.F90 @@ -2,7 +2,9 @@ module rrtmgp_lw_aerosol_optics use machine, only: kind_phys use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_optical_props, only: ty_optical_props_1scl - use rrtmgp_aux, only: check_error_msg + use radiation_tools, only: check_error_msg + use rrtmgp_sw_gas_optics, only: sw_gas_props + use rrtmgp_lw_gas_optics, only: lw_gas_props use module_radiation_aerosols, only: & NF_AESW, & ! Number of optical-fields in SW output (3=tau+g+omega) NF_AELW, & ! Number of optical-fields in LW output (3=tau+g+omega) @@ -30,7 +32,7 @@ end subroutine rrtmgp_lw_aerosol_optics_init !! subroutine rrtmgp_lw_aerosol_optics_run(doLWrad, nCol, nLev, nTracer, nTracerAer,& p_lev, p_lay, p_lk, tv_lay, relhum, lsmask, tracer, aerfld, lon, lat, & - lw_gas_props, sw_gas_props, aerodp, lw_optical_props_aerosol, errmsg, errflg) + aerodp, lw_optical_props_aerosol, errmsg, errflg) ! Inputs logical, intent(in) :: & @@ -40,30 +42,26 @@ subroutine rrtmgp_lw_aerosol_optics_run(doLWrad, nCol, nLev, nTracer, nTracerAer nLev, & ! Number of vertical layers nTracer, & ! Number of tracers nTracerAer ! Number of aerosol tracers - real(kind_phys), dimension(nCol), intent(in) :: & + real(kind_phys), dimension(:), intent(in) :: & lon, & ! Longitude lat, & ! Latitude lsmask ! Land/sea/sea-ice mask - real(kind_phys), dimension(nCol,Nlev),intent(in) :: & + real(kind_phys), dimension(:,:),intent(in) :: & p_lay, & ! Pressure @ layer-centers (Pa) tv_lay, & ! Virtual-temperature @ layer-centers (K) relhum, & ! Relative-humidity @ layer-centers p_lk ! Exner function @ layer-centers (1) - real(kind_phys), dimension(nCol, nLev, nTracer),intent(in) :: & + real(kind_phys), dimension(:,:, :),intent(in) :: & tracer ! trace gas concentrations - real(kind_phys), dimension(nCol, nLev, nTracerAer),intent(in) :: & + real(kind_phys), dimension(:,:, :),intent(in) :: & aerfld ! aerosol input concentrations - real(kind_phys), dimension(nCol,nLev+1),intent(in) :: & + real(kind_phys), dimension(:,:),intent(in) :: & p_lev ! Pressure @ layer-interfaces (Pa) - type(ty_gas_optics_rrtmgp),intent(in) :: & - sw_gas_props ! RRTMGP DDT: spectral information for SW calculation - type(ty_gas_optics_rrtmgp),intent(in) :: & - lw_gas_props ! RRTMGP DDT: spectral information for LW calculation ! Outputs - real(kind_phys), dimension(nCol,NSPC1), intent(inout) :: & + real(kind_phys), dimension(:,:), intent(inout) :: & aerodp ! Vertical integrated optical depth for various aerosol species - type(ty_optical_props_1scl),intent(out) :: & + type(ty_optical_props_1scl),intent(inout) :: & lw_optical_props_aerosol ! RRTMGP DDT: Longwave aerosol optical properties (tau) integer, intent(out) :: & errflg ! CCPP error flag @@ -75,6 +73,7 @@ subroutine rrtmgp_lw_aerosol_optics_run(doLWrad, nCol, nLev, nTracer, nTracerAer aerosolslw ! real(kind_phys), dimension(nCol, nLev, sw_gas_props%get_nband(), NF_AESW) :: & aerosolssw + integer :: iBand ! Initialize CCPP error handling variables errmsg = '' @@ -83,16 +82,18 @@ subroutine rrtmgp_lw_aerosol_optics_run(doLWrad, nCol, nLev, nTracer, nTracerAer if (.not. doLWrad) return ! Call module_radiation_aerosols::setaer(),to setup aerosols property profile - call setaer(p_lev, p_lay, p_lk, tv_lay, relhum, lsmask, tracer, aerfld, lon, lat, ncol, nLev, & + call setaer(p_lev/100., p_lay/100., p_lk, tv_lay, relhum, lsmask, tracer, aerfld, lon, lat, ncol, nLev, & nLev+1, .true., .true., aerosolssw, aerosolslw, aerodp) - ! Allocate RRTMGP DDT: Aerosol optics [nCol,nlev,nBands] - call check_error_msg('rrtmgp_lw_aerosol_optics_run',lw_optical_props_aerosol%alloc_1scl( & - ncol, nlev, lw_gas_props%get_band_lims_wavenumber())) - ! Copy aerosol optical information to RRTMGP DDT lw_optical_props_aerosol%tau = aerosolslw(:,:,:,1) * (1. - aerosolslw(:,:,:,2)) + lw_optical_props_aerosol%band_lims_wvn = lw_gas_props%get_band_lims_wavenumber() + do iBand=1,lw_gas_props%get_nband() + lw_optical_props_aerosol%band2gpt(1:2,iBand) = iBand + lw_optical_props_aerosol%gpt2band(iBand) = iBand + end do + end subroutine rrtmgp_lw_aerosol_optics_run ! ######################################################################################### diff --git a/physics/rrtmgp_lw_aerosol_optics.meta b/physics/rrtmgp_lw_aerosol_optics.meta index 0787d3fc4..bd4766691 100644 --- a/physics/rrtmgp_lw_aerosol_optics.meta +++ b/physics/rrtmgp_lw_aerosol_optics.meta @@ -1,14 +1,14 @@ [ccpp-table-properties] name = rrtmgp_lw_aerosol_optics type = scheme - dependencies = iounitdef.f,machine.F,radiation_aerosols.f,rrtmgp_aux.F90 + dependencies = iounitdef.f,machine.F,radiation_aerosols.f,radiation_tools.F90 ######################################################################## [ccpp-arg-table] name = rrtmgp_lw_aerosol_optics_run type = scheme [doLWrad] - standard_name = flag_to_calc_lw + standard_name = flag_for_calling_longwave_radiation long_name = logical flags for lw radiation calls units = flag dimensions = () @@ -24,7 +24,7 @@ intent = in optional = F [nLev] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () @@ -51,7 +51,7 @@ standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure at vertical interface for radiation calculation units = hPa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -60,16 +60,16 @@ standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure at vertical layer for radiation calculation units = hPa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [p_lk] - standard_name = dimensionless_exner_function_at_model_layers + standard_name = dimensionless_exner_function long_name = dimensionless Exner function at model layer centers units = none - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -78,7 +78,7 @@ standard_name = virtual_temperature long_name = layer virtual temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -87,13 +87,13 @@ standard_name = relative_humidity long_name = layer relative humidity units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [lsmask] - standard_name = sea_land_ice_mask_real + standard_name = area_type long_name = landmask: sea/land/ice=0/1/2 units = flag dimensions = (horizontal_loop_extent) @@ -105,16 +105,16 @@ standard_name = chemical_tracers long_name = chemical tracers units = g g-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = in optional = F [aerfld] - standard_name = aerosol_number_concentration_from_gocart_aerosol_climatology + standard_name = mass_number_concentration_of_aerosol_from_gocart_climatology long_name = GOCART aerosol climatology number concentration units = kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_aerosol_tracers_MG) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_aerosol_tracers_MG) type = real kind = kind_phys intent = in @@ -137,22 +137,6 @@ kind = kind_phys intent = in optional = F -[lw_gas_props] - standard_name = coefficients_for_lw_gas_optics - long_name = DDT containing spectral information for RRTMGP LW radiation scheme - units = DDT - dimensions = () - intent = in - type = ty_gas_optics_rrtmgp - optional = F -[sw_gas_props] - standard_name = coefficients_for_sw_gas_optics - long_name = DDT containing spectral information for RRTMGP SW radiation scheme - units = DDT - dimensions = () - type = ty_gas_optics_rrtmgp - intent = in - optional = F [aerodp] standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles long_name = vertical integrated optical depth for various aerosol species @@ -168,7 +152,7 @@ units = DDT dimensions = () type = ty_optical_props_1scl - intent = out + intent = inout optional = F [errmsg] standard_name = ccpp_error_message diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index 341c19fc2..7be8f7865 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -2,26 +2,65 @@ module rrtmgp_lw_cloud_optics use machine, only: kind_phys use mo_rte_kind, only: wl use mo_cloud_optics, only: ty_cloud_optics - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_optical_props, only: ty_optical_props_1scl, ty_optical_props_2str use mo_rrtmg_lw_cloud_optics, only: rrtmg_lw_cloud_optics - use rrtmgp_aux, only: check_error_msg + use rrtmgp_lw_gas_optics, only: lw_gas_props + use radiation_tools, only: check_error_msg use netcdf +#ifdef MPI + use mpi +#endif implicit none - public rrtmgp_lw_cloud_optics_init, rrtmgp_lw_cloud_optics_run, rrtmgp_lw_cloud_optics_finalize - + type(ty_cloud_optics) :: lw_cloud_props + integer :: & + nrghice_fromfileLW, nBandLW, nSize_liqLW, nSize_iceLW, nSizeRegLW, & + nCoeff_extLW, nCoeff_ssa_gLW, nBoundLW, npairsLW + real(kind_phys) :: & + radliq_facLW, & ! Factor for calculating LUT interpolation indices for liquid + radice_facLW ! Factor for calculating LUT interpolation indices for ice + real(kind_phys), dimension(:,:), allocatable :: & + lut_extliqLW, & ! LUT shortwave liquid extinction coefficient + lut_ssaliqLW, & ! LUT shortwave liquid single scattering albedo + lut_asyliqLW, & ! LUT shortwave liquid asymmetry parameter + band_limsCLDLW ! Beginning and ending wavenumber [cm -1] for each band + real(kind_phys), dimension(:,:,:), allocatable :: & + lut_exticeLW, & ! LUT shortwave ice extinction coefficient + lut_ssaiceLW, & ! LUT shortwave ice single scattering albedo + lut_asyiceLW ! LUT shortwave ice asymmetry parameter + real(kind_phys), dimension(:), allocatable :: & + pade_sizereg_extliqLW, & ! Particle size regime boundaries for shortwave liquid extinction + ! coefficient for Pade interpolation + pade_sizereg_ssaliqLW, & ! Particle size regime boundaries for shortwave liquid single + ! scattering albedo for Pade interpolation + pade_sizereg_asyliqLW, & ! Particle size regime boundaries for shortwave liquid asymmetry + ! parameter for Pade interpolation + pade_sizereg_exticeLW, & ! Particle size regime boundaries for shortwave ice extinction + ! coefficient for Pade interpolation + pade_sizereg_ssaiceLW, & ! Particle size regime boundaries for shortwave ice single + ! scattering albedo for Pade interpolation + pade_sizereg_asyiceLW ! Particle size regime boundaries for shortwave ice asymmetry + ! parameter for Pade interpolation + real(kind_phys), dimension(:,:,:), allocatable :: & + pade_extliqLW, & ! PADE coefficients for shortwave liquid extinction + pade_ssaliqLW, & ! PADE coefficients for shortwave liquid single scattering albedo + pade_asyliqLW ! PADE coefficients for shortwave liquid asymmetry parameter + real(kind_phys), dimension(:,:,:,:), allocatable :: & + pade_exticeLW, & ! PADE coefficients for shortwave ice extinction + pade_ssaiceLW, & ! PADE coefficients for shortwave ice single scattering albedo + pade_asyiceLW ! PADE coefficients for shortwave ice asymmetry parameter + ! Parameters used for rain and snow(+groupel) RRTMGP cloud-optics real(kind_phys), parameter :: & absrain = 0.33e-3, & ! Rain drop absorption coefficient \f$(m^{2}/g)\f$ . abssnow0 = 1.5, & ! Snow flake absorption coefficient (micron), fu coeff abssnow1 = 2.34e-3 ! Snow flake absorption coefficient \f$(m^{2}/g)\f$, ncar coef real(kind_phys) :: & - radliq_lwr, & ! Liquid particle size lower bound for LUT interpolation - radliq_upr, & ! Liquid particle size upper bound for LUT interpolation - radice_lwr, & ! Ice particle size upper bound for LUT interpolation - radice_upr ! Ice particle size lower bound for LUT interpolation + radliq_lwrLW, & ! Liquid particle size lower bound for LUT interpolation + radliq_uprLW, & ! Liquid particle size upper bound for LUT interpolation + radice_lwrLW, & ! Ice particle size upper bound for LUT interpolation + radice_uprLW ! Ice particle size lower bound for LUT interpolation contains @@ -31,78 +70,33 @@ module rrtmgp_lw_cloud_optics !! \section arg_table_rrtmgp_lw_cloud_optics_init !! \htmlinclude rrtmgp_lw_cloud_optics.html !! - subroutine rrtmgp_lw_cloud_optics_init(doG_cldoptics, doGP_cldoptics_PADE, & - doGP_cldoptics_LUT, nrghice, rrtmgp_root_dir, rrtmgp_lw_file_clouds, mpicomm, & - mpirank, mpiroot, lw_cloud_props, errmsg, errflg) + subroutine rrtmgp_lw_cloud_optics_init(nrghice, mpicomm, mpirank, mpiroot, & + doG_cldoptics, doGP_cldoptics_PADE, doGP_cldoptics_LUT, rrtmgp_root_dir, & + rrtmgp_lw_file_clouds, errmsg, errflg) ! Inputs logical, intent(in) :: & - doG_cldoptics, & ! Use legacy RRTMG cloud-optics? - doGP_cldoptics_PADE, & ! Use RRTMGP cloud-optics: PADE approximation? - doGP_cldoptics_LUT ! Use RRTMGP cloud-optics: LUTs? + doG_cldoptics, & ! Use legacy RRTMG cloud-optics? + doGP_cldoptics_PADE, & ! Use RRTMGP cloud-optics: PADE approximation? + doGP_cldoptics_LUT ! Use RRTMGP cloud-optics: LUTs? integer, intent(inout) :: & - nrghice ! Number of ice-roughness categories - integer, intent(in) :: & - mpicomm, & ! MPI communicator - mpirank, & ! Current MPI rank - mpiroot ! Master MPI rank + nrghice ! Number of ice-roughness categories + integer, intent(in) :: & + mpicomm, & ! MPI communicator + mpirank, & ! Current MPI rank + mpiroot ! Master MPI rank character(len=128),intent(in) :: & - rrtmgp_root_dir, & ! RTE-RRTMGP root directory - rrtmgp_lw_file_clouds ! RRTMGP file containing coefficients used to compute clouds optical properties - + rrtmgp_root_dir, & ! RTE-RRTMGP root directory + rrtmgp_lw_file_clouds ! RRTMGP file containing coefficients used to compute clouds optical properties + ! Outputs - type(ty_cloud_optics),intent(out) :: & - lw_cloud_props ! RRTMGP DDT: spectral information for RRTMGP LW radiation scheme character(len=*), intent(out) :: & - errmsg ! Error message + errmsg ! Error message integer, intent(out) :: & - errflg ! Error code - - ! Local variables that will be passed to cloud_optics%load() - real(kind_phys) :: & - !radliq_lwr, & ! Liquid particle size lower bound for LUT interpolation - !radliq_upr, & ! Liquid particle size upper bound for LUT interpolation - radliq_fac, & ! Factor for calculating LUT interpolation indices for liquid - !radice_lwr, & ! Ice particle size upper bound for LUT interpolation - !radice_upr, & ! Ice particle size lower bound for LUT interpolation - radice_fac ! Factor for calculating LUT interpolation indices for ice - real(kind_phys), dimension(:,:), allocatable :: & - lut_extliq, & ! LUT shortwave liquid extinction coefficient - lut_ssaliq, & ! LUT shortwave liquid single scattering albedo - lut_asyliq, & ! LUT shortwave liquid asymmetry parameter - band_lims ! Beginning and ending wavenumber [cm -1] for each band - real(kind_phys), dimension(:,:,:), allocatable :: & - lut_extice, & ! LUT shortwave ice extinction coefficient - lut_ssaice, & ! LUT shortwave ice single scattering albedo - lut_asyice ! LUT shortwave ice asymmetry parameter - real(kind_phys), dimension(:), allocatable :: & - pade_sizereg_extliq, & ! Particle size regime boundaries for shortwave liquid extinction - ! coefficient for Pade interpolation - pade_sizereg_ssaliq, & ! Particle size regime boundaries for shortwave liquid single - ! scattering albedo for Pade interpolation - pade_sizereg_asyliq, & ! Particle size regime boundaries for shortwave liquid asymmetry - ! parameter for Pade interpolation - pade_sizereg_extice, & ! Particle size regime boundaries for shortwave ice extinction - ! coefficient for Pade interpolation - pade_sizereg_ssaice, & ! Particle size regime boundaries for shortwave ice single - ! scattering albedo for Pade interpolation - pade_sizereg_asyice ! Particle size regime boundaries for shortwave ice asymmetry - ! parameter for Pade interpolation - real(kind_phys), dimension(:,:,:), allocatable :: & - pade_extliq, & ! PADE coefficients for shortwave liquid extinction - pade_ssaliq, & ! PADE coefficients for shortwave liquid single scattering albedo - pade_asyliq ! PADE coefficients for shortwave liquid asymmetry parameter - real(kind_phys), dimension(:,:,:,:), allocatable :: & - pade_extice, & ! PADE coefficients for shortwave ice extinction - pade_ssaice, & ! PADE coefficients for shortwave ice single scattering albedo - pade_asyice ! PADE coefficients for shortwave ice asymmetry parameter - ! Dimensions - integer :: & - nrghice_fromfile, nBand, nSize_liq, nSize_ice, nSizeReg,& - nCoeff_ext, nCoeff_ssa_g, nBound, npairs + errflg ! Error code ! Local variables - integer :: dimID,varID,status,ncid + integer :: dimID,varID,status,ncid,mpierr character(len=264) :: lw_cloud_props_file integer,parameter :: max_strlen=256, nrghice_default=2 @@ -110,162 +104,274 @@ subroutine rrtmgp_lw_cloud_optics_init(doG_cldoptics, doGP_cldoptics_PADE, errmsg = '' errflg = 0 + ! If not using RRTMGP cloud optics, return. if (doG_cldoptics) return - + ! Filenames are set in the physics_nml lw_cloud_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_lw_file_clouds) - ! On master processor only... -! if (mpirank .eq. mpiroot) then + ! ####################################################################################### + ! + ! Read dimensions for longwave cloud-optics fields... + ! (ONLY master processor(0), if MPI enabled) + ! + ! ####################################################################################### +#ifdef MPI + if (mpirank .eq. mpiroot) then +#endif + write (*,*) 'Reading RRTMGP longwave cloud-optics metadata ... ' + ! Open file status = nf90_open(trim(lw_cloud_props_file), NF90_NOWRITE, ncid) - + ! Read dimensions status = nf90_inq_dimid(ncid, 'nband', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nBand) + status = nf90_inquire_dimension(ncid, dimid, len=nBandLW) status = nf90_inq_dimid(ncid, 'nrghice', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nrghice_fromfile) + status = nf90_inquire_dimension(ncid, dimid, len=nrghice_fromfileLW) status = nf90_inq_dimid(ncid, 'nsize_liq', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nSize_liq) + status = nf90_inquire_dimension(ncid, dimid, len=nSize_liqLW) status = nf90_inq_dimid(ncid, 'nsize_ice', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nSize_ice) + status = nf90_inquire_dimension(ncid, dimid, len=nSize_iceLW) status = nf90_inq_dimid(ncid, 'nsizereg', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nSizeReg) + status = nf90_inquire_dimension(ncid, dimid, len=nSizeRegLW) status = nf90_inq_dimid(ncid, 'ncoeff_ext', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nCoeff_ext) + status = nf90_inquire_dimension(ncid, dimid, len=nCoeff_extLW) status = nf90_inq_dimid(ncid, 'ncoeff_ssa_g', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nCoeff_ssa_g) + status = nf90_inquire_dimension(ncid, dimid, len=nCoeff_ssa_gLW) status = nf90_inq_dimid(ncid, 'nbound', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nBound) + status = nf90_inquire_dimension(ncid, dimid, len=nBoundLW) status = nf90_inq_dimid(ncid, 'pair', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=npairs) + status = nf90_inquire_dimension(ncid, dimid, len=npairsLW) - ! Has the number of ice-roughnesses to use been provided from the namelist? - ! If not provided, use default number of ice-roughness categories - if (nrghice .eq. 0) then - nrghice = nrghice_default - else - nrghice = nrghice_fromfile - ! If provided in the namelist, check to ensure that number of ice-roughness categories is feasible. - if (nrghice .gt. nrghice_fromfile) then - errmsg = 'Number of RRTMGP ice-roughness categories requested in namelist file is not allowed. Using default number of categories.' - nrghice = nrghice_default - endif - endif +#ifdef MPI + endif ! On master processor - ! Allocate space for arrays - if (doGP_cldoptics_LUT) then - allocate(lut_extliq(nSize_liq, nBand)) - allocate(lut_ssaliq(nSize_liq, nBand)) - allocate(lut_asyliq(nSize_liq, nBand)) - allocate(lut_extice(nSize_ice, nBand, nrghice_fromfile)) - allocate(lut_ssaice(nSize_ice, nBand, nrghice_fromfile)) - allocate(lut_asyice(nSize_ice, nBand, nrghice_fromfile)) - endif - if (doGP_cldoptics_PADE) then - allocate(pade_extliq(nBand, nSizeReg, nCoeff_ext )) - allocate(pade_ssaliq(nBand, nSizeReg, nCoeff_ssa_g)) - allocate(pade_asyliq(nBand, nSizeReg, nCoeff_ssa_g)) - allocate(pade_extice(nBand, nSizeReg, nCoeff_ext, nrghice_fromfile)) - allocate(pade_ssaice(nBand, nSizeReg, nCoeff_ssa_g, nrghice_fromfile)) - allocate(pade_asyice(nBand, nSizeReg, nCoeff_ssa_g, nrghice_fromfile)) - allocate(pade_sizereg_extliq(nBound)) - allocate(pade_sizereg_ssaliq(nBound)) - allocate(pade_sizereg_asyliq(nBound)) - allocate(pade_sizereg_extice(nBound)) - allocate(pade_sizereg_ssaice(nBound)) - allocate(pade_sizereg_asyice(nBound)) - endif - allocate(band_lims(2,nBand)) + ! Other processors waiting... + call mpi_barrier(mpicomm, mpierr) + + ! ####################################################################################### + ! + ! Broadcast dimensions... + ! (ALL processors) + ! + ! ####################################################################################### + call mpi_bcast(nBandLW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(nSize_liqLW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(nSize_iceLW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(nSizeregLW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(nCoeff_extLW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(nCoeff_ssa_gLW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(nBoundLW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(nPairsLW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) +#endif + + ! Has the number of ice-roughnesses to use been provided from the namelist? + ! If so, override nrghice from cloud-optics file + if (nrghice .ne. 0) nrghice_fromfileLW = nrghice +#ifdef MPI + call mpi_bcast(nrghice_fromfileLW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) +#endif + + ! ####################################################################################### + ! + ! Allocate space for arrays... + ! (ALL processors) + ! + ! ####################################################################################### + if (doGP_cldoptics_LUT) then + allocate(lut_extliqLW(nSize_liqLW, nBandLW)) + allocate(lut_ssaliqLW(nSize_liqLW, nBandLW)) + allocate(lut_asyliqLW(nSize_liqLW, nBandLW)) + allocate(lut_exticeLW(nSize_iceLW, nBandLW, nrghice_fromfileLW)) + allocate(lut_ssaiceLW(nSize_iceLW, nBandLW, nrghice_fromfileLW)) + allocate(lut_asyiceLW(nSize_iceLW, nBandLW, nrghice_fromfileLW)) + endif + if (doGP_cldoptics_PADE) then + allocate(pade_extliqLW(nBandLW, nSizeRegLW, nCoeff_extLW )) + allocate(pade_ssaliqLW(nBandLW, nSizeRegLW, nCoeff_ssa_gLW)) + allocate(pade_asyliqLW(nBandLW, nSizeRegLW, nCoeff_ssa_gLW)) + allocate(pade_exticeLW(nBandLW, nSizeRegLW, nCoeff_extLW, nrghice_fromfileLW)) + allocate(pade_ssaiceLW(nBandLW, nSizeRegLW, nCoeff_ssa_gLW, nrghice_fromfileLW)) + allocate(pade_asyiceLW(nBandLW, nSizeRegLW, nCoeff_ssa_gLW, nrghice_fromfileLW)) + allocate(pade_sizereg_extliqLW(nBoundLW)) + allocate(pade_sizereg_ssaliqLW(nBoundLW)) + allocate(pade_sizereg_asyliqLW(nBoundLW)) + allocate(pade_sizereg_exticeLW(nBoundLW)) + allocate(pade_sizereg_ssaiceLW(nBoundLW)) + allocate(pade_sizereg_asyiceLW(nBoundLW)) + endif + allocate(band_limsCLDLW(2,nBandLW)) + ! ####################################################################################### + ! + ! Read in data ... + ! (ONLY master processor(0), if MPI enabled) + ! + ! ####################################################################################### +#ifdef MPI + if (mpirank .eq. mpiroot) then +#endif ! Read in fields from file if (doGP_cldoptics_LUT) then write (*,*) 'Reading RRTMGP longwave cloud data (LUT) ... ' status = nf90_inq_varid(ncid,'radliq_lwr',varID) - status = nf90_get_var(ncid,varID,radliq_lwr) + status = nf90_get_var(ncid,varID,radliq_lwrLW) status = nf90_inq_varid(ncid,'radliq_upr',varID) - status = nf90_get_var(ncid,varID,radliq_upr) + status = nf90_get_var(ncid,varID,radliq_uprLW) status = nf90_inq_varid(ncid,'radliq_fac',varID) - status = nf90_get_var(ncid,varID,radliq_fac) + status = nf90_get_var(ncid,varID,radliq_facLW) status = nf90_inq_varid(ncid,'radice_lwr',varID) - status = nf90_get_var(ncid,varID,radice_lwr) + status = nf90_get_var(ncid,varID,radice_lwrLW) status = nf90_inq_varid(ncid,'radice_upr',varID) - status = nf90_get_var(ncid,varID,radice_upr) + status = nf90_get_var(ncid,varID,radice_uprLW) status = nf90_inq_varid(ncid,'radice_fac',varID) - status = nf90_get_var(ncid,varID,radice_fac) + status = nf90_get_var(ncid,varID,radice_facLW) status = nf90_inq_varid(ncid,'lut_extliq',varID) - status = nf90_get_var(ncid,varID,lut_extliq) + status = nf90_get_var(ncid,varID,lut_extliqLW) status = nf90_inq_varid(ncid,'lut_ssaliq',varID) - status = nf90_get_var(ncid,varID,lut_ssaliq) + status = nf90_get_var(ncid,varID,lut_ssaliqLW) status = nf90_inq_varid(ncid,'lut_asyliq',varID) - status = nf90_get_var(ncid,varID,lut_asyliq) + status = nf90_get_var(ncid,varID,lut_asyliqLW) status = nf90_inq_varid(ncid,'lut_extice',varID) - status = nf90_get_var(ncid,varID,lut_extice) + status = nf90_get_var(ncid,varID,lut_exticeLW) status = nf90_inq_varid(ncid,'lut_ssaice',varID) - status = nf90_get_var(ncid,varID,lut_ssaice) + status = nf90_get_var(ncid,varID,lut_ssaiceLW) status = nf90_inq_varid(ncid,'lut_asyice',varID) - status = nf90_get_var(ncid,varID,lut_asyice) + status = nf90_get_var(ncid,varID,lut_asyiceLW) status = nf90_inq_varid(ncid,'bnd_limits_wavenumber',varID) - status = nf90_get_var(ncid,varID,band_lims) + status = nf90_get_var(ncid,varID,band_limsCLDLW) endif if (doGP_cldoptics_PADE) then write (*,*) 'Reading RRTMGP longwave cloud data (PADE) ... ' status = nf90_inq_varid(ncid,'radliq_lwr',varID) - status = nf90_get_var(ncid,varID,radliq_lwr) + status = nf90_get_var(ncid,varID,radliq_lwrLW) status = nf90_inq_varid(ncid,'radliq_upr',varID) - status = nf90_get_var(ncid,varID,radliq_upr) + status = nf90_get_var(ncid,varID,radliq_uprLW) status = nf90_inq_varid(ncid,'radliq_fac',varID) - status = nf90_get_var(ncid,varID,radliq_fac) + status = nf90_get_var(ncid,varID,radliq_facLW) status = nf90_inq_varid(ncid,'radice_lwr',varID) - status = nf90_get_var(ncid,varID,radice_lwr) + status = nf90_get_var(ncid,varID,radice_lwrLW) status = nf90_inq_varid(ncid,'radice_upr',varID) - status = nf90_get_var(ncid,varID,radice_upr) + status = nf90_get_var(ncid,varID,radice_uprLW) status = nf90_inq_varid(ncid,'radice_fac',varID) - status = nf90_get_var(ncid,varID,radice_fac) + status = nf90_get_var(ncid,varID,radice_facLW) status = nf90_inq_varid(ncid,'pade_extliq',varID) - status = nf90_get_var(ncid,varID,pade_extliq) + status = nf90_get_var(ncid,varID,pade_extliqLW) status = nf90_inq_varid(ncid,'pade_ssaliq',varID) - status = nf90_get_var(ncid,varID,pade_ssaliq) + status = nf90_get_var(ncid,varID,pade_ssaliqLW) status = nf90_inq_varid(ncid,'pade_asyliq',varID) - status = nf90_get_var(ncid,varID,pade_asyliq) + status = nf90_get_var(ncid,varID,pade_asyliqLW) status = nf90_inq_varid(ncid,'pade_extice',varID) - status = nf90_get_var(ncid,varID,pade_extice) + status = nf90_get_var(ncid,varID,pade_exticeLW) status = nf90_inq_varid(ncid,'pade_ssaice',varID) - status = nf90_get_var(ncid,varID,pade_ssaice) + status = nf90_get_var(ncid,varID,pade_ssaiceLW) status = nf90_inq_varid(ncid,'pade_asyice',varID) - status = nf90_get_var(ncid,varID,pade_asyice) + status = nf90_get_var(ncid,varID,pade_asyiceLW) status = nf90_inq_varid(ncid,'pade_sizreg_extliq',varID) - status = nf90_get_var(ncid,varID,pade_sizereg_extliq) + status = nf90_get_var(ncid,varID,pade_sizereg_extliqLW) status = nf90_inq_varid(ncid,'pade_sizreg_ssaliq',varID) - status = nf90_get_var(ncid,varID,pade_sizereg_ssaliq) + status = nf90_get_var(ncid,varID,pade_sizereg_ssaliqLW) status = nf90_inq_varid(ncid,'pade_sizreg_asyliq',varID) - status = nf90_get_var(ncid,varID,pade_sizereg_asyliq) + status = nf90_get_var(ncid,varID,pade_sizereg_asyliqLW) status = nf90_inq_varid(ncid,'pade_sizreg_extice',varID) - status = nf90_get_var(ncid,varID,pade_sizereg_extice) + status = nf90_get_var(ncid,varID,pade_sizereg_exticeLW) status = nf90_inq_varid(ncid,'pade_sizreg_ssaice',varID) - status = nf90_get_var(ncid,varID,pade_sizereg_ssaice) + status = nf90_get_var(ncid,varID,pade_sizereg_ssaiceLW) status = nf90_inq_varid(ncid,'pade_sizreg_asyice',varID) - status = nf90_get_var(ncid,varID,pade_sizereg_asyice) + status = nf90_get_var(ncid,varID,pade_sizereg_asyiceLW) status = nf90_inq_varid(ncid,'bnd_limits_wavenumber',varID) - status = nf90_get_var(ncid,varID,band_lims) + status = nf90_get_var(ncid,varID,band_limsCLDLW) endif ! Close file status = nf90_close(ncid) -! endif - - ! Load tables data for RRTMGP cloud-optics +#ifdef MPI + endif ! Master process + + ! Other processors waiting... + call mpi_barrier(mpicomm, mpierr) + + ! ####################################################################################### + ! + ! Broadcast data... + ! (ALL processors) + ! + ! ####################################################################################### + + ! Real scalars + call mpi_bcast(radliq_facLW, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(radice_facLW, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(radliq_lwrLW, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(radliq_uprLW, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(radice_lwrLW, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(radice_uprLW, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + + ! Real arrays + call mpi_bcast(band_limsCLDLW, size(band_limsCLDLW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + if (doGP_cldoptics_LUT) then + call mpi_bcast(lut_extliqLW, size(lut_extliqLW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(lut_ssaliqLW, size(lut_ssaliqLW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(lut_asyliqLW, size(lut_asyliqLW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(lut_exticeLW, size(lut_exticeLW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(lut_ssaiceLW, size(lut_ssaiceLW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(lut_asyiceLW, size(lut_asyiceLW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + endif + if (doGP_cldoptics_PADE) then + call mpi_bcast(pade_extliqLW, size(pade_extliqLW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(pade_ssaliqLW, size(pade_ssaliqLW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(pade_asyliqLW, size(pade_asyliqLW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(pade_exticeLW, size(pade_exticeLW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(pade_ssaiceLW, size(pade_ssaiceLW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(pade_asyiceLW, size(pade_asyiceLW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(pade_sizereg_extliqLW, size(pade_sizereg_extliqLW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(pade_sizereg_ssaliqLW, size(pade_sizereg_ssaliqLW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(pade_sizereg_asyliqLW, size(pade_sizereg_asyliqLW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(pade_sizereg_exticeLW, size(pade_sizereg_exticeLW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(pade_sizereg_ssaiceLW, size(pade_sizereg_ssaiceLW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(pade_sizereg_asyiceLW, size(pade_sizereg_asyiceLW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + endif +#endif + + ! ####################################################################################### + ! + ! Initialize RRTMGP DDT's... + ! + ! ####################################################################################### if (doGP_cldoptics_LUT) then - call check_error_msg('lw_cloud_optics_init',lw_cloud_props%load(band_lims, & - radliq_lwr, radliq_upr, radliq_fac, radice_lwr, radice_upr, radice_fac, & - lut_extliq, lut_ssaliq, lut_asyliq, lut_extice, lut_ssaice, lut_asyice)) + call check_error_msg('lw_cloud_optics_init',lw_cloud_props%load(band_limsCLDLW, & + radliq_lwrLW, radliq_uprLW, radliq_facLW, radice_lwrLW, radice_uprLW, & + radice_facLW, lut_extliqLW, lut_ssaliqLW, lut_asyliqLW, lut_exticeLW, & + lut_ssaiceLW, lut_asyiceLW)) endif + if (doGP_cldoptics_PADE) then - call check_error_msg('lw_cloud_optics_init', lw_cloud_props%load(band_lims, & - pade_extliq, pade_ssaliq, pade_asyliq, pade_extice, pade_ssaice, pade_asyice,& - pade_sizereg_extliq, pade_sizereg_ssaliq, pade_sizereg_asyliq, & - pade_sizereg_extice, pade_sizereg_ssaice, pade_sizereg_asyice)) + call check_error_msg('lw_cloud_optics_init', lw_cloud_props%load(band_limsCLDLW, & + pade_extliqLW, pade_ssaliqLW, pade_asyliqLW, pade_exticeLW, pade_ssaiceLW, & + pade_asyiceLW, pade_sizereg_extliqLW, pade_sizereg_ssaliqLW, & + pade_sizereg_asyliqLW, pade_sizereg_exticeLW, pade_sizereg_ssaiceLW, & + pade_sizereg_asyiceLW)) endif + call check_error_msg('lw_cloud_optics_init',lw_cloud_props%set_ice_roughness(nrghice)) end subroutine rrtmgp_lw_cloud_optics_init @@ -277,9 +383,9 @@ end subroutine rrtmgp_lw_cloud_optics_init !! \htmlinclude rrtmgp_lw_cloud_optics.html !! subroutine rrtmgp_lw_cloud_optics_run(doLWrad, doG_cldoptics, icliq_lw, icice_lw, & - doGP_cldoptics_PADE, doGP_cldoptics_LUT, doGP_lwscat, nCol, nLev, nrghice, p_lay, & - cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, & - cld_rerain, precip_frac, lw_cloud_props, lw_gas_props, lon, lat, cldtaulw, & + doGP_cldoptics_PADE, doGP_cldoptics_LUT, doGP_lwscat, nCol, nLev, nbndsGPlw, & + p_lay, cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, & + cld_rwp, cld_rerain, precip_frac, lon, lat, cldtaulw, & lw_optical_props_cloudsByBand, lw_optical_props_precipByBand, errmsg, errflg) ! Inputs @@ -290,9 +396,9 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, doG_cldoptics, icliq_lw, icice_lw doGP_cldoptics_LUT, & ! Use RRTMGP cloud-optics: LUTs? doGP_lwscat ! Include scattering in LW cloud-optics? integer, intent(in) :: & + nbndsGPlw, & ! Number of longwave bands nCol, & ! Number of horizontal gridpoints nLev, & ! Number of vertical levels - nrghice, & ! Number of ice-roughness categories icliq_lw, & ! Choice of treatment of liquid cloud optical properties (RRTMG legacy) icice_lw ! Choice of treatment of ice cloud optical properties (RRTMG legacy) real(kind_phys), dimension(nCol), intent(in) :: & @@ -310,10 +416,6 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, doG_cldoptics, icliq_lw, icice_lw cld_rwp, & ! Cloud rain water path cld_rerain, & ! Cloud rain effective radius precip_frac ! Precipitation fraction by layer. - type(ty_cloud_optics),intent(in) :: & - lw_cloud_props ! RRTMGP DDT: spectral information for RRTMGP LW radiation scheme - type(ty_gas_optics_rrtmgp),intent(in) :: & - lw_gas_props ! RRTMGP DDT: spectral information for RRTMGP LW radiation scheme ! Outputs character(len=*), intent(out) :: & @@ -328,7 +430,7 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, doG_cldoptics, icliq_lw, icice_lw ! Local variables real(kind_phys) :: tau_rain, tau_snow - real(kind_phys), dimension(ncol,nLev,lw_gas_props%get_nband()) :: & + real(kind_phys), dimension(ncol,nLev,nbndsGPlw) :: & tau_cld, tau_precip integer :: iCol, iLay, iBand @@ -342,23 +444,18 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, doG_cldoptics, icliq_lw, icice_lw if (.not. doLWrad) return - ! Allocate space for RRTMGP DDTs containing cloud radiative properties - ! Cloud optics [nCol,nLev,nBands] - call check_error_msg('rrtmgp_lw_cloud_optics_run',lw_optical_props_cloudsByBand%alloc_2str(& - ncol, nLev, lw_gas_props%get_band_lims_wavenumber())) - lw_optical_props_cloudsByBand%tau(:,:,:) = 0._kind_phys - lw_optical_props_cloudsByBand%ssa(:,:,:) = 1._kind_phys - lw_optical_props_cloudsByBand%g(:,:,:) = 0._kind_phys - - ! Precipitation optics [nCol,nLev,nBands] - call check_error_msg('rrtmgp_lw_cloud_optics_run',lw_optical_props_precipByBand%alloc_2str(& - ncol, nLev, lw_gas_props%get_band_lims_wavenumber())) - lw_optical_props_precipByBand%tau(:,:,:) = 0._kind_phys - lw_optical_props_precipByBand%ssa(:,:,:) = 1._kind_phys - lw_optical_props_precipByBand%g(:,:,:) = 0._kind_phys + lw_optical_props_cloudsByBand%band_lims_wvn = lw_gas_props%get_band_lims_wavenumber() + lw_optical_props_precipByBand%band_lims_wvn = lw_gas_props%get_band_lims_wavenumber() + do iBand=1,lw_gas_props%get_nband() + lw_optical_props_cloudsByBand%band2gpt(1:2,iBand) = iBand + lw_optical_props_cloudsByBand%band2gpt(1:2,iBand) = iBand + lw_optical_props_precipByBand%gpt2band(iBand) = iBand + lw_optical_props_precipByBand%gpt2band(iBand) = iBand + end do ! Compute cloud-optics for RTE. if (doGP_cldoptics_PADE .or. doGP_cldoptics_LUT) then + ! i) RRTMGP cloud-optics. call check_error_msg('rrtmgp_lw_cloud_optics_run',lw_cloud_props%cloud_optics(& cld_lwp, & ! IN - Cloud liquid water path (g/m2) @@ -380,7 +477,7 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, doG_cldoptics, icliq_lw, icice_lw else tau_snow = 0.0 endif - do iBand=1,lw_gas_props%get_nband() + do iBand=1,nbndsGPlw lw_optical_props_precipByBand%tau(iCol,iLay,iBand) = tau_rain + tau_snow enddo endif @@ -390,9 +487,9 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, doG_cldoptics, icliq_lw, icice_lw if (doG_cldoptics) then ! ii) RRTMG cloud-optics. if (any(cld_frac .gt. 0)) then - call rrtmg_lw_cloud_optics(ncol, nLev, lw_gas_props%get_nband(), cld_lwp, & - cld_reliq, cld_iwp, cld_reice, cld_rwp, cld_rerain, cld_swp, cld_resnow, & - cld_frac, icliq_lw, icice_lw, tau_cld, tau_precip) + call rrtmg_lw_cloud_optics(ncol, nLev, nbndsGPlw, cld_lwp, cld_reliq, cld_iwp,& + cld_reice, cld_rwp, cld_rerain, cld_swp, cld_resnow, cld_frac, icliq_lw, & + icice_lw, tau_cld, tau_precip) lw_optical_props_cloudsByBand%tau = tau_cld lw_optical_props_precipByBand%tau = tau_precip endif diff --git a/physics/rrtmgp_lw_cloud_optics.meta b/physics/rrtmgp_lw_cloud_optics.meta index c57e70a33..09d79a388 100644 --- a/physics/rrtmgp_lw_cloud_optics.meta +++ b/physics/rrtmgp_lw_cloud_optics.meta @@ -1,7 +1,7 @@ [ccpp-table-properties] name = rrtmgp_lw_cloud_optics type = scheme - dependencies = machine.F,rrtmg_lw_cloud_optics.F90,rrtmgp_aux.F90 + dependencies = machine.F,rrtmg_lw_cloud_optics.F90,radiation_tools.F90 ######################################################################## [ccpp-arg-table] @@ -32,7 +32,7 @@ intent = in optional = F [nrghice] - standard_name = number_of_rrtmgp_ice_roughness + standard_name = number_of_ice_roughness_categories long_name = number of ice-roughness categories in RRTMGP calculation units = count dimensions = () @@ -49,7 +49,7 @@ optional = F kind = len=128 [rrtmgp_lw_file_clouds] - standard_name = rrtmgp_coeff_lw_cloud_optics + standard_name = filename_of_rrtmgp_longwave_cloud_optics_coefficients long_name = file containing coefficients for RRTMGP LW cloud optics units = none dimensions = () @@ -74,7 +74,7 @@ intent = in optional = F [mpicomm] - standard_name = mpi_comm + standard_name = mpi_communicator long_name = MPI communicator units = index dimensions = () @@ -98,21 +98,13 @@ type = integer intent = out optional = F -[lw_cloud_props] - standard_name = coefficients_for_lw_cloud_optics - long_name = DDT containing spectral information for RRTMGP LW radiation scheme - units = DDT - dimensions = () - type = ty_cloud_optics - intent = out - optional = F ######################################################################## [ccpp-arg-table] name = rrtmgp_lw_cloud_optics_run type = scheme [doLWrad] - standard_name = flag_to_calc_lw + standard_name = flag_for_calling_longwave_radiation long_name = logical flags for lw radiation calls units = flag dimensions = () @@ -176,26 +168,18 @@ intent = in optional = F [nLev] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () type = integer intent = in optional = F -[nrghice] - standard_name = number_of_rrtmgp_ice_roughness - long_name = number of ice-roughness categories in RRTMGP calculation - units = count - dimensions = () - type = integer - intent = in - optional = F [cld_frac] standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real intent = in kind = kind_phys @@ -203,7 +187,7 @@ standard_name = cloud_liquid_water_path long_name = layer cloud liquid water path units = g m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real intent = in kind = kind_phys @@ -211,7 +195,7 @@ standard_name = mean_effective_radius_for_liquid_cloud long_name = mean effective radius for liquid cloud units = um - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real intent = in kind = kind_phys @@ -219,7 +203,7 @@ standard_name = cloud_ice_water_path long_name = layer cloud ice water path units = g m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real intent = in kind = kind_phys @@ -227,7 +211,7 @@ standard_name = mean_effective_radius_for_ice_cloud long_name = mean effective radius for ice cloud units = um - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real intent = in kind = kind_phys @@ -235,7 +219,7 @@ standard_name = cloud_snow_water_path long_name = cloud snow water path units = g m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real intent = in kind = kind_phys @@ -243,7 +227,7 @@ standard_name = mean_effective_radius_for_snow_flake long_name = mean effective radius for snow flake units = um - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real intent = in kind = kind_phys @@ -251,7 +235,7 @@ standard_name = cloud_rain_water_path long_name = cloud rain water path units = g m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real intent = in kind = kind_phys @@ -259,7 +243,7 @@ standard_name = mean_effective_radius_for_rain_drop long_name = mean effective radius for rain drop units = um - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real intent = in kind = kind_phys @@ -267,7 +251,7 @@ standard_name = precipitation_fraction_by_layer long_name = precipitation fraction in each layer units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -276,26 +260,18 @@ standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure layer units = hPa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F -[lw_gas_props] - standard_name = coefficients_for_lw_gas_optics - long_name = DDT containing spectral information for RRTMGP LW radiation scheme - units = DDT - dimensions = () - intent = in - type = ty_gas_optics_rrtmgp - optional = F -[lw_cloud_props] - standard_name = coefficients_for_lw_cloud_optics - long_name = DDT containing spectral information for RRTMGP LW radiation scheme - units = DDT - dimensions = () +[nbndsGPlw] + standard_name = number_of_longwave_bands + long_name = number of lw bands used in RRTMGP + units = count + dimensions = () + type = integer intent = in - type = ty_cloud_optics optional = F [lon] standard_name = longitude @@ -319,7 +295,7 @@ standard_name = RRTMGP_cloud_optical_depth_layers_at_10mu_band long_name = approx 10mu band layer cloud optical depth units = none - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -330,7 +306,7 @@ units = DDT dimensions = () type = ty_optical_props_2str - intent = out + intent = inout optional = F [lw_optical_props_precipByBand] standard_name = longwave_optical_properties_for_precipitation_by_band @@ -338,7 +314,7 @@ units = DDT dimensions = () type = ty_optical_props_2str - intent = out + intent = inout optional = F [errmsg] standard_name = ccpp_error_message diff --git a/physics/rrtmgp_lw_cloud_sampling.F90 b/physics/rrtmgp_lw_cloud_sampling.F90 index 902a4e20f..0f4459487 100644 --- a/physics/rrtmgp_lw_cloud_sampling.F90 +++ b/physics/rrtmgp_lw_cloud_sampling.F90 @@ -4,7 +4,8 @@ module rrtmgp_lw_cloud_sampling use mo_optical_props, only: ty_optical_props_2str use rrtmgp_sampling, only: sampled_mask, draw_samples use mersenne_twister, only: random_setseed, random_number, random_stat - use rrtmgp_aux, only: check_error_msg + use radiation_tools, only: check_error_msg + use rrtmgp_lw_gas_optics, only: lw_gas_props use netcdf implicit none @@ -17,10 +18,7 @@ module rrtmgp_lw_cloud_sampling !! \section arg_table_rrtmgp_lw_cloud_sampling_init !! \htmlinclude rrtmgp_lw_cloud_sampling_init.html !! - subroutine rrtmgp_lw_cloud_sampling_init(lw_gas_props, ipsdlw0, errmsg, errflg) - ! Inputs - type(ty_gas_optics_rrtmgp),intent(in) :: & - lw_gas_props ! RRTMGP DDT: K-distribution data + subroutine rrtmgp_lw_cloud_sampling_init(ipsdlw0, errmsg, errflg) ! Outputs integer, intent(out) :: & ipsdlw0 ! Initial permutation seed for McICA @@ -46,7 +44,7 @@ end subroutine rrtmgp_lw_cloud_sampling_init !! subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, iovr, & iovr_max, iovr_maxrand, iovr_rand, iovr_dcorr, iovr_exp, iovr_exprand, isubc_lw, & - cld_frac, precip_frac, cloud_overlap_param, precip_overlap_param, lw_gas_props, & + cld_frac, precip_frac, cloud_overlap_param, precip_overlap_param, & doGP_lwscat, lw_optical_props_cloudsByBand, lw_optical_props_precipByBand, & lw_optical_props_clouds, lw_optical_props_precip, errmsg, errflg) @@ -77,8 +75,6 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, real(kind_phys), dimension(ncol,nLev), intent(in) :: & cloud_overlap_param, & ! Cloud overlap parameter precip_overlap_param ! Precipitation overlap parameter - type(ty_gas_optics_rrtmgp),intent(in) :: & - lw_gas_props ! RRTMGP DDT: K-distribution data type(ty_optical_props_2str),intent(in) :: & lw_optical_props_cloudsByBand, & ! RRTMGP DDT: Longwave optical properties in each band (clouds) lw_optical_props_precipByBand ! RRTMGP DDT: Longwave optical properties in each band (precipitation) @@ -88,12 +84,12 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, errmsg ! CCPP error message integer, intent(out) :: & errflg ! CCPP error code - type(ty_optical_props_2str),intent(out) :: & + type(ty_optical_props_2str),intent(inout) :: & lw_optical_props_clouds, & ! RRTMGP DDT: Shortwave optical properties by spectral point (clouds) lw_optical_props_precip ! RRTMGP DDT: Shortwave optical properties by spectral point (precipitation) ! Local variables - integer :: iCol, iLay + integer :: iCol, iLay, iBand integer,dimension(ncol) :: ipseed_lw type(random_stat) :: rng_stat real(kind_phys), dimension(lw_gas_props%get_ngpt(),nLev,ncol) :: rng3D,rng3D2 @@ -110,12 +106,11 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, ! #################################################################################### ! First sample the clouds... ! #################################################################################### - - ! Allocate space RRTMGP DDTs [nCol,nLev,nGpt] - call check_error_msg('rrtmgp_lw_cloud_sampling_run',& - lw_optical_props_clouds%alloc_2str(nCol, nLev, lw_gas_props)) - lw_optical_props_clouds%tau(:,:,:) = 0._kind_phys - lw_optical_props_clouds%ssa(:,:,:) = 0._kind_phys + lw_optical_props_clouds%band2gpt = lw_gas_props%get_band_lims_gpoint() + lw_optical_props_clouds%band_lims_wvn = lw_gas_props%get_band_lims_wavenumber() + do iBand=1,lw_gas_props%get_nband() + lw_optical_props_clouds%gpt2band(lw_optical_props_clouds%band2gpt(1,iBand):lw_optical_props_clouds%band2gpt(2,iBand)) = iBand + end do ! Change random number seed value for each radiation invocation (isubc_lw =1 or 2). if(isubc_lw == 1) then ! advance prescribed permutation seed @@ -180,13 +175,12 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, ! #################################################################################### ! Next sample the precipitation... ! #################################################################################### - - ! Allocate space RRTMGP DDTs [nCol,nLev,nGpt] - call check_error_msg('rrtmgp_lw_cloud_sampling_run',& - lw_optical_props_precip%alloc_2str(nCol, nLev, lw_gas_props)) - lw_optical_props_precip%tau(:,:,:) = 0._kind_phys - lw_optical_props_precip%ssa(:,:,:) = 0._kind_phys - + lw_optical_props_precip%band2gpt = lw_gas_props%get_band_lims_gpoint() + lw_optical_props_precip%band_lims_wvn = lw_gas_props%get_band_lims_wavenumber() + do iBand=1,lw_gas_props%get_nband() + lw_optical_props_precip%gpt2band(lw_optical_props_precip%band2gpt(1,iBand):lw_optical_props_precip%band2gpt(2,iBand)) = iBand + end do + ! Change random number seed value for each radiation invocation (isubc_lw =1 or 2). if(isubc_lw == 1) then ! advance prescribed permutation seed do iCol = 1, ncol diff --git a/physics/rrtmgp_lw_cloud_sampling.meta b/physics/rrtmgp_lw_cloud_sampling.meta index 2438f715c..c22304bf4 100644 --- a/physics/rrtmgp_lw_cloud_sampling.meta +++ b/physics/rrtmgp_lw_cloud_sampling.meta @@ -1,20 +1,12 @@ [ccpp-table-properties] name = rrtmgp_lw_cloud_sampling type = scheme - dependencies = machine.F,mersenne_twister.f,physparam.f,rrtmgp_sampling.F90,rrtmgp_aux.F90 + dependencies = machine.F,mersenne_twister.f,physparam.f,rrtmgp_sampling.F90,radiation_tools.F90 ######################################################################## [ccpp-arg-table] name = rrtmgp_lw_cloud_sampling_init type = scheme -[lw_gas_props] - standard_name = coefficients_for_lw_gas_optics - long_name = DDT containing spectral information for RRTMGP LW radiation scheme - units = DDT - dimensions = () - type = ty_gas_optics_rrtmgp - intent = in - optional = F [ipsdlw0] standard_name = initial_permutation_seed_lw long_name = initial seed for McICA LW @@ -46,7 +38,7 @@ name = rrtmgp_lw_cloud_sampling_run type = scheme [doLWrad] - standard_name = flag_to_calc_lw + standard_name = flag_for_calling_longwave_radiation long_name = logical flags for lw radiation calls units = flag dimensions = () @@ -70,7 +62,7 @@ intent = in optional = F [nLev] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () @@ -150,7 +142,7 @@ intent = in optional = F [icseed_lw] - standard_name = seed_random_numbers_lw + standard_name = random_number_seed_for_mcica_longwave long_name = seed for random number generation for longwave radiation units = none dimensions = (horizontal_loop_extent) @@ -161,7 +153,7 @@ standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -170,7 +162,7 @@ standard_name = precipitation_fraction_by_layer long_name = precipitation fraction in each layer units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -179,7 +171,7 @@ standard_name = cloud_overlap_param long_name = cloud overlap parameter units = km - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -188,18 +180,10 @@ standard_name = precip_overlap_param long_name = precipitation overlap parameter units = km - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in - optional = F -[lw_gas_props] - standard_name = coefficients_for_lw_gas_optics - long_name = DDT containing spectral information for RRTMGP LW radiation scheme - units = DDT - dimensions = () - type = ty_gas_optics_rrtmgp - intent = in optional = F [lw_optical_props_cloudsByBand] standard_name = longwave_optical_properties_for_cloudy_atmosphere_by_band @@ -223,7 +207,7 @@ units = DDT dimensions = () type = ty_optical_props_2str - intent = out + intent = inout optional = F [lw_optical_props_precip] standard_name = longwave_optical_properties_for_precipitation @@ -231,7 +215,7 @@ units = DDT dimensions = () type = ty_optical_props_2str - intent = out + intent = inout optional = F [errmsg] standard_name = ccpp_error_message diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index f8a01b982..a116ad772 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -5,31 +5,85 @@ module rrtmgp_lw_gas_optics use mo_gas_concentrations, only: ty_gas_concs use mo_source_functions, only: ty_source_func_lw use mo_optical_props, only: ty_optical_props_1scl - use mo_compute_bc, only: compute_bc - use rrtmgp_aux, only: check_error_msg + use radiation_tools, only: check_error_msg + use GFS_rrtmgp_pre, only: active_gases_array use netcdf +#ifdef MPI + use mpi +#endif implicit none + type(ty_gas_optics_rrtmgp) :: lw_gas_props + integer :: & + ntempsLW, npressLW, ngptsLW, nabsorbersLW, nextrabsorbersLW, nminorabsorbersLW,& + nmixingfracsLW, nlayersLW, nbndsLW, npairsLW, ninternalSourcetempsLW, & + nminor_absorber_intervals_lowerLW, nminor_absorber_intervals_upperLW, & + ncontributors_lowerLW, ncontributors_upperLW, nfit_coeffsLW + integer, dimension(:), allocatable :: & + kminor_start_lowerLW, & ! Starting index in the [1, nContributors] vector for a contributor + ! given by \"minor_gases_lower\" (lower atmosphere) + kminor_start_upperLW ! Starting index in the [1, nContributors] vector for a contributor + ! given by \"minor_gases_upper\" (upper atmosphere) + integer, dimension(:,:), allocatable :: & + band2gptLW, & ! Beginning and ending gpoint for each band + minor_limits_gpt_lowerLW, & ! Beginning and ending gpoint for each minor interval in lower atmosphere + minor_limits_gpt_upperLW ! Beginning and ending gpoint for each minor interval in upper atmosphere + integer, dimension(:,:,:), allocatable :: & + key_speciesLW ! Key species pair for each band + real(kind_phys) :: & + press_ref_tropLW, & ! Reference pressure separating the lower and upper atmosphere [Pa] + temp_ref_pLW, & ! Standard spectroscopic reference pressure [Pa] + temp_ref_tLW ! Standard spectroscopic reference temperature [K] + real(kind_phys), dimension(:), allocatable :: & + press_refLW, & ! Pressures for reference atmosphere; press_ref(# reference layers) [Pa] + temp_refLW ! Temperatures for reference atmosphere; temp_ref(# reference layers) [K] + real(kind_phys), dimension(:,:), allocatable :: & + band_limsLW, & ! Beginning and ending wavenumber [cm -1] for each band + totplnkLW, & ! Integrated Planck function by band + optimal_angle_fitLW + real(kind_phys), dimension(:,:,:), allocatable :: & + vmr_refLW, & ! volume mixing ratios for reference atmospherer + kminor_lowerLW, & ! (transformed from [nTemp x nEta x nGpt x nAbsorbers] array to + ! [nTemp x nEta x nContributors] array) + kminor_upperLW, & ! (transformed from [nTemp x nEta x nGpt x nAbsorbers] array to + ! [nTemp x nEta x nContributors] array) + rayl_lowerLW, & ! Not used in LW, rather allocated(rayl_lower) is used + rayl_upperLW ! Not used in LW, rather allocated(rayl_upper) is used + real(kind_phys), dimension(:,:,:,:), allocatable :: & + kmajorLW, & ! Stored absorption coefficients due to major absorbing gases + planck_fracLW ! Planck fractions + character(len=32), dimension(:), allocatable :: & + gas_namesLW, & ! Names of absorbing gases + gas_minorLW, & ! Name of absorbing minor gas + identifier_minorLW, & ! Unique string identifying minor gas + minor_gases_lowerLW, & ! Names of minor absorbing gases in lower atmosphere + minor_gases_upperLW, & ! Names of minor absorbing gases in upper atmosphere + scaling_gas_lowerLW, & ! Absorption also depends on the concentration of this gas + scaling_gas_upperLW ! Absorption also depends on the concentration of this gas + logical(wl), dimension(:), allocatable :: & + minor_scales_with_density_lowerLW, & ! Density scaling is applied to minor absorption coefficients + minor_scales_with_density_upperLW, & ! Density scaling is applied to minor absorption coefficients + scale_by_complement_lowerLW, & ! Absorption is scaled by concentration of scaling_gas (F) or its complement (T) + scale_by_complement_upperLW ! Absorption is scaled by concentration of scaling_gas (F) or its complement (T) + contains ! ######################################################################################### - ! SUBROUTINE rrtmgp_sw_gas_optics_init + ! SUBROUTINE rrtmgp_lw_gas_optics_init ! ######################################################################################### !! \section arg_table_rrtmgp_lw_gas_optics_init !! \htmlinclude rrtmgp_lw_gas_optics_init.html !! - subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp_nGases, & - active_gases_array, mpicomm, mpirank, mpiroot, lw_gas_props, errmsg, errflg) + subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, mpicomm, & + mpirank, mpiroot, gas_concentrations, minGPpres, minGPtemp, errmsg, errflg) ! Inputs + type(ty_gas_concs), intent(inout) :: & + gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) character(len=128),intent(in) :: & rrtmgp_root_dir, & ! RTE-RRTMGP root directory rrtmgp_lw_file_gas ! RRTMGP file containing coefficients used to compute gaseous optical properties - integer, intent(in) :: & - rrtmgp_nGases ! Number of trace gases active in RRTMGP - character(len=*),dimension(rrtmgp_nGases), intent(in) :: & - active_gases_array ! Character array containing trace gases to include in RRTMGP integer,intent(in) :: & mpicomm, & ! MPI communicator mpirank, & ! Current MPI rank @@ -40,68 +94,12 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp errmsg ! CCPP error message integer, intent(out) :: & errflg ! CCPP error code - type(ty_gas_optics_rrtmgp),intent(out) :: & - lw_gas_props ! RRTMGP DDT: longwave spectral information - - ! Variables that will be passed to gas_optics%load() - type(ty_gas_concs) :: & - gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) - integer, dimension(:), allocatable :: & - kminor_start_lower, & ! Starting index in the [1, nContributors] vector for a contributor - ! given by \"minor_gases_lower\" (lower atmosphere) - kminor_start_upper ! Starting index in the [1, nContributors] vector for a contributor - ! given by \"minor_gases_upper\" (upper atmosphere) - integer, dimension(:,:), allocatable :: & - band2gpt, & ! Beginning and ending gpoint for each band - minor_limits_gpt_lower, & ! Beginning and ending gpoint for each minor interval in lower atmosphere - minor_limits_gpt_upper ! Beginning and ending gpoint for each minor interval in upper atmosphere - integer, dimension(:,:,:), allocatable :: & - key_species ! Key species pair for each band - real(kind_phys) :: & - press_ref_trop, & ! Reference pressure separating the lower and upper atmosphere [Pa] - temp_ref_p, & ! Standard spectroscopic reference pressure [Pa] - temp_ref_t ! Standard spectroscopic reference temperature [K] - real(kind_phys), dimension(:), allocatable :: & - press_ref, & ! Pressures for reference atmosphere; press_ref(# reference layers) [Pa] - temp_ref ! Temperatures for reference atmosphere; temp_ref(# reference layers) [K] - real(kind_phys), dimension(:,:), allocatable :: & - band_lims, & ! Beginning and ending wavenumber [cm -1] for each band - totplnk, & ! Integrated Planck function by band - optimal_angle_fit - real(kind_phys), dimension(:,:,:), allocatable :: & - vmr_ref, & ! volume mixing ratios for reference atmosphere - kminor_lower, & ! (transformed from [nTemp x nEta x nGpt x nAbsorbers] array to - ! [nTemp x nEta x nContributors] array) - kminor_upper, & ! (transformed from [nTemp x nEta x nGpt x nAbsorbers] array to - ! [nTemp x nEta x nContributors] array) - rayl_lower, & ! Not used in LW, rather allocated(rayl_lower) is used - rayl_upper ! Not used in LW, rather allocated(rayl_upper) is used - real(kind_phys), dimension(:,:,:,:), allocatable :: & - kmajor, & ! Stored absorption coefficients due to major absorbing gases - planck_frac ! Planck fractions - character(len=32), dimension(:), allocatable :: & - gas_names, & ! Names of absorbing gases - gas_minor, & ! Name of absorbing minor gas - identifier_minor, & ! Unique string identifying minor gas - minor_gases_lower, & ! Names of minor absorbing gases in lower atmosphere - minor_gases_upper, & ! Names of minor absorbing gases in upper atmosphere - scaling_gas_lower, & ! Absorption also depends on the concentration of this gas - scaling_gas_upper ! Absorption also depends on the concentration of this gas - logical(wl), dimension(:), allocatable :: & - minor_scales_with_density_lower, & ! Density scaling is applied to minor absorption coefficients - minor_scales_with_density_upper, & ! Density scaling is applied to minor absorption coefficients - scale_by_complement_lower, & ! Absorption is scaled by concentration of scaling_gas (F) or its complement (T) - scale_by_complement_upper ! Absorption is scaled by concentration of scaling_gas (F) or its complement (T) - - ! Dimensions - integer :: & - ntemps, npress, ngpts, nabsorbers, nextrabsorbers, nminorabsorbers,& - nmixingfracs, nlayers, nbnds, npairs, ninternalSourcetemps, & - nminor_absorber_intervals_lower, nminor_absorber_intervals_upper, & - ncontributors_lower, ncontributors_upper,nfit_coeffs + real(kind_phys), intent(out) :: & + minGPtemp, & ! Minimum temperature allowed by RRTMGP. + minGPpres ! Minimum pressure allowed by RRTMGP. ! Local variables - integer :: ncid, dimID, varID, status, iGas, ierr + integer :: ncid, dimID, varID, status, iGas, ierr, ii, mpierr, iChar integer,dimension(:),allocatable :: temp1, temp2, temp3, temp4, & temp_log_array1, temp_log_array2, temp_log_array3, temp_log_array4 character(len=264) :: lw_gas_props_file @@ -113,165 +111,345 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp ! Filenames are set in the physics_nml lw_gas_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_lw_file_gas) - ! On master processor only... -! if (mpirank .eq. mpiroot) then + ! ####################################################################################### + ! + ! Read dimensions for k-distribution fields... + ! (ONLY master processor(0), if MPI enabled) + ! + ! ####################################################################################### +#ifdef MPI + if (mpirank .eq. mpiroot) then +#endif + write (*,*) 'Reading RRTMGP longwave k-distribution metadata ... ' + ! Open file status = nf90_open(trim(lw_gas_props_file), NF90_NOWRITE, ncid) ! Read dimensions for k-distribution fields status = nf90_inq_dimid(ncid, 'temperature', dimid) - status = nf90_inquire_dimension(ncid, dimid, len = ntemps) + status = nf90_inquire_dimension(ncid, dimid, len = ntempsLW) status = nf90_inq_dimid(ncid, 'pressure', dimid) - status = nf90_inquire_dimension(ncid, dimid, len = npress) + status = nf90_inquire_dimension(ncid, dimid, len = npressLW) status = nf90_inq_dimid(ncid, 'absorber', dimid) - status = nf90_inquire_dimension(ncid, dimid, len = nabsorbers) + status = nf90_inquire_dimension(ncid, dimid, len = nabsorbersLW) status = nf90_inq_dimid(ncid, 'minor_absorber', dimid) - status = nf90_inquire_dimension(ncid, dimid, len = nminorabsorbers) + status = nf90_inquire_dimension(ncid, dimid, len = nminorabsorbersLW) status = nf90_inq_dimid(ncid, 'absorber_ext', dimid) - status = nf90_inquire_dimension(ncid, dimid, len = nextrabsorbers) + status = nf90_inquire_dimension(ncid, dimid, len = nextrabsorbersLW) status = nf90_inq_dimid(ncid, 'mixing_fraction', dimid) - status = nf90_inquire_dimension(ncid, dimid, len = nmixingfracs) + status = nf90_inquire_dimension(ncid, dimid, len = nmixingfracsLW) status = nf90_inq_dimid(ncid, 'atmos_layer', dimid) - status = nf90_inquire_dimension(ncid, dimid, len = nlayers) + status = nf90_inquire_dimension(ncid, dimid, len = nlayersLW) status = nf90_inq_dimid(ncid, 'bnd', dimid) - status = nf90_inquire_dimension(ncid, dimid, len = nbnds) + status = nf90_inquire_dimension(ncid, dimid, len = nbndsLW) status = nf90_inq_dimid(ncid, 'gpt', dimid) - status = nf90_inquire_dimension(ncid, dimid, len = ngpts) + status = nf90_inquire_dimension(ncid, dimid, len = ngptsLW) status = nf90_inq_dimid(ncid, 'pair', dimid) - status = nf90_inquire_dimension(ncid, dimid, len = npairs) + status = nf90_inquire_dimension(ncid, dimid, len = npairsLW) status = nf90_inq_dimid(ncid, 'contributors_lower', dimid) - status = nf90_inquire_dimension(ncid, dimid, len = ncontributors_lower) + status = nf90_inquire_dimension(ncid, dimid, len = ncontributors_lowerLW) status = nf90_inq_dimid(ncid, 'contributors_upper', dimid) - status = nf90_inquire_dimension(ncid, dimid, len = ncontributors_upper) + status = nf90_inquire_dimension(ncid, dimid, len = ncontributors_upperLW) status = nf90_inq_dimid(ncid, 'fit_coeffs', dimid) - status = nf90_inquire_dimension(ncid, dimid, len = nfit_coeffs) + status = nf90_inquire_dimension(ncid, dimid, len = nfit_coeffsLW) status = nf90_inq_dimid(ncid, 'minor_absorber_intervals_lower', dimid) - status = nf90_inquire_dimension(ncid, dimid, len = nminor_absorber_intervals_lower) + status = nf90_inquire_dimension(ncid, dimid, len = nminor_absorber_intervals_lowerLW) status = nf90_inq_dimid(ncid, 'minor_absorber_intervals_upper', dimid) - status = nf90_inquire_dimension(ncid, dimid, len = nminor_absorber_intervals_upper) + status = nf90_inquire_dimension(ncid, dimid, len = nminor_absorber_intervals_upperLW) status = nf90_inq_dimid(ncid, 'temperature_Planck', dimid) - status = nf90_inquire_dimension(ncid, dimid, len = ninternalSourcetemps) - - ! Allocate space for arrays - allocate(gas_names(nabsorbers)) - allocate(scaling_gas_lower(nminor_absorber_intervals_lower)) - allocate(scaling_gas_upper(nminor_absorber_intervals_upper)) - allocate(gas_minor(nminorabsorbers)) - allocate(identifier_minor(nminorabsorbers)) - allocate(minor_gases_lower(nminor_absorber_intervals_lower)) - allocate(minor_gases_upper(nminor_absorber_intervals_upper)) - allocate(minor_limits_gpt_lower(npairs,nminor_absorber_intervals_lower)) - allocate(minor_limits_gpt_upper(npairs,nminor_absorber_intervals_upper)) - allocate(band2gpt(2,nbnds)) - allocate(key_species(2,nlayers,nbnds)) - allocate(band_lims(2,nbnds)) - allocate(press_ref(npress)) - allocate(temp_ref(ntemps)) - allocate(vmr_ref(nlayers, nextrabsorbers, ntemps)) - allocate(kminor_lower(ncontributors_lower, nmixingfracs, ntemps)) - allocate(kmajor(ngpts, nmixingfracs, npress+1, ntemps)) - allocate(kminor_start_lower(nminor_absorber_intervals_lower)) - allocate(kminor_upper(ncontributors_upper, nmixingfracs, ntemps)) - allocate(kminor_start_upper(nminor_absorber_intervals_upper)) - allocate(optimal_angle_fit(nfit_coeffs,nbnds)) - allocate(minor_scales_with_density_lower(nminor_absorber_intervals_lower)) - allocate(minor_scales_with_density_upper(nminor_absorber_intervals_upper)) - allocate(scale_by_complement_lower(nminor_absorber_intervals_lower)) - allocate(scale_by_complement_upper(nminor_absorber_intervals_upper)) - allocate(temp1(nminor_absorber_intervals_lower)) - allocate(temp2(nminor_absorber_intervals_upper)) - allocate(temp3(nminor_absorber_intervals_lower)) - allocate(temp4(nminor_absorber_intervals_upper)) - allocate(totplnk(ninternalSourcetemps, nbnds)) - allocate(planck_frac(ngpts, nmixingfracs, npress+1, ntemps)) - - ! Read in fields from file - if (mpirank==mpiroot) write (*,*) 'Reading RRTMGP longwave k-distribution data ... ' + status = nf90_inquire_dimension(ncid, dimid, len = ninternalSourcetempsLW) +#ifdef MPI + endif ! On master processor + + ! Other processors waiting... + call mpi_barrier(mpicomm, mpierr) + + ! ####################################################################################### + ! + ! Broadcast dimensions... + ! (ALL processors) + ! + ! ####################################################################################### + call mpi_bcast(ntempsLW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(npressLW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(ngptsLW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(nabsorbersLW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(nextrabsorbersLW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(nminorabsorbersLW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(nmixingfracsLW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(nlayersLW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(nbndsLW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(npairsLW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(ninternalSourcetempsLW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(nminor_absorber_intervals_lowerLW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(nminor_absorber_intervals_upperLW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(ncontributors_lowerLW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(ncontributors_upperLW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(nfit_coeffsLW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) +#endif + + ! Allocate space for arrays + if (.not. allocated(gas_namesLW)) & + allocate(gas_namesLW(nabsorbersLW)) + if (.not. allocated(scaling_gas_lowerLW)) & + allocate(scaling_gas_lowerLW(nminor_absorber_intervals_lowerLW)) + if (.not. allocated(scaling_gas_upperLW)) & + allocate(scaling_gas_upperLW(nminor_absorber_intervals_upperLW)) + if (.not. allocated(gas_minorLW)) & + allocate(gas_minorLW(nminorabsorbersLW)) + if (.not. allocated(identifier_minorLW)) & + allocate(identifier_minorLW(nminorabsorbersLW)) + if (.not. allocated(minor_gases_lowerLW)) & + allocate(minor_gases_lowerLW(nminor_absorber_intervals_lowerLW)) + if (.not. allocated(minor_gases_upperLW)) & + allocate(minor_gases_upperLW(nminor_absorber_intervals_upperLW)) + if (.not. allocated(minor_limits_gpt_lowerLW)) & + allocate(minor_limits_gpt_lowerLW(npairsLW, nminor_absorber_intervals_lowerLW)) + if (.not. allocated(minor_limits_gpt_upperLW)) & + allocate(minor_limits_gpt_upperLW(npairsLW, nminor_absorber_intervals_upperLW)) + if (.not. allocated(band2gptLW)) & + allocate(band2gptLW(2, nbndsLW)) + if (.not. allocated(key_speciesLW)) & + allocate(key_speciesLW(2, nlayersLW, nbndsLW)) + if (.not. allocated(band_limsLW)) & + allocate(band_limsLW(2, nbndsLW)) + if (.not. allocated(press_refLW)) & + allocate(press_refLW(npressLW)) + if (.not. allocated(temp_refLW)) & + allocate(temp_refLW(ntempsLW)) + if (.not. allocated(vmr_refLW)) & + allocate(vmr_refLW(nlayersLW, nextrabsorbersLW, ntempsLW)) + if (.not. allocated(kminor_lowerLW)) & + allocate(kminor_lowerLW(ncontributors_lowerLW, nmixingfracsLW, ntempsLW)) + if (.not. allocated(kmajorLW)) & + allocate(kmajorLW(ngptsLW, nmixingfracsLW, npressLW+1, ntempsLW)) + if (.not. allocated(kminor_start_lowerLW)) & + allocate(kminor_start_lowerLW(nminor_absorber_intervals_lowerLW)) + if (.not. allocated(kminor_upperLW)) & + allocate(kminor_upperLW(ncontributors_upperLW, nmixingfracsLW, ntempsLW)) + if (.not. allocated(kminor_start_upperLW)) & + allocate(kminor_start_upperLW(nminor_absorber_intervals_upperLW)) + if (.not. allocated(optimal_angle_fitLW)) & + allocate(optimal_angle_fitLW(nfit_coeffsLW, nbndsLW)) + if (.not. allocated(minor_scales_with_density_lowerLW)) & + allocate(minor_scales_with_density_lowerLW(nminor_absorber_intervals_lowerLW)) + if (.not. allocated(minor_scales_with_density_upperLW)) & + allocate(minor_scales_with_density_upperLW(nminor_absorber_intervals_upperLW)) + if (.not. allocated(scale_by_complement_lowerLW)) & + allocate(scale_by_complement_lowerLW(nminor_absorber_intervals_lowerLW)) + if (.not. allocated(scale_by_complement_upperLW)) & + allocate(scale_by_complement_upperLW(nminor_absorber_intervals_upperLW)) + if (.not. allocated(temp1)) & + allocate(temp1(nminor_absorber_intervals_lowerLW)) + if (.not. allocated(temp2)) & + allocate(temp2(nminor_absorber_intervals_upperLW)) + if (.not. allocated(temp3)) & + allocate(temp3(nminor_absorber_intervals_lowerLW)) + if (.not. allocated(temp4)) & + allocate(temp4(nminor_absorber_intervals_upperLW)) + if (.not. allocated(totplnkLW)) & + allocate(totplnkLW(ninternalSourcetempsLW, nbndsLW)) + if (.not. allocated(planck_fracLW)) & + allocate(planck_fracLW(ngptsLW, nmixingfracsLW, npressLW+1, ntempsLW)) + + ! ####################################################################################### + ! + ! Read in data ... + ! (ONLY master processor(0), if MPI enabled) + ! + ! ####################################################################################### +#ifdef MPI + if (mpirank .eq. mpiroot) then +#endif + write (*,*) 'Reading RRTMGP longwave k-distribution data ... ' status = nf90_inq_varid(ncid, 'gas_names', varID) - status = nf90_get_var( ncid, varID, gas_names) + status = nf90_get_var( ncid, varID, gas_namesLW) status = nf90_inq_varid(ncid, 'scaling_gas_lower', varID) - status = nf90_get_var( ncid, varID, scaling_gas_lower) + status = nf90_get_var( ncid, varID, scaling_gas_lowerLW) status = nf90_inq_varid(ncid, 'scaling_gas_upper', varID) - status = nf90_get_var( ncid, varID, scaling_gas_upper) + status = nf90_get_var( ncid, varID, scaling_gas_upperLW) status = nf90_inq_varid(ncid, 'gas_minor', varID) - status = nf90_get_var( ncid, varID, gas_minor) + status = nf90_get_var( ncid, varID, gas_minorLW) status = nf90_inq_varid(ncid, 'identifier_minor', varID) - status = nf90_get_var( ncid, varID, identifier_minor) + status = nf90_get_var( ncid, varID, identifier_minorLW) status = nf90_inq_varid(ncid, 'minor_gases_lower', varID) - status = nf90_get_var( ncid, varID, minor_gases_lower) + status = nf90_get_var( ncid, varID, minor_gases_lowerLW) status = nf90_inq_varid(ncid, 'minor_gases_upper', varID) - status = nf90_get_var( ncid, varID, minor_gases_upper) + status = nf90_get_var( ncid, varID, minor_gases_upperLW) status = nf90_inq_varid(ncid, 'minor_limits_gpt_lower', varID) - status = nf90_get_var( ncid, varID, minor_limits_gpt_lower) + status = nf90_get_var( ncid, varID, minor_limits_gpt_lowerLW) status = nf90_inq_varid(ncid, 'minor_limits_gpt_upper', varID) - status = nf90_get_var( ncid, varID, minor_limits_gpt_upper) + status = nf90_get_var( ncid, varID, minor_limits_gpt_upperLW) status = nf90_inq_varid(ncid, 'bnd_limits_gpt', varID) - status = nf90_get_var( ncid, varID, band2gpt) + status = nf90_get_var( ncid, varID, band2gptLW) status = nf90_inq_varid(ncid, 'key_species', varID) - status = nf90_get_var( ncid, varID, key_species) + status = nf90_get_var( ncid, varID, key_speciesLW) status = nf90_inq_varid(ncid, 'bnd_limits_wavenumber', varID) - status = nf90_get_var( ncid, varID, band_lims) + status = nf90_get_var( ncid, varID, band_limsLW) status = nf90_inq_varid(ncid, 'press_ref', varID) - status = nf90_get_var( ncid, varID, press_ref) + status = nf90_get_var( ncid, varID, press_refLW) status = nf90_inq_varid(ncid, 'temp_ref', varID) - status = nf90_get_var( ncid, varID, temp_ref) + status = nf90_get_var( ncid, varID, temp_refLW) status = nf90_inq_varid(ncid, 'absorption_coefficient_ref_P', varID) - status = nf90_get_var( ncid, varID, temp_ref_p) + status = nf90_get_var( ncid, varID, temp_ref_pLW) status = nf90_inq_varid(ncid, 'absorption_coefficient_ref_T', varID) - status = nf90_get_var( ncid, varID, temp_ref_t) + status = nf90_get_var( ncid, varID, temp_ref_tLW) status = nf90_inq_varid(ncid, 'press_ref_trop', varID) - status = nf90_get_var( ncid, varID, press_ref_trop) + status = nf90_get_var( ncid, varID, press_ref_tropLW) status = nf90_inq_varid(ncid, 'kminor_lower', varID) - status = nf90_get_var( ncid, varID, kminor_lower) + status = nf90_get_var( ncid, varID, kminor_lowerLW) status = nf90_inq_varid(ncid, 'kminor_upper', varID) - status = nf90_get_var( ncid, varID, kminor_upper) + status = nf90_get_var( ncid, varID, kminor_upperLW) status = nf90_inq_varid(ncid, 'vmr_ref', varID) - status = nf90_get_var( ncid, varID, vmr_ref) + status = nf90_get_var( ncid, varID, vmr_refLW) status = nf90_inq_varid(ncid, 'optimal_angle_fit',varID) - status = nf90_get_var( ncid, varID, optimal_angle_fit) + status = nf90_get_var( ncid, varID, optimal_angle_fitLW) status = nf90_inq_varid(ncid, 'kmajor', varID) - status = nf90_get_var( ncid, varID, kmajor) + status = nf90_get_var( ncid, varID, kmajorLW) status = nf90_inq_varid(ncid, 'kminor_start_lower', varID) - status = nf90_get_var( ncid, varID, kminor_start_lower) + status = nf90_get_var( ncid, varID, kminor_start_lowerLW) status = nf90_inq_varid(ncid, 'kminor_start_upper', varID) - status = nf90_get_var( ncid, varID, kminor_start_upper) + status = nf90_get_var( ncid, varID, kminor_start_upperLW) status = nf90_inq_varid(ncid, 'totplnk', varID) - status = nf90_get_var( ncid, varID, totplnk) + status = nf90_get_var( ncid, varID, totplnkLW) status = nf90_inq_varid(ncid, 'plank_fraction', varID) - status = nf90_get_var( ncid, varID, planck_frac) - + status = nf90_get_var( ncid, varID, planck_fracLW) + ! Logical fields are read in as integers and then converted to logicals. - status = nf90_inq_varid(ncid, 'minor_scales_with_density_lower', varID) + status = nf90_inq_varid(ncid,'minor_scales_with_density_lower', varID) status = nf90_get_var( ncid, varID,temp1) - minor_scales_with_density_lower(:) = .false. - where(temp1 .eq. 1) minor_scales_with_density_lower(:) = .true. - status = nf90_inq_varid(ncid, 'minor_scales_with_density_upper', varID) + status = nf90_inq_varid(ncid,'minor_scales_with_density_upper', varID) status = nf90_get_var( ncid, varID,temp2) - minor_scales_with_density_upper(:) = .false. - where(temp2 .eq. 1) minor_scales_with_density_upper(:) = .true. - status = nf90_inq_varid(ncid, 'scale_by_complement_lower', varID) + status = nf90_inq_varid(ncid,'scale_by_complement_lower', varID) status = nf90_get_var( ncid, varID,temp3) - scale_by_complement_lower(:) = .false. - where(temp3 .eq. 1) scale_by_complement_lower(:) = .true. - status = nf90_inq_varid(ncid, 'scale_by_complement_upper', varID) + status = nf90_inq_varid(ncid,'scale_by_complement_upper', varID) status = nf90_get_var( ncid, varID,temp4) - scale_by_complement_upper(:) = .false. - where(temp4 .eq. 1) scale_by_complement_upper(:) = .true. - - ! Close file - status = nf90_close(ncid) -! endif - - ! Initialize gas concentrations and gas optics class - call check_error_msg('lw_gas_optics_init',gas_concentrations%init(active_gases_array)) - call check_error_msg('lw_gas_optics_init',lw_gas_props%load(gas_concentrations, gas_names, & - key_species, band2gpt, band_lims, press_ref, press_ref_trop, temp_ref, temp_ref_p, & - temp_ref_t, vmr_ref, kmajor, kminor_lower, kminor_upper, gas_minor, identifier_minor, & - minor_gases_lower, minor_gases_upper, minor_limits_gpt_lower, minor_limits_gpt_upper, & - minor_scales_with_density_lower, minor_scales_with_density_upper, scaling_gas_lower, & - scaling_gas_upper, scale_by_complement_lower, scale_by_complement_upper, & - kminor_start_lower, kminor_start_upper, totplnk, planck_frac, rayl_lower, rayl_upper, & - optimal_angle_fit)) + status = nf90_close(ncid) + + do ii=1,nminor_absorber_intervals_lowerLW + if (temp1(ii) .eq. 0) minor_scales_with_density_lowerLW(ii) = .false. + if (temp1(ii) .eq. 1) minor_scales_with_density_lowerLW(ii) = .true. + if (temp3(ii) .eq. 0) scale_by_complement_lowerLW(ii) = .false. + if (temp3(ii) .eq. 1) scale_by_complement_lowerLW(ii) = .true. + enddo + do ii=1,nminor_absorber_intervals_upperLW + if (temp2(ii) .eq. 0) minor_scales_with_density_upperLW(ii) = .false. + if (temp2(ii) .eq. 1) minor_scales_with_density_upperLW(ii) = .true. + if (temp4(ii) .eq. 0) scale_by_complement_upperLW(ii) = .false. + if (temp4(ii) .eq. 1) scale_by_complement_upperLW(ii) = .true. + enddo +#ifdef MPI + endif ! Master process + + ! Other processors waiting... + call mpi_barrier(mpicomm, mpierr) + + ! ####################################################################################### + ! + ! Broadcast data... + ! (ALL processors) + ! + ! ####################################################################################### + + ! Real scalars + call mpi_bcast(press_ref_tropLW, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(temp_ref_pLW, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(temp_ref_tLW, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + + ! Integer arrays + call mpi_bcast(kminor_start_lowerLW, & + size(kminor_start_lowerLW), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(kminor_start_upperLW, & + size(kminor_start_upperLW), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(band2gptLW, & + size(band2gptLW), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(minor_limits_gpt_lowerLW, & + size(minor_limits_gpt_lowerLW), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(minor_limits_gpt_upperLW, & + size(minor_limits_gpt_upperLW), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(key_speciesLW, & + size(key_speciesLW), MPI_INTEGER, mpiroot, mpicomm, mpierr) + + ! Real arrays + call mpi_bcast(press_refLW, & + size(press_refLW), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(temp_refLW, & + size(temp_refLW), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(band_limsLW, & + size(band_limsLW), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(totplnkLW, & + size(totplnkLW), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(optimal_angle_fitLW, & + size(optimal_angle_fitLW), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(vmr_refLW, & + size(vmr_refLW), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(kminor_lowerLW, & + size(kminor_lowerLW), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(kminor_upperLW, & + size(kminor_upperLW), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(kmajorLW, & + size(kmajorLW), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(planck_fracLW, & + size(planck_fracLW), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + + + ! Characters + do iChar=1,nabsorbersLW + call mpi_bcast(gas_namesLW(iChar), & + len(gas_namesLW(iChar)), MPI_CHARACTER, mpiroot, mpicomm, mpierr) + enddo + do iChar=1,nminorabsorbersLW + call mpi_bcast(gas_minorLW(iChar), & + len(gas_minorLW(iChar)), MPI_CHARACTER, mpiroot, mpicomm, mpierr) + call mpi_bcast(identifier_minorLW(iChar), & + len(identifier_minorLW(iChar)), MPI_CHARACTER, mpiroot, mpicomm, mpierr) + enddo + do iChar=1,nminor_absorber_intervals_lowerLW + call mpi_bcast(minor_gases_lowerLW(iChar), & + len(minor_gases_lowerLW(iChar)), MPI_CHARACTER, mpiroot, mpicomm, mpierr) + call mpi_bcast(scaling_gas_lowerLW(iChar), & + len(scaling_gas_lowerLW(iChar)), MPI_CHARACTER, mpiroot, mpicomm, mpierr) + enddo + do iChar=1,nminor_absorber_intervals_upperLW + call mpi_bcast(minor_gases_upperLW(iChar), & + len(minor_gases_upperLW(iChar)), MPI_CHARACTER, mpiroot, mpicomm, mpierr) + call mpi_bcast(scaling_gas_upperLW(iChar), & + len(scaling_gas_upperLW(iChar)), MPI_CHARACTER, mpiroot, mpicomm, mpierr) + enddo + + ! Logicals + call mpi_bcast(minor_scales_with_density_lowerLW, & + size(minor_scales_with_density_lowerLW), MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call mpi_bcast(minor_scales_with_density_upperLW, & + size(minor_scales_with_density_upperLW), MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call mpi_bcast(scale_by_complement_lowerLW, & + size(scale_by_complement_lowerLW), MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call mpi_bcast(scale_by_complement_upperLW, & + size(scale_by_complement_upperLW), MPI_LOGICAL, mpiroot, mpicomm, mpierr) + + call mpi_barrier(mpicomm, mpierr) +#endif + + ! ####################################################################################### + ! + ! Initialize RRTMGP DDT's... + ! + ! ####################################################################################### + gas_concentrations%gas_name(:) = active_gases_array(:) + call check_error_msg('rrtmgp_lw_gas_optics_init',lw_gas_props%load(gas_concentrations, & + gas_namesLW, key_speciesLW, band2gptLW, band_limsLW, press_refLW, press_ref_tropLW,& + temp_refLW, temp_ref_pLW, temp_ref_tLW, vmr_refLW, kmajorLW, kminor_lowerLW, & + kminor_upperLW, gas_minorLW, identifier_minorLW, minor_gases_lowerLW, & + minor_gases_upperLW, minor_limits_gpt_lowerLW, minor_limits_gpt_upperLW, & + minor_scales_with_density_lowerLW, minor_scales_with_density_upperLW, & + scaling_gas_lowerLW, scaling_gas_upperLW, scale_by_complement_lowerLW, & + scale_by_complement_upperLW, kminor_start_lowerLW, kminor_start_upperLW, totplnkLW,& + planck_fracLW, rayl_lowerLW, rayl_upperLW, optimal_angle_fitLW)) + + ! The minimum pressure allowed in GP RTE calculations. Used to bound uppermost layer + ! temperature (GFS_rrtmgp_pre.F90) + minGPpres = lw_gas_props%get_press_min() + minGPtemp = lw_gas_props%get_temp_min() end subroutine rrtmgp_lw_gas_optics_init @@ -281,8 +459,8 @@ end subroutine rrtmgp_lw_gas_optics_init !! \section arg_table_rrtmgp_lw_gas_optics_run !! \htmlinclude rrtmgp_lw_gas_optics_run.html !! - subroutine rrtmgp_lw_gas_optics_run(doLWrad, nCol, nLev, lw_gas_props, p_lay, p_lev, t_lay,& - t_lev, tsfg, gas_concentrations, lw_optical_props_clrsky, sources, errmsg, errflg) + subroutine rrtmgp_lw_gas_optics_run(doLWrad, nCol, nLev, p_lay, p_lev, t_lay, t_lev, tsfg,& + gas_concentrations, lw_optical_props_clrsky, sources, errmsg, errflg) ! Inputs logical, intent(in) :: & @@ -290,8 +468,6 @@ subroutine rrtmgp_lw_gas_optics_run(doLWrad, nCol, nLev, lw_gas_props, p_lay, p_ integer,intent(in) :: & ncol, & ! Number of horizontal points nLev ! Number of vertical levels - type(ty_gas_optics_rrtmgp),intent(in) :: & - lw_gas_props ! RRTMGP DDT: real(kind_phys), dimension(ncol,nLev), intent(in) :: & p_lay, & ! Pressure @ model layer-centers (hPa) t_lay ! Temperature (K) @@ -308,10 +484,13 @@ subroutine rrtmgp_lw_gas_optics_run(doLWrad, nCol, nLev, lw_gas_props, p_lay, p_ errmsg ! CCPP error message integer, intent(out) :: & errflg ! CCPP error code - type(ty_optical_props_1scl),intent(out) :: & + type(ty_optical_props_1scl),intent(inout) :: & lw_optical_props_clrsky ! RRTMGP DDT: longwave clear-sky radiative properties - type(ty_source_func_lw),intent(out) :: & + type(ty_source_func_lw),intent(inout) :: & sources ! RRTMGP DDT: longwave source functions + + ! Local + integer :: ii ! Initialize CCPP error handling variables errmsg = '' @@ -319,9 +498,15 @@ subroutine rrtmgp_lw_gas_optics_run(doLWrad, nCol, nLev, lw_gas_props, p_lay, p_ if (.not. doLWrad) return - ! Allocate and initialize - call check_error_msg('rrtmgp_lw_gas_optics_run',lw_optical_props_clrsky%alloc_1scl(ncol, nLev, lw_gas_props)) - call check_error_msg('rrtmgp_lw_gas_optics_run',sources%alloc(ncol, nLev, lw_gas_props)) + ! Copy spectral information into GP DDTs. + lw_optical_props_clrsky%band2gpt = lw_gas_props%get_band_lims_gpoint() + sources%band2gpt = lw_gas_props%get_band_lims_gpoint() + sources%band_lims_wvn = lw_gas_props%get_band_lims_wavenumber() + lw_optical_props_clrsky%band_lims_wvn = lw_gas_props%get_band_lims_wavenumber() + do ii=1,nbndsLW + lw_optical_props_clrsky%gpt2band(band2gptLW(1,ii):band2gptLW(2,ii)) = ii + sources%gpt2band(band2gptLW(1,ii):band2gptLW(2,ii)) = ii + end do ! Gas-optics call check_error_msg('rrtmgp_lw_gas_optics_run',lw_gas_props%gas_optics(& diff --git a/physics/rrtmgp_lw_gas_optics.meta b/physics/rrtmgp_lw_gas_optics.meta index 3eab78be2..b0c58b191 100644 --- a/physics/rrtmgp_lw_gas_optics.meta +++ b/physics/rrtmgp_lw_gas_optics.meta @@ -1,8 +1,7 @@ [ccpp-table-properties] name = rrtmgp_lw_gas_optics type = scheme - dependencies = machine.F,rte-rrtmgp/extensions/mo_compute_bc.F90,rte-rrtmgp/rte/mo_fluxes.F90,rte-rrtmgp/rte/kernels/mo_fluxes_broadband_kernels.F90 - dependencies = rte-rrtmgp/rte/mo_rte_lw.F90,rte-rrtmgp/rte/mo_rte_sw.F90,rte-rrtmgp/rte/kernels/mo_rte_solver_kernels.F90,rrtmgp_aux.F90 + dependencies = machine.F,radiation_tools.F90,GFS_rrtmgp_pre.F90,rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90,rte-rrtmgp/rte/mo_rte_kind.F90,rte-rrtmgp/rrtmgp/mo_gas_concentrations.F90,rte-rrtmgp/rte/mo_optical_props.F90,rte-rrtmgp/rte/mo_source_functions.F90 ######################################################################## [ccpp-arg-table] @@ -18,7 +17,7 @@ optional = F kind = len=128 [rrtmgp_lw_file_gas] - standard_name = rrtmgp_kdistribution_lw + standard_name = filename_of_rrtmgp_longwave_k_distribution long_name = file containing RRTMGP LW k-distribution units = none dimensions = () @@ -26,22 +25,13 @@ intent = in optional = F kind = len=128 -[rrtmgp_nGases] - standard_name = number_of_active_gases_used_by_RRTMGP - long_name = number of gases available used by RRTMGP - units = count - dimensions = () - type = integer - intent = in - optional = F -[active_gases_array] - standard_name = list_of_active_gases_used_by_RRTMGP - long_name = list of active gases used by RRTMGP - units = none - dimensions = (number_of_active_gases_used_by_RRTMGP) - type = character - kind = len=* - intent = in +[gas_concentrations] + standard_name = Gas_concentrations_for_RRTMGP_suite + long_name = DDT containing gas concentrations for RRTMGP radiation scheme + units = DDT + dimensions = () + type = ty_gas_concs + intent = inout optional = F [mpirank] standard_name = mpi_rank @@ -60,7 +50,7 @@ intent = in optional = F [mpicomm] - standard_name = mpi_comm + standard_name = mpi_communicator long_name = MPI communicator units = index dimensions = () @@ -84,12 +74,22 @@ type = integer intent = out optional = F -[lw_gas_props] - standard_name = coefficients_for_lw_gas_optics - long_name = DDT containing spectral information for RRTMGP LW radiation scheme - units = DDT +[minGPpres] + standard_name = minimum_pressure_in_RRTMGP + long_name = minimum pressure allowed in RRTMGP + units = Pa dimensions = () - type = ty_gas_optics_rrtmgp + type = real + kind = kind_phys + intent = out + optional = F +[minGPtemp] + standard_name = minimum_temperature_in_RRTMGP + long_name = minimum temperature allowed in RRTMGP + units = K + dimensions = () + type = real + kind = kind_phys intent = out optional = F @@ -98,7 +98,7 @@ name = rrtmgp_lw_gas_optics_run type = scheme [doLWrad] - standard_name = flag_to_calc_lw + standard_name = flag_for_calling_longwave_radiation long_name = flag to calculate LW irradiances units = flag dimensions = () @@ -114,26 +114,18 @@ intent = in optional = F [nLev] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () type = integer intent = in optional = F -[lw_gas_props] - standard_name = coefficients_for_lw_gas_optics - long_name = DDT containing spectral information for RRTMGP LW radiation scheme - units = DDT - dimensions = () - type = ty_gas_optics_rrtmgp - intent = in - optional = F [p_lay] standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure layer units = hPa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -142,7 +134,7 @@ standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure level units = hPa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -151,7 +143,7 @@ standard_name = air_temperature_at_layer_for_RRTMGP long_name = air temperature layer units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -160,7 +152,7 @@ standard_name = air_temperature_at_interface_for_RRTMGP long_name = air temperature level units = K - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -188,7 +180,7 @@ units = DDT dimensions = () type = ty_optical_props_1scl - intent = out + intent = inout optional = F [sources] standard_name = longwave_source_function @@ -196,7 +188,7 @@ units = DDT dimensions = () type = ty_source_func_lw - intent = out + intent = inout optional = F [errmsg] standard_name = ccpp_error_message diff --git a/physics/rrtmgp_lw_pre.F90 b/physics/rrtmgp_lw_pre.F90 index 358e49bee..99318c1b8 100644 --- a/physics/rrtmgp_lw_pre.F90 +++ b/physics/rrtmgp_lw_pre.F90 @@ -5,6 +5,7 @@ module rrtmgp_lw_pre setemis ! Routine to compute surface-emissivity use mo_gas_optics_rrtmgp, only: & ty_gas_optics_rrtmgp + use rrtmgp_lw_gas_optics, only: lw_gas_props implicit none @@ -24,36 +25,21 @@ end subroutine rrtmgp_lw_pre_init !> \section arg_table_rrtmgp_lw_pre_run !! \htmlinclude rrtmgp_lw_pre_run.html !! - subroutine rrtmgp_lw_pre_run (doLWrad, nCol, xlon, xlat, slmsk, zorl, snowd, sncovr, & - tsfg, tsfa, hprime, lw_gas_props, sfc_emiss_byband, semis, errmsg, errflg) - + subroutine rrtmgp_lw_pre_run (doLWrad, semis, sfc_emiss_byband, errmsg, errflg) + ! Inputs logical, intent(in) :: & - doLWrad ! Logical flag for longwave radiation call - integer, intent(in) :: & - nCol ! Number of horizontal grid points - real(kind_phys), dimension(nCol), intent(in) :: & - xlon, & ! Longitude - xlat, & ! Latitude - slmsk, & ! Land/sea/sea-ice mask - zorl, & ! Surface roughness length (cm) - snowd, & ! water equivalent snow depth (mm) - sncovr, & ! Surface snow are fraction (1) - tsfg, & ! Surface ground temperature for radiation (K) - tsfa, & ! Lowest model layer air temperature for radiation (K) - hprime ! Standard deviation of subgrid orography - type(ty_gas_optics_rrtmgp),intent(in) :: & - lw_gas_props ! RRTMGP DDT: spectral information for LW calculation + doLWrad + real(kind_phys), dimension(:), intent(in) :: & + semis - ! Outputs - real(kind_phys), dimension(lw_gas_props%get_nband(),ncol), intent(out) :: & + ! Outputs + real(kind_phys), dimension(:,:), intent(inout) :: & sfc_emiss_byband ! Surface emissivity in each band character(len=*), intent(out) :: & errmsg ! Error message integer, intent(out) :: & errflg ! Error flag - real(kind_phys), dimension(nCol), intent(out) :: & - semis ! Local variables integer :: iBand @@ -61,13 +47,8 @@ subroutine rrtmgp_lw_pre_run (doLWrad, nCol, xlon, xlat, slmsk, zorl, snowd, snc ! Initialize CCPP error handling variables errmsg = '' errflg = 0 - - if (.not. doLWrad) return - ! ####################################################################################### - ! Call module_radiation_surface::setemis(),to setup surface emissivity for LW radiation. - ! ####################################################################################### - call setemis (xlon, xlat, slmsk, snowd, sncovr, zorl, tsfg, tsfa, hprime, nCol, semis) + if (.not. doLWrad) return ! Assign same emissivity to all bands do iBand=1,lw_gas_props%get_nband() diff --git a/physics/rrtmgp_lw_pre.meta b/physics/rrtmgp_lw_pre.meta index 1f329dd8d..071f1944a 100644 --- a/physics/rrtmgp_lw_pre.meta +++ b/physics/rrtmgp_lw_pre.meta @@ -8,110 +8,13 @@ name = rrtmgp_lw_pre_run type = scheme [doLWrad] - standard_name = flag_to_calc_lw + standard_name = flag_for_calling_longwave_radiation long_name = logical flags for lw radiation calls units = flag dimensions = () type = logical intent = in optional = F -[nCol] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent - units = count - dimensions = () - type = integer - intent = in - optional = F -[xlon] - standard_name = longitude - long_name = longitude - units = radian - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[xlat] - standard_name = latitude - long_name = latitude - units = radian - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[slmsk] - standard_name = sea_land_ice_mask_real - long_name = landmask: sea/land/ice=0/1/2 - units = flag - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[zorl] - standard_name = surface_roughness_length - long_name = surface roughness length - units = cm - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[snowd] - standard_name = surface_snow_thickness_water_equivalent - long_name = water equivalent snow depth - units = mm - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[sncovr] - standard_name = surface_snow_area_fraction_over_land - long_name = surface snow area fraction - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[tsfg] - standard_name = surface_ground_temperature_for_radiation - long_name = surface ground temperature for radiation - units = K - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[tsfa] - standard_name = surface_air_temperature_for_radiation - long_name = lowest model layer air temperature for radiation - units = K - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[hprime] - standard_name = standard_deviation_of_subgrid_orography - long_name = standard deviation of subgrid orography - units = m - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[lw_gas_props] - standard_name = coefficients_for_lw_gas_optics - long_name = DDT containing spectral information for RRTMGP LW radiation scheme - units = DDT - dimensions = () - type = ty_gas_optics_rrtmgp - intent = in - optional = F [semis] standard_name = surface_longwave_emissivity long_name = surface lw emissivity in fraction @@ -119,16 +22,16 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = out + intent = in optional = F [sfc_emiss_byband] standard_name = surface_emissivity_in_each_RRTMGP_LW_band long_name = surface emissivity in each RRTMGP LW band units = none - dimensions = (number_of_lw_bands_rrtmgp,horizontal_loop_extent) + dimensions = (number_of_longwave_bands,horizontal_loop_extent) type = real kind = kind_phys - intent = out + intent = inout optional = F [errmsg] standard_name = ccpp_error_message diff --git a/physics/rrtmgp_lw_rte.F90 b/physics/rrtmgp_lw_rte.F90 index 321214a02..ea50653ac 100644 --- a/physics/rrtmgp_lw_rte.F90 +++ b/physics/rrtmgp_lw_rte.F90 @@ -9,8 +9,8 @@ module rrtmgp_lw_rte use mo_rte_lw, only: rte_lw use mo_fluxes_byband, only: ty_fluxes_byband use mo_source_functions, only: ty_source_func_lw - use rrtmgp_aux, only: check_error_msg - + use radiation_tools, only: check_error_msg + use rrtmgp_lw_gas_optics, only: lw_gas_props implicit none public rrtmgp_lw_rte_init, rrtmgp_lw_rte_run, rrtmgp_lw_rte_finalize @@ -28,10 +28,10 @@ end subroutine rrtmgp_lw_rte_init !! \section arg_table_rrtmgp_lw_rte_run !! \htmlinclude rrtmgp_lw_rte_run.html !! - subroutine rrtmgp_lw_rte_run(doLWrad, doLWclrsky, use_LW_jacobian, doGP_lwscat, nCol, & - nLev, p_lev, lw_gas_props, sfc_emiss_byband, sources, lw_optical_props_clrsky, & - lw_optical_props_clouds, lw_optical_props_aerosol, nGauss_angles, fluxlwUP_allsky, & - fluxlwDOWN_allsky, fluxlwUP_clrsky, fluxlwDOWN_clrsky, sfculw_jac, errmsg, errflg) + subroutine rrtmgp_lw_rte_run(doLWrad, doLWclrsky, use_LW_jacobian, doGP_lwscat, nCol, & + nLev, p_lev, sfc_emiss_byband, sources, lw_optical_props_clrsky, & + lw_optical_props_clouds, lw_optical_props_aerosol, nGauss_angles, fluxlwUP_allsky, & + fluxlwDOWN_allsky, fluxlwUP_clrsky, fluxlwDOWN_clrsky, fluxlwUP_jac, errmsg, errflg) ! Inputs logical, intent(in) :: & @@ -45,8 +45,6 @@ subroutine rrtmgp_lw_rte_run(doLWrad, doLWclrsky, use_LW_jacobian, doGP_lwscat, nGauss_angles ! Number of angles used in Gaussian quadrature real(kind_phys), dimension(ncol,nLev+1), intent(in) :: & p_lev ! Pressure @ model layer-interfaces (hPa) - type(ty_gas_optics_rrtmgp),intent(in) :: & - lw_gas_props ! RRTMGP DDT: longwave spectral information real(kind_phys), dimension(lw_gas_props%get_nband(),ncol), intent(in) :: & sfc_emiss_byband ! Surface emissivity in each band type(ty_source_func_lw),intent(in) :: & @@ -58,9 +56,8 @@ subroutine rrtmgp_lw_rte_run(doLWrad, doLWclrsky, use_LW_jacobian, doGP_lwscat, lw_optical_props_clouds ! RRTMGP DDT: longwave cloud radiative properties ! Outputs - real(kind_phys), dimension(ncol), intent(inout) :: & - sfculw_jac ! Jacobian of upwelling LW surface radiation (W/m2/K) real(kind_phys), dimension(ncol,nLev+1), intent(inout) :: & + fluxlwUP_jac, & ! Jacobian of upwelling LW surface radiation (W/m2/K) fluxlwUP_allsky, & ! All-sky flux (W/m2) fluxlwDOWN_allsky, & ! All-sky flux (W/m2) fluxlwUP_clrsky, & ! Clear-sky flux (W/m2) @@ -75,10 +72,10 @@ subroutine rrtmgp_lw_rte_run(doLWrad, doLWclrsky, use_LW_jacobian, doGP_lwscat, flux_allsky, flux_clrsky real(kind_phys), dimension(ncol,nLev+1,lw_gas_props%get_nband()),target :: & fluxLW_up_allsky, fluxLW_up_clrsky, fluxLW_dn_allsky, fluxLW_dn_clrsky - real(kind_phys), dimension(nCol,nLev+1) :: fluxlwUP_jac,fluxlwDOWN_jac logical :: & top_at_1 integer :: iSFC, iTOA + real(kind_phys), dimension(nCol,lw_gas_props%get_ngpt()) :: lw_Ds ! Initialize CCPP error handling variables errmsg = '' @@ -107,17 +104,27 @@ subroutine rrtmgp_lw_rte_run(doLWrad, doLWclrsky, use_LW_jacobian, doGP_lwscat, ! ! Add aerosol optics to gas optics call check_error_msg('rrtmgp_lw_rte_run',lw_optical_props_aerosol%increment(lw_optical_props_clrsky)) - call lw_optical_props_aerosol%finalize() ! Call RTE solver if (doLWclrsky) then - call check_error_msg('rrtmgp_lw_rte_run',rte_lw( & - lw_optical_props_clrsky, & ! IN - optical-properties - top_at_1, & ! IN - veritcal ordering flag - sources, & ! IN - source function - sfc_emiss_byband, & ! IN - surface emissivity in each LW band - flux_clrsky, & ! OUT - Fluxes - n_gauss_angles = nGauss_angles)) ! IN - Number of angles in Gaussian quadrature + call check_error_msg('rrtmgp_lw_rte_run_opt_angle',lw_gas_props%compute_optimal_angles(lw_optical_props_clrsky,lw_Ds)) + if (nGauss_angles .gt. 1) then + call check_error_msg('rrtmgp_lw_rte_run',rte_lw( & + lw_optical_props_clrsky, & ! IN - optical-properties + top_at_1, & ! IN - veritcal ordering flag + sources, & ! IN - source function + sfc_emiss_byband, & ! IN - surface emissivity in each LW band + flux_clrsky, & ! OUT - Fluxes + n_gauss_angles = nGauss_angles)) ! IN - Number of angles in Gaussian quadrature + else + call check_error_msg('rrtmgp_lw_rte_run',rte_lw( & + lw_optical_props_clrsky, & ! IN - optical-properties + top_at_1, & ! IN - veritcal ordering flag + sources, & ! IN - source function + sfc_emiss_byband, & ! IN - surface emissivity in each LW band + flux_clrsky, & ! OUT - Fluxes + lw_Ds = lw_Ds)) + endif ! Store fluxes fluxlwUP_clrsky = sum(flux_clrsky%bnd_flux_up,dim=3) @@ -135,7 +142,6 @@ subroutine rrtmgp_lw_rte_run(doLWrad, doLWclrsky, use_LW_jacobian, doGP_lwscat, if (doGP_lwscat) then ! Add clear-sky optics to cloud-optics (2-stream) call check_error_msg('rrtmgp_lw_rte_run',lw_optical_props_clrsky%increment(lw_optical_props_clouds)) - call lw_optical_props_clrsky%finalize() if (use_LW_jacobian) then ! Compute LW Jacobians @@ -146,9 +152,7 @@ subroutine rrtmgp_lw_rte_run(doLWrad, doLWclrsky, use_LW_jacobian, doGP_lwscat, sfc_emiss_byband, & ! IN - surface emissivity in each LW band flux_allsky, & ! OUT - Flxues n_gauss_angles = nGauss_angles, & ! IN - Number of angles in Gaussian quadrature - flux_up_Jac = fluxlwUP_jac, & ! OUT - surface temperature flux (upward) Jacobian (W/m2/K) - flux_dn_Jac = fluxlwDOWN_jac)) ! OUT - surface temperature flux (downward) Jacobian (W/m2/K) - sfculw_jac = fluxlwUP_jac(:,iSFC) + flux_up_Jac = fluxlwUP_jac)) ! OUT - surface temperature flux (upward) Jacobian (W/m2/K) else call check_error_msg('rrtmgp_lw_rte_run',rte_lw( & lw_optical_props_clouds, & ! IN - optical-properties @@ -162,7 +166,6 @@ subroutine rrtmgp_lw_rte_run(doLWrad, doLWclrsky, use_LW_jacobian, doGP_lwscat, else ! Add cloud optics to clear-sky optics (scalar) call check_error_msg('rrtmgp_lw_rte_run',lw_optical_props_clouds%increment(lw_optical_props_clrsky)) - call lw_optical_props_clouds%finalize() if (use_LW_jacobian) then ! Compute LW Jacobians @@ -173,9 +176,7 @@ subroutine rrtmgp_lw_rte_run(doLWrad, doLWclrsky, use_LW_jacobian, doGP_lwscat, sfc_emiss_byband, & ! IN - surface emissivity in each LW band flux_allsky, & ! OUT - Flxues n_gauss_angles = nGauss_angles, & ! IN - Number of angles in Gaussian quadrature - flux_up_Jac = fluxlwUP_jac, & ! OUT - surface temperature flux (upward) Jacobian (W/m2/K) - flux_dn_Jac = fluxlwDOWN_jac)) ! OUT - surface temperature flux (downward) Jacobian (W/m2/K) - sfculw_jac = fluxlwUP_jac(:,iSFC) + flux_up_Jac = fluxlwUP_jac)) ! OUT - surface temperature flux (upward) Jacobian (W/m2/K) else call check_error_msg('rrtmgp_lw_rte_run',rte_lw( & lw_optical_props_clrsky, & ! IN - optical-properties diff --git a/physics/rrtmgp_lw_rte.meta b/physics/rrtmgp_lw_rte.meta index d295fa511..253aa11ca 100644 --- a/physics/rrtmgp_lw_rte.meta +++ b/physics/rrtmgp_lw_rte.meta @@ -1,7 +1,7 @@ [ccpp-table-properties] name = rrtmgp_lw_rte type = scheme - dependencies = machine.F,rte-rrtmgp/rte/mo_rte_lw.F90,rte-rrtmgp/rte/mo_fluxes.F90,rte-rrtmgp/rte/kernels/mo_fluxes_broadband_kernels.F90,rrtmgp_aux.F90 + dependencies = machine.F,rte-rrtmgp/rte/mo_rte_lw.F90,rte-rrtmgp/rte/mo_fluxes.F90,rte-rrtmgp/rte/kernels/mo_fluxes_broadband_kernels.F90,radiation_tools.F90 dependencies = rte-rrtmgp/rte/kernels/mo_rte_solver_kernels.F90,rte-rrtmgp/extensions/mo_fluxes_byband.F90,rte-rrtmgp/extensions/mo_fluxes_byband_kernels.F90 ######################################################################## @@ -9,7 +9,7 @@ name = rrtmgp_lw_rte_run type = scheme [doLWrad] - standard_name = flag_to_calc_lw + standard_name = flag_for_calling_longwave_radiation long_name = logical flags for lw radiation calls units = flag dimensions = () @@ -17,7 +17,7 @@ intent = in optional = F [doLWclrsky] - standard_name = flag_for_output_of_longwave_heating_rate + standard_name = flag_for_output_of_tendency_of_air_temperature_due_to_longwave_heating_on_radiation_timestep_assuming_clear_sky long_name = flag to output lw heating rate (Radtend%lwhc) units = flag dimensions = () @@ -49,7 +49,7 @@ intent = in optional = F [nLev] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () @@ -57,7 +57,7 @@ intent = in optional = F [nGauss_angles] - standard_name = number_of_angles_used_in_gaussian_quadrature + standard_name = number_of_gaussian_quadrature_angles_for_radiation long_name = Number of angles used in Gaussian quadrature units = count dimensions = () @@ -68,7 +68,7 @@ standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure level units = hPa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -77,19 +77,11 @@ standard_name = surface_emissivity_in_each_RRTMGP_LW_band long_name = surface emissivity in each RRTMGP LW band units = none - dimensions = (number_of_lw_bands_rrtmgp,horizontal_loop_extent) + dimensions = (number_of_longwave_bands,horizontal_loop_extent) type = real kind = kind_phys intent = in optional = F -[lw_gas_props] - standard_name = coefficients_for_lw_gas_optics - long_name = DDT containing spectral information for RRTMGP LW radiation scheme - units = DDT - dimensions = () - type = ty_gas_optics_rrtmgp - intent = in - optional = F [lw_optical_props_clrsky] standard_name = longwave_optical_properties_for_clear_sky long_name = Fortran DDT containing RRTMGP optical properties @@ -126,7 +118,7 @@ standard_name = RRTMGP_lw_flux_profile_upward_allsky long_name = RRTMGP upward longwave all-sky flux profile units = W m-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = inout @@ -135,7 +127,7 @@ standard_name = RRTMGP_lw_flux_profile_downward_allsky long_name = RRTMGP downward longwave all-sky flux profile units = W m-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = inout @@ -144,7 +136,7 @@ standard_name = RRTMGP_lw_flux_profile_upward_clrsky long_name = RRTMGP upward longwave clr-sky flux profile units = W m-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = inout @@ -153,16 +145,16 @@ standard_name = RRTMGP_lw_flux_profile_downward_clrsky long_name = RRTMGP downward longwave clr-sky flux profile units = W m-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = inout optional = F -[sfculw_jac] - standard_name = RRTMGP_jacobian_of_lw_flux_upward_at_surface - long_name = RRTMGP Jacobian upward longwave flux at surface +[fluxlwUP_jac] + standard_name = RRTMGP_jacobian_of_lw_flux_upward + long_name = RRTMGP Jacobian upward longwave flux profile units = W m-2 K-1 - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/rrtmgp_sw_aerosol_optics.F90 b/physics/rrtmgp_sw_aerosol_optics.F90 index 4bb034279..3a74771b7 100644 --- a/physics/rrtmgp_sw_aerosol_optics.F90 +++ b/physics/rrtmgp_sw_aerosol_optics.F90 @@ -2,7 +2,9 @@ module rrtmgp_sw_aerosol_optics use machine, only: kind_phys use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_optical_props, only: ty_optical_props_2str - use rrtmgp_aux, only: check_error_msg + use radiation_tools, only: check_error_msg + use rrtmgp_sw_gas_optics, only: sw_gas_props + use rrtmgp_lw_gas_optics, only: lw_gas_props use module_radiation_aerosols, only: & NF_AESW, & ! Number of optical-fields in SW output (3=tau+g+omega) NF_AELW, & ! Number of optical-fields in LW output (3=tau+g+omega) @@ -30,7 +32,7 @@ end subroutine rrtmgp_sw_aerosol_optics_init !! subroutine rrtmgp_sw_aerosol_optics_run(doSWrad, nCol, nLev, nTracer, nTracerAer, nDay, & idxday, p_lev, p_lay, p_lk, tv_lay, relhum, lsmask, tracer, aerfld, lon, lat, & - lw_gas_props, sw_gas_props, aerodp, sw_optical_props_aerosol, errmsg, errflg ) + aerodp, sw_optical_props_aerosol, errmsg, errflg ) ! Inputs logical, intent(in) :: & @@ -41,30 +43,26 @@ subroutine rrtmgp_sw_aerosol_optics_run(doSWrad, nCol, nLev, nTracer, nTracerAer nLev, & ! Number of vertical layers nTracer, & ! Number of tracers nTracerAer ! Number of aerosol tracers - integer,intent(in),dimension(nCol) :: & + integer,intent(in),dimension(:) :: & idxday ! Indices for daylit points. - real(kind_phys), dimension(nCol), intent(in) :: & + real(kind_phys), dimension(:), intent(in) :: & lon, & ! Longitude lat, & ! Latitude lsmask ! Land/sea/sea-ice mask - real(kind_phys), dimension(nCol,Nlev),intent(in) :: & + real(kind_phys), dimension(:,:),intent(in) :: & p_lay, & ! Pressure @ layer-centers (Pa) tv_lay, & ! Virtual-temperature @ layer-centers (K) relhum, & ! Relative-humidity @ layer-centers p_lk ! Exner function @ layer-centers (1) - real(kind_phys), dimension(nCol, nLev, nTracer),intent(in) :: & + real(kind_phys), dimension(:, :,:),intent(in) :: & tracer ! trace gas concentrations - real(kind_phys), dimension(nCol, nLev, nTracerAer),intent(in) :: & + real(kind_phys), dimension(:, :,:),intent(in) :: & aerfld ! aerosol input concentrations - real(kind_phys), dimension(nCol,nLev+1),intent(in) :: & + real(kind_phys), dimension(:,:),intent(in) :: & p_lev ! Pressure @ layer-interfaces (Pa) - type(ty_gas_optics_rrtmgp),intent(in) :: & - sw_gas_props ! RRTMGP DDT: spectral information for SW calculation - type(ty_gas_optics_rrtmgp),intent(in) :: & - lw_gas_props ! RRTMGP DDT: spectral information for LW calculation ! Outputs - real(kind_phys), dimension(nCol,NSPC1), intent(inout) :: & + real(kind_phys), dimension(:,:), intent(inout) :: & aerodp ! Vertical integrated optical depth for various aerosol species type(ty_optical_props_2str),intent(out) :: & sw_optical_props_aerosol ! RRTMGP DDT: Longwave aerosol optical properties (tau) @@ -87,7 +85,7 @@ subroutine rrtmgp_sw_aerosol_optics_run(doSWrad, nCol, nLev, nTracer, nTracerAer if (nDay .gt. 0) then ! Call module_radiation_aerosols::setaer(),to setup aerosols property profile - call setaer(p_lev, p_lay, p_lk, tv_lay, relhum, lsmask, tracer, aerfld, lon, lat, nCol, nLev, & + call setaer(p_lev/100., p_lay/100., p_lk, tv_lay, relhum, lsmask, tracer, aerfld, lon, lat, nCol, nLev, & nLev+1, .true., .true., aerosolssw2, aerosolslw, aerodp) ! Store aerosol optical properties diff --git a/physics/rrtmgp_sw_aerosol_optics.meta b/physics/rrtmgp_sw_aerosol_optics.meta index 0ad7008c0..8c2e9e877 100644 --- a/physics/rrtmgp_sw_aerosol_optics.meta +++ b/physics/rrtmgp_sw_aerosol_optics.meta @@ -1,14 +1,14 @@ [ccpp-table-properties] name = rrtmgp_sw_aerosol_optics type = scheme - dependencies = iounitdef.f,machine.F,radiation_aerosols.f,rrtmgp_aux.F90 + dependencies = iounitdef.f,machine.F,radiation_aerosols.f,radiation_tools.F90 ######################################################################## [ccpp-arg-table] name = rrtmgp_sw_aerosol_optics_run type = scheme [doSWrad] - standard_name = flag_to_calc_sw + standard_name = flag_for_calling_shortwave_radiation long_name = logical flags for sw radiation calls units = flag dimensions = () @@ -24,7 +24,7 @@ intent = in optional = F [nLev] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () @@ -67,7 +67,7 @@ standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure at vertical interface for radiation calculation units = hPa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -76,16 +76,16 @@ standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure at vertical layer for radiation calculation units = hPa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [p_lk] - standard_name = dimensionless_exner_function_at_model_layers + standard_name = dimensionless_exner_function long_name = dimensionless Exner function at model layer centers units = none - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -94,7 +94,7 @@ standard_name = virtual_temperature long_name = layer virtual temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -103,13 +103,13 @@ standard_name = relative_humidity long_name = layer relative humidity units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [lsmask] - standard_name = sea_land_ice_mask_real + standard_name = area_type long_name = landmask: sea/land/ice=0/1/2 units = flag dimensions = (horizontal_loop_extent) @@ -121,16 +121,16 @@ standard_name = chemical_tracers long_name = chemical tracers units = g g-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = in optional = F [aerfld] - standard_name = aerosol_number_concentration_from_gocart_aerosol_climatology + standard_name = mass_number_concentration_of_aerosol_from_gocart_climatology long_name = GOCART aerosol climatology number concentration units = kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_aerosol_tracers_MG) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_aerosol_tracers_MG) type = real kind = kind_phys intent = in @@ -153,22 +153,6 @@ kind = kind_phys intent = in optional = F -[lw_gas_props] - standard_name = coefficients_for_lw_gas_optics - long_name = DDT containing spectral information for RRTMGP LW radiation scheme - units = DDT - dimensions = () - intent = in - type = ty_gas_optics_rrtmgp - optional = F -[sw_gas_props] - standard_name = coefficients_for_sw_gas_optics - long_name = DDT containing spectral information for RRTMGP SW radiation scheme - units = DDT - dimensions = () - type = ty_gas_optics_rrtmgp - intent = in - optional = F [aerodp] standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles long_name = vertical integrated optical depth for various aerosol species diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index f08cd7181..0ab0c3361 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -2,16 +2,55 @@ module rrtmgp_sw_cloud_optics use machine, only: kind_phys use mo_rte_kind, only: wl use mo_cloud_optics, only: ty_cloud_optics - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_optical_props, only: ty_optical_props_2str use mo_rrtmg_sw_cloud_optics, only: rrtmg_sw_cloud_optics - use rrtmgp_aux, only: check_error_msg + use rrtmgp_sw_gas_optics, only: sw_gas_props + use radiation_tools, only: check_error_msg use netcdf +#ifdef MPI + use mpi +#endif implicit none - - public rrtmgp_sw_cloud_optics_init, rrtmgp_sw_cloud_optics_run, rrtmgp_sw_cloud_optics_finalize + type(ty_cloud_optics) :: sw_cloud_props + integer :: & + nrghice_fromfileSW, nBandSW, nSize_liqSW, nSize_iceSW, nSizeregSW, & + nCoeff_extSW, nCoeff_ssa_gSW, nBoundSW, nPairsSW + real(kind_phys) :: & + radliq_facSW, & ! Factor for calculating LUT interpolation indices for liquid + radice_facSW ! Factor for calculating LUT interpolation indices for ice + real(kind_phys), dimension(:,:), allocatable :: & + lut_extliqSW, & ! LUT shortwave liquid extinction coefficient + lut_ssaliqSW, & ! LUT shortwave liquid single scattering albedo + lut_asyliqSW, & ! LUT shortwave liquid asymmetry parameter + band_limsCLDSW ! Beginning and ending wavenumber [cm -1] for each band + real(kind_phys), dimension(:,:,:), allocatable :: & + lut_exticeSW, & ! LUT shortwave ice extinction coefficient + lut_ssaiceSW, & ! LUT shortwave ice single scattering albedo + lut_asyiceSW ! LUT shortwave ice asymmetry parameter + real(kind_phys), dimension(:), allocatable :: & + pade_sizereg_extliqSW, & ! Particle size regime boundaries for shortwave liquid extinction + ! coefficient for Pade interpolation + pade_sizereg_ssaliqSW, & ! Particle size regime boundaries for shortwave liquid single + ! scattering albedo for Pade interpolation + pade_sizereg_asyliqSW, & ! Particle size regime boundaries for shortwave liquid asymmetry + ! parameter for Pade interpolation + pade_sizereg_exticeSW, & ! Particle size regime boundaries for shortwave ice extinction + ! coefficient for Pade interpolation + pade_sizereg_ssaiceSW, & ! Particle size regime boundaries for shortwave ice single + ! scattering albedo for Pade interpolation + pade_sizereg_asyiceSW ! Particle size regime boundaries for shortwave ice asymmetry + ! parameter for Pade interpolation + real(kind_phys), dimension(:,:,:), allocatable :: & + pade_extliqSW, & ! PADE coefficients for shortwave liquid extinction + pade_ssaliqSW, & ! PADE coefficients for shortwave liquid single scattering albedo + pade_asyliqSW ! PADE coefficients for shortwave liquid asymmetry parameter + real(kind_phys), dimension(:,:,:,:), allocatable :: & + pade_exticeSW, & ! PADE coefficients for shortwave ice extinction + pade_ssaiceSW, & ! PADE coefficients for shortwave ice single scattering albedo + pade_asyiceSW ! PADE coefficients for shortwave ice asymmetry parameter + ! Parameters used for rain and snow(+groupel) RRTMGP cloud-optics real(kind_phys),parameter :: & a0r = 3.07e-3, & ! @@ -19,10 +58,10 @@ module rrtmgp_sw_cloud_optics a1s = 1.5 ! real(kind_phys),dimension(:),allocatable :: b0r,b0s,b1s,c0r,c0s real(kind_phys) :: & - radliq_lwr, & ! Liquid particle size lower bound for LUT interpolation - radliq_upr, & ! Liquid particle size upper bound for LUT interpolation - radice_lwr, & ! Ice particle size upper bound for LUT interpolation - radice_upr ! Ice particle size lower bound for LUT interpolation + radliq_lwrSW, & ! Liquid particle size lower bound for LUT interpolation + radliq_uprSW, & ! Liquid particle size upper bound for LUT interpolation + radice_lwrSW, & ! Ice particle size upper bound for LUT interpolation + radice_uprSW ! Ice particle size lower bound for LUT interpolation contains ! ###################################################################################### @@ -33,7 +72,7 @@ module rrtmgp_sw_cloud_optics !! subroutine rrtmgp_sw_cloud_optics_init(doG_cldoptics, doGP_cldoptics_PADE, & doGP_cldoptics_LUT, nrghice, rrtmgp_root_dir, rrtmgp_sw_file_clouds, mpicomm, & - mpirank, mpiroot, sw_cloud_props, errmsg, errflg) + mpirank, mpiroot, errmsg, errflg) ! Inputs logical, intent(in) :: & @@ -49,62 +88,16 @@ subroutine rrtmgp_sw_cloud_optics_init(doG_cldoptics, doGP_cldoptics_PADE, character(len=128),intent(in) :: & rrtmgp_root_dir, & ! RTE-RRTMGP root directory rrtmgp_sw_file_clouds ! RRTMGP file containing coefficients used to compute clouds optical properties - + ! Outputs - type(ty_cloud_optics),intent(out) :: & - sw_cloud_props ! RRTMGP DDT: shortwave spectral information character(len=*), intent(out) :: & errmsg ! CCPP error message integer, intent(out) :: & errflg ! CCPP error code - ! Local variables that will be passed to cloud_optics%load() - real(kind_phys) :: & - !radliq_lwr, & ! Liquid particle size lower bound for LUT interpolation - !radliq_upr, & ! Liquid particle size upper bound for LUT interpolation - radliq_fac, & ! Factor for calculating LUT interpolation indices for liquid - !radice_lwr, & ! Ice particle size upper bound for LUT interpolation - !radice_upr, & ! Ice particle size lower bound for LUT interpolation - radice_fac ! Factor for calculating LUT interpolation indices for ice - real(kind_phys), dimension(:,:), allocatable :: & - lut_extliq, & ! LUT shortwave liquid extinction coefficient - lut_ssaliq, & ! LUT shortwave liquid single scattering albedo - lut_asyliq, & ! LUT shortwave liquid asymmetry parameter - band_lims ! Beginning and ending wavenumber [cm -1] for each band - real(kind_phys), dimension(:,:,:), allocatable :: & - lut_extice, & ! LUT shortwave ice extinction coefficient - lut_ssaice, & ! LUT shortwave ice single scattering albedo - lut_asyice ! LUT shortwave ice asymmetry parameter - real(kind_phys), dimension(:), allocatable :: & - pade_sizereg_extliq, & ! Particle size regime boundaries for shortwave liquid extinction - ! coefficient for Pade interpolation - pade_sizereg_ssaliq, & ! Particle size regime boundaries for shortwave liquid single - ! scattering albedo for Pade interpolation - pade_sizereg_asyliq, & ! Particle size regime boundaries for shortwave liquid asymmetry - ! parameter for Pade interpolation - pade_sizereg_extice, & ! Particle size regime boundaries for shortwave ice extinction - ! coefficient for Pade interpolation - pade_sizereg_ssaice, & ! Particle size regime boundaries for shortwave ice single - ! scattering albedo for Pade interpolation - pade_sizereg_asyice ! Particle size regime boundaries for shortwave ice asymmetry - ! parameter for Pade interpolation - real(kind_phys), dimension(:,:,:), allocatable :: & - pade_extliq, & ! PADE coefficients for shortwave liquid extinction - pade_ssaliq, & ! PADE coefficients for shortwave liquid single scattering albedo - pade_asyliq ! PADE coefficients for shortwave liquid asymmetry parameter - real(kind_phys), dimension(:,:,:,:), allocatable :: & - pade_extice, & ! PADE coefficients for shortwave ice extinction - pade_ssaice, & ! PADE coefficients for shortwave ice single scattering albedo - pade_asyice ! PADE coefficients for shortwave ice asymmetry parameter - ! Dimensions - integer :: & - nrghice_fromfile, nBand, nSize_liq, nSize_ice, nSizereg,& - nCoeff_ext, nCoeff_ssa_g, nBound, nPairs - ! Local variables - integer :: status,ncid,dimid,varID + integer :: status,ncid,dimid,varID,mpierr character(len=264) :: sw_cloud_props_file - integer,parameter :: nrghice_default=2 ! Initialize errmsg = '' @@ -115,159 +108,269 @@ subroutine rrtmgp_sw_cloud_optics_init(doG_cldoptics, doGP_cldoptics_PADE, ! Filenames are set in the physics_nml sw_cloud_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_sw_file_clouds) - ! On master processor only... -! if (mpirank .eq. mpiroot) then + ! ####################################################################################### + ! + ! Read dimensions for shortwave cloud-optics fields... + ! (ONLY master processor(0), if MPI enabled) + ! + ! ####################################################################################### +#ifdef MPI + if (mpirank .eq. mpiroot) then +#endif + write (*,*) 'Reading RRTMGP shortwave cloud-optics metadata ... ' + ! Open file status = nf90_open(trim(sw_cloud_props_file), NF90_NOWRITE, ncid) ! Read dimensions status = nf90_inq_dimid(ncid, 'nband', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nBand) + status = nf90_inquire_dimension(ncid, dimid, len=nBandSW) status = nf90_inq_dimid(ncid, 'nrghice', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nrghice_fromfile) + status = nf90_inquire_dimension(ncid, dimid, len=nrghice_fromfileSW) status = nf90_inq_dimid(ncid, 'nsize_liq', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nSize_liq) + status = nf90_inquire_dimension(ncid, dimid, len=nSize_liqSW) status = nf90_inq_dimid(ncid, 'nsize_ice', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nSize_ice) + status = nf90_inquire_dimension(ncid, dimid, len=nSize_iceSW) status = nf90_inq_dimid(ncid, 'nsizereg', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nSizereg) + status = nf90_inquire_dimension(ncid, dimid, len=nSizeregSW) status = nf90_inq_dimid(ncid, 'ncoeff_ext', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nCoeff_ext) + status = nf90_inquire_dimension(ncid, dimid, len=nCoeff_extSW) status = nf90_inq_dimid(ncid, 'ncoeff_ssa_g', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nCoeff_ssa_g) + status = nf90_inquire_dimension(ncid, dimid, len=nCoeff_ssa_gSW) status = nf90_inq_dimid(ncid, 'nbound', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nBound) + status = nf90_inquire_dimension(ncid, dimid, len=nBoundSW) status = nf90_inq_dimid(ncid, 'pair', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nPairs) - - ! Has the number of ice-roughnesses to use been provided from the namelist? - ! If not provided, use default number of ice-roughness categories - if (nrghice .eq. 0) then - nrghice = nrghice_default - else - nrghice = nrghice_fromfile - ! If provided in the namelist, check to ensure that number of ice-roughness categories is feasible. - if (nrghice .gt. nrghice_fromfile) then - errmsg = 'Number of RRTMGP ice-roughness categories requested in namelist file is not allowed. Using default number of categories.' - nrghice = nrghice_default - endif - endif + status = nf90_inquire_dimension(ncid, dimid, len=nPairsSW) +#ifdef MPI + endif ! On master processor - ! Allocate space for arrays - if (doGP_cldoptics_LUT) then - allocate(lut_extliq(nSize_liq, nBand)) - allocate(lut_ssaliq(nSize_liq, nBand)) - allocate(lut_asyliq(nSize_liq, nBand)) - allocate(lut_extice(nSize_ice, nBand, nrghice_fromfile)) - allocate(lut_ssaice(nSize_ice, nBand, nrghice_fromfile)) - allocate(lut_asyice(nSize_ice, nBand, nrghice_fromfile)) - endif - if (doGP_cldoptics_PADE) then - allocate(pade_extliq(nBand, nSizeReg, nCoeff_ext )) - allocate(pade_ssaliq(nBand, nSizeReg, nCoeff_ssa_g)) - allocate(pade_asyliq(nBand, nSizeReg, nCoeff_ssa_g)) - allocate(pade_extice(nBand, nSizeReg, nCoeff_ext, nrghice_fromfile)) - allocate(pade_ssaice(nBand, nSizeReg, nCoeff_ssa_g, nrghice_fromfile)) - allocate(pade_asyice(nBand, nSizeReg, nCoeff_ssa_g, nrghice_fromfile)) - allocate(pade_sizereg_extliq(nBound)) - allocate(pade_sizereg_ssaliq(nBound)) - allocate(pade_sizereg_asyliq(nBound)) - allocate(pade_sizereg_extice(nBound)) - allocate(pade_sizereg_ssaice(nBound)) - allocate(pade_sizereg_asyice(nBound)) - endif - allocate(band_lims(2,nBand)) + ! Other processors waiting... + call mpi_barrier(mpicomm, mpierr) - ! Read in fields from file + ! ####################################################################################### + ! + ! Broadcast dimensions... + ! (ALL processors) + ! + ! ####################################################################################### + call mpi_bcast(nBandSW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(nSize_liqSW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(nSize_iceSW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(nSizeregSW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(nCoeff_extSW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(nCoeff_ssa_gSW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(nBoundSW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(nPairsSW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) +#endif + + ! Has the number of ice-roughnesses provided from the namelist? + ! If so, override nrghice from cloud-optics file + if (nrghice .ne. 0) nrghice_fromfileSW = nrghice +#ifdef MPI + call mpi_bcast(nrghice_fromfileSW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) +#endif + + ! ####################################################################################### + ! + ! Allocate space for arrays... + ! (ALL processors) + ! + ! ####################################################################################### + if (doGP_cldoptics_LUT) then + allocate(lut_extliqSW(nSize_liqSW, nBandSW)) + allocate(lut_ssaliqSW(nSize_liqSW, nBandSW)) + allocate(lut_asyliqSW(nSize_liqSW, nBandSW)) + allocate(lut_exticeSW(nSize_iceSW, nBandSW, nrghice_fromfileSW)) + allocate(lut_ssaiceSW(nSize_iceSW, nBandSW, nrghice_fromfileSW)) + allocate(lut_asyiceSW(nSize_iceSW, nBandSW, nrghice_fromfileSW)) + endif + if (doGP_cldoptics_PADE) then + allocate(pade_extliqSW(nBandSW, nSizeRegSW, nCoeff_extSW )) + allocate(pade_ssaliqSW(nBandSW, nSizeRegSW, nCoeff_ssa_gSW)) + allocate(pade_asyliqSW(nBandSW, nSizeRegSW, nCoeff_ssa_gSW)) + allocate(pade_exticeSW(nBandSW, nSizeRegSW, nCoeff_extSW, nrghice_fromfileSW)) + allocate(pade_ssaiceSW(nBandSW, nSizeRegSW, nCoeff_ssa_gSW, nrghice_fromfileSW)) + allocate(pade_asyiceSW(nBandSW, nSizeRegSW, nCoeff_ssa_gSW, nrghice_fromfileSW)) + allocate(pade_sizereg_extliqSW(nBoundSW)) + allocate(pade_sizereg_ssaliqSW(nBoundSW)) + allocate(pade_sizereg_asyliqSW(nBoundSW)) + allocate(pade_sizereg_exticeSW(nBoundSW)) + allocate(pade_sizereg_ssaiceSW(nBoundSW)) + allocate(pade_sizereg_asyiceSW(nBoundSW)) + endif + allocate(band_limsCLDSW(2,nBandSW)) + + ! ####################################################################################### + ! + ! Read in data ... + ! (ONLY master processor(0), if MPI enabled) + ! + ! ####################################################################################### +#ifdef MPI + if (mpirank .eq. mpiroot) then +#endif if (doGP_cldoptics_LUT) then write (*,*) 'Reading RRTMGP shortwave cloud data (LUT) ... ' status = nf90_inq_varid(ncid,'radliq_lwr',varID) - status = nf90_get_var(ncid,varID,radliq_lwr) + status = nf90_get_var(ncid,varID,radliq_lwrSW) status = nf90_inq_varid(ncid,'radliq_upr',varID) - status = nf90_get_var(ncid,varID,radliq_upr) + status = nf90_get_var(ncid,varID,radliq_uprSW) status = nf90_inq_varid(ncid,'radliq_fac',varID) - status = nf90_get_var(ncid,varID,radliq_fac) + status = nf90_get_var(ncid,varID,radliq_facSW) status = nf90_inq_varid(ncid,'radice_lwr',varID) - status = nf90_get_var(ncid,varID,radice_lwr) + status = nf90_get_var(ncid,varID,radice_lwrSW) status = nf90_inq_varid(ncid,'radice_upr',varID) - status = nf90_get_var(ncid,varID,radice_upr) + status = nf90_get_var(ncid,varID,radice_uprSW) status = nf90_inq_varid(ncid,'radice_fac',varID) - status = nf90_get_var(ncid,varID,radice_fac) + status = nf90_get_var(ncid,varID,radice_facSW) status = nf90_inq_varid(ncid,'lut_extliq',varID) - status = nf90_get_var(ncid,varID,lut_extliq) + status = nf90_get_var(ncid,varID,lut_extliqSW) status = nf90_inq_varid(ncid,'lut_ssaliq',varID) - status = nf90_get_var(ncid,varID,lut_ssaliq) + status = nf90_get_var(ncid,varID,lut_ssaliqSW) status = nf90_inq_varid(ncid,'lut_asyliq',varID) - status = nf90_get_var(ncid,varID,lut_asyliq) + status = nf90_get_var(ncid,varID,lut_asyliqSW) status = nf90_inq_varid(ncid,'lut_extice',varID) - status = nf90_get_var(ncid,varID,lut_extice) + status = nf90_get_var(ncid,varID,lut_exticeSW) status = nf90_inq_varid(ncid,'lut_ssaice',varID) - status = nf90_get_var(ncid,varID,lut_ssaice) + status = nf90_get_var(ncid,varID,lut_ssaiceSW) status = nf90_inq_varid(ncid,'lut_asyice',varID) - status = nf90_get_var(ncid,varID,lut_asyice) + status = nf90_get_var(ncid,varID,lut_asyiceSW) status = nf90_inq_varid(ncid,'bnd_limits_wavenumber',varID) - status = nf90_get_var(ncid,varID,band_lims) + status = nf90_get_var(ncid,varID,band_limsCLDSW) endif if (doGP_cldoptics_PADE) then write (*,*) 'Reading RRTMGP shortwave cloud data (PADE) ... ' status = nf90_inq_varid(ncid,'radliq_lwr',varID) - status = nf90_get_var(ncid,varID,radliq_lwr) + status = nf90_get_var(ncid,varID,radliq_lwrSW) status = nf90_inq_varid(ncid,'radliq_upr',varID) - status = nf90_get_var(ncid,varID,radliq_upr) + status = nf90_get_var(ncid,varID,radliq_uprSW) status = nf90_inq_varid(ncid,'radliq_fac',varID) - status = nf90_get_var(ncid,varID,radliq_fac) + status = nf90_get_var(ncid,varID,radliq_facSW) status = nf90_inq_varid(ncid,'radice_lwr',varID) - status = nf90_get_var(ncid,varID,radice_lwr) + status = nf90_get_var(ncid,varID,radice_lwrSW) status = nf90_inq_varid(ncid,'radice_upr',varID) - status = nf90_get_var(ncid,varID,radice_upr) + status = nf90_get_var(ncid,varID,radice_uprSW) status = nf90_inq_varid(ncid,'radice_fac',varID) - status = nf90_get_var(ncid,varID,radice_fac) + status = nf90_get_var(ncid,varID,radice_facSW) status = nf90_inq_varid(ncid,'pade_extliq',varID) - status = nf90_get_var(ncid,varID,pade_extliq) + status = nf90_get_var(ncid,varID,pade_extliqSW) status = nf90_inq_varid(ncid,'pade_ssaliq',varID) - status = nf90_get_var(ncid,varID,pade_ssaliq) + status = nf90_get_var(ncid,varID,pade_ssaliqSW) status = nf90_inq_varid(ncid,'pade_asyliq',varID) - status = nf90_get_var(ncid,varID,pade_asyliq) + status = nf90_get_var(ncid,varID,pade_asyliqSW) status = nf90_inq_varid(ncid,'pade_extice',varID) - status = nf90_get_var(ncid,varID,pade_extice) + status = nf90_get_var(ncid,varID,pade_exticeSW) status = nf90_inq_varid(ncid,'pade_ssaice',varID) - status = nf90_get_var(ncid,varID,pade_ssaice) + status = nf90_get_var(ncid,varID,pade_ssaiceSW) status = nf90_inq_varid(ncid,'pade_asyice',varID) - status = nf90_get_var(ncid,varID,pade_asyice) + status = nf90_get_var(ncid,varID,pade_asyiceSW) status = nf90_inq_varid(ncid,'pade_sizreg_extliq',varID) - status = nf90_get_var(ncid,varID,pade_sizereg_extliq) + status = nf90_get_var(ncid,varID,pade_sizereg_extliqSW) status = nf90_inq_varid(ncid,'pade_sizreg_ssaliq',varID) - status = nf90_get_var(ncid,varID,pade_sizereg_ssaliq) + status = nf90_get_var(ncid,varID,pade_sizereg_ssaliqSW) status = nf90_inq_varid(ncid,'pade_sizreg_asyliq',varID) - status = nf90_get_var(ncid,varID,pade_sizereg_asyliq) + status = nf90_get_var(ncid,varID,pade_sizereg_asyliqSW) status = nf90_inq_varid(ncid,'pade_sizreg_extice',varID) - status = nf90_get_var(ncid,varID,pade_sizereg_extice) + status = nf90_get_var(ncid,varID,pade_sizereg_exticeSW) status = nf90_inq_varid(ncid,'pade_sizreg_ssaice',varID) - status = nf90_get_var(ncid,varID,pade_sizereg_ssaice) + status = nf90_get_var(ncid,varID,pade_sizereg_ssaiceSW) status = nf90_inq_varid(ncid,'pade_sizreg_asyice',varID) - status = nf90_get_var(ncid,varID,pade_sizereg_asyice) + status = nf90_get_var(ncid,varID,pade_sizereg_asyiceSW) status = nf90_inq_varid(ncid,'bnd_limits_wavenumber',varID) - status = nf90_get_var(ncid,varID,band_lims) + status = nf90_get_var(ncid,varID,band_limsCLDSW) endif ! Close file status = nf90_close(ncid) -! endif - ! Load tables data for RRTMGP cloud-optics +#ifdef MPI + endif ! Master process + + ! Other processors waiting... + call mpi_barrier(mpicomm, mpierr) + + ! ####################################################################################### + ! + ! Broadcast data... + ! (ALL processors) + ! + ! ####################################################################################### + + ! Real scalars + call mpi_bcast(radliq_facSW, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(radice_facSW, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(radliq_lwrSW, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(radliq_uprSW, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(radice_lwrSW, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(radice_uprSW, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + + ! Real arrays + call mpi_bcast(band_limsCLDSW, size(band_limsCLDSW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) if (doGP_cldoptics_LUT) then - call check_error_msg('sw_cloud_optics_init',sw_cloud_props%load(band_lims, & - radliq_lwr, radliq_upr, radliq_fac, radice_lwr, radice_upr, radice_fac, & - lut_extliq, lut_ssaliq, lut_asyliq, lut_extice, lut_ssaice, lut_asyice)) + call mpi_bcast(lut_extliqSW, size(lut_extliqSW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(lut_ssaliqSW, size(lut_ssaliqSW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(lut_asyliqSW, size(lut_asyliqSW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(lut_exticeSW, size(lut_exticeSW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(lut_ssaiceSW, size(lut_ssaiceSW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(lut_asyiceSW, size(lut_asyiceSW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) endif if (doGP_cldoptics_PADE) then - call check_error_msg('sw_cloud_optics_init', sw_cloud_props%load(band_lims, & - pade_extliq, pade_ssaliq, pade_asyliq, pade_extice, pade_ssaice, pade_asyice,& - pade_sizereg_extliq, pade_sizereg_ssaliq, pade_sizereg_asyliq, & - pade_sizereg_extice, pade_sizereg_ssaice, pade_sizereg_asyice)) + call mpi_bcast(pade_extliqSW, size(pade_extliqSW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(pade_ssaliqSW, size(pade_ssaliqSW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(pade_asyliqSW, size(pade_asyliqSW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(pade_exticeSW, size(pade_exticeSW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(pade_ssaiceSW, size(pade_ssaiceSW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(pade_asyiceSW, size(pade_asyiceSW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(pade_sizereg_extliqSW, size(pade_sizereg_extliqSW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(pade_sizereg_ssaliqSW, size(pade_sizereg_ssaliqSW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(pade_sizereg_asyliqSW, size(pade_sizereg_asyliqSW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(pade_sizereg_exticeSW, size(pade_sizereg_exticeSW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(pade_sizereg_ssaiceSW, size(pade_sizereg_ssaiceSW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(pade_sizereg_asyiceSW, size(pade_sizereg_asyiceSW), & + MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) endif - call check_error_msg('sw_cloud_optics_init',sw_cloud_props%set_ice_roughness(nrghice)) - +#endif + + ! ####################################################################################### + ! + ! Initialize RRTMGP DDT's... + ! + ! ####################################################################################### + if (doGP_cldoptics_LUT) then + call check_error_msg('sw_cloud_optics_init',sw_cloud_props%load(band_limsCLDSW, & + radliq_lwrSW, radliq_uprSW, radliq_facSW, radice_lwrSW, radice_uprSW, & + radice_facSW, lut_extliqSW, lut_ssaliqSW, lut_asyliqSW, lut_exticeSW, & + lut_ssaiceSW, lut_asyiceSW)) + endif + + if (doGP_cldoptics_PADE) then + call check_error_msg('sw_cloud_optics_init', sw_cloud_props%load(band_limsCLDSW, & + pade_extliqSW, pade_ssaliqSW, pade_asyliqSW, pade_exticeSW, pade_ssaiceSW, & + pade_asyiceSW, pade_sizereg_extliqSW, pade_sizereg_ssaliqSW, & + pade_sizereg_asyliqSW, pade_sizereg_exticeSW, pade_sizereg_ssaiceSW, & + pade_sizereg_asyiceSW)) + endif + + call check_error_msg('sw_cloud_optics_init',sw_cloud_props%set_ice_roughness(nrghice_fromfileSW)) + ! Initialize coefficients for rain and snow(+groupel) cloud optics allocate(b0r(sw_cloud_props%get_nband()),b0s(sw_cloud_props%get_nband()), & b1s(sw_cloud_props%get_nband()),c0r(sw_cloud_props%get_nband()), & @@ -282,7 +385,7 @@ subroutine rrtmgp_sw_cloud_optics_init(doG_cldoptics, doGP_cldoptics_PADE, 0.944, 0.894, 0.884, 0.883, 0.883, 0.883, 0.883/) c0s = (/0.970, 0.970, 0.970, 0.970, 0.970, 0.970, 0.970, & 0.970, 0.970, 0.970, 0.700, 0.700, 0.700, 0.700/) - + end subroutine rrtmgp_sw_cloud_optics_init ! ######################################################################################### @@ -292,9 +395,9 @@ end subroutine rrtmgp_sw_cloud_optics_init !! \htmlinclude rrtmgp_sw_cloud_optics.html !! subroutine rrtmgp_sw_cloud_optics_run(doSWrad, doG_cldoptics, icliq_sw, icice_sw, & - doGP_cldoptics_PADE, doGP_cldoptics_LUT, nCol, nLev, nDay, idxday, nrghice, cld_frac,& - cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, & - precip_frac, sw_cloud_props, sw_gas_props, sw_optical_props_cloudsByBand, & + doGP_cldoptics_PADE, doGP_cldoptics_LUT, nCol, nLev, nDay, nbndsGPsw, idxday, & + cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, & + cld_rerain, precip_frac, sw_optical_props_cloudsByBand, & sw_optical_props_precipByBand, cldtausw, errmsg, errflg) ! Inputs @@ -304,10 +407,10 @@ subroutine rrtmgp_sw_cloud_optics_run(doSWrad, doG_cldoptics, icliq_sw, icice_sw doGP_cldoptics_PADE, & ! Use RRTMGP cloud-optics: PADE approximation? doGP_cldoptics_LUT ! Use RRTMGP cloud-optics: LUTs? integer, intent(in) :: & + nbndsGPsw, & ! Number of shortwave bands nCol, & ! Number of horizontal gridpoints nLev, & ! Number of vertical levels nday, & ! Number of daylit points. - nrghice, & ! Number of ice-roughness categories icliq_sw, & ! Choice of treatment of liquid cloud optical properties (RRTMG legacy) icice_sw ! Choice of treatment of ice cloud optical properties (RRTMG legacy) integer,intent(in),dimension(ncol) :: & @@ -323,11 +426,7 @@ subroutine rrtmgp_sw_cloud_optics_run(doSWrad, doG_cldoptics, icliq_sw, icice_sw cld_rwp, & ! Cloud rain water path cld_rerain, & ! Cloud rain effective radius precip_frac ! Precipitation fraction by layer - type(ty_cloud_optics),intent(in) :: & - sw_cloud_props ! RRTMGP DDT: shortwave cloud properties - type(ty_gas_optics_rrtmgp),intent(in) :: & - sw_gas_props ! RRTMGP DDT: shortwave K-distribution data - + ! Outputs character(len=*), intent(out) :: & errmsg ! CCPP error message @@ -343,9 +442,10 @@ subroutine rrtmgp_sw_cloud_optics_run(doSWrad, doG_cldoptics, icliq_sw, icice_sw integer :: iDay, iLay, iBand real(kind_phys) :: tau_rain, tau_snow, ssa_rain, ssa_snow, asy_rain, asy_snow, & tau_prec, asy_prec, ssa_prec, asyw, ssaw, za1, za2 - real(kind_phys), dimension(nday,nLev,sw_gas_props%get_nband()) :: & + real(kind_phys), dimension(nday,nLev,nbndsGPsw) :: & tau_cld, ssa_cld, asy_cld, tau_precip, ssa_precip, asy_precip - + type(ty_optical_props_2str) :: sw_optical_props_cloudsByBand_daylit + ! Initialize CCPP error handling variables errmsg = '' errflg = 0 @@ -355,23 +455,19 @@ subroutine rrtmgp_sw_cloud_optics_run(doSWrad, doG_cldoptics, icliq_sw, icice_sw ! Only process sunlit points... if (nDay .gt. 0) then - ! Allocate space for RRTMGP DDTs containing cloud/precipitation radiative properties - ! Cloud optics [nday,nLev,nBands] - call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_optical_props_cloudsByBand%alloc_2str(& - nday, nLev, sw_gas_props%get_band_lims_wavenumber())) - sw_optical_props_cloudsByBand%tau(:,:,:) = 0._kind_phys - sw_optical_props_cloudsByBand%ssa(:,:,:) = 1._kind_phys - sw_optical_props_cloudsByBand%g(:,:,:) = 0._kind_phys - - ! Cloud-precipitation optics [nday,nLev,nBands] - call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_optical_props_precipByBand%alloc_2str(& - nday, nLev, sw_gas_props%get_band_lims_wavenumber())) - sw_optical_props_precipByBand%tau(:,:,:) = 0._kind_phys - sw_optical_props_precipByBand%ssa(:,:,:) = 1._kind_phys - sw_optical_props_precipByBand%g(:,:,:) = 0._kind_phys - ! Compute cloud/precipitation optics. if (doGP_cldoptics_PADE .or. doGP_cldoptics_LUT) then + call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_optical_props_cloudsByBand%alloc_2str(& + nday, nLev, sw_cloud_props%get_band_lims_wavenumber())) + sw_optical_props_cloudsByBand%tau(:,:,:) = 0._kind_phys + sw_optical_props_cloudsByBand%ssa(:,:,:) = 1._kind_phys + sw_optical_props_cloudsByBand%g(:,:,:) = 0._kind_phys + call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_optical_props_precipByBand%alloc_2str(& + nday, nLev, sw_cloud_props%get_band_lims_wavenumber())) + sw_optical_props_precipByBand%tau(:,:,:) = 0._kind_phys + sw_optical_props_precipByBand%ssa(:,:,:) = 1._kind_phys + sw_optical_props_precipByBand%g(:,:,:) = 0._kind_phys + ! RRTMGP cloud-optics. call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_cloud_props%cloud_optics(& cld_lwp(idxday(1:nday),:), & ! IN - Cloud liquid water path @@ -393,7 +489,7 @@ subroutine rrtmgp_sw_cloud_optics_run(doSWrad, doG_cldoptics, icliq_sw, icice_sw endif ! Rain/Snow single-scattering albedo and asymmetry (Band dependent) - do iBand=1,sw_cloud_props%get_nband() + do iBand=1,nbndsGPsw ! By species ssa_rain = tau_rain*(1.-b0r(iBand)) asy_rain = ssa_rain*c0r(iBand) @@ -416,18 +512,29 @@ subroutine rrtmgp_sw_cloud_optics_run(doSWrad, doG_cldoptics, icliq_sw, icice_sw enddo endif if (doG_cldoptics) then + call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_optical_props_cloudsByBand%alloc_2str(& + nday, nLev, sw_gas_props%get_band_lims_wavenumber())) + sw_optical_props_cloudsByBand%tau(:,:,:) = 0._kind_phys + sw_optical_props_cloudsByBand%ssa(:,:,:) = 1._kind_phys + sw_optical_props_cloudsByBand%g(:,:,:) = 0._kind_phys + call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_optical_props_precipByBand%alloc_2str(& + nday, nLev, sw_gas_props%get_band_lims_wavenumber())) + sw_optical_props_precipByBand%tau(:,:,:) = 0._kind_phys + sw_optical_props_precipByBand%ssa(:,:,:) = 1._kind_phys + sw_optical_props_precipByBand%g(:,:,:) = 0._kind_phys + ! RRTMG cloud(+precipitation) optics if (any(cld_frac .gt. 0)) then - call rrtmg_sw_cloud_optics(nday, nLev, sw_gas_props%get_nband(), & - cld_lwp(idxday(1:nday),:), cld_reliq(idxday(1:nday),:), & - cld_iwp(idxday(1:nday),:), cld_reice(idxday(1:nday),:), & - cld_rwp(idxday(1:nday),:), cld_rerain(idxday(1:nday),:), & - cld_swp(idxday(1:nday),:), cld_resnow(idxday(1:nday),:), & - cld_frac(idxday(1:nday),:), icliq_sw, icice_sw, & - tau_cld, ssa_cld, asy_cld, & + call rrtmg_sw_cloud_optics(nday, nLev, sw_gas_props%get_nband(), & + cld_lwp(idxday(1:nday),:), cld_reliq(idxday(1:nday),:), & + cld_iwp(idxday(1:nday),:), cld_reice(idxday(1:nday),:), & + cld_rwp(idxday(1:nday),:), cld_rerain(idxday(1:nday),:), & + cld_swp(idxday(1:nday),:), cld_resnow(idxday(1:nday),:), & + cld_frac(idxday(1:nday),:), icliq_sw, icice_sw, & + tau_cld, ssa_cld, asy_cld, & tau_precip, ssa_precip, asy_precip) - - ! Cloud-optics (Need to reorder from G->GP band conventions) + + ! Cloud-optics (Need to reorder from G->GP band conventions) sw_optical_props_cloudsByBand%tau(:,:,1) = tau_cld(:,:,sw_gas_props%get_nband()) sw_optical_props_cloudsByBand%ssa(:,:,1) = ssa_cld(:,:,sw_gas_props%get_nband()) sw_optical_props_cloudsByBand%g(:,:,1) = asy_cld(:,:,sw_gas_props%get_nband()) @@ -441,6 +548,7 @@ subroutine rrtmgp_sw_cloud_optics_run(doSWrad, doG_cldoptics, icliq_sw, icice_sw sw_optical_props_precipByBand%tau(:,:,2:sw_gas_props%get_nband()) = tau_precip(:,:,1:sw_gas_props%get_nband()-1) sw_optical_props_precipByBand%ssa(:,:,2:sw_gas_props%get_nband()) = ssa_precip(:,:,1:sw_gas_props%get_nband()-1) sw_optical_props_precipByBand%g(:,:,2:sw_gas_props%get_nband()) = asy_precip(:,:,1:sw_gas_props%get_nband()-1) + endif endif diff --git a/physics/rrtmgp_sw_cloud_optics.meta b/physics/rrtmgp_sw_cloud_optics.meta index 4439a607b..9da5093b2 100644 --- a/physics/rrtmgp_sw_cloud_optics.meta +++ b/physics/rrtmgp_sw_cloud_optics.meta @@ -1,7 +1,7 @@ [ccpp-table-properties] name = rrtmgp_sw_cloud_optics type = scheme - dependencies = machine.F,physparam.f,rrtmg_sw_cloud_optics.F90,rrtmgp_aux.F90 + dependencies = machine.F,physparam.f,rrtmg_sw_cloud_optics.F90,radiation_tools.F90 ######################################################################## [ccpp-arg-table] @@ -32,7 +32,7 @@ intent = in optional = F [nrghice] - standard_name = number_of_rrtmgp_ice_roughness + standard_name = number_of_ice_roughness_categories long_name = number of ice-roughness categories in RRTMGP calculation units = count dimensions = () @@ -49,7 +49,7 @@ optional = F kind = len=128 [rrtmgp_sw_file_clouds] - standard_name = rrtmgp_coeff_sw_cloud_optics + standard_name = filename_of_rrtmgp_shortwave_cloud_optics_coefficients long_name = file containing coefficients for RRTMGP SW cloud optics units = none dimensions = () @@ -74,7 +74,7 @@ intent = in optional = F [mpicomm] - standard_name = mpi_comm + standard_name = mpi_communicator long_name = MPI communicator units = index dimensions = () @@ -98,21 +98,12 @@ type = integer intent = out optional = F -[sw_cloud_props] - standard_name = coefficients_for_sw_cloud_optics - long_name = DDT containing spectral information for RRTMGP SW radiation scheme - units = DDT - dimensions = () - type = ty_cloud_optics - intent = out - optional = F - ######################################################################## [ccpp-arg-table] name = rrtmgp_sw_cloud_optics_run type = scheme [doSWrad] - standard_name = flag_to_calc_sw + standard_name = flag_for_calling_shortwave_radiation long_name = logical flags for sw radiation calls units = flag dimensions = () @@ -128,7 +119,7 @@ intent = in optional = F [nLev] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () @@ -144,7 +135,7 @@ intent = in optional = F [icliq_sw] - standard_name = flag_for_optical_property_for_liquid_clouds_for_shortwave_radiation + standard_name = control_for_shortwave_radiation_liquid_clouds long_name = sw optical property for liquid clouds units = flag dimensions = () @@ -175,19 +166,11 @@ type = logical intent = in optional = F -[nrghice] - standard_name = number_of_rrtmgp_ice_roughness - long_name = number of ice-roughness categories in RRTMGP calculation - units = count - dimensions = () - type = integer - intent = in - optional = F [cld_frac] standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -196,7 +179,7 @@ standard_name = cloud_liquid_water_path long_name = layer cloud liquid water path units = g m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -205,7 +188,7 @@ standard_name = mean_effective_radius_for_liquid_cloud long_name = mean effective radius for liquid cloud units = um - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -214,7 +197,7 @@ standard_name = cloud_ice_water_path long_name = layer cloud ice water path units = g m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -223,7 +206,7 @@ standard_name = mean_effective_radius_for_ice_cloud long_name = mean effective radius for ice cloud units = um - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -232,7 +215,7 @@ standard_name = cloud_snow_water_path long_name = layer cloud snow water path units = g m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -241,7 +224,7 @@ standard_name = mean_effective_radius_for_snow_flake long_name = mean effective radius for snow cloud units = um - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -250,7 +233,7 @@ standard_name = cloud_rain_water_path long_name = layer cloud rain water path units = g m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -259,7 +242,7 @@ standard_name = mean_effective_radius_for_rain_drop long_name = mean effective radius for rain cloud units = um - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -268,25 +251,17 @@ standard_name = precipitation_fraction_by_layer long_name = precipitation fraction in each layer units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F -[sw_cloud_props] - standard_name = coefficients_for_sw_cloud_optics - long_name = DDT containing spectral information for cloudy RRTMGP SW radiation scheme - units = DDT - dimensions = () - type = ty_cloud_optics - intent = in - optional = F -[sw_gas_props] - standard_name = coefficients_for_sw_gas_optics - long_name = DDT containing spectral information for RRTMGP SW radiation scheme - units = DDT - dimensions = () - type = ty_gas_optics_rrtmgp +[nbndsGPsw] + standard_name = number_of_shortwave_bands + long_name = number of sw bands used in RRTMGP + units = count + dimensions = () + type = integer intent = in optional = F [nday] @@ -325,7 +300,7 @@ standard_name = RRTMGP_cloud_optical_depth_layers_at_0_55mu_band long_name = approx .55mu band layer cloud optical depth units = none - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out diff --git a/physics/rrtmgp_sw_cloud_sampling.F90 b/physics/rrtmgp_sw_cloud_sampling.F90 index e74ceb4e5..043949fa5 100644 --- a/physics/rrtmgp_sw_cloud_sampling.F90 +++ b/physics/rrtmgp_sw_cloud_sampling.F90 @@ -4,7 +4,8 @@ module rrtmgp_sw_cloud_sampling use mo_optical_props, only: ty_optical_props_2str use rrtmgp_sampling, only: sampled_mask, draw_samples use mersenne_twister, only: random_setseed, random_number, random_stat - use rrtmgp_aux, only: check_error_msg + use radiation_tools, only: check_error_msg + use rrtmgp_sw_gas_optics, only: sw_gas_props use netcdf implicit none @@ -16,10 +17,8 @@ module rrtmgp_sw_cloud_sampling !! \section arg_table_rrtmgp_sw_cloud_sampling_init !! \htmlinclude rrtmgp_sw_cloud_sampling.html !! - subroutine rrtmgp_sw_cloud_sampling_init(sw_gas_props, ipsdsw0, errmsg, errflg) - ! Inputs - type(ty_gas_optics_rrtmgp),intent(in) :: & - sw_gas_props ! RRTMGP DDT: K-distribution data + subroutine rrtmgp_sw_cloud_sampling_init(ipsdsw0, errmsg, errflg) + ! Outputs integer, intent(out) :: & ipsdsw0 ! Initial permutation seed for McICA @@ -46,7 +45,7 @@ end subroutine rrtmgp_sw_cloud_sampling_init subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxday, iovr, & iovr_max, iovr_maxrand, iovr_rand, iovr_dcorr, iovr_exp, iovr_exprand, isubc_sw, & icseed_sw, cld_frac, precip_frac, cloud_overlap_param, precip_overlap_param, & - sw_gas_props, sw_optical_props_cloudsByBand, sw_optical_props_precipByBand, & + sw_optical_props_cloudsByBand, sw_optical_props_precipByBand, & sw_optical_props_clouds, sw_optical_props_precip, errmsg, errflg) ! Inputs @@ -78,8 +77,6 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd real(kind_phys), dimension(ncol,nLev), intent(in) :: & cloud_overlap_param, & ! Cloud overlap parameter precip_overlap_param ! Precipitation overlap parameter - type(ty_gas_optics_rrtmgp),intent(in) :: & - sw_gas_props ! RRTMGP DDT: K-distribution data type(ty_optical_props_2str),intent(in) :: & sw_optical_props_cloudsByBand, & ! RRTMGP DDT: Shortwave optical properties in each band (clouds) sw_optical_props_precipByBand ! RRTMGP DDT: Shortwave optical properties in each band (precipitation) diff --git a/physics/rrtmgp_sw_cloud_sampling.meta b/physics/rrtmgp_sw_cloud_sampling.meta index 01a311fd4..4ba9dcd3b 100644 --- a/physics/rrtmgp_sw_cloud_sampling.meta +++ b/physics/rrtmgp_sw_cloud_sampling.meta @@ -1,20 +1,12 @@ [ccpp-table-properties] name = rrtmgp_sw_cloud_sampling type = scheme - dependencies = machine.F,mersenne_twister.f,physparam.f,rrtmgp_sampling.F90,rrtmgp_aux.F90 + dependencies = machine.F,mersenne_twister.f,physparam.f,rrtmgp_sampling.F90,radiation_tools.F90 ######################################################################## [ccpp-arg-table] name = rrtmgp_sw_cloud_sampling_init type = scheme -[sw_gas_props] - standard_name = coefficients_for_sw_gas_optics - long_name = DDT containing spectral information for RRTMGP SW radiation scheme - units = DDT - dimensions = () - type = ty_gas_optics_rrtmgp - intent = in - optional = F [ipsdsw0] standard_name = initial_permutation_seed_sw long_name = initial seed for McICA SW @@ -46,7 +38,7 @@ name = rrtmgp_sw_cloud_sampling_run type = scheme [doSWrad] - standard_name = flag_to_calc_sw + standard_name = flag_for_calling_shortwave_radiation long_name = logical flags for sw radiation calls units = flag dimensions = () @@ -70,7 +62,7 @@ intent = in optional = F [nLev] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () @@ -158,7 +150,7 @@ intent = in optional = F [icseed_sw] - standard_name = seed_random_numbers_sw + standard_name = random_number_seed_for_mcica_shortwave long_name = seed for random number generation for shortwave radiation units = none dimensions = (horizontal_loop_extent) @@ -169,7 +161,7 @@ standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -178,7 +170,7 @@ standard_name = precipitation_fraction_by_layer long_name = precipitation fraction in each layer units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -187,7 +179,7 @@ standard_name = cloud_overlap_param long_name = cloud overlap parameter units = km - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -196,18 +188,10 @@ standard_name = precip_overlap_param long_name = precipitation overlap parameter units = km - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in - optional = F -[sw_gas_props] - standard_name = coefficients_for_sw_gas_optics - long_name = DDT containing spectral information for RRTMGP SW radiation scheme - units = DDT - dimensions = () - type = ty_gas_optics_rrtmgp - intent = in optional = F [sw_optical_props_cloudsByBand] standard_name = shortwave_optical_properties_for_cloudy_atmosphere_by_band diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index ac643e71d..bd0ac1169 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -1,16 +1,77 @@ module rrtmgp_sw_gas_optics use machine, only: kind_phys - use module_radiation_gases, only: NF_VGAS use mo_rte_kind, only: wl use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_gas_concentrations, only: ty_gas_concs - use rrtmgp_aux, only: check_error_msg + use radiation_tools, only: check_error_msg use mo_optical_props, only: ty_optical_props_2str - use mo_compute_bc, only: compute_bc + use GFS_rrtmgp_pre, only: active_gases_array use netcdf +#ifdef MPI + use mpi +#endif implicit none + real(kind_phys),parameter :: & + tsi_default = 1360.85767381726, & + mg_default = 0.1567652, & + sb_default = 902.7126 + ! RRTMGP k-distribution LUTs. + type(ty_gas_optics_rrtmgp) :: sw_gas_props + integer :: & + ntempsSW, npressSW, ngptsSW, nabsorbersSW, nextrabsorbersSW, nminorabsorbersSW, & + nmixingfracsSW, nlayersSW, nbndsSW, npairsSW, nminor_absorber_intervals_lowerSW,& + nminor_absorber_intervals_upperSW, ncontributors_lowerSW, ncontributors_upperSW + integer, dimension(:), allocatable :: & + kminor_start_lowerSW, & ! Starting index in the [1, nContributors] vector for a contributor + ! given by \"minor_gases_lower\" (lower atmosphere) + kminor_start_upperSW ! Starting index in the [1, nContributors] vector for a contributor + ! given by \"minor_gases_upper\" (upper atmosphere) + integer, dimension(:,:), allocatable :: & + band2gptSW, & ! Beginning and ending gpoint for each band + minor_limits_gpt_lowerSW, & ! Beginning and ending gpoint for each minor interval in lower atmosphere + minor_limits_gpt_upperSW ! Beginning and ending gpoint for each minor interval in upper atmosphere + integer, dimension(:,:,:), allocatable :: & + key_speciesSW ! Key species pair for each band + real(kind_phys) :: & + press_ref_tropSW, & ! Reference pressure separating the lower and upper atmosphere [Pa] + temp_ref_pSW, & ! Standard spectroscopic reference pressure [Pa] + temp_ref_tSW, & ! Standard spectroscopic reference temperature [K] + tsi_defaultSW, & ! + mg_defaultSW, & ! Mean value of Mg2 index over the average solar cycle from the NRLSSI2 model of solar variability + sb_defaultSW ! Mean value of sunspot index over the average solar cycle from the NRLSSI2 model of solar variability + real(kind_phys), dimension(:), allocatable :: & + press_refSW, & ! Pressures for reference atmosphere; press_ref(# reference layers) [Pa] + temp_refSW, & ! Temperatures for reference atmosphere; temp_ref(# reference layers) [K] + solar_quietSW, & ! Spectrally-dependent quiet sun irradiance from the NRLSSI2 model of solar variability + solar_facularSW, & ! Spectrally-dependent facular term from the NRLSSI2 model of solar variability + solar_sunspotSW ! Spectrally-dependent sunspot term from the NRLSSI2 model of solar variability + real(kind_phys), dimension(:,:), allocatable :: & + band_limsSW ! Beginning and ending wavenumber [cm -1] for each band + real(kind_phys), dimension(:,:,:), allocatable :: & + vmr_refSW, & ! Volume mixing ratios for reference atmosphere + kminor_lowerSW, & ! (transformed from [nTemp x nEta x nGpt x nAbsorbers] array to + ! [nTemp x nEta x nContributors] array) + kminor_upperSW, & ! (transformed from [nTemp x nEta x nGpt x nAbsorbers] array to + ! [nTemp x nEta x nContributors] array) + rayl_lowerSW, & ! Stored coefficients due to rayleigh scattering contribution + rayl_upperSW ! Stored coefficients due to rayleigh scattering contribution + real(kind_phys), dimension(:,:,:,:), allocatable :: & + kmajorSW ! Stored absorption coefficients due to major absorbing gases + character(len=32), dimension(:), allocatable :: & + gas_namesSW, & ! Names of absorbing gases + gas_minorSW, & ! Name of absorbing minor gas + identifier_minorSW, & ! Unique string identifying minor gas + minor_gases_lowerSW, & ! Names of minor absorbing gases in lower atmosphere + minor_gases_upperSW, & ! Names of minor absorbing gases in upper atmosphere + scaling_gas_lowerSW, & ! Absorption also depends on the concentration of this gas + scaling_gas_upperSW ! Absorption also depends on the concentration of this gas + logical(wl), dimension(:), allocatable :: & + minor_scales_with_density_lowerSW, & ! Density scaling is applied to minor absorption coefficients + minor_scales_with_density_upperSW, & ! Density scaling is applied to minor absorption coefficients + scale_by_complement_lowerSW, & ! Absorption is scaled by concentration of scaling_gas (F) or its complement (T) + scale_by_complement_upperSW ! Absorption is scaled by concentration of scaling_gas (F) or its complement (T) contains ! ######################################################################################### @@ -19,91 +80,31 @@ module rrtmgp_sw_gas_optics !! \section arg_table_rrtmgp_sw_gas_optics_init !! \htmlinclude rrtmgp_sw_gas_optics.html !! - subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp_nGases, & - active_gases_array, mpicomm, mpirank, mpiroot, sw_gas_props, errmsg, errflg) + subroutine rrtmgp_sw_gas_optics_init(nCol, nLev, nThreads, rrtmgp_root_dir, & + rrtmgp_sw_file_gas, gas_concentrations, mpicomm, mpirank, mpiroot, errmsg, errflg) ! Inputs character(len=128),intent(in) :: & rrtmgp_root_dir, & ! RTE-RRTMGP root directory rrtmgp_sw_file_gas ! RRTMGP file containing coefficients used to compute gaseous optical properties - integer, intent(in) :: & - rrtmgp_nGases ! Number of trace gases active in RRTMGP - character(len=*),dimension(rrtmgp_nGases), intent(in) :: & - active_gases_array ! Character array containing trace gases to include in RRTMGP integer,intent(in) :: & + nCol, & ! Number of horizontal gridpoints. + nLev, & ! Number of vertical levels. + nThreads, & ! Number of openMP threads mpicomm, & ! MPI communicator mpirank, & ! Current MPI rank mpiroot ! Master MPI rank + type(ty_gas_concs),intent(inout) :: & + gas_concentrations ! RRTMGP DDT containing active trace gases. ! Outputs character(len=*), intent(out) :: & errmsg ! CCPP error message integer, intent(out) :: & errflg ! CCPP error code - type(ty_gas_optics_rrtmgp),intent(out) :: & - sw_gas_props ! RRTMGP DDT: shortwave spectral information - - ! Variables that will be passed to gas_optics%load() - type(ty_gas_concs) :: & - gas_concentrations - integer, dimension(:), allocatable :: & - kminor_start_lower, & ! Starting index in the [1, nContributors] vector for a contributor - ! given by \"minor_gases_lower\" (lower atmosphere) - kminor_start_upper ! Starting index in the [1, nContributors] vector for a contributor - ! given by \"minor_gases_upper\" (upper atmosphere) - integer, dimension(:,:), allocatable :: & - band2gpt, & ! Beginning and ending gpoint for each band - minor_limits_gpt_lower, & ! Beginning and ending gpoint for each minor interval in lower atmosphere - minor_limits_gpt_upper ! Beginning and ending gpoint for each minor interval in upper atmosphere - integer, dimension(:,:,:), allocatable :: & - key_species ! Key species pair for each band - real(kind_phys) :: & - press_ref_trop, & ! Reference pressure separating the lower and upper atmosphere [Pa] - temp_ref_p, & ! Standard spectroscopic reference pressure [Pa] - temp_ref_t, & ! Standard spectroscopic reference temperature [K] - tsi_default, & ! - mg_default, & ! - sb_default ! - real(kind_phys), dimension(:), allocatable :: & - press_ref, & ! Pressures for reference atmosphere; press_ref(# reference layers) [Pa] - temp_ref, & ! Temperatures for reference atmosphere; temp_ref(# reference layers) [K] - solar_quiet, & ! - solar_facular, & ! - solar_sunspot ! - real(kind_phys), dimension(:,:), allocatable :: & - band_lims ! Beginning and ending wavenumber [cm -1] for each band - real(kind_phys), dimension(:,:,:), allocatable :: & - vmr_ref, & ! Volume mixing ratios for reference atmosphere - kminor_lower, & ! (transformed from [nTemp x nEta x nGpt x nAbsorbers] array to - ! [nTemp x nEta x nContributors] array) - kminor_upper, & ! (transformed from [nTemp x nEta x nGpt x nAbsorbers] array to - ! [nTemp x nEta x nContributors] array) - rayl_lower, & ! Stored coefficients due to rayleigh scattering contribution - rayl_upper ! Stored coefficients due to rayleigh scattering contribution - real(kind_phys), dimension(:,:,:,:), allocatable :: & - kmajor ! Stored absorption coefficients due to major absorbing gases - character(len=32), dimension(:), allocatable :: & - gas_names, & ! Names of absorbing gases - gas_minor, & ! Name of absorbing minor gas - identifier_minor, & ! Unique string identifying minor gas - minor_gases_lower, & ! Names of minor absorbing gases in lower atmosphere - minor_gases_upper, & ! Names of minor absorbing gases in upper atmosphere - scaling_gas_lower, & ! Absorption also depends on the concentration of this gas - scaling_gas_upper ! Absorption also depends on the concentration of this gas - logical(wl), dimension(:), allocatable :: & - minor_scales_with_density_lower, & ! Density scaling is applied to minor absorption coefficients - minor_scales_with_density_upper, & ! Density scaling is applied to minor absorption coefficients - scale_by_complement_lower, & ! Absorption is scaled by concentration of scaling_gas (F) or its complement (T) - scale_by_complement_upper ! Absorption is scaled by concentration of scaling_gas (F) or its complement (T) - ! Dimensions - integer :: & - ntemps, npress, ngpts, nabsorbers, nextrabsorbers, & - nminorabsorbers, nmixingfracs, nlayers, nbnds, npairs, & - nminor_absorber_intervals_lower, nminor_absorber_intervals_upper, & - ncontributors_lower, ncontributors_upper ! Local variables - integer :: status, ncid, dimid, varID, iGas + integer :: status, ncid, dimid, varID, iGas, mpierr, iChar integer,dimension(:),allocatable :: temp1, temp2, temp3, temp4 character(len=264) :: sw_gas_props_file @@ -111,177 +112,373 @@ subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp errmsg = '' errflg = 0 - ! Filenames are set in the gphysics_nml + ! Filenames are set in the gfphysics_nml sw_gas_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_sw_file_gas) - ! Read dimensions for k-distribution fields (only on master processor(0)) -! if (mpirank .eq. mpiroot) then + ! ####################################################################################### + ! + ! Read dimensions for k-distribution fields... + ! (ONLY master processor(0), if MPI enabled) + ! + ! ####################################################################################### +#ifdef MPI + if (mpirank .eq. mpiroot) then +#endif + write (*,*) 'Reading RRTMGP shortwave k-distribution metadata ... ' + ! Open file status = nf90_open(trim(sw_gas_props_file), NF90_NOWRITE, ncid) ! Read dimensions for k-distribution fields status = nf90_inq_dimid(ncid, 'temperature', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=ntemps) + status = nf90_inquire_dimension(ncid, dimid, len=ntempsSW) status = nf90_inq_dimid(ncid, 'pressure', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=npress) + status = nf90_inquire_dimension(ncid, dimid, len=npressSW) status = nf90_inq_dimid(ncid, 'absorber', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nabsorbers) + status = nf90_inquire_dimension(ncid, dimid, len=nabsorbersSW) status = nf90_inq_dimid(ncid, 'minor_absorber',dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nminorabsorbers) + status = nf90_inquire_dimension(ncid, dimid, len=nminorabsorbersSW) status = nf90_inq_dimid(ncid, 'absorber_ext', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nextrabsorbers) + status = nf90_inquire_dimension(ncid, dimid, len=nextrabsorbersSW) status = nf90_inq_dimid(ncid, 'mixing_fraction', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nmixingfracs) + status = nf90_inquire_dimension(ncid, dimid, len=nmixingfracsSW) status = nf90_inq_dimid(ncid, 'atmos_layer', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nlayers) + status = nf90_inquire_dimension(ncid, dimid, len=nlayersSW) status = nf90_inq_dimid(ncid, 'bnd', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nbnds) + status = nf90_inquire_dimension(ncid, dimid, len=nbndsSW) status = nf90_inq_dimid(ncid, 'gpt', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=ngpts) + status = nf90_inquire_dimension(ncid, dimid, len=ngptsSW) status = nf90_inq_dimid(ncid, 'pair', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=npairs) + status = nf90_inquire_dimension(ncid, dimid, len=npairsSW) status = nf90_inq_dimid(ncid, 'contributors_lower',dimid) - status = nf90_inquire_dimension(ncid, dimid, len=ncontributors_lower) + status = nf90_inquire_dimension(ncid, dimid, len=ncontributors_lowerSW) status = nf90_inq_dimid(ncid, 'contributors_upper', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=ncontributors_upper) + status = nf90_inquire_dimension(ncid, dimid, len=ncontributors_upperSW) status = nf90_inq_dimid(ncid, 'minor_absorber_intervals_lower', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nminor_absorber_intervals_lower) + status = nf90_inquire_dimension(ncid, dimid, len=nminor_absorber_intervals_lowerSW) status = nf90_inq_dimid(ncid, 'minor_absorber_intervals_upper', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nminor_absorber_intervals_upper) - - ! Allocate space for arrays - allocate(gas_names(nabsorbers)) - allocate(scaling_gas_lower(nminor_absorber_intervals_lower)) - allocate(scaling_gas_upper(nminor_absorber_intervals_upper)) - allocate(gas_minor(nminorabsorbers)) - allocate(identifier_minor(nminorabsorbers)) - allocate(minor_gases_lower(nminor_absorber_intervals_lower)) - allocate(minor_gases_upper(nminor_absorber_intervals_upper)) - allocate(minor_limits_gpt_lower(npairs,nminor_absorber_intervals_lower)) - allocate(minor_limits_gpt_upper(npairs,nminor_absorber_intervals_upper)) - allocate(band2gpt(2,nbnds)) - allocate(key_species(2,nlayers,nbnds)) - allocate(band_lims(2,nbnds)) - allocate(press_ref(npress)) - allocate(temp_ref(ntemps)) - allocate(vmr_ref(nlayers, nextrabsorbers, ntemps)) - allocate(kminor_lower(ncontributors_lower, nmixingfracs, ntemps)) - allocate(kmajor(ngpts, nmixingfracs, npress+1, ntemps)) - allocate(kminor_start_lower(nminor_absorber_intervals_lower)) - allocate(kminor_upper(ncontributors_upper, nmixingfracs, ntemps)) - allocate(kminor_start_upper(nminor_absorber_intervals_upper)) - allocate(minor_scales_with_density_lower(nminor_absorber_intervals_lower)) - allocate(minor_scales_with_density_upper(nminor_absorber_intervals_upper)) - allocate(scale_by_complement_lower(nminor_absorber_intervals_lower)) - allocate(scale_by_complement_upper(nminor_absorber_intervals_upper)) - allocate(rayl_upper(ngpts, nmixingfracs, ntemps)) - allocate(rayl_lower(ngpts, nmixingfracs, ntemps)) - allocate(solar_quiet(ngpts)) - allocate(solar_facular(ngpts)) - allocate(solar_sunspot(ngpts)) - allocate(temp1(nminor_absorber_intervals_lower)) - allocate(temp2(nminor_absorber_intervals_upper)) - allocate(temp3(nminor_absorber_intervals_lower)) - allocate(temp4(nminor_absorber_intervals_upper)) - - ! Read in fields from file - if (mpirank==mpiroot) write (*,*) 'Reading RRTMGP shortwave k-distribution data ... ' + status = nf90_inquire_dimension(ncid, dimid, len=nminor_absorber_intervals_upperSW) + +#ifdef MPI + endif ! On master processor + + ! Other processors waiting... + call mpi_barrier(mpicomm, mpierr) + + ! ####################################################################################### + ! + ! Broadcast dimensions... + ! (ALL processors) + ! + ! ####################################################################################### + call mpi_bcast(nbndsSW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(ngptsSW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(nmixingfracsSW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(ntempsSW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(npressSW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(nabsorbersSW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(nextrabsorbersSW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(nminorabsorbersSW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(nlayersSW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(npairsSW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(ncontributors_upperSW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(ncontributors_lowerSW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(nminor_absorber_intervals_upperSW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(nminor_absorber_intervals_lowerSW, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) +#endif + + ! ####################################################################################### + ! + ! Allocate space for arrays... + ! (ALL processors) + ! + ! ####################################################################################### + if (.not. allocated(gas_namesSW)) & + allocate(gas_namesSW(nabsorbersSW)) + if (.not. allocated(scaling_gas_lowerSW)) & + allocate(scaling_gas_lowerSW(nminor_absorber_intervals_lowerSW)) + if (.not. allocated(scaling_gas_upperSW)) & + allocate(scaling_gas_upperSW(nminor_absorber_intervals_upperSW)) + if (.not. allocated(gas_minorSW)) & + allocate(gas_minorSW(nminorabsorbersSW)) + if (.not. allocated(identifier_minorSW)) & + allocate(identifier_minorSW(nminorabsorbersSW)) + if (.not. allocated(minor_gases_lowerSW)) & + allocate(minor_gases_lowerSW(nminor_absorber_intervals_lowerSW)) + if (.not. allocated(minor_gases_upperSW)) & + allocate(minor_gases_upperSW(nminor_absorber_intervals_upperSW)) + if (.not. allocated(minor_limits_gpt_lowerSW)) & + allocate(minor_limits_gpt_lowerSW(npairsSW,nminor_absorber_intervals_lowerSW)) + if (.not. allocated(minor_limits_gpt_upperSW)) & + allocate(minor_limits_gpt_upperSW(npairsSW,nminor_absorber_intervals_upperSW)) + if (.not. allocated(band2gptSW)) & + allocate(band2gptSW(2,nbndsSW)) + if (.not. allocated(key_speciesSW)) & + allocate(key_speciesSW(2,nlayersSW,nbndsSW)) + if (.not. allocated(band_limsSW)) & + allocate(band_limsSW(2,nbndsSW)) + if (.not. allocated(press_refSW)) & + allocate(press_refSW(npressSW)) + if (.not. allocated(temp_refSW)) & + allocate(temp_refSW(ntempsSW)) + if (.not. allocated(vmr_refSW)) & + allocate(vmr_refSW(nlayersSW, nextrabsorbersSW, ntempsSW)) + if (.not. allocated(kminor_lowerSW)) & + allocate(kminor_lowerSW(ncontributors_lowerSW, nmixingfracsSW, ntempsSW)) + if (.not. allocated(kmajorSW)) & + allocate(kmajorSW(ngptsSW, nmixingfracsSW, npressSW+1, ntempsSW)) + if (.not. allocated(kminor_start_lowerSW)) & + allocate(kminor_start_lowerSW(nminor_absorber_intervals_lowerSW)) + if (.not. allocated(kminor_upperSW)) & + allocate(kminor_upperSW(ncontributors_upperSW, nmixingfracsSW, ntempsSW)) + if (.not. allocated(kminor_start_upperSW)) & + allocate(kminor_start_upperSW(nminor_absorber_intervals_upperSW)) + if (.not. allocated(minor_scales_with_density_lowerSW)) & + allocate(minor_scales_with_density_lowerSW(nminor_absorber_intervals_lowerSW)) + if (.not. allocated(minor_scales_with_density_upperSW)) & + allocate(minor_scales_with_density_upperSW(nminor_absorber_intervals_upperSW)) + if (.not. allocated(scale_by_complement_lowerSW)) & + allocate(scale_by_complement_lowerSW(nminor_absorber_intervals_lowerSW)) + if (.not. allocated(scale_by_complement_upperSW)) & + allocate(scale_by_complement_upperSW(nminor_absorber_intervals_upperSW)) + if (.not. allocated(rayl_upperSW)) & + allocate(rayl_upperSW(ngptsSW, nmixingfracsSW, ntempsSW)) + if (.not. allocated(rayl_lowerSW)) & + allocate(rayl_lowerSW(ngptsSW, nmixingfracsSW, ntempsSW)) + if (.not. allocated(solar_quietSW)) & + allocate(solar_quietSW(ngptsSW)) + if (.not. allocated(solar_facularSW)) & + allocate(solar_facularSW(ngptsSW)) + if (.not. allocated(solar_sunspotSW)) & + allocate(solar_sunspotSW(ngptsSW)) + if (.not. allocated(temp1)) & + allocate(temp1(nminor_absorber_intervals_lowerSW)) + if (.not. allocated(temp2)) & + allocate(temp2(nminor_absorber_intervals_upperSW)) + if (.not. allocated(temp3)) & + allocate(temp3(nminor_absorber_intervals_lowerSW)) + if (.not. allocated(temp4)) & + allocate(temp4(nminor_absorber_intervals_upperSW)) + + ! ####################################################################################### + ! + ! Read in data ... + ! (ONLY master processor(0), if MPI enabled) + ! + ! ####################################################################################### +#ifdef MPI + if (mpirank .eq. mpiroot) then +#endif + write (*,*) 'Reading RRTMGP shortwave k-distribution data ... ' status = nf90_inq_varid(ncid, 'gas_names', varID) - status = nf90_get_var( ncid, varID, gas_names) + status = nf90_get_var( ncid, varID, gas_namesSW) status = nf90_inq_varid(ncid, 'scaling_gas_lower', varID) - status = nf90_get_var( ncid, varID, scaling_gas_lower) + status = nf90_get_var( ncid, varID, scaling_gas_lowerSW) status = nf90_inq_varid(ncid, 'scaling_gas_upper', varID) - status = nf90_get_var( ncid, varID, scaling_gas_upper) + status = nf90_get_var( ncid, varID, scaling_gas_upperSW) status = nf90_inq_varid(ncid, 'gas_minor', varID) - status = nf90_get_var( ncid, varID, gas_minor) + status = nf90_get_var( ncid, varID, gas_minorSW) status = nf90_inq_varid(ncid, 'identifier_minor', varID) - status = nf90_get_var( ncid, varID, identifier_minor) + status = nf90_get_var( ncid, varID, identifier_minorSW) status = nf90_inq_varid(ncid, 'minor_gases_lower', varID) - status = nf90_get_var( ncid, varID, minor_gases_lower) + status = nf90_get_var( ncid, varID, minor_gases_lowerSW) status = nf90_inq_varid(ncid, 'minor_gases_upper', varID) - status = nf90_get_var( ncid, varID, minor_gases_upper) + status = nf90_get_var( ncid, varID, minor_gases_upperSW) status = nf90_inq_varid(ncid, 'minor_limits_gpt_lower', varID) - status = nf90_get_var( ncid, varID, minor_limits_gpt_lower) + status = nf90_get_var( ncid, varID, minor_limits_gpt_lowerSW) status = nf90_inq_varid(ncid, 'minor_limits_gpt_upper', varID) - status = nf90_get_var( ncid, varID, minor_limits_gpt_upper) + status = nf90_get_var( ncid, varID, minor_limits_gpt_upperSW) status = nf90_inq_varid(ncid, 'bnd_limits_gpt', varID) - status = nf90_get_var( ncid, varID, band2gpt) + status = nf90_get_var( ncid, varID, band2gptSW) status = nf90_inq_varid(ncid, 'key_species', varID) - status = nf90_get_var( ncid, varID, key_species) + status = nf90_get_var( ncid, varID, key_speciesSW) status = nf90_inq_varid(ncid,'bnd_limits_wavenumber', varID) - status = nf90_get_var( ncid, varID, band_lims) + status = nf90_get_var( ncid, varID, band_limsSW) status = nf90_inq_varid(ncid, 'press_ref', varID) - status = nf90_get_var( ncid, varID, press_ref) + status = nf90_get_var( ncid, varID, press_refSW) status = nf90_inq_varid(ncid, 'temp_ref', varID) - status = nf90_get_var( ncid, varID, temp_ref) + status = nf90_get_var( ncid, varID, temp_refSW) status = nf90_inq_varid(ncid, 'absorption_coefficient_ref_P', varID) - status = nf90_get_var( ncid, varID, temp_ref_p) + status = nf90_get_var( ncid, varID, temp_ref_pSW) status = nf90_inq_varid(ncid, 'absorption_coefficient_ref_T', varID) - status = nf90_get_var( ncid, varID, temp_ref_t) + status = nf90_get_var( ncid, varID, temp_ref_tSW) status = nf90_inq_varid(ncid, 'tsi_default', varID) - status = nf90_get_var( ncid, varID, tsi_default) + if (status .eq. 0) then + status = nf90_get_var( ncid, varID, tsi_defaultSW) + else + tsi_defaultSW = tsi_default + endif status = nf90_inq_varid(ncid, 'mg_default', varID) - status = nf90_get_var( ncid, varID, mg_default) + if (status .eq. 0) then + status = nf90_get_var( ncid, varID, mg_defaultSW) + else + mg_defaultSW = mg_default + endif status = nf90_inq_varid(ncid, 'sb_default', varID) - status = nf90_get_var( ncid, varID, sb_default) + if (status .eq. 0) then + status = nf90_get_var( ncid, varID, sb_defaultSW) + else + sb_defaultSW = sb_default + endif status = nf90_inq_varid(ncid, 'press_ref_trop', varID) - status = nf90_get_var( ncid, varID, press_ref_trop) + status = nf90_get_var( ncid, varID, press_ref_tropSW) status = nf90_inq_varid(ncid, 'kminor_lower', varID) - status = nf90_get_var( ncid, varID, kminor_lower) + status = nf90_get_var( ncid, varID, kminor_lowerSW) status = nf90_inq_varid(ncid, 'kminor_upper', varID) - status = nf90_get_var( ncid, varID, kminor_upper) + status = nf90_get_var( ncid, varID, kminor_upperSW) status = nf90_inq_varid(ncid, 'vmr_ref', varID) - status = nf90_get_var( ncid, varID, vmr_ref) + status = nf90_get_var( ncid, varID, vmr_refSW) status = nf90_inq_varid(ncid, 'kmajor', varID) - status = nf90_get_var( ncid, varID, kmajor) + status = nf90_get_var( ncid, varID, kmajorSW) status = nf90_inq_varid(ncid, 'kminor_start_lower', varID) - status = nf90_get_var( ncid, varID, kminor_start_lower) + status = nf90_get_var( ncid, varID, kminor_start_lowerSW) status = nf90_inq_varid(ncid, 'kminor_start_upper', varID) - status = nf90_get_var( ncid, varID, kminor_start_upper) + status = nf90_get_var( ncid, varID, kminor_start_upperSW) status = nf90_inq_varid(ncid, 'solar_source_quiet', varID) - status = nf90_get_var( ncid, varID, solar_quiet) + status = nf90_get_var( ncid, varID, solar_quietSW) status = nf90_inq_varid(ncid, 'solar_source_facular', varID) - status = nf90_get_var( ncid, varID, solar_facular) + status = nf90_get_var( ncid, varID, solar_facularSW) status = nf90_inq_varid(ncid, 'solar_source_sunspot', varID) - status = nf90_get_var( ncid, varID, solar_sunspot) + status = nf90_get_var( ncid, varID, solar_sunspotSW) status = nf90_inq_varid(ncid, 'rayl_lower', varID) - status = nf90_get_var( ncid, varID, rayl_lower) + status = nf90_get_var( ncid, varID, rayl_lowerSW) status = nf90_inq_varid(ncid, 'rayl_upper', varID) - status = nf90_get_var( ncid, varID, rayl_upper) + status = nf90_get_var( ncid, varID, rayl_upperSW) ! Logical fields are read in as integers and then converted to logicals. status = nf90_inq_varid(ncid,'minor_scales_with_density_lower', varID) status = nf90_get_var( ncid, varID,temp1) - minor_scales_with_density_lower(:) = .false. - where(temp1 .eq. 1) minor_scales_with_density_lower(:) = .true. + minor_scales_with_density_lowerSW(:) = .false. + where(temp1 .eq. 1) minor_scales_with_density_lowerSW(:) = .true. status = nf90_inq_varid(ncid,'minor_scales_with_density_upper', varID) status = nf90_get_var( ncid, varID,temp2) - minor_scales_with_density_upper(:) = .false. - where(temp2 .eq. 1) minor_scales_with_density_upper(:) = .true. + minor_scales_with_density_upperSW(:) = .false. + where(temp2 .eq. 1) minor_scales_with_density_upperSW(:) = .true. status = nf90_inq_varid(ncid,'scale_by_complement_lower', varID) status = nf90_get_var( ncid, varID,temp3) - scale_by_complement_lower(:) = .false. - where(temp3 .eq. 1) scale_by_complement_lower(:) = .true. + scale_by_complement_lowerSW(:) = .false. + where(temp3 .eq. 1) scale_by_complement_lowerSW(:) = .true. status = nf90_inq_varid(ncid,'scale_by_complement_upper', varID) status = nf90_get_var( ncid, varID,temp4) - scale_by_complement_upper(:) = .false. - where(temp4 .eq. 1) scale_by_complement_upper(:) = .true. + scale_by_complement_upperSW(:) = .false. + where(temp4 .eq. 1) scale_by_complement_upperSW(:) = .true. ! Close status = nf90_close(ncid) -! endif +#ifdef MPI + endif ! Master process + + ! Other processors waiting... + call mpi_barrier(mpicomm, mpierr) + ! ####################################################################################### + ! + ! Broadcast data... + ! (ALL processors) + ! + ! ####################################################################################### - ! Initialize gas concentrations and gas optics class - call check_error_msg('sw_gas_optics_init',gas_concentrations%init(active_gases_array)) - call check_error_msg('sw_gas_optics_init',sw_gas_props%load(gas_concentrations, gas_names, & - key_species, band2gpt, band_lims, press_ref, press_ref_trop, temp_ref, temp_ref_p, & - temp_ref_t, vmr_ref, kmajor, kminor_lower, kminor_upper, gas_minor, identifier_minor, & - minor_gases_lower, minor_gases_upper, minor_limits_gpt_lower,minor_limits_gpt_upper, & - minor_scales_with_density_lower, minor_scales_with_density_upper, scaling_gas_lower, & - scaling_gas_upper, scale_by_complement_lower, scale_by_complement_upper, & - kminor_start_lower, kminor_start_upper, solar_quiet, solar_facular, solar_sunspot, & - tsi_default, mg_default, sb_default, rayl_lower, rayl_upper)) + ! Real scalars + call mpi_bcast(press_ref_tropSW, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(temp_ref_pSW, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(temp_ref_tSW, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(tsi_defaultSW, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(mg_defaultSW, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(sb_defaultSW, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + + ! Integer arrays + call mpi_bcast(kminor_start_lowerSW, & + size(kminor_start_lowerSW), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(kminor_start_upperSW, & + size(kminor_start_upperSW), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(band2gptSW, & + size(band2gptSW), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(minor_limits_gpt_lowerSW, & + size(minor_limits_gpt_lowerSW), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(minor_limits_gpt_upperSW, & + size(minor_limits_gpt_upperSW), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call mpi_bcast(key_speciesSW, & + size(key_speciesSW), MPI_INTEGER, mpiroot, mpicomm, mpierr) + + ! Real arrays + call mpi_bcast(press_refSW, & + size(press_refSW), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(temp_refSW, & + size(temp_refSW), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(solar_quietSW, & + size(solar_quietSW), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(solar_facularSW, & + size(solar_facularSW), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(solar_sunspotSW, & + size(solar_sunspotSW), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(band_limsSW, & + size(band_limsSW), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(vmr_refSW, & + size(vmr_refSW), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(kminor_lowerSW, & + size(kminor_lowerSW), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(kminor_upperSW, & + size(kminor_upperSW), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(rayl_lowerSW, & + size(rayl_lowerSW), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(rayl_upperSW, & + size(rayl_upperSW), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call mpi_bcast(kmajorSW, & + size(kmajorSW), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + + ! Characters + do iChar=1,nabsorbersSW + call mpi_bcast(gas_namesSW(iChar), & + len(gas_namesSW(iChar)), MPI_CHARACTER, mpiroot, mpicomm, mpierr) + enddo + do iChar=1,nminorabsorbersSW + call mpi_bcast(gas_minorSW(iChar), & + len(gas_minorSW(iChar)), MPI_CHARACTER, mpiroot, mpicomm, mpierr) + call mpi_bcast(identifier_minorSW(iChar), & + len(identifier_minorSW(iChar)), MPI_CHARACTER, mpiroot, mpicomm, mpierr) + enddo + do iChar=1,nminor_absorber_intervals_lowerSW + call mpi_bcast(minor_gases_lowerSW(iChar), & + len(minor_gases_lowerSW(iChar)), MPI_CHARACTER, mpiroot, mpicomm, mpierr) + call mpi_bcast(scaling_gas_lowerSW(iChar), & + len(scaling_gas_lowerSW(iChar)), MPI_CHARACTER, mpiroot, mpicomm, mpierr) + enddo + do iChar=1,nminor_absorber_intervals_upperSW + call mpi_bcast(minor_gases_upperSW(iChar), & + len(minor_gases_upperSW(iChar)), MPI_CHARACTER, mpiroot, mpicomm, mpierr) + call mpi_bcast(scaling_gas_upperSW(iChar), & + len(scaling_gas_upperSW(iChar)), MPI_CHARACTER, mpiroot, mpicomm, mpierr) + enddo + + ! Logicals + call mpi_bcast(minor_scales_with_density_lowerSW, & + size(minor_scales_with_density_lowerSW), MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call mpi_bcast(minor_scales_with_density_upperSW, & + size(minor_scales_with_density_upperSW), MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call mpi_bcast(scale_by_complement_lowerSW, & + size(scale_by_complement_lowerSW), MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call mpi_bcast(scale_by_complement_upperSW, & + size(scale_by_complement_upperSW), MPI_LOGICAL, mpiroot, mpicomm, mpierr) + + call mpi_barrier(mpicomm, mpierr) +#endif + + ! ####################################################################################### + ! + ! Initialize RRTMGP DDT's... + ! + ! ####################################################################################### + gas_concentrations%gas_name(:) = active_gases_array(:) + call check_error_msg('sw_gas_optics_init',sw_gas_props%load(gas_concentrations, & + gas_namesSW, key_speciesSW, band2gptSW, band_limsSW, press_refSW, press_ref_tropSW,& + temp_refSW, temp_ref_pSW, temp_ref_tSW, vmr_refSW, kmajorSW, kminor_lowerSW, & + kminor_upperSW, gas_minorSW, identifier_minorSW, minor_gases_lowerSW, & + minor_gases_upperSW, minor_limits_gpt_lowerSW, minor_limits_gpt_upperSW, & + minor_scales_with_density_lowerSW, minor_scales_with_density_upperSW, & + scaling_gas_lowerSW, scaling_gas_upperSW, scale_by_complement_lowerSW, & + scale_by_complement_upperSW, kminor_start_lowerSW, kminor_start_upperSW, & + solar_quietSW, solar_facularSW, solar_sunspotSW, tsi_defaultSW, mg_defaultSW, & + sb_defaultSW, rayl_lowerSW, rayl_upperSW)) end subroutine rrtmgp_sw_gas_optics_init @@ -291,21 +488,20 @@ end subroutine rrtmgp_sw_gas_optics_init !! \section arg_table_rrtmgp_sw_gas_optics_run !! \htmlinclude rrtmgp_sw_gas_optics.html !! - subroutine rrtmgp_sw_gas_optics_run(doSWrad, nCol, nLev, nday, idxday, sw_gas_props, p_lay,& - p_lev, toa_src_sw, t_lay, t_lev, gas_concentrations, solcon, rrtmgp_nGases, & - active_gases_array, sw_optical_props_clrsky, errmsg, errflg) + subroutine rrtmgp_sw_gas_optics_run(doSWrad, nCol, nLev, ngptsGPsw, nday, idxday, p_lay, & + p_lev, toa_src_sw, t_lay, t_lev, gas_concentrations, solcon, sw_optical_props_clrsky,& + errmsg, errflg) ! Inputs logical, intent(in) :: & doSWrad ! Flag to calculate SW irradiances integer,intent(in) :: & + ngptsGPsw, & ! Number of spectral (g) points. nDay, & ! Number of daylit points. nCol, & ! Number of horizontal points nLev ! Number of vertical levels integer,intent(in),dimension(ncol) :: & idxday ! Indices for daylit points. - type(ty_gas_optics_rrtmgp),intent(in) :: & - sw_gas_props ! RRTMGP DDT: spectral information for RRTMGP SW radiation scheme real(kind_phys), dimension(ncol,nLev), intent(in) :: & p_lay, & ! Pressure @ model layer-centers (hPa) t_lay ! Temperature (K) @@ -316,10 +512,6 @@ subroutine rrtmgp_sw_gas_optics_run(doSWrad, nCol, nLev, nday, idxday, sw_gas_pr gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) real(kind_phys), intent(in) :: & solcon ! Solar constant - integer, intent(in) :: & - rrtmgp_nGases ! Number of trace gases active in RRTMGP - character(len=*),dimension(rrtmgp_nGases), intent(in) :: & - active_gases_array ! Character array containing trace gases to include in RRTMGP ! Output character(len=*), intent(out) :: & @@ -328,15 +520,14 @@ subroutine rrtmgp_sw_gas_optics_run(doSWrad, nCol, nLev, nday, idxday, sw_gas_pr errflg ! CCPP error code type(ty_optical_props_2str),intent(out) :: & sw_optical_props_clrsky ! RRTMGP DDT: clear-sky shortwave optical properties, spectral (tau,ssa,g) - real(kind_phys), dimension(ncol,sw_gas_props%get_ngpt()), intent(out) :: & + real(kind_phys), dimension(nCol,ngptsGPsw), intent(out) :: & toa_src_sw ! TOA incident spectral flux (W/m2) ! Local variables integer :: ij,iGas real(kind_phys), dimension(ncol,nLev) :: vmrTemp - real(kind_phys), dimension(nday,sw_gas_props%get_ngpt()) :: toa_src_sw_temp - type(ty_gas_concs) :: & - gas_concentrations_daylit ! RRTMGP DDT: trace gas concentrations (vmr) + real(kind_phys), dimension(nday,ngptsGPsw) :: toa_src_sw_temp + type(ty_gas_concs) :: gas_concentrations_daylit ! Initialize CCPP error handling variables errmsg = '' @@ -344,38 +535,46 @@ subroutine rrtmgp_sw_gas_optics_run(doSWrad, nCol, nLev, nday, idxday, sw_gas_pr if (.not. doSWrad) return + toa_src_sw(:,:) = 0._kind_phys if (nDay .gt. 0) then + !active_gases = gas_concentrations%get_gas_names() ! Allocate space - call check_error_msg('rrtmgp_sw_gas_optics_run',sw_optical_props_clrsky%alloc_2str(nday, nLev, sw_gas_props)) + call check_error_msg('rrtmgp_sw_gas_optics_run_alloc_2str',& + sw_optical_props_clrsky%alloc_2str(nday, nLev, sw_gas_props)) - ! Initialize gas concentrations and gas optics class - call check_error_msg('rrtmgp_sw_rte_run',gas_concentrations_daylit%init(active_gases_array)) + gas_concentrations_daylit%ncol = nDay + gas_concentrations_daylit%nlay = nLev + allocate(gas_concentrations_daylit%gas_name(gas_concentrations%get_num_gases())) + allocate(gas_concentrations_daylit%concs(gas_concentrations%get_num_gases())) + do iGas=1,gas_concentrations%get_num_gases() + allocate(gas_concentrations_daylit%concs(iGas)%conc(nDay, nLev)) + enddo + gas_concentrations_daylit%gas_name(:) = active_gases_array(:) - ! Subset the gas concentrations, only need daylit points. - do iGas=1,rrtmgp_nGases - call check_error_msg('rrtmgp_sw_rte_run',& - gas_concentrations%get_vmr(trim(active_gases_array(iGas)),vmrTemp)) - call check_error_msg('rrtmgp_sw_rte_run',& - gas_concentrations_daylit%set_vmr(trim(active_gases_array(iGas)),vmrTemp(idxday(1:nday),:))) + ! Subset the gas concentrations. + do iGas=1,gas_concentrations%get_num_gases() + call check_error_msg('rrtmgp_sw_gas_optics_run_get_vmr',& + gas_concentrations%get_vmr(trim(gas_concentrations_daylit%gas_name(iGas)),vmrTemp)) + call check_error_msg('rrtmgp_sw_gas_optics_run_set_vmr',& + gas_concentrations_daylit%set_vmr(trim(gas_concentrations_daylit%gas_name(iGas)),vmrTemp(idxday(1:nday),:))) enddo - ! Gas-optics + ! Call SW gas-optics call check_error_msg('rrtmgp_sw_gas_optics_run',sw_gas_props%gas_optics(& - p_lay(idxday(1:nday),:), & ! IN - Pressure @ layer-centers (Pa) - p_lev(idxday(1:nday),:), & ! IN - Pressure @ layer-interfaces (Pa) - t_lay(idxday(1:nday),:), & ! IN - Temperature @ layer-centers (K) - gas_concentrations_daylit, & ! IN - RRTMGP DDT: trace gas volumne mixing-ratios - sw_optical_props_clrsky, & ! OUT - RRTMGP DDT: Shortwave optical properties, by - ! spectral point (tau,ssa,g) - toa_src_sw_temp)) ! OUT - TOA incident shortwave radiation (spectral) + p_lay(idxday(1:nday),:), & ! IN - Pressure @ layer-centers (Pa) + p_lev(idxday(1:nday),:), & ! IN - Pressure @ layer-interfaces (Pa) + t_lay(idxday(1:nday),:), & ! IN - Temperature @ layer-centers (K) + gas_concentrations_daylit, & ! IN - RRTMGP DDT: trace gas volumne mixing-ratios + sw_optical_props_clrsky, & ! OUT - RRTMGP DDT: Shortwave optical properties, by + ! spectral point (tau,ssa,g) + toa_src_sw_temp)) ! OUT - TOA incident shortwave radiation (spectral) toa_src_sw(idxday(1:nday),:) = toa_src_sw_temp + ! Scale incident flux do ij=1,nday toa_src_sw(idxday(ij),:) = toa_src_sw(idxday(ij),:)*solcon/ & sum(toa_src_sw(idxday(ij),:)) enddo - else - toa_src_sw(:,:) = 0. endif end subroutine rrtmgp_sw_gas_optics_run diff --git a/physics/rrtmgp_sw_gas_optics.meta b/physics/rrtmgp_sw_gas_optics.meta index 75bcde0c8..f85daf09a 100644 --- a/physics/rrtmgp_sw_gas_optics.meta +++ b/physics/rrtmgp_sw_gas_optics.meta @@ -1,13 +1,36 @@ [ccpp-table-properties] name = rrtmgp_sw_gas_optics type = scheme - dependencies = iounitdef.f,machine.F,radiation_gases.f,rrtmgp_aux.F90,rte-rrtmgp/extensions/mo_compute_bc.F90,rte-rrtmgp/rte/mo_fluxes.F90,rte-rrtmgp/rte/kernels/mo_fluxes_broadband_kernels.F90 - dependencies = rte-rrtmgp/rte/mo_rte_lw.F90,rte-rrtmgp/rte/mo_rte_sw.F90,rte-rrtmgp/rte/kernels/mo_rte_solver_kernels.F90,rrtmgp_aux.F90 + dependencies = machine.F,radiation_tools.F90,GFS_rrtmgp_pre.F90,rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90,rte-rrtmgp/rte/mo_rte_kind.F90,rte-rrtmgp/rrtmgp/mo_gas_concentrations.F90,rte-rrtmgp/rte/mo_optical_props.F90 ######################################################################## [ccpp-arg-table] name = rrtmgp_sw_gas_optics_init type = scheme +[ncol] + standard_name = horizontal_dimension + long_name = horizontal dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[nLev] + standard_name = vertical_layer_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in + optional = F +[nThreads] + standard_name = number_of_openmp_threads + long_name = number of OpenMP threads available to scheme + units = count + dimensions = () + type = integer + intent = in + optional = F [rrtmgp_root_dir] standard_name = directory_for_rte_rrtmgp_source_code long_name = directory for rte+rrtmgp source code @@ -18,7 +41,7 @@ optional = F kind = len=128 [rrtmgp_sw_file_gas] - standard_name = rrtmgp_kdistribution_sw + standard_name = filename_of_rrtmgp_shortwave_k_distribution long_name = file containing RRTMGP SW k-distribution units = none dimensions = () @@ -26,22 +49,13 @@ intent = in optional = F kind = len=128 -[rrtmgp_nGases] - standard_name = number_of_active_gases_used_by_RRTMGP - long_name = number of gases available used by RRTMGP - units = count - dimensions = () - type = integer - intent = in - optional = F -[active_gases_array] - standard_name = list_of_active_gases_used_by_RRTMGP - long_name = list of active gases used by RRTMGP - units = none - dimensions = (number_of_active_gases_used_by_RRTMGP) - type = character - kind = len=* - intent = in +[gas_concentrations] + standard_name = Gas_concentrations_for_RRTMGP_suite + long_name = DDT containing gas concentrations for RRTMGP radiation scheme + units = DDT + dimensions = () + type = ty_gas_concs + intent = inout optional = F [mpirank] standard_name = mpi_rank @@ -60,7 +74,7 @@ intent = in optional = F [mpicomm] - standard_name = mpi_comm + standard_name = mpi_communicator long_name = MPI communicator units = index dimensions = () @@ -84,21 +98,13 @@ type = integer intent = out optional = F -[sw_gas_props] - standard_name = coefficients_for_sw_gas_optics - long_name = DDT containing spectral information for RRTMGP SW radiation scheme - units = DDT - dimensions = () - type = ty_gas_optics_rrtmgp - intent = out - optional = F ######################################################################## [ccpp-arg-table] name = rrtmgp_sw_gas_optics_run type = scheme [doSWrad] - standard_name = flag_to_calc_sw + standard_name = flag_for_calling_shortwave_radiation long_name = flag to calculate SW irradiances units = flag dimensions = () @@ -114,7 +120,7 @@ intent = in optional = F [nLev] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () @@ -137,19 +143,19 @@ type = integer intent = in optional = F -[sw_gas_props] - standard_name = coefficients_for_sw_gas_optics - long_name = DDT containing spectral information for RRTMGP SW radiation scheme - units = DDT - dimensions = () - type = ty_gas_optics_rrtmgp +[ngptsGPsw] + standard_name = number_of_shortwave_spectral_points + long_name = number of spectral points in RRTMGP SW calculation + units = count + dimensions = () + type = integer intent = in optional = F [p_lay] standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure layer units = hPa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -158,7 +164,7 @@ standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure level units = hPa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -167,7 +173,7 @@ standard_name = air_temperature_at_layer_for_RRTMGP long_name = air temperature layer units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -176,7 +182,7 @@ standard_name = air_temperature_at_interface_for_RRTMGP long_name = air temperature level units = K - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -185,7 +191,7 @@ standard_name = toa_incident_sw_flux_by_spectral_point long_name = TOA shortwave incident flux at each spectral points units = W m-2 - dimensions = (horizontal_loop_extent,number_of_sw_spectral_points_rrtmgp) + dimensions = (horizontal_loop_extent,number_of_shortwave_spectral_points) type = real kind = kind_phys intent = out @@ -207,23 +213,6 @@ kind = kind_phys intent = in optional = F -[rrtmgp_nGases] - standard_name = number_of_active_gases_used_by_RRTMGP - long_name = number of gases available used by RRTMGP - units = count - dimensions = () - type = integer - intent = in - optional = F -[active_gases_array] - standard_name = list_of_active_gases_used_by_RRTMGP - long_name = list of active gases used by RRTMGP - units = none - dimensions = (number_of_active_gases_used_by_RRTMGP) - type = character - kind = len=* - intent = in - optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/rrtmgp_sw_rte.F90 b/physics/rrtmgp_sw_rte.F90 index 9719c6e86..f28e94b0f 100644 --- a/physics/rrtmgp_sw_rte.F90 +++ b/physics/rrtmgp_sw_rte.F90 @@ -8,8 +8,8 @@ module rrtmgp_sw_rte use mo_gas_concentrations, only: ty_gas_concs use mo_fluxes_byband, only: ty_fluxes_byband use module_radsw_parameters, only: cmpfsw_type - use rrtmgp_aux, only: check_error_msg - + use radiation_tools, only: check_error_msg + use rrtmgp_sw_gas_optics, only: sw_gas_props implicit none public rrtmgp_sw_rte_init, rrtmgp_sw_rte_run, rrtmgp_sw_rte_finalize @@ -29,10 +29,10 @@ end subroutine rrtmgp_sw_rte_init !! \htmlinclude rrtmgp_sw_rte.html !! subroutine rrtmgp_sw_rte_run(doSWrad, doSWclrsky, nCol, nLev, nDay, idxday, coszen, p_lay, & - t_lay, p_lev, sw_gas_props, sw_optical_props_clrsky, sfc_alb_nir_dir, sfc_alb_nir_dif,& + t_lay, p_lev, sw_optical_props_clrsky, sfc_alb_nir_dir, sfc_alb_nir_dif, & sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, toa_src_sw, sw_optical_props_clouds, & - sw_optical_props_aerosol, rrtmgp_nGases, active_gases_array, scmpsw, fluxswUP_allsky, & - fluxswDOWN_allsky, fluxswUP_clrsky, fluxswDOWN_clrsky, errmsg, errflg) + sw_optical_props_aerosol, scmpsw, fluxswUP_allsky, fluxswDOWN_allsky, fluxswUP_clrsky,& + fluxswDOWN_clrsky, errmsg, errflg) ! Inputs logical, intent(in) :: & @@ -51,8 +51,6 @@ subroutine rrtmgp_sw_rte_run(doSWrad, doSWclrsky, nCol, nLev, nDay, idxday, cosz t_lay ! Temperature (K) real(kind_phys), dimension(ncol,NLev+1), intent(in) :: & p_lev ! Pressure @ model layer-interfaces (Pa) - type(ty_gas_optics_rrtmgp),intent(in) :: & - sw_gas_props ! RRTMGP DDT: SW spectral information type(ty_optical_props_2str),intent(inout) :: & sw_optical_props_clrsky ! RRTMGP DDT: shortwave clear-sky radiative properties type(ty_optical_props_2str),intent(in) :: & @@ -65,10 +63,6 @@ subroutine rrtmgp_sw_rte_run(doSWrad, doSWclrsky, nCol, nLev, nDay, idxday, cosz sfc_alb_uvvis_dif ! Surface albedo (diffuse) real(kind_phys), dimension(ncol,sw_gas_props%get_ngpt()), intent(in) :: & toa_src_sw ! TOA incident spectral flux (W/m2) - integer, intent(in) :: & - rrtmgp_nGases ! Number of trace gases active in RRTMGP - character(len=*),dimension(rrtmgp_nGases), intent(in) :: & - active_gases_array ! Character array containing trace gases to include in RRTMGP ! Outputs character(len=*), intent(out) :: & diff --git a/physics/rrtmgp_sw_rte.meta b/physics/rrtmgp_sw_rte.meta index 43febcd92..e2232049b 100644 --- a/physics/rrtmgp_sw_rte.meta +++ b/physics/rrtmgp_sw_rte.meta @@ -1,7 +1,7 @@ [ccpp-table-properties] name = rrtmgp_sw_rte type = scheme - dependencies = machine.F,radsw_param.f,rte-rrtmgp/rte/mo_rte_sw.F90,rte-rrtmgp/rte/mo_fluxes.F90,rte-rrtmgp/rte/kernels/mo_fluxes_broadband_kernels.F90,rrtmgp_aux.F90 + dependencies = machine.F,radsw_param.f,rte-rrtmgp/rte/mo_rte_sw.F90,rte-rrtmgp/rte/mo_fluxes.F90,rte-rrtmgp/rte/kernels/mo_fluxes_broadband_kernels.F90,radiation_tools.F90 dependencies = rte-rrtmgp/rte/kernels/mo_rte_solver_kernels.F90,rte-rrtmgp/extensions/mo_fluxes_byband.F90,rte-rrtmgp/extensions/mo_fluxes_byband_kernels.F90 ######################################################################## @@ -9,7 +9,7 @@ name = rrtmgp_sw_rte_run type = scheme [doSWrad] - standard_name = flag_to_calc_sw + standard_name = flag_for_calling_shortwave_radiation long_name = flag to calculate SW irradiances units = flag dimensions = () @@ -17,7 +17,7 @@ intent = in optional = F [doSWclrsky] - standard_name = flag_for_output_of_shortwave_heating_rate + standard_name = flag_for_output_of_tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_timestep_assuming_clear_sky long_name = flag to output sw heating rate (Radtend%swhc) units = flag dimensions = () @@ -33,7 +33,7 @@ intent = in optional = F [nLev] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () @@ -57,7 +57,7 @@ intent = in optional = F [coszen] - standard_name = cosine_of_zenith_angle + standard_name = cosine_of_solar_zenith_angle_for_daytime_points_on_radiation_timestep long_name = mean cos of zenith angle over rad call period units = none dimensions = (horizontal_loop_extent) @@ -69,7 +69,7 @@ standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure layer units = hPa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -78,7 +78,7 @@ standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure level units = hPa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -87,19 +87,11 @@ standard_name = air_temperature_at_layer_for_RRTMGP long_name = air temperature layer units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F -[sw_gas_props] - standard_name = coefficients_for_sw_gas_optics - long_name = DDT containing spectral information for RRTMGP SW radiation scheme - units = DDT - dimensions = () - type = ty_gas_optics_rrtmgp - intent = in - optional = F [sw_optical_props_clrsky] standard_name = shortwave_optical_properties_for_clear_sky long_name = Fortran DDT containing RRTMGP optical properties @@ -128,7 +120,7 @@ standard_name = surface_albedo_nearIR_direct long_name = near-IR (direct) surface albedo (sfc_alb_nir_dir) units = none - dimensions = (number_of_sw_bands_rrtmgp,horizontal_loop_extent) + dimensions = (number_of_shortwave_bands,horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -137,7 +129,7 @@ standard_name = surface_albedo_nearIR_diffuse long_name = near-IR (diffuse) surface albedo (sfc_alb_nir_dif) units = none - dimensions = (number_of_sw_bands_rrtmgp,horizontal_loop_extent) + dimensions = (number_of_shortwave_bands,horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -146,7 +138,7 @@ standard_name = surface_albedo_uvvis_dir long_name = UVVIS (direct) surface albedo (sfc_alb_uvvis_dir) units = none - dimensions = (number_of_sw_bands_rrtmgp,horizontal_loop_extent) + dimensions = (number_of_shortwave_bands,horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -155,7 +147,7 @@ standard_name = surface_albedo_uvvis_dif long_name = UVVIS (diffuse) surface albedo (sfc_alb_uvvis_dif) units = none - dimensions = (number_of_sw_bands_rrtmgp,horizontal_loop_extent) + dimensions = (number_of_shortwave_bands,horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -164,28 +156,11 @@ standard_name = toa_incident_sw_flux_by_spectral_point long_name = TOA shortwave incident flux at each spectral points units = W m-2 - dimensions = (horizontal_loop_extent,number_of_sw_spectral_points_rrtmgp) + dimensions = (horizontal_loop_extent,number_of_shortwave_spectral_points) type = real kind = kind_phys intent = in optional = F -[rrtmgp_nGases] - standard_name = number_of_active_gases_used_by_RRTMGP - long_name = number of gases available used by RRTMGP - units = count - dimensions = () - type = integer - intent = in - optional = F -[active_gases_array] - standard_name = list_of_active_gases_used_by_RRTMGP - long_name = list of active gases used by RRTMGP - units = none - dimensions = (number_of_active_gases_used_by_RRTMGP) - type = character - kind = len=* - intent = in - optional = F [scmpsw] standard_name = components_of_surface_downward_shortwave_fluxes long_name = derived type for special components of surface downward shortwave fluxes @@ -198,7 +173,7 @@ standard_name = RRTMGP_sw_flux_profile_upward_allsky long_name = RRTMGP upward shortwave all-sky flux profile units = W m-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = inout @@ -207,7 +182,7 @@ standard_name = RRTMGP_sw_flux_profile_downward_allsky long_name = RRTMGP downward shortwave all-sky flux profile units = W m-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = inout @@ -216,7 +191,7 @@ standard_name = RRTMGP_sw_flux_profile_upward_clrsky long_name = RRTMGP upward shortwave clr-sky flux profile units = W m-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = inout @@ -225,7 +200,7 @@ standard_name = RRTMGP_sw_flux_profile_downward_clrsky long_name = RRTMGP downward shortwave clr-sky flux profile units = W m-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/rte-rrtmgp b/physics/rte-rrtmgp index 33c8a984c..3be5c3437 160000 --- a/physics/rte-rrtmgp +++ b/physics/rte-rrtmgp @@ -1 +1 @@ -Subproject commit 33c8a984c17cf41be5d4c2928242e1b4239bfc40 +Subproject commit 3be5c3437da541575a293e74b0049721642a6975 diff --git a/physics/samfaerosols.F b/physics/samfaerosols.F index fea4b5ead..87a2277dd 100644 --- a/physics/samfaerosols.F +++ b/physics/samfaerosols.F @@ -77,6 +77,7 @@ subroutine samfdeepcnv_aerosols(im, ix, km, itc, ntc, ntr, delt, ecdo2 = zero ecko2 = zero qaero = zero + wet_dep = zero c -- set work arrays @@ -91,7 +92,7 @@ subroutine samfdeepcnv_aerosols(im, ix, km, itc, ntc, ntr, delt, do k = 1, km do i = 1, im - xmbp(i,k) = g * xmb(i) / delp(i,k) + if (cnvflg(i)) xmbp(i,k) = g * xmb(i) / delp(i,k) enddo enddo @@ -477,6 +478,7 @@ subroutine samfshalcnv_aerosols(im, ix, km, itc, ntc, ntr, delt, !ecdo2 = zero ecko2 = zero qaero = zero + wet_dep = zero c -- set work arrays @@ -491,7 +493,7 @@ subroutine samfshalcnv_aerosols(im, ix, km, itc, ntc, ntr, delt, do k = 1, km do i = 1, im - xmbp(i,k) = g * xmb(i) / delp(i,k) + if (cnvflg(i)) xmbp(i,k) = g * xmb(i) / delp(i,k) enddo enddo @@ -810,4 +812,4 @@ subroutine samfshalcnv_aerosols(im, ix, km, itc, ntc, ntr, delt, return end subroutine samfshalcnv_aerosols - end module samfcnv_aerosols \ No newline at end of file + end module samfcnv_aerosols diff --git a/physics/samfdeepcnv.f b/physics/samfdeepcnv.f index 1b71e011e..95e99e7be 100644 --- a/physics/samfdeepcnv.f +++ b/physics/samfdeepcnv.f @@ -10,7 +10,23 @@ module samfdeepcnv contains - subroutine samfdeepcnv_init() + subroutine samfdeepcnv_init(imfdeepcnv,imfdeepcnv_samf, & + & errmsg, errflg) + + integer, intent(in) :: imfdeepcnv + integer, intent(in) :: imfdeepcnv_samf + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + + ! Consistency checks + if (imfdeepcnv/=imfdeepcnv_samf) then + write(errmsg,'(*(a))') 'Logic error: namelist choice of', & + & ' deep convection is different from SAMF scheme' + errflg = 1 + return + end if + end subroutine samfdeepcnv_init subroutine samfdeepcnv_finalize() @@ -64,10 +80,10 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & & t0c,delt,ntk,ntr,delp, & & prslp,psp,phil,qtr,q1,t1,u1,v1,fscav,hwrf_samfdeep, & & cldwrk,rn,kbot,ktop,kcnv,islimsk,garea, & - & dot,ncloud,ud_mf,dd_mf,dt_mf,cnvw,cnvc, & + & dot,ncloud,hpbl,ud_mf,dd_mf,dt_mf,cnvw,cnvc, & & QLCN, QICN, w_upi, cf_upi, CNV_MFD, & & CNV_DQLDT,CLCN,CNV_FICE,CNV_NDROP,CNV_NICE,mp_phys,mp_phys_mg,& - & clam,c0s,c1,betal,betas,evfact,evfactl,pgcon,asolfac, & + & clam,c0s,c1,betal,betas,evef,pgcon,asolfac, & & do_ca, ca_closure, ca_entr, ca_trigger, nthresh, ca_deep, & & rainevap, & & errmsg,errflg) @@ -78,29 +94,29 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & implicit none ! integer, intent(in) :: im, km, itc, ntc, ntk, ntr, ncloud - integer, intent(in) :: islimsk(im) + integer, intent(in) :: islimsk(:) real(kind=kind_phys), intent(in) :: cliq, cp, cvap, eps, epsm1, & & fv, grav, hvap, rd, rv, t0c real(kind=kind_phys), intent(in) :: delt - real(kind=kind_phys), intent(in) :: psp(im), delp(im,km), & - & prslp(im,km), garea(im), dot(im,km), phil(im,km) + real(kind=kind_phys), intent(in) :: psp(:), delp(:,:), & + & prslp(:,:), garea(:), hpbl(:), dot(:,:), phil(:,:) real(kind=kind_phys), dimension(:), intent(in) :: fscav logical, intent(in) :: hwrf_samfdeep real(kind=kind_phys), intent(in) :: nthresh - real(kind=kind_phys), intent(in) :: ca_deep(im) - real(kind=kind_phys), intent(out) :: rainevap(im) + real(kind=kind_phys), intent(in) :: ca_deep(:) + real(kind=kind_phys), intent(out) :: rainevap(:) logical, intent(in) :: do_ca,ca_closure,ca_entr,ca_trigger - integer, intent(inout) :: kcnv(im) + integer, intent(inout) :: kcnv(:) ! DH* TODO - check dimensions of qtr, ntr+2 correct? *DH - real(kind=kind_phys), intent(inout) :: qtr(im,km,ntr+2), & - & q1(im,km), t1(im,km), u1(im,km), v1(im,km), & - & cnvw(im,km), cnvc(im,km) + real(kind=kind_phys), intent(inout) :: qtr(:,:,:), & + & q1(:,:), t1(:,:), u1(:,:), v1(:,:), & + & cnvw(:,:), cnvc(:,:) - integer, intent(out) :: kbot(im), ktop(im) - real(kind=kind_phys), intent(out) :: cldwrk(im), & - & rn(im), & - & ud_mf(im,km),dd_mf(im,km), dt_mf(im,km) + integer, intent(out) :: kbot(:), ktop(:) + real(kind=kind_phys), intent(out) :: cldwrk(:), & + & rn(:), & + & ud_mf(:,:),dd_mf(:,:), dt_mf(:,:) ! GJF* These variables are conditionally allocated depending on whether the ! Morrison-Gettelman microphysics is used, so they must be declared @@ -109,11 +125,11 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & & qlcn, qicn, w_upi, cnv_mfd, cnv_dqldt, clcn & &, cnv_fice, cnv_ndrop, cnv_nice, cf_upi ! *GJF - integer :: mp_phys, mp_phys_mg + integer, intent(in) :: mp_phys, mp_phys_mg real(kind=kind_phys), intent(in) :: clam, c0s, c1, & & betal, betas, asolfac, & - & evfact, evfactl, pgcon + & evef, pgcon character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! @@ -122,12 +138,10 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & ! integer latd,lond ! real(kind=kind_phys) clamd, tkemx, tkemn, dtke, - & beta, dbeta, betamx, betamn, + & beta, clamca, & cxlame, cxlamd, - & cxlamu, & xlamde, xlamdd, - & crtlamd, - & crtlame + & crtlame, crtlamd ! ! real(kind=kind_phys) detad real(kind=kind_phys) adw, aup, aafac, d0, @@ -142,7 +156,8 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & & edtmaxl, edtmaxs, el2orc, elocp, & es, etah, & cthk, dthk, - & evef, fact1, fact2, factor, +! & evfact, evfactl, + & fact1, fact2, factor, & gamma, pprime, cm, & qlk, qrch, qs, & rain, rfact, shear, tfac, @@ -156,15 +171,16 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & & xqrch, tem, tem1, tem2, & ptem, ptem1, ptem2 ! - integer kb(im), kbcon(im), kbcon1(im), + integer kb(im), kb1(im), kbcon(im), kbcon1(im), & ktcon(im), ktcon1(im), ktconn(im), & jmin(im), lmin(im), kbmax(im), - & kbm(im), kmax(im) + & kbm(im), kmax(im), kd94(im) ! ! real(kind=kind_phys) aa1(im), acrt(im), acrtfct(im), real(kind=kind_phys) aa1(im), tkemean(im),clamt(im), & ps(im), del(im,km), prsl(im,km), - & umean(im), tauadv(im), gdx(im), +! & umean(im), tauadv(im), gdx(im), + & gdx(im), & delhbar(im), delq(im), delq2(im), & delqbar(im), delqev(im), deltbar(im), & deltv(im), dtconv(im), edt(im), @@ -182,10 +198,11 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & ! & xpwev(im), delebar(im,ntr), & delubar(im), delvbar(im) ! - real(kind=kind_phys) c0(im) + real(kind=kind_phys) c0(im), sfcpbl(im) cj real(kind=kind_phys) cinpcr, cinpcrmx, cinpcrmn, - & cinacr, cinacrmx, cinacrmn + & cinacr, cinacrmx, cinacrmn, + & sfclfac, rhcrt cj ! ! parameters for updraft velocity calculation @@ -211,9 +228,9 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & parameter(cm=1.0) ! parameter(fact1=(cvap-cliq)/rv,fact2=hvap/rv-fact1*t0c) parameter(clamd=0.03,tkemx=0.65,tkemn=0.05) + parameter(clamca=0.03) parameter(dtke=tkemx-tkemn) - parameter(dbeta=0.1) - parameter(cthk=150.,dthk=25.) + parameter(cthk=200.,dthk=25.,sfclfac=0.2,rhcrt=0.75) parameter(cinpcrmx=180.,cinpcrmn=120.) ! parameter(cinacrmx=-120.,cinacrmn=-120.) parameter(cinacrmx=-120.,cinacrmn=-80.) @@ -236,7 +253,8 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & real(kind=kind_phys) qlko_ktcon(im), dellal(im,km), tvo(im,km), & dbyo(im,km), zo(im,km), & xlamue(im,km), xlamud(im,km), - & fent1(im,km), fent2(im,km), frh(im,km), + & fent1(im,km), fent2(im,km), + & rh(im,km), frh(im,km), & heo(im,km), heso(im,km), & qrcd(im,km), dellah(im,km), dellaq(im,km), & dellae(im,km,ntr), @@ -247,7 +265,7 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & & qrcko(im,km), qrcdo(im,km), & pwo(im,km), pwdo(im,km), c0t(im,km), & tx1(im), sumx(im), cnvwt(im,km) -! &, rhbar(im) + &, rhbar(im) ! logical do_aerosols, totflg, cnvflg(im), asqecflg(im), flg(im) ! @@ -302,6 +320,7 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & c do i=1,im cnvflg(i) = .true. + sfcpbl(i) = sfclfac * hpbl(i) rn(i)=0. mbdt(i)=10. kbot(i)=km+1 @@ -326,12 +345,20 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & cina(i) = 0. pwavo(i)= 0. pwevo(i)= 0. + xmb(i) = 0. xpwav(i)= 0. xpwev(i)= 0. vshear(i) = 0. rainevap(i) = 0. gdx(i) = sqrt(garea(i)) enddo + + do k=1,km + do i=1,im + xlamud(i,k) = 0. + xlamue(i,k) = 0. + enddo + enddo ! if (hwrf_samfdeep) then do i=1,im @@ -409,16 +436,17 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & ! model tunable parameters are all here edtmaxl = .3 edtmaxs = .3 +! evfact = 0.3 +! evfactl = 0.3 + aafac = .1 if (hwrf_samfdeep) then - aafac = .1 - cxlamu = 1.0e-3 + cxlame = 1.0e-3 else - aafac = .05 cxlame = 1.0e-4 endif - crtlamd = 1.0e-4 + cxlamd = 0.75e-4 crtlame = 1.0e-4 - cxlamd = 1.0e-4 + crtlamd = 1.0e-4 xlamde = 1.0e-4 xlamdd = 1.0e-4 ! @@ -442,6 +470,7 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & kbmax(i) = km kbm(i) = km kmax(i) = km + kd94(i) = km tx1(i) = 1.0 / ps(i) enddo ! @@ -450,12 +479,14 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & if (prsl(i,k)*tx1(i) > 0.04) kmax(i) = k + 1 if (prsl(i,k)*tx1(i) > 0.45) kbmax(i) = k + 1 if (prsl(i,k)*tx1(i) > 0.70) kbm(i) = k + 1 + if (prsl(i,k)*tx1(i) > 0.94) kd94(i) = k + 1 enddo enddo do i=1,im kmax(i) = min(km,kmax(i)) kbmax(i) = min(kbmax(i),kmax(i)) kbm(i) = min(kbm(i),kmax(i)) + kd94(i) = min(kd94(i),kmax(i)) enddo c c hydrostatic height assume zero terr and initially assume @@ -492,6 +523,7 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & eta(i,k) = 1. fent1(i,k)= 1. fent2(i,k)= 1. + rh(i,k) = 0. frh(i,k) = 0. hcko(i,k) = 0. qcko(i,k) = 0. @@ -576,14 +608,32 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & c this is the level where updraft starts c !> ## Perform calculations related to the updraft of the entraining/detraining cloud model ("static control"). -!> - Search below index "kbm" for the level of maximum moist static energy. +!> - Find the index for a level of sfclfac*hpbl which is initial guess for the parcel starting level. + do i=1,im + flg(i) = .true. + kb1(i) = 1 + enddo + do k = 2, km1 + do i=1,im + if (flg(i) .and. zo(i,k) <= sfcpbl(i)) then + kb1(i) = k + else + flg(i) = .false. + endif + enddo + enddo do i=1,im - hmax(i) = heo(i,1) - kb(i) = 1 + kb1(i) = min(kb1(i),kbm(i)) + enddo +c +!> - Search below index "kbm" and above kb1 for the level of maximum moist static energy. + do i=1,im + hmax(i) = heo(i,kb1(i)) + kb(i) = kb1(i) enddo do k = 2, km do i=1,im - if (k <= kbm(i)) then + if (k > kb1(i) .and. k <= kbm(i)) then if(heo(i,k) > hmax(i)) then kb(i) = k hmax(i) = heo(i,k) @@ -625,8 +675,8 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & val2 = 1.e-10 qo(i,k) = max(qo(i,k), val2 ) ! qo(i,k) = min(qo(i,k),qeso(i,k)) - tem = min(qo(i,k)/qeso(i,k), 1.) - frh(i,k) = 1. - tem + rh(i,k) = min(qo(i,k)/qeso(i,k), 1.) + frh(i,k) = 1. - rh(i,k) heo(i,k) = .5 * grav * (zo(i,k) + zo(i,k+1)) + & cp * to(i,k) + hvap * qo(i,k) heso(i,k) = .5 * grav * (zo(i,k) + zo(i,k+1)) + @@ -670,14 +720,6 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & do i=1,im if(kbcon(i) == kmax(i)) cnvflg(i) = .false. enddo -!! - if(do_ca .and. ca_trigger)then - do i=1,im - if(ca_deep(i) > nthresh) then - cnvflg(i) = .true. - endif - enddo - endif !! totflg = .true. do i=1,im @@ -731,13 +773,112 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & enddo !! if(do_ca .and. ca_trigger)then + do i=1,im + if(ca_deep(i) > nthresh) cnvflg(i) = .true. + if(kbcon(i) == kmax(i)) cnvflg(i) = .false. + enddo + endif + + totflg = .true. do i=1,im - if(ca_deep(i) > nthresh) then - cnvflg(i) = .true. - endif + totflg = totflg .and. (.not. cnvflg(i)) + enddo + if(totflg) return +!! +! +! re-define kb & kbcon +! + do i=1,im + if (cnvflg(i)) then + hmax(i) = heo(i,1) + kb(i) = 1 + endif + enddo + do k = 2, km + do i=1,im + if (cnvflg(i) .and. k <= kbm(i)) then + if(heo(i,k) > hmax(i)) then + kb(i) = k + hmax(i) = heo(i,k) + endif + endif + enddo + enddo +! + do i=1,im + flg(i) = cnvflg(i) + if(flg(i)) kbcon(i) = kmax(i) + enddo + do k = 1, km1 + do i=1,im + if (flg(i) .and. k <= kbmax(i)) then + if(k > kb(i) .and. heo(i,kb(i)) > heso(i,k)) then + kbcon(i) = k + flg(i) = .false. + endif + endif + enddo + enddo +! + do i=1,im + if(cnvflg(i) .and. kbcon(i) == kmax(i)) then + cnvflg(i) = .false. + endif enddo +!! + if(do_ca .and. ca_trigger)then + do i=1,im + if(ca_deep(i) > nthresh) cnvflg(i) = .true. + if(kbcon(i) == kmax(i)) cnvflg(i) = .false. + enddo endif + + totflg = .true. + do i=1,im + totflg = totflg .and. (.not. cnvflg(i)) + enddo + if(totflg) return +!! + do i=1,im + if(cnvflg(i)) then +! pdot(i) = 10.* dot(i,kbcon(i)) + pdot(i) = 0.01 * dot(i,kbcon(i)) ! Now dot is in Pa/s + endif + enddo +! +!> - if the mean relative humidity in the subcloud layers is less than a threshold value (rhcrt), convection is not triggered. +! + do i = 1, im + rhbar(i) = 0. + sumx(i) = 0. + enddo + do k = 1, km1 + do i = 1, im + if (cnvflg(i)) then + if(k >= kb(i) .and. k < kbcon(i)) then + dz = zo(i,k+1) - zo(i,k) + rhbar(i) = rhbar(i) + rh(i,k) * dz + sumx(i) = sumx(i) + dz + endif + endif + enddo + enddo + do i= 1, im + if(cnvflg(i)) then + rhbar(i) = rhbar(i) / sumx(i) + if(rhbar(i) < rhcrt) then + cnvflg(i) = .false. + endif + endif + enddo !! + if(do_ca .and. ca_trigger)then + do i=1,im + if(ca_deep(i) > nthresh) cnvflg(i) = .true. + if(kbcon(i) == kmax(i)) cnvflg(i) = .false. + enddo + endif + totflg = .true. do i=1,im totflg = totflg .and. (.not. cnvflg(i)) @@ -745,6 +886,8 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & if(totflg) return !! ! +!Lisa: at this point only trigger criteria is set + ! turbulent entrainment rate assumed to be proportional ! to subcloud mean TKE ! @@ -784,13 +927,25 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & endif enddo ! + if(do_ca .and. ca_entr)then + do i=1,im + if(cnvflg(i)) then + if(ca_deep(i) > nthresh)then + clamt(i) = clam - clamca + else + clamt(i) = clam + endif + endif + enddo + endif + else ! if(do_ca .and. ca_entr)then do i=1,im if(cnvflg(i)) then if(ca_deep(i) > nthresh)then - clamt(i) = clam - clamd + clamt(i) = clam - clamca else clamt(i) = clam endif @@ -812,7 +967,8 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & do k = 1, km1 do i=1,im if(cnvflg(i)) then - xlamue(i,k) = clamt(i) / zi(i,k) + dz =zo(i,k+1) - zo(i,k) + xlamue(i,k) = clamt(i) / (zi(i,k) + dz) xlamue(i,k) = max(xlamue(i,k), crtlame) endif enddo @@ -859,6 +1015,7 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & do k = 1, km1 do i=1,im if(cnvflg(i) .and. k < kmax(i)) then +! xlamud(i,k) = crtlamd xlamud(i,k) = 0.001 * clamt(i) endif enddo @@ -889,7 +1046,7 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & do i=1,im if(cnvflg(i) .and. & (k > kbcon(i) .and. k < kmax(i))) then - tem = cxlamu * frh(i,k) * fent2(i,k) + tem = cxlame * frh(i,k) * fent2(i,k) xlamue(i,k) = xlamue(i,k)*fent1(i,k) + tem endif enddo @@ -1056,14 +1213,14 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & endif enddo !! + if(do_ca .and. ca_trigger)then - do i=1,im - if(ca_deep(i) > nthresh) then - cnvflg(i) = .true. - endif - enddo + do i=1,im + if(ca_deep(i) > nthresh) cnvflg(i) = .true. + if(kbcon(i) == kmax(i)) cnvflg(i) = .false. + enddo endif -!! + totflg = .true. do i = 1, im totflg = totflg .and. (.not. cnvflg(i)) @@ -1139,13 +1296,12 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & endif !hwrf_samfdeep !! if(do_ca .and. ca_trigger)then - do i=1,im - if(ca_deep(i) > nthresh) then - cnvflg(i) = .true. - endif - enddo + do i=1,im + if(ca_deep(i) > nthresh) cnvflg(i) = .true. + if(kbcon(i) == kmax(i)) cnvflg(i) = .false. + enddo endif -!! + totflg = .true. do i=1,im totflg = totflg .and. (.not. cnvflg(i)) @@ -1180,21 +1336,22 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & if(tem < cthk) cnvflg(i) = .false. endif enddo -!! + + if(do_ca .and. ca_trigger)then - do i=1,im - if(ca_deep(i) > nthresh) then - cnvflg(i) = .true. - endif - enddo + do i=1,im + if(ca_deep(i) > nthresh) cnvflg(i) = .true. + if(kbcon(i) == kmax(i)) cnvflg(i) = .false. + enddo endif -!! + totflg = .true. - do i = 1, im + do i=1,im totflg = totflg .and. (.not. cnvflg(i)) enddo if(totflg) return !! + c c search for downdraft originating level above theta-e minimum c @@ -1629,60 +1786,34 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & do k = 1, km1 do i = 1, im if(cnvflg(i)) then - if(k >= 1 .and. k < kbcon(i)) then + if(k >= 1 .and. k < kd94(i)) then dz = zi(i,k+1) - zi(i,k) sumx(i) = sumx(i) + dz endif endif enddo enddo - - if (hwrf_samfdeep) then - do i = 1, im + do i = 1, im beta = betas if(islimsk(i) == 1) beta = betal if(cnvflg(i)) then - dz = (sumx(i)+zi(i,1))/float(kbcon(i)) - tem = 1./float(kbcon(i)) + dz = (sumx(i)+zi(i,1))/float(kd94(i)) + tem = 1./float(kd94(i)) xlamd(i) = (1.-beta**tem)/dz endif - enddo - else - do i = 1, im - if(cnvflg(i)) then - betamn = betas - if(islimsk(i) == 1) betamn = betal - if(ntk > 0) then - betamx = betamn + dbeta - if(tkemean(i) > tkemx) then - beta = betamn - else if(tkemean(i) < tkemn) then - beta = betamx - else - tem = (betamx - betamn) * (tkemean(i) - tkemn) - beta = betamx - tem / dtke - endif - else - beta = betamn - endif - dz = (sumx(i)+zi(i,1))/float(kbcon(i)) - tem = 1./float(kbcon(i)) - xlamd(i) = (1.-beta**tem)/dz - endif - enddo - endif + enddo c c determine downdraft mass flux c -!> - Calculate the normalized downdraft mass flux from equation 1 of Pan and Wu (1995) \cite pan_and_wu_1995 . Downdraft entrainment and detrainment rates are constants from the downdraft origination to the LFC. +!> - Calculate the normalized downdraft mass flux from equation 1 of Pan and Wu (1995) \cite pan_and_wu_1995 . Downdraft entrainment and detrainment rates are constants from the downdraft origination to the level of 60mb above the ground surface (kd94). do k = km1, 1, -1 do i = 1, im if (cnvflg(i) .and. k <= kmax(i)-1) then - if(k < jmin(i) .and. k >= kbcon(i)) then + if(k < jmin(i) .and. k >= kd94(i)) then dz = zi(i,k+1) - zi(i,k) ptem = xlamdd - xlamde etad(i,k) = etad(i,k+1) * (1. - ptem * dz) - else if(k < kbcon(i)) then + else if(k < kd94(i)) then dz = zi(i,k+1) - zi(i,k) ptem = xlamd(i) + xlamdd - xlamde etad(i,k) = etad(i,k+1) * (1. - ptem * dz) @@ -1722,7 +1853,7 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & do i = 1, im if (cnvflg(i) .and. k < jmin(i)) then dz = zi(i,k+1) - zi(i,k) - if(k >= kbcon(i)) then + if(k >= kd94(i)) then tem = xlamde * dz tem1 = 0.5 * xlamdd * dz else @@ -1771,7 +1902,7 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & ! detad = etad(i,k+1) - etad(i,k) cj dz = zi(i,k+1) - zi(i,k) - if(k >= kbcon(i)) then + if(k >= kd94(i)) then tem = xlamde * dz tem1 = 0.5 * xlamdd * dz else @@ -1920,7 +2051,7 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & tem = 0.5 * (xlamue(i,k)+xlamue(i,k-1)) tem1 = 0.5 * (xlamud(i,k)+xlamud(i,k-1)) c - if(k <= kbcon(i)) then + if(k <= kd94(i)) then ptem = xlamde ptem1 = xlamd(i)+xlamdd else @@ -2232,7 +2363,7 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & do i = 1, im if (asqecflg(i) .and. k < jmin(i)) then dz = zi(i,k+1) - zi(i,k) - if(k >= kbcon(i)) then + if(k >= kd94(i)) then tem = xlamde * dz tem1 = 0.5 * xlamdd * dz else @@ -2257,7 +2388,7 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & ! detad = etad(i,k+1) - etad(i,k) cj dz = zi(i,k+1) - zi(i,k) - if(k >= kbcon(i)) then + if(k >= kd94(i)) then tem = xlamde * dz tem1 = 0.5 * xlamdd * dz else @@ -2409,40 +2540,41 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & endif ! !> - Calculate advective time scale (tauadv) using a mean cloud layer wind speed. - do i= 1, im - if(cnvflg(i)) then - sumx(i) = 0. - umean(i) = 0. - endif - enddo - do k = 2, km1 - do i = 1, im - if(cnvflg(i)) then - if(k >= kbcon1(i) .and. k < ktcon1(i)) then - dz = zi(i,k) - zi(i,k-1) - tem = sqrt(u1(i,k)*u1(i,k)+v1(i,k)*v1(i,k)) - umean(i) = umean(i) + tem * dz - sumx(i) = sumx(i) + dz - endif - endif - enddo - enddo - do i= 1, im - if(cnvflg(i)) then - umean(i) = umean(i) / sumx(i) - umean(i) = max(umean(i), 1.) - tauadv(i) = gdx(i) / umean(i) - endif - enddo +! do i= 1, im +! if(cnvflg(i)) then +! sumx(i) = 0. +! umean(i) = 0. +! endif +! enddo +! do k = 2, km1 +! do i = 1, im +! if(cnvflg(i)) then +! if(k >= kbcon1(i) .and. k < ktcon1(i)) then +! dz = zi(i,k) - zi(i,k-1) +! tem = sqrt(u1(i,k)*u1(i,k)+v1(i,k)*v1(i,k)) +! umean(i) = umean(i) + tem * dz +! sumx(i) = sumx(i) + dz +! endif +! endif +! enddo +! enddo +! do i= 1, im +! if(cnvflg(i)) then +! umean(i) = umean(i) / sumx(i) +! umean(i) = max(umean(i), 1.) +! tauadv(i) = gdx(i) / umean(i) +! endif +! enddo !> - From Han et al.'s (2017) \cite han_et_al_2017 equation 6, calculate cloud base mass flux as a function of the mean updraft velcoity for the grid sizes where the quasi-equilibrium assumption of Arakawa-Schubert is not valid any longer. !! As discussed in Han et al. (2017) \cite han_et_al_2017 , when dtconv is larger than tauadv, the convective mixing is not fully conducted before the cumulus cloud is advected out of the grid cell. In this case, therefore, the cloud base mass flux is further reduced in proportion to the ratio of tauadv to dtconv. do i= 1, im if(cnvflg(i) .and. .not.asqecflg(i)) then k = kbcon(i) rho = po(i,k)*100. / (rd*to(i,k)) - tfac = tauadv(i) / dtconv(i) - tfac = min(tfac, 1.) - xmb(i) = tfac*betaw*rho*wc(i) +! tfac = tauadv(i) / dtconv(i) +! tfac = min(tfac, 1.) +! xmb(i) = tfac*betaw*rho*wc(i) + xmb(i) = betaw*rho*wc(i) endif enddo !> - For the cases where the quasi-equilibrium assumption of Arakawa-Schubert is valid, first calculate the large scale destabilization as in equation 5 of Pan and Wu (1995) \cite pan_and_wu_1995 : @@ -2482,9 +2614,10 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & !! !! Again when dtconv is larger than tauadv, the cloud base mass flux is further reduced in proportion to the ratio of tauadv to dtconv. if(asqecflg(i)) then - tfac = tauadv(i) / dtconv(i) - tfac = min(tfac, 1.) - xmb(i) = -tfac * fld(i) / xk(i) +! tfac = tauadv(i) / dtconv(i) +! tfac = min(tfac, 1.) +! xmb(i) = -tfac * fld(i) / xk(i) + xmb(i) = -fld(i) / xk(i) endif enddo !! @@ -2698,10 +2831,9 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & rn(i) = rn(i) + rain * xmb(i) * .001 * dt2 endif if(flg(i) .and. k < ktcon(i)) then - evef = edt(i) * evfact - if(islimsk(i) == 1) evef=edt(i) * evfactl +! evef = edt(i) * evfact +! if(islimsk(i) == 1) evef=edt(i) * evfactl ! if(islimsk(i) == 1) evef=.07 -c if(islimsk(i) == 1) evef = 0. qcond(i) = evef * (q1(i,k) - qeso(i,k)) & / (1. + el2orc * qeso(i,k) / t1(i,k)**2) dp = 1000. * del(i,k) diff --git a/physics/samfdeepcnv.meta b/physics/samfdeepcnv.meta index 8000fb90c..255213268 100644 --- a/physics/samfdeepcnv.meta +++ b/physics/samfdeepcnv.meta @@ -3,6 +3,44 @@ type = scheme dependencies = funcphys.f90,machine.F,samfaerosols.F +######################################################################## +[ccpp-arg-table] + name = samfdeepcnv_init + type = scheme +[imfdeepcnv] + standard_name = control_for_deep_convection_scheme + long_name = flag for mass-flux deep convection scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imfdeepcnv_samf] + standard_name = identifer_for_scale_aware_mass_flux_deep_convection + long_name = flag for SAMF deep convection scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + ######################################################################## [ccpp-arg-table] name = samfdeepcnv_run @@ -16,7 +54,7 @@ intent = in optional = F [km] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -112,7 +150,7 @@ intent = in optional = F [rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -139,7 +177,7 @@ intent = in optional = F [delt] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics time step units = s dimensions = () @@ -167,7 +205,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = pres(k) - pres(k+1) units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -176,7 +214,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -194,7 +232,7 @@ standard_name = geopotential long_name = layer geopotential units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -203,49 +241,49 @@ standard_name = convective_transportable_tracers long_name = array to contain cloud water and other convective trans. tracers units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers_for_convective_transport) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers_for_convective_transport) type = real kind = kind_phys intent = inout optional = F [q1] - standard_name = water_vapor_specific_humidity_updated_by_physics + standard_name = specific_humidity_of_new_state long_name = updated vapor specific humidity units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [t1] - standard_name = air_temperature_updated_by_physics + standard_name = air_temperature_of_new_state long_name = updated temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [u1] - standard_name = x_wind_updated_by_physics + standard_name = x_wind_of_new_state long_name = updated x-direction wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [v1] - standard_name = y_wind_updated_by_physics + standard_name = y_wind_of_new_state long_name = updated y-direction wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [fscav] - standard_name = coefficients_for_aerosol_scavenging + standard_name = chemical_tracer_scavenging_fractions long_name = array of aerosol scavenging coefficients units = none dimensions = (number_of_chemical_tracers) @@ -254,7 +292,7 @@ intent = in optional = F [hwrf_samfdeep] - standard_name = flag_for_hwrf_samfdeepcnv_scheme + standard_name = flag_for_hurricane_specific_code_in_scale_aware_mass_flux_deep_convection long_name = flag for hwrf samfdeepcnv scheme units = flag dimensions = () @@ -321,27 +359,36 @@ intent = in optional = F [dot] - standard_name = omega + standard_name = lagrangian_tendency_of_air_pressure long_name = layer mean vertical velocity units = Pa s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [ncloud] - standard_name = number_of_hydrometeors - long_name = number of hydrometeors + standard_name = number_of_condensate_species + long_name = number of cloud condensate types units = count dimensions = () type = integer intent = in optional = F +[hpbl] + standard_name = atmosphere_boundary_layer_thickness + long_name = PBL top height + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F [ud_mf] standard_name = instantaneous_atmosphere_updraft_convective_mass_flux long_name = (updraft mass flux) * delt units = kg m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -350,7 +397,7 @@ standard_name = instantaneous_atmosphere_downdraft_convective_mass_flux long_name = (downdraft mass flux) * delt units = kg m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -359,7 +406,7 @@ standard_name = instantaneous_atmosphere_detrainment_convective_mass_flux long_name = (detrainment mass flux) * delt units = kg m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -368,7 +415,7 @@ standard_name = convective_cloud_water_mixing_ratio long_name = moist convective cloud water mixing ratio units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -377,7 +424,7 @@ standard_name = convective_cloud_cover long_name = convective cloud cover units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -386,7 +433,7 @@ standard_name = mass_fraction_of_convective_cloud_liquid_water long_name = mass fraction of convective cloud liquid water units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -395,7 +442,7 @@ standard_name = mass_fraction_of_convective_cloud_ice long_name = mass fraction of convective cloud ice water units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -404,7 +451,7 @@ standard_name = vertical_velocity_for_updraft long_name = vertical velocity for updraft units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -413,7 +460,7 @@ standard_name = convective_cloud_fraction_for_microphysics long_name = convective cloud fraction for microphysics units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -422,7 +469,7 @@ standard_name = detrained_mass_flux long_name = detrained mass flux units = kg m-2 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -431,7 +478,7 @@ standard_name = tendency_of_cloud_water_due_to_convective_microphysics long_name = tendency of cloud water due to convective microphysics units = kg m-2 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -440,7 +487,7 @@ standard_name = convective_cloud_volume_fraction long_name = convective cloud volume fraction units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -449,7 +496,7 @@ standard_name = ice_fraction_in_convective_tower long_name = ice fraction in convective tower units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -458,7 +505,7 @@ standard_name = number_concentration_of_cloud_liquid_water_particles_for_detrainment long_name = droplet number concentration in convective detrainment units = m-3 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -467,13 +514,13 @@ standard_name = number_concentration_of_ice_crystals_for_detrainment long_name = crystal number concentration in convective detrainment units = m-3 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [mp_phys] - standard_name = flag_for_microphysics_scheme + standard_name = control_for_microphysics_scheme long_name = choice of microphysics scheme units = flag dimensions = () @@ -481,7 +528,7 @@ intent = in optional = F [mp_phys_mg] - standard_name = flag_for_morrison_gettelman_microphysics_scheme + standard_name = identifier_for_morrison_gettelman_microphysics_scheme long_name = choice of Morrison-Gettelman microphysics scheme units = flag dimensions = () @@ -489,7 +536,7 @@ intent = in optional = F [clam] - standard_name = entrainment_rate_coefficient_deep_convection + standard_name = entrainment_rate_coefficient_for_deep_convection long_name = entrainment rate coefficient for deep conv. units = none dimensions = () @@ -498,7 +545,7 @@ intent = in optional = F [c0s] - standard_name = rain_conversion_parameter_deep_convection + standard_name = rain_conversion_parameter_for_deep_convection long_name = convective rain conversion parameter for deep conv. units = m-1 dimensions = () @@ -507,7 +554,7 @@ intent = in optional = F [c1] - standard_name = detrainment_conversion_parameter_deep_convection + standard_name = detrainment_conversion_parameter_for_deep_convection long_name = convective detrainment conversion parameter for deep conv. units = m-1 dimensions = () @@ -516,7 +563,7 @@ intent = in optional = F [betal] - standard_name = downdraft_fraction_reaching_surface_over_land_deep_convection + standard_name = downdraft_fraction_reaching_surface_over_land_for_deep_convection long_name = downdraft fraction reaching surface over land for deep conv. units = frac dimensions = () @@ -525,26 +572,17 @@ intent = in optional = F [betas] - standard_name = downdraft_fraction_reaching_surface_over_ocean_deep_convection - long_name = downdraft fraction reaching surface over ocean for deep conv. - units = frac - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[evfact] - standard_name = rain_evaporation_coefficient_deep_convection - long_name = convective rain evaporation coefficient for deep conv. + standard_name = downdraft_fraction_reaching_surface_over_water_for_deep_convection + long_name = downdraft fraction reaching surface over water for deep conv. units = frac dimensions = () type = real kind = kind_phys intent = in optional = F -[evfactl] - standard_name = rain_evaporation_coefficient_over_land_deep_convection - long_name = convective rain evaporation coefficient over land for deep conv. +[evef] + standard_name = rain_evaporation_coefficient_for_convection + long_name = convective rain evaporation coefficient for convection units = frac dimensions = () type = real @@ -552,7 +590,7 @@ intent = in optional = F [pgcon] - standard_name = momentum_transport_reduction_factor_pgf_deep_convection + standard_name = momentum_transport_reduction_factor_due_to_pressure_gradient_force_for_deep_convection long_name = reduction factor in momentum transport due to deep conv. induced pressure gradient force units = frac dimensions = () @@ -561,7 +599,7 @@ intent = in optional = F [asolfac] - standard_name = aerosol_aware_parameter_deep_convection + standard_name = aerosol_aware_multiplicative_rain_conversion_parameter_for_deep_convection long_name = aerosol-aware parameter inversely proportional to CCN number concentraion from Lim (2011) for deep conv. units = none dimensions = () @@ -586,7 +624,7 @@ intent = in optional = F [ca_entr] - standard_name = flag_for_global_cellular_automata_entr + standard_name = flag_for_global_cellular_automata_deep_convective_entrainment long_name = switch for ca on entr units = flag dimensions = () @@ -602,7 +640,7 @@ intent = in optional = F [nthresh] - standard_name = threshold_for_perturbed_vertical_velocity + standard_name = cellular_automata_vertical_velocity_perturbation_threshold_for_deep_convection long_name = threshold used for perturbed vertical velocity units = m s-1 dimensions = () @@ -611,7 +649,7 @@ intent = in optional = F [ca_deep] - standard_name = fraction_of_cellular_automata_for_deep_convection + standard_name = cellular_automata_area_fraction_for_deep_convection_from_coupled_process long_name = fraction of cellular automata for deep convection units = frac dimensions = (horizontal_loop_extent) diff --git a/physics/samfshalcnv.f b/physics/samfshalcnv.f index ce6ae62c4..c314809cc 100644 --- a/physics/samfshalcnv.f +++ b/physics/samfshalcnv.f @@ -9,7 +9,23 @@ module samfshalcnv contains - subroutine samfshalcnv_init() + subroutine samfshalcnv_init(imfshalcnv, imfshalcnv_samf, & + & errmsg, errflg) + + integer, intent(in) :: imfshalcnv + integer, intent(in) :: imfshalcnv_samf + + ! CCPP error handling + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Consistency checks + if (imfshalcnv/=imfshalcnv_samf) then + write(errmsg,'(*(a))') 'Logic error: namelist choice of', & + & ' shallow convection is different from SAMF' + errflg = 1 + return + end if end subroutine samfshalcnv_init subroutine samfshalcnv_finalize() @@ -45,7 +61,7 @@ subroutine samfshalcnv_run(im,km,itc,ntc,cliq,cp,cvap, & & prslp,psp,phil,qtr,q1,t1,u1,v1,fscav, & & rn,kbot,ktop,kcnv,islimsk,garea, & & dot,ncloud,hpbl,ud_mf,dt_mf,cnvw,cnvc, & - & clam,c0s,c1,pgcon,asolfac,hwrf_samfshal,errmsg,errflg) + & clam,c0s,c1,evef,pgcon,asolfac,hwrf_samfshal,errmsg,errflg) ! use machine , only : kind_phys use funcphys , only : fpvs @@ -53,25 +69,25 @@ subroutine samfshalcnv_run(im,km,itc,ntc,cliq,cp,cvap, & implicit none ! integer, intent(in) :: im, km, itc, ntc, ntk, ntr, ncloud - integer, intent(in) :: islimsk(im) + integer, intent(in) :: islimsk(:) real(kind=kind_phys), intent(in) :: cliq, cp, cvap, & & eps, epsm1, fv, grav, hvap, rd, rv, t0c real(kind=kind_phys), intent(in) :: delt - real(kind=kind_phys), intent(in) :: psp(im), delp(im,km), & - & prslp(im,km), garea(im), hpbl(im), dot(im,km), phil(im,km) + real(kind=kind_phys), intent(in) :: psp(:), delp(:,:), & + & prslp(:,:), garea(:), hpbl(:), dot(:,:), phil(:,:) ! real(kind=kind_phys), dimension(:), intent(in) :: fscav - integer, intent(inout) :: kcnv(im) + integer, intent(inout) :: kcnv(:) ! DH* TODO - check dimensions of qtr, ntr+2 correct? *DH - real(kind=kind_phys), intent(inout) :: qtr(im,km,ntr+2), & - & q1(im,km), t1(im,km), u1(im,km), v1(im,km) + real(kind=kind_phys), intent(inout) :: qtr(:,:,:), & + & q1(:,:), t1(:,:), u1(:,:), v1(:,:) ! - integer, intent(out) :: kbot(im), ktop(im) - real(kind=kind_phys), intent(out) :: rn(im), & - & cnvw(im,km), cnvc(im,km), ud_mf(im,km), dt_mf(im,km) + integer, intent(out) :: kbot(:), ktop(:) + real(kind=kind_phys), intent(out) :: rn(:), & + & cnvw(:,:), cnvc(:,:), ud_mf(:,:), dt_mf(:,:) ! real(kind=kind_phys), intent(in) :: clam, c0s, c1, & - & asolfac, pgcon + & asolfac, evef, pgcon logical, intent(in) :: hwrf_samfshal character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -92,8 +108,8 @@ subroutine samfshalcnv_run(im,km,itc,ntc,cliq,cp,cvap, & & dz, dz1, e1, & el2orc, elocp, aafac, cm, & es, etah, h1, - & evef, evfact, evfactl, fact1, - & fact2, factor, dthk, +! & evfact, evfactl, + & fact1, fact2, factor, dthk, & gamma, pprime, betaw, & qlk, qrch, qs, & rfact, shear, tfac, @@ -104,30 +120,34 @@ subroutine samfshalcnv_run(im,km,itc,ntc,cliq,cp,cvap, & & rho, tem, tem1, tem2, & ptem, ptem1 ! - integer kb(im), kbcon(im), kbcon1(im), + integer kb(im), kb1(im), kbcon(im), kbcon1(im), & ktcon(im), ktcon1(im), ktconn(im), & kbm(im), kmax(im) ! real(kind=kind_phys) aa1(im), cina(im), & tkemean(im), clamt(im), & ps(im), del(im,km), prsl(im,km), - & umean(im), tauadv(im), gdx(im), +! & umean(im), tauadv(im), gdx(im), + & gdx(im), & delhbar(im), delq(im), delq2(im), & delqbar(im), delqev(im), deltbar(im), - & deltv(im), dtconv(im), edt(im), +! & deltv(im), dtconv(im), edt(im), + & deltv(im), dtconv(im), & pdot(im), po(im,km), & qcond(im), qevap(im), hmax(im), - & rntot(im), vshear(im), +! & rntot(im), vshear(im), + & rntot(im), & xlamud(im), xmb(im), xmbmax(im), & delebar(im,ntr), & delubar(im), delvbar(im) ! - real(kind=kind_phys) c0(im) + real(kind=kind_phys) c0(im), sfcpbl(im) c - real(kind=kind_phys) crtlamd + real(kind=kind_phys) crtlame, crtlamd ! real(kind=kind_phys) cinpcr, cinpcrmx, cinpcrmn, - & cinacr, cinacrmx, cinacrmn + & cinacr, cinacrmx, cinacrmn, + & sfclfac, rhcrt ! ! parameters for updraft velocity calculation real(kind=kind_phys) bet1, cd1, f1, gam1, @@ -156,10 +176,9 @@ subroutine samfshalcnv_run(im,km,itc,ntc,cliq,cp,cvap, & ! parameter(fact1=(cvap-cliq)/rv,fact2=hvap/rv-fact1*t0c) parameter(clamd=0.1,tkemx=0.65,tkemn=0.05) parameter(dtke=tkemx-tkemn) - parameter(dthk=25.) + parameter(dthk=25.,sfclfac=0.2,rhcrt=0.75) parameter(cinpcrmx=180.,cinpcrmn=120.) parameter(cinacrmx=-120.) - parameter(crtlamd=3.e-4) parameter(dtmax=10800.,dtmin=600.) parameter(bet1=1.875,cd1=.506,f1=2.0,gam1=.5) parameter(betaw=.03,dxcrt=15.e3) @@ -178,6 +197,7 @@ subroutine samfshalcnv_run(im,km,itc,ntc,cliq,cp,cvap, & ! real(kind=kind_phys) qlko_ktcon(im), dellal(im,km), tvo(im,km), real(kind=kind_phys) qlko_ktcon(im), dellal(im,km), & dbyo(im,km), zo(im,km), xlamue(im,km), + & rh(im,km), & heo(im,km), heso(im,km), & dellah(im,km), dellaq(im,km), & dellae(im,km,ntr), @@ -187,6 +207,7 @@ subroutine samfshalcnv_run(im,km,itc,ntc,cliq,cp,cvap, & & eta(im,km), & zi(im,km), pwo(im,km), c0t(im,km), & sumx(im), tx1(im), cnvwt(im,km) + &, rhbar(im) ! logical do_aerosols, totflg, cnvflg(im), flg(im) ! @@ -239,6 +260,7 @@ subroutine samfshalcnv_run(im,km,itc,ntc,cliq,cp,cvap, & kbot(i)=km+1 ktop(i)=0 endif + sfcpbl(i) = sfclfac * hpbl(i) rn(i)=0. kbcon(i)=km ktcon(i)=1 @@ -246,11 +268,12 @@ subroutine samfshalcnv_run(im,km,itc,ntc,cliq,cp,cvap, & kb(i)=km pdot(i) = 0. qlko_ktcon(i) = 0. - edt(i) = 0. +! edt(i) = 0. aa1(i) = 0. cina(i) = 0. - vshear(i) = 0. +! vshear(i) = 0. gdx(i) = sqrt(garea(i)) + xmb(i) = 0. scaldfunc(i)=-1.0 ! wang initialized sigmagfm(i)=-1.0 enddo @@ -263,6 +286,7 @@ subroutine samfshalcnv_run(im,km,itc,ntc,cliq,cp,cvap, & kbot(i)=km+1 ktop(i)=0 endif + sfcpbl(i) = sfclfac * hpbl(i) rn(i)=0. kbcon(i)=km ktcon(i)=1 @@ -270,11 +294,12 @@ subroutine samfshalcnv_run(im,km,itc,ntc,cliq,cp,cvap, & kb(i)=km pdot(i) = 0. qlko_ktcon(i) = 0. - edt(i) = 0. +! edt(i) = 0.0 aa1(i) = 0. cina(i) = 0. - vshear(i) = 0. +! vshear(i) = 0. gdx(i) = sqrt(garea(i)) + xmb(i) = 0. enddo endif !! @@ -326,14 +351,12 @@ subroutine samfshalcnv_run(im,km,itc,ntc,cliq,cp,cvap, & dt2 = delt ! c model tunable parameters are all here - if (hwrf_samfshal) then - aafac = .1 - else - aafac = .05 - endif -c evef = 0.07 - evfact = 0.3 - evfactl = 0.3 + aafac = .1 +! evfact = 0.3 +! evfactl = 0.3 +! + crtlame = 1.0e-4 + crtlamd = 3.0e-4 ! w1l = -8.e-3 w2l = -4.e-2 @@ -421,6 +444,7 @@ subroutine samfshalcnv_run(im,km,itc,ntc,cliq,cp,cvap, & if (cnvflg(i) .and. k <= kmax(i)) then pfld(i,k) = prsl(i,k) * 10.0 eta(i,k) = 1. + rh(i,k) = 0. hcko(i,k) = 0. qcko(i,k) = 0. qrcko(i,k)= 0. @@ -494,16 +518,34 @@ subroutine samfshalcnv_run(im,km,itc,ntc,cliq,cp,cvap, & c this is the level where updraft starts c !> ## Perform calculations related to the updraft of the entraining/detraining cloud model ("static control"). +!> - Find the index for a level of sfclfac*hpbl which is initial guess for the parcel starting level. + do i=1,im + flg(i) = cnvflg(i) + kb1(i) = 1 + enddo + do k = 1, km1 + do i=1,im + if (flg(i) .and. zo(i,k) <= sfcpbl(i)) then + kb1(i) = k + else + flg(i) = .false. + endif + enddo + enddo + do i=1,im + kb1(i) = min(kb1(i),kpbl(i)) + enddo +c !> - Search in the PBL for the level of maximum moist static energy to start the ascending parcel. do i=1,im if (cnvflg(i)) then - hmax(i) = heo(i,1) - kb(i) = 1 + hmax(i) = heo(i,kb1(i)) + kb(i) = kb1(i) endif enddo do k = 2, km do i=1,im - if (cnvflg(i) .and. k <= kpbl(i)) then + if(cnvflg(i) .and. (k > kb1(i) .and. k <= kpbl(i))) then if(heo(i,k) > hmax(i)) then kb(i) = k hmax(i) = heo(i,k) @@ -545,6 +587,7 @@ subroutine samfshalcnv_run(im,km,itc,ntc,cliq,cp,cvap, & val2 = 1.e-10 qo(i,k) = max(qo(i,k), val2 ) ! qo(i,k) = min(qo(i,k),qeso(i,k)) + rh(i,k) = min(qo(i,k)/qeso(i,k), 1.) heo(i,k) = .5 * grav * (zo(i,k) + zo(i,k+1)) + & cp * to(i,k) + hvap * qo(i,k) heso(i,k) = .5 * grav * (zo(i,k) + zo(i,k+1)) + @@ -650,11 +693,95 @@ subroutine samfshalcnv_run(im,km,itc,ntc,cliq,cp,cvap, & enddo if(totflg) return ! +! re-define kb & kbcon +! + do i=1,im + if (cnvflg(i)) then + hmax(i) = heo(i,1) + kb(i) = 1 + endif + enddo + do k = 2, km + do i=1,im + if (cnvflg(i) .and. k <= kpbl(i)) then + if(heo(i,k) > hmax(i)) then + kb(i) = k + hmax(i) = heo(i,k) + endif + endif + enddo + enddo +! + do i=1,im + flg(i) = cnvflg(i) + if(flg(i)) kbcon(i) = kmax(i) + enddo + do k = 2, km1 + do i=1,im + if (flg(i) .and. k < kbm(i)) then + if(k > kb(i) .and. heo(i,kb(i)) > heso(i,k)) then + kbcon(i) = k + flg(i) = .false. + endif + endif + enddo + enddo +! + do i=1,im + if(cnvflg(i)) then + if(kbcon(i) == kmax(i)) cnvflg(i) = .false. + endif + enddo +!! + totflg = .true. + do i=1,im + totflg = totflg .and. (.not. cnvflg(i)) + enddo + if(totflg) return +!! + do i=1,im + if(cnvflg(i)) then +! pdot(i) = 10.* dot(i,kbcon(i)) + pdot(i) = 0.01 * dot(i,kbcon(i)) ! Now dot is in Pa/s + endif + enddo +! +!> - if the mean relative humidity in the subcloud layers is less than a threshold value (rhcrt), convection is not triggered. +! + do i = 1, im + rhbar(i) = 0. + sumx(i) = 0. + enddo + do k = 1, km1 + do i = 1, im + if (cnvflg(i)) then + if(k >= kb(i) .and. k < kbcon(i)) then + dz = zo(i,k+1) - zo(i,k) + rhbar(i) = rhbar(i) + rh(i,k) * dz + sumx(i) = sumx(i) + dz + endif + endif + enddo + enddo + do i= 1, im + if(cnvflg(i)) then + rhbar(i) = rhbar(i) / sumx(i) + if(rhbar(i) < rhcrt) then + cnvflg(i) = .false. + endif + endif + enddo +!! + totflg = .true. + do i=1,im + totflg = totflg .and. (.not. cnvflg(i)) + enddo + if(totflg) return +!! +! ! turbulent entrainment rate assumed to be proportional ! to subcloud mean TKE ! -! - !c !c specify the detrainment rate for the updrafts !c @@ -719,7 +846,9 @@ subroutine samfshalcnv_run(im,km,itc,ntc,cliq,cp,cvap, & do k = 1, km1 do i=1,im if(cnvflg(i)) then - xlamue(i,k) = clamt(i) / zi(i,k) + dz = zo(i,k+1) - zo(i,k) + xlamue(i,k) = clamt(i) / (zi(i,k) + dz) + xlamue(i,k) = max(xlamue(i,k), crtlame) endif enddo enddo @@ -990,23 +1119,13 @@ subroutine samfshalcnv_run(im,km,itc,ntc,cliq,cp,cvap, & c specify upper limit of mass flux at cloud base c !> - Calculate the maximum value of the cloud base mass flux using the CFL-criterion-based formula of Han and Pan (2011) \cite han_and_pan_2011, equation 7. - if(hwrf_samfshal) then - do i = 1, im + do i = 1, im if(cnvflg(i)) then k = kbcon(i) dp = 1000. * del(i,k) xmbmax(i) = dp / (grav * dt2) endif - enddo - else - do i = 1, im - if(cnvflg(i)) then - k = kbcon(i) - dp = 1000. * del(i,k) - xmbmax(i) = dp / (2. * grav * dt2) - endif - enddo - endif + enddo c c compute cloud moisture property and precipitation c @@ -1333,34 +1452,34 @@ subroutine samfshalcnv_run(im,km,itc,ntc,cliq,cp,cvap, & !! E = 1.591 - 0.639\frac{\Delta V}{\Delta z} + 0.0953\left(\frac{\Delta V}{\Delta z}\right)^2 - 0.00496\left(\frac{\Delta V}{\Delta z}\right)^3 !! \f] !! where \f$\Delta V\f$ is the integrated horizontal shear over the cloud depth, \f$\Delta z\f$, (the ratio is converted to units of \f$10^{-3} s^{-1}\f$). The variable "edt" is \f$1-E\f$ and is constrained to the range \f$[0,0.9]\f$. - do i = 1, im - if(cnvflg(i)) then - vshear(i) = 0. - endif - enddo - do k = 2, km - do i = 1, im - if (cnvflg(i)) then - if(k > kb(i) .and. k <= ktcon(i)) then - shear= sqrt((uo(i,k)-uo(i,k-1)) ** 2 - & + (vo(i,k)-vo(i,k-1)) ** 2) - vshear(i) = vshear(i) + shear - endif - endif - enddo - enddo - do i = 1, im - if(cnvflg(i)) then - vshear(i) = 1.e3 * vshear(i) / (zi(i,ktcon(i))-zi(i,kb(i))) - e1=1.591-.639*vshear(i) - & +.0953*(vshear(i)**2)-.00496*(vshear(i)**3) - edt(i)=1.-e1 - val = .9 - edt(i) = min(edt(i),val) - val = .0 - edt(i) = max(edt(i),val) - endif - enddo +! do i = 1, im +! if(cnvflg(i)) then +! vshear(i) = 0. +! endif +! enddo +! do k = 2, km +! do i = 1, im +! if (cnvflg(i)) then +! if(k > kb(i) .and. k <= ktcon(i)) then +! shear= sqrt((uo(i,k)-uo(i,k-1)) ** 2 +! & + (vo(i,k)-vo(i,k-1)) ** 2) +! vshear(i) = vshear(i) + shear +! endif +! endif +! enddo +! enddo +! do i = 1, im +! if(cnvflg(i)) then +! vshear(i) = 1.e3 * vshear(i) / (zi(i,ktcon(i))-zi(i,kb(i))) +! e1=1.591-.639*vshear(i) +! & +.0953*(vshear(i)**2)-.00496*(vshear(i)**3) +! edt(i)=1.-e1 +! val = .9 +! edt(i) = min(edt(i),val) +! val = .0 +! edt(i) = max(edt(i),val) +! endif +! enddo c c--- what would the change be, that a cloud with unit mass c--- will do to the environment? @@ -1505,31 +1624,31 @@ subroutine samfshalcnv_run(im,km,itc,ntc,cliq,cp,cvap, & enddo ! !> - Calculate advective time scale (tauadv) using a mean cloud layer wind speed. - do i= 1, im - if(cnvflg(i)) then - sumx(i) = 0. - umean(i) = 0. - endif - enddo - do k = 2, km1 - do i = 1, im - if(cnvflg(i)) then - if(k >= kbcon1(i) .and. k < ktcon1(i)) then - dz = zi(i,k) - zi(i,k-1) - tem = sqrt(u1(i,k)*u1(i,k)+v1(i,k)*v1(i,k)) - umean(i) = umean(i) + tem * dz - sumx(i) = sumx(i) + dz - endif - endif - enddo - enddo - do i= 1, im - if(cnvflg(i)) then - umean(i) = umean(i) / sumx(i) - umean(i) = max(umean(i), 1.) - tauadv(i) = gdx(i) / umean(i) - endif - enddo +! do i= 1, im +! if(cnvflg(i)) then +! sumx(i) = 0. +! umean(i) = 0. +! endif +! enddo +! do k = 2, km1 +! do i = 1, im +! if(cnvflg(i)) then +! if(k >= kbcon1(i) .and. k < ktcon1(i)) then +! dz = zi(i,k) - zi(i,k-1) +! tem = sqrt(u1(i,k)*u1(i,k)+v1(i,k)*v1(i,k)) +! umean(i) = umean(i) + tem * dz +! sumx(i) = sumx(i) + dz +! endif +! endif +! enddo +! enddo +! do i= 1, im +! if(cnvflg(i)) then +! umean(i) = umean(i) / sumx(i) +! umean(i) = max(umean(i), 1.) +! tauadv(i) = gdx(i) / umean(i) +! endif +! enddo c c compute cloud base mass flux as a function of the mean c updraft velcoity @@ -1540,9 +1659,10 @@ subroutine samfshalcnv_run(im,km,itc,ntc,cliq,cp,cvap, & if(cnvflg(i)) then k = kbcon(i) rho = po(i,k)*100. / (rd*to(i,k)) - tfac = tauadv(i) / dtconv(i) - tfac = min(tfac, 1.) - xmb(i) = tfac*betaw*rho*wc(i) +! tfac = tauadv(i) / dtconv(i) +! tfac = min(tfac, 1.) +! xmb(i) = tfac*betaw*rho*wc(i) + xmb(i) = betaw*rho*wc(i) endif enddo ! @@ -1706,10 +1826,9 @@ subroutine samfshalcnv_run(im,km,itc,ntc,cliq,cp,cvap, & endif endif if(flg(i) .and. k < ktcon(i)) then - evef = edt(i) * evfact - if(islimsk(i) == 1) evef=edt(i) * evfactl +! evef = edt(i) * evfact +! if(islimsk(i) == 1) evef=edt(i) * evfactl ! if(islimsk(i) == 1) evef=.07 -c if(islimsk(i) == 1) evef = 0. qcond(i) = evef * (q1(i,k) - qeso(i,k)) & / (1. + el2orc * qeso(i,k) / t1(i,k)**2) dp = 1000. * del(i,k) diff --git a/physics/samfshalcnv.meta b/physics/samfshalcnv.meta index 7f5421b70..33f457b23 100644 --- a/physics/samfshalcnv.meta +++ b/physics/samfshalcnv.meta @@ -3,6 +3,44 @@ type = scheme dependencies = funcphys.f90,machine.F,samfaerosols.F +######################################################################## +[ccpp-arg-table] + name = samfshalcnv_init + type = scheme +[imfshalcnv] + standard_name = control_for_shallow_convection_scheme + long_name = flag for mass-flux shallow convection scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imfshalcnv_samf] + standard_name = identifier_for_scale_aware_mass_flux_shallow_convection + long_name = flag for SAMF shallow convection scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + ######################################################################## [ccpp-arg-table] name = samfshalcnv_run @@ -16,7 +54,7 @@ intent = in optional = F [km] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -112,7 +150,7 @@ intent = in optional = F [rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -139,7 +177,7 @@ intent = in optional = F [delt] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics time step units = s dimensions = () @@ -167,7 +205,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = pres(k) - pres(k+1) units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -176,7 +214,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -194,7 +232,7 @@ standard_name = geopotential long_name = layer geopotential units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -203,49 +241,49 @@ standard_name = convective_transportable_tracers long_name = array to contain cloud water and other convective trans. tracers units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers_for_convective_transport) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers_for_convective_transport) type = real kind = kind_phys intent = inout optional = F [q1] - standard_name = water_vapor_specific_humidity_updated_by_physics + standard_name = specific_humidity_of_new_state long_name = updated vapor specific humidity units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [t1] - standard_name = air_temperature_updated_by_physics + standard_name = air_temperature_of_new_state long_name = updated temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [u1] - standard_name = x_wind_updated_by_physics + standard_name = x_wind_of_new_state long_name = updated x-direction wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [v1] - standard_name = y_wind_updated_by_physics + standard_name = y_wind_of_new_state long_name = updated y-direction wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [fscav] - standard_name = coefficients_for_aerosol_scavenging + standard_name = chemical_tracer_scavenging_fractions long_name = array of aerosol scavenging coefficients units = none dimensions = (number_of_chemical_tracers) @@ -304,17 +342,17 @@ intent = in optional = F [dot] - standard_name = omega + standard_name = lagrangian_tendency_of_air_pressure long_name = layer mean vertical velocity units = Pa s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [ncloud] - standard_name = number_of_hydrometeors - long_name = number of hydrometeors + standard_name = number_of_condensate_species + long_name = number of cloud condensate types units = count dimensions = () type = integer @@ -333,7 +371,7 @@ standard_name = instantaneous_atmosphere_updraft_convective_mass_flux long_name = (updraft mass flux) * delt units = kg m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -342,7 +380,7 @@ standard_name = instantaneous_atmosphere_detrainment_convective_mass_flux long_name = (detrainment mass flux) * delt units = kg m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -351,7 +389,7 @@ standard_name = convective_cloud_water_mixing_ratio long_name = moist convective cloud water mixing ratio units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -360,13 +398,13 @@ standard_name = convective_cloud_cover long_name = convective cloud cover units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [clam] - standard_name = entrainment_rate_coefficient_shallow_convection + standard_name = entrainment_rate_coefficient_for_shallow_convection long_name = entrainment rate coefficient for shal conv. units = none dimensions = () @@ -375,7 +413,7 @@ intent = in optional = F [c0s] - standard_name = rain_conversion_parameter_shallow_convection + standard_name = rain_conversion_parameter_for_shallow_convection long_name = convective rain conversion parameter for shal conv. units = m-1 dimensions = () @@ -384,7 +422,7 @@ intent = in optional = F [c1] - standard_name = detrainment_conversion_parameter_shallow_convection + standard_name = detrainment_conversion_parameter_for_shallow_convection long_name = convective detrainment conversion parameter for shal conv. units = m-1 dimensions = () @@ -392,8 +430,17 @@ kind = kind_phys intent = in optional = F +[evef] + standard_name = rain_evaporation_coefficient_for_convection + long_name = convective rain evaporation coefficient for convection + units = frac + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F [pgcon] - standard_name = momentum_transport_reduction_factor_pgf_shallow_convection + standard_name = momentum_transport_reduction_factor_due_to_pressure_gradient_force_for_shallow_convection long_name = reduction factor in momentum transport due to shal conv. induced pressure gradient force units = frac dimensions = () @@ -402,7 +449,7 @@ intent = in optional = F [asolfac] - standard_name = aerosol_aware_parameter_shallow_convection + standard_name = aerosol_aware_multiplicative_rain_conversion_parameter_for_shallow_convection long_name = aerosol-aware parameter inversely proportional to CCN number concentraion from Lim (2011) for shal conv. units = none dimensions = () @@ -411,7 +458,7 @@ intent = in optional = F [hwrf_samfshal] - standard_name = flag_for_hwrf_samfshalcnv_scheme + standard_name = flag_for_hurricane_specific_code_in_scale_aware_mass_flux_shallow_convection long_name = flag for hwrf samfshalcnv scheme units = flag dimensions = () diff --git a/physics/sascnvn.meta b/physics/sascnvn.meta index d49d287e1..1ad5fa124 100644 --- a/physics/sascnvn.meta +++ b/physics/sascnvn.meta @@ -8,7 +8,7 @@ name = sascnvn_init type = scheme [imfdeepcnv] - standard_name = flag_for_mass_flux_deep_convection_scheme + standard_name = control_for_deep_convection_scheme long_name = flag for mass-flux deep convection scheme units = flag dimensions = () @@ -16,7 +16,7 @@ intent = in optional = F [imfdeepcnv_sas] - standard_name = flag_for_sas_deep_convection_scheme + standard_name = identifier_for_simplified_arakawa_schubert_deep_convection long_name = flag for SAS deep convection scheme units = flag dimensions = () @@ -100,7 +100,7 @@ intent = in optional = F [rgas] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -153,7 +153,7 @@ intent = in optional = F [km] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () @@ -161,7 +161,7 @@ intent = in optional = F [jcap] - standard_name = number_of_spectral_wave_trancation_for_sas + standard_name = number_of_spectral_wave_truncation_for_simplified_arakawa_schubert_convection long_name = number of spectral wave trancation used only by sascnv and sascnvn units = count dimensions = () @@ -169,7 +169,7 @@ intent = in optional = F [delt] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics timestep units = s dimensions = () @@ -181,7 +181,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = air pressure difference between midlayers units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -190,7 +190,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -208,7 +208,7 @@ standard_name = geopotential long_name = geopotential at model layer centers units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -217,7 +217,7 @@ standard_name = cloud_condensed_water_mixing_ratio_convective_transport_tracer long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -226,43 +226,43 @@ standard_name = ice_water_mixing_ratio_convective_transport_tracer long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [q1] - standard_name = water_vapor_specific_humidity_updated_by_physics + standard_name = specific_humidity_of_new_state long_name = water vapor specific humidity updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [t1] - standard_name = air_temperature_updated_by_physics + standard_name = air_temperature_of_new_state long_name = temperature updated by physics units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [u1] - standard_name = x_wind_updated_by_physics + standard_name = x_wind_of_new_state long_name = zonal wind updated by physics units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [v1] - standard_name = y_wind_updated_by_physics + standard_name = y_wind_of_new_state long_name = meridional wind updated by physics units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -318,17 +318,17 @@ intent = in optional = F [dot] - standard_name = omega + standard_name = lagrangian_tendency_of_air_pressure long_name = layer mean vertical velocity units = Pa s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [ncloud] - standard_name = number_of_hydrometeors - long_name = number of hydrometeors + standard_name = number_of_condensate_species + long_name = number of cloud condensate types units = count dimensions = () type = integer @@ -338,7 +338,7 @@ standard_name = instantaneous_atmosphere_updraft_convective_mass_flux long_name = (updraft mass flux) * delt units = kg m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -347,7 +347,7 @@ standard_name = instantaneous_atmosphere_downdraft_convective_mass_flux long_name = (downdraft mass flux) * delt units = kg m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -356,7 +356,7 @@ standard_name = instantaneous_atmosphere_detrainment_convective_mass_flux long_name = (detrainment mass flux) * delt units = kg m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -365,7 +365,7 @@ standard_name = convective_cloud_water_mixing_ratio long_name = moist convective cloud water mixing ratio units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -374,7 +374,7 @@ standard_name = convective_cloud_cover long_name = convective cloud cover units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -383,7 +383,7 @@ standard_name = mass_fraction_of_convective_cloud_liquid_water long_name = mass fraction of convective cloud liquid water units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -392,7 +392,7 @@ standard_name = mass_fraction_of_convective_cloud_ice long_name = mass fraction of convective cloud ice water units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -401,7 +401,7 @@ standard_name = vertical_velocity_for_updraft long_name = vertical velocity for updraft units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -410,7 +410,7 @@ standard_name = convective_cloud_fraction_for_microphysics long_name = convective cloud fraction for microphysics units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -419,7 +419,7 @@ standard_name = detrained_mass_flux long_name = detrained mass flux units = kg m-2 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -428,7 +428,7 @@ standard_name = tendency_of_cloud_water_due_to_convective_microphysics long_name = tendency of cloud water due to convective microphysics units = kg m-2 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -437,7 +437,7 @@ standard_name = convective_cloud_volume_fraction long_name = convective cloud volume fraction units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -446,7 +446,7 @@ standard_name = ice_fraction_in_convective_tower long_name = ice fraction in convective tower units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -455,7 +455,7 @@ standard_name = number_concentration_of_cloud_liquid_water_particles_for_detrainment long_name = droplet number concentration in convective detrainment units = m-3 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -464,13 +464,13 @@ standard_name = number_concentration_of_ice_crystals_for_detrainment long_name = crystal number concentration in convective detrainment units = m-3 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [mp_phys] - standard_name = flag_for_microphysics_scheme + standard_name = control_for_microphysics_scheme long_name = choice of microphysics scheme units = flag dimensions = () @@ -478,7 +478,7 @@ intent = in optional = F [mp_phys_mg] - standard_name = flag_for_morrison_gettelman_microphysics_scheme + standard_name = identifier_for_morrison_gettelman_microphysics_scheme long_name = choice of Morrison-Gettelman microphysics scheme units = flag dimensions = () @@ -486,7 +486,7 @@ intent = in optional = F [clam] - standard_name = entrainment_rate_coefficient_deep_convection + standard_name = entrainment_rate_coefficient_for_deep_convection long_name = entrainment rate coefficient for deep convection units = none dimensions = () @@ -495,7 +495,7 @@ intent = in optional = F [c0] - standard_name = rain_conversion_parameter_deep_convection + standard_name = rain_conversion_parameter_for_deep_convection long_name = convective rain conversion parameter for deep convection units = m-1 dimensions = () @@ -504,7 +504,7 @@ intent = in optional = F [c1] - standard_name = detrainment_conversion_parameter_deep_convection + standard_name = detrainment_conversion_parameter_for_deep_convection long_name = convective detrainment conversion parameter for deep convection units = m-1 dimensions = () @@ -513,7 +513,7 @@ intent = in optional = F [betal] - standard_name = downdraft_fraction_reaching_surface_over_land_deep_convection + standard_name = downdraft_fraction_reaching_surface_over_land_for_deep_convection long_name = downdraft fraction reaching surface over land for deep convection units = frac dimensions = () @@ -522,8 +522,8 @@ intent = in optional = F [betas] - standard_name = downdraft_fraction_reaching_surface_over_ocean_deep_convection - long_name = downdraft fraction reaching surface over ocean for deep convection + standard_name = downdraft_fraction_reaching_surface_over_water_for_deep_convection + long_name = downdraft fraction reaching surface over water for deep convection units = frac dimensions = () type = real @@ -531,7 +531,7 @@ intent = in optional = F [evfact] - standard_name = rain_evaporation_coefficient_deep_convection + standard_name = rain_evaporation_coefficient_over_ocean_for_deep_convection long_name = convective rain evaporation coefficient for deep convection units = frac dimensions = () @@ -540,7 +540,7 @@ intent = in optional = F [evfactl] - standard_name = rain_evaporation_coefficient_over_land_deep_convection + standard_name = rain_evaporation_coefficient_over_land_for_deep_convection long_name = convective rain evaporation coefficient over land for deep convection units = frac dimensions = () @@ -549,7 +549,7 @@ intent = in optional = F [pgcon] - standard_name = momentum_transport_reduction_factor_pgf_deep_convection + standard_name = momentum_transport_reduction_factor_due_to_pressure_gradient_force_for_deep_convection long_name = reduction factor in momentum transport due to deep convection induced pressure gradient force units = frac dimensions = () diff --git a/physics/satmedmfvdif.F b/physics/satmedmfvdif.F index ec6add8a5..feb4ef870 100644 --- a/physics/satmedmfvdif.F +++ b/physics/satmedmfvdif.F @@ -10,9 +10,11 @@ module satmedmfvdif !> \section arg_table_satmedmfvdif_init Argument Table !! \htmlinclude satmedmfvdif_init.html !! - subroutine satmedmfvdif_init (isatmedmf,isatmedmf_vdif, + subroutine satmedmfvdif_init (satmedmf, + & isatmedmf,isatmedmf_vdif, & errmsg,errflg) + logical, intent(in) :: satmedmf integer, intent(in) :: isatmedmf,isatmedmf_vdif character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -21,6 +23,13 @@ subroutine satmedmfvdif_init (isatmedmf,isatmedmf_vdif, errmsg = '' errflg = 0 +! Consistency checks + if (.not. satmedmf) then + write(errmsg,fmt='(*(a))') 'Logic error: satmedmf = .false.' + errflg = 1 + return + end if + if (.not. isatmedmf==isatmedmf_vdif) then write(errmsg,fmt='(*(a))') 'Logic error: satmedmfvdif is ', & 'called, but isatmedmf/=isatmedmf_vdif.' @@ -61,8 +70,9 @@ subroutine satmedmfvdif_run(im,km,ntrac,ntcw,ntiw,ntke, & & prsi,del,prsl,prslk,phii,phil,delt, & & dspheat,dusfc,dvsfc,dtsfc,dqsfc,hpbl, & & kinver,xkzm_m,xkzm_h,xkzm_s, & - & dt3dt_PBL,du3dt_PBL,dv3dt_PBL,dq3dt_PBL,do3dt_PBL, & - & gen_tend,ldiag3d,qdiag3d,errmsg,errflg) + & index_of_temperature,index_of_x_wind,index_of_y_wind, & + & index_of_process_pbl,ntqv,ntoz,dtend,dtidx, & + & gen_tend,ldiag3d,errmsg,errflg) ! use machine , only : kind_phys use funcphys , only : fpvs @@ -71,36 +81,37 @@ subroutine satmedmfvdif_run(im,km,ntrac,ntcw,ntiw,ntke, & ! !---------------------------------------------------------------------- integer, intent(in) :: im, km, ntrac, ntcw, ntiw, ntke - integer, intent(in) :: kinver(im) - integer, intent(out) :: kpbl(im) + integer, intent(in) :: kinver(:) + integer, intent(out) :: kpbl(:) ! - logical, intent(in) :: gen_tend, ldiag3d, qdiag3d - real(kind=kind_phys), intent(inout), dimension(:,:) :: & - & dt3dt_PBL,du3dt_PBL,dv3dt_PBL,dq3dt_PBL,do3dt_PBL + logical, intent(in) :: gen_tend, ldiag3d + real(kind=kind_phys), intent(inout), dimension(:,:,:) :: dtend + integer, intent(in) :: index_of_temperature,index_of_x_wind, & + & index_of_y_wind, ntqv, ntoz, dtidx(:,:), index_of_process_pbl ! real(kind=kind_phys), intent(in) :: grav,rd,cp,rv,hvap,hfus,fv, & & eps,epsm1 real(kind=kind_phys), intent(in) :: delt, xkzm_m, xkzm_h, xkzm_s - real(kind=kind_phys), intent(inout) :: dv(im,km), du(im,km), & - & tdt(im,km), rtg(im,km,ntrac) + real(kind=kind_phys), intent(inout) :: dv(:,:), du(:,:), & + & tdt(:,:), rtg(:,:,:) real(kind=kind_phys), intent(in) :: & - & u1(im,km), v1(im,km), & - & t1(im,km), q1(im,km,ntrac), & - & swh(im,km), hlw(im,km), & - & xmu(im), garea(im), & - & psk(im), rbsoil(im), & - & zorl(im), tsea(im), & - & u10m(im), v10m(im), & - & fm(im), fh(im), & - & evap(im), heat(im), & - & stress(im), spd1(im), & - & prsi(im,km+1), del(im,km), & - & prsl(im,km), prslk(im,km), & - & phii(im,km+1), phil(im,km) + & u1(:,:), v1(:,:), & + & t1(:,:), q1(:,:,:), & + & swh(:,:), hlw(:,:), & + & xmu(:), garea(:), & + & psk(:), rbsoil(:), & + & zorl(:), tsea(:), & + & u10m(:), v10m(:), & + & fm(:), fh(:), & + & evap(:), heat(:), & + & stress(:), spd1(:), & + & prsi(:,:), del(:,:), & + & prsl(:,:), prslk(:,:), & + & phii(:,:), phil(:,:) real(kind=kind_phys), intent(out) :: & - & dusfc(im), dvsfc(im), & - & dtsfc(im), dqsfc(im), & - & hpbl(im) + & dusfc(:), dvsfc(:), & + & dtsfc(:), dqsfc(:), & + & hpbl(:) ! logical, intent(in) :: dspheat character(len=*), intent(out) :: errmsg @@ -206,6 +217,7 @@ subroutine satmedmfvdif_run(im,km,ntrac,ntcw,ntiw,ntke, & real(kind=kind_phys) qlcr, zstblmax ! real(kind=kind_phys) h1 + integer :: idtend !! parameter(wfac=7.0,cfac=4.5) parameter(gamcrt=3.,gamcrq=0.,sfcfrac=0.1) @@ -1400,19 +1412,13 @@ subroutine satmedmfvdif_run(im,km,ntrac,ntcw,ntiw,ntke, & enddo enddo if (ldiag3d .and. .not. gen_tend) then - do k = 1,km - do i = 1,im - ttend = (f1(i,k)-t1(i,k))*rdt - dt3dt_PBL(i,k) = dt3dt_PBL(i,k) + ttend*delt - enddo - enddo - if (qdiag3d) then - do k = 1,km - do i = 1,im - qtend = (f2(i,k)-q1(i,k,1))*rdt - dq3dt_PBL(i,k) = dq3dt_PBL(i,k) + qtend*delt - enddo - enddo + idtend = dtidx(index_of_temperature,index_of_process_pbl) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + delt*rdt*(f1-t1) + endif + idtend = dtidx(100+ntqv,index_of_process_pbl) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) +delt*rdt*(f2-q1(:,:,1)) endif endif ! @@ -1516,14 +1522,14 @@ subroutine satmedmfvdif_run(im,km,ntrac,ntcw,ntiw,ntke, & enddo enddo if (ldiag3d .and. .not. gen_tend) then - do k = 1,km - do i = 1,im - utend = (f1(i,k)-u1(i,k))*rdt - vtend = (f2(i,k)-v1(i,k))*rdt - du3dt_PBL(i,k) = du3dt_PBL(i,k) + utend*delt - dv3dt_PBL(i,k) = dv3dt_PBL(i,k) + vtend*delt - enddo - enddo + idtend=dtidx(index_of_x_wind,index_of_process_pbl) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + delt*rdt*(f1-u1) + endif + idtend=dtidx(index_of_y_wind,index_of_process_pbl) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + delt*rdt*(f2-v1) + endif endif ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! diff --git a/physics/satmedmfvdif.meta b/physics/satmedmfvdif.meta index d860e3310..43800b441 100644 --- a/physics/satmedmfvdif.meta +++ b/physics/satmedmfvdif.meta @@ -7,6 +7,16 @@ [ccpp-arg-table] name = satmedmfvdif_init type = scheme +[satmedmf] + standard_name = flag_for_scale_aware_TKE_moist_EDMF_PBL + long_name = flag for scale-aware TKE moist EDMF PBL scheme + units = flag + dimensions = () + type = logical + intent = in + optional = F + intent = in + optional = F [isatmedmf] standard_name = choice_of_scale_aware_TKE_moist_EDMF_PBL long_name = choice of scale-aware TKE moist EDMF PBL scheme @@ -54,7 +64,7 @@ intent = in optional = F [km] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -70,7 +80,7 @@ intent = in optional = F [ntcw] - standard_name = index_for_liquid_cloud_condensate + standard_name = index_for_liquid_cloud_condensate_vertical_diffusion_tracer long_name = tracer index for cloud condensate (or liquid water) units = index dimensions = () @@ -103,7 +113,7 @@ intent = in optional = F [rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -175,28 +185,28 @@ intent = in optional = F [dv] - standard_name = tendency_of_y_wind_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_y_wind long_name = updated tendency of the y wind units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [du] - standard_name = tendency_of_x_wind_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_x_wind long_name = updated tendency of the x wind units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [tdt] - standard_name = tendency_of_air_temperature_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_air_temperature long_name = updated tendency of the temperature units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -205,7 +215,7 @@ standard_name = tendency_of_vertically_diffused_tracer_concentration long_name = updated tendency of the tracers due to vertical diffusion in PBL scheme units = kg kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_vertical_diffusion_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_vertical_diffusion_tracers) type = real kind = kind_phys intent = inout @@ -214,7 +224,7 @@ standard_name = x_wind long_name = x component of layer wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -223,7 +233,7 @@ standard_name = y_wind long_name = y component of layer wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -232,7 +242,7 @@ standard_name = air_temperature long_name = layer mean air temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -241,25 +251,25 @@ standard_name = vertically_diffused_tracer_concentration long_name = tracer concentration diffused by PBL scheme units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_vertical_diffusion_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_vertical_diffusion_tracers) type = real kind = kind_phys intent = in optional = F [swh] - standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_timestep long_name = total sky shortwave heating rate units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [hlw] - standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step + standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_timestep long_name = total sky longwave heating rate units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -283,7 +293,7 @@ intent = in optional = F [psk] - standard_name = dimensionless_exner_function_at_lowest_model_interface + standard_name = surface_dimensionless_exner_function long_name = dimensionless Exner function at the surface interface units = none dimensions = (horizontal_loop_extent) @@ -355,8 +365,8 @@ intent = in optional = F [heat] - standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness - long_name = kinematic surface upward sensible heat flux + standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness_and_vegetation + long_name = kinematic surface upward sensible heat flux reduced by surface roughness and vegetation units = K m s-1 dimensions = (horizontal_loop_extent) type = real @@ -364,7 +374,7 @@ intent = in optional = F [evap] - standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness + standard_name = surface_upward_specific_humidity_flux long_name = kinematic surface upward latent heat flux units = kg kg-1 m s-1 dimensions = (horizontal_loop_extent) @@ -402,7 +412,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -411,7 +421,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = pres(k) - pres(k+1) units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -420,16 +430,16 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [prslk] - standard_name = dimensionless_exner_function_at_model_layers + standard_name = dimensionless_exner_function long_name = Exner function at layers units = none - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -438,7 +448,7 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -447,13 +457,13 @@ standard_name = geopotential long_name = geopotential at model layer centers units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [delt] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = time step for physics units = s dimensions = () @@ -523,7 +533,7 @@ intent = in optional = F [xkzm_m] - standard_name = atmosphere_momentum_diffusivity_background + standard_name = atmosphere_momentum_diffusivity_due_to_background long_name = background value of momentum diffusivity units = m2 s-1 dimensions = () @@ -532,7 +542,7 @@ intent = in optional = F [xkzm_h] - standard_name = atmosphere_heat_diffusivity_background + standard_name = atmosphere_heat_diffusivity_due_to_background long_name = background value of heat diffusivity units = m2 s-1 dimensions = () @@ -541,7 +551,7 @@ intent = in optional = F [xkzm_s] - standard_name = diffusivity_background_sigma_level + standard_name = sigma_pressure_threshold_at_upper_extent_of_background_diffusion long_name = sigma level threshold for background diffusivity units = none dimensions = () @@ -549,53 +559,73 @@ kind = kind_phys intent = in optional = F -[dt3dt_PBL] - standard_name = cumulative_change_in_temperature_due_to_PBL - long_name = cumulative change in temperature due to PBL - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) +[dtend] + standard_name = cumulative_change_of_state_variables + long_name = diagnostic tendencies for state variables + units = various + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_cumulative_change_processes) type = real kind = kind_phys - intent = inout + intent = in optional = F -[du3dt_PBL] - standard_name = cumulative_change_in_x_wind_due_to_PBL - long_name = cumulative change in x wind due to PBL - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[dtidx] + standard_name = cumulative_change_of_state_variables_outer_index + long_name = index of state-variable and process in last dimension of diagnostic tendencies array AKA cumulative_change_index + units = index + dimensions = (number_of_tracers_plus_one_hundred,number_of_cumulative_change_processes) + type = integer + intent = in optional = F -[dv3dt_PBL] - standard_name = cumulative_change_in_y_wind_due_to_PBL - long_name = cumulative change in y wind due to PBL - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[index_of_temperature] + standard_name = index_of_temperature_in_cumulative_change_index + long_name = index of temperature in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in optional = F -[dq3dt_PBL] - standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL - long_name = cumulative change in water vapor specific humidity due to PBL - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[index_of_x_wind] + standard_name = index_of_x_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in optional = F -[do3dt_PBL] - standard_name = cumulative_change_in_ozone_mixing_ratio_due_to_PBL - long_name = cumulative change in ozone mixing ratio due to PBL - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[index_of_y_wind] + standard_name = index_of_y_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_process_pbl] + standard_name = index_of_subgrid_scale_vertical_mixing_process_in_cumulative_change_index + long_name = index of subgrid scale vertical mixing process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntqv] + standard_name = index_of_specific_humidity_in_tracer_concentration_array + long_name = tracer index for water vapor (specific humidity) + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntoz] + standard_name = index_of_ozone_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for ozone mixing ratio + units = index + dimensions = () + type = integer + intent = in optional = F [gen_tend] - standard_name = flag_for_generic_planetary_boundary_layer_tendency + standard_name = flag_for_generic_tendency_due_to_planetary_boundary_layer long_name = true if GFS_PBL_generic should calculate tendencies units = flag dimensions = () @@ -603,21 +633,13 @@ intent = in optional = F [ldiag3d] - standard_name = flag_diagnostics_3D + standard_name = flag_for_diagnostics_3D long_name = flag for 3d diagnostic fields units = flag dimensions = () type = logical intent = in optional = F -[qdiag3d] - standard_name = flag_tracer_diagnostics_3D - long_name = flag for 3d tracer diagnostic fields - units = flag - dimensions = () - type = logical - intent = in - optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/satmedmfvdifq.F b/physics/satmedmfvdifq.F index 63a67c810..4ac22e137 100644 --- a/physics/satmedmfvdifq.F +++ b/physics/satmedmfvdifq.F @@ -19,10 +19,13 @@ module satmedmfvdifq !> \section arg_table_satmedmfvdifq_init Argument Table !! \htmlinclude satmedmfvdifq_init.html !! - subroutine satmedmfvdifq_init (isatmedmf,isatmedmf_vdifq, + subroutine satmedmfvdifq_init (satmedmf, + & isatmedmf,isatmedmf_vdifq, & errmsg,errflg) + logical, intent(in ) :: satmedmf integer, intent(in) :: isatmedmf,isatmedmf_vdifq + character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -30,6 +33,13 @@ subroutine satmedmfvdifq_init (isatmedmf,isatmedmf_vdifq, errmsg = '' errflg = 0 +! Consistency checks + if (.not. satmedmf) then + write(errmsg,fmt='(*(a))') 'Logic error: satmedmf = .false.' + errflg = 1 + return + end if + if (.not. isatmedmf==isatmedmf_vdifq) then write(errmsg,fmt='(*(a))') 'Logic error: satmedmfvdif is ', & 'called, but isatmedmf/=isatmedmf_vdifq.' @@ -59,13 +69,14 @@ end subroutine satmedmfvdifq_finalize !! @{ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntiw,ntke, & & grav,rd,cp,rv,hvap,hfus,fv,eps,epsm1, & - & dv,du,tdt,rtg,u1,v1,t1,q1,swh,hlw,xmu,garea,islimsk, & - & snwdph_lnd,psk,rbsoil,zorl,u10m,v10m,fm,fh, & + & dv,du,tdt,rtg,u1,v1,t1,q1,swh,hlw,xmu,garea,zvfun, & + & psk,rbsoil,zorl,u10m,v10m,fm,fh, & & tsea,heat,evap,stress,spd1,kpbl, & & prsi,del,prsl,prslk,phii,phil,delt, & - & dspheat,dusfc,dvsfc,dtsfc,dqsfc,hpbl, & + & dspheat,dusfc,dvsfc,dtsfc,dqsfc,hpbl,dkt,dku, & & kinver,xkzm_m,xkzm_h,xkzm_s,dspfac,bl_upfr,bl_dnfr, & - & ntoz,du3dt,dv3dt,dt3dt,dq3dt,do3dt,gen_tend,ldiag3d,qdiag3d, & + & ntoz,ntqv,dtend,dtidx,index_of_temperature,index_of_x_wind, & + & index_of_y_wind,index_of_process_pbl,gen_tend,ldiag3d, & & errmsg,errflg) ! use machine , only : kind_phys @@ -74,41 +85,41 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntiw,ntke, & implicit none ! !---------------------------------------------------------------------- - integer, intent(in) :: im, km, ntrac, ntcw, ntiw, ntke, ntoz - integer, intent(in) :: kinver(im) - integer, intent(in) :: islimsk(im) - integer, intent(out) :: kpbl(im) - logical, intent(in) :: gen_tend,ldiag3d,qdiag3d + integer, intent(in) :: im, km, ntrac, ntcw, ntiw, ntke, ntoz,ntqv + integer, intent(in) :: kinver(:) + integer, intent(out) :: kpbl(:) + logical, intent(in) :: gen_tend,ldiag3d ! real(kind=kind_phys), intent(in) :: grav,rd,cp,rv,hvap,hfus,fv, & & eps,epsm1 real(kind=kind_phys), intent(in) :: delt, xkzm_m, xkzm_h, xkzm_s real(kind=kind_phys), intent(in) :: dspfac, bl_upfr, bl_dnfr - real(kind=kind_phys), intent(inout) :: dv(im,km), du(im,km), & - & tdt(im,km), rtg(im,km,ntrac) + real(kind=kind_phys), intent(inout) :: dv(:,:), du(:,:), & + & tdt(:,:), rtg(:,:,:) real(kind=kind_phys), intent(in) :: & - & u1(im,km), v1(im,km), & - & t1(im,km), q1(im,km,ntrac), & - & swh(im,km), hlw(im,km), & - & xmu(im), garea(im), & - & snwdph_lnd(im), & - & psk(im), rbsoil(im), & - & zorl(im), tsea(im), & - & u10m(im), v10m(im), & - & fm(im), fh(im), & - & evap(im), heat(im), & - & stress(im), spd1(im), & - & prsi(im,km+1), del(im,km), & - & prsl(im,km), prslk(im,km), & - & phii(im,km+1), phil(im,km) - real(kind=kind_phys), intent(inout), dimension(:,:) :: & - & du3dt(:,:), dv3dt(:,:), & - & dt3dt(:,:), dq3dt(:,:), & - & do3dt(:,:) + & u1(:,:), v1(:,:), & + & t1(:,:), q1(:,:,:), & + & swh(:,:), hlw(:,:), & + & xmu(:), garea(:), & + & zvfun(:), & + & psk(:), rbsoil(:), & + & zorl(:), tsea(:), & + & u10m(:), v10m(:), & + & fm(:), fh(:), & + & evap(:), heat(:), & + & stress(:), spd1(:), & + & prsi(:,:), del(:,:), & + & prsl(:,:), prslk(:,:), & + & phii(:,:), phil(:,:) + real(kind=kind_phys), intent(inout), dimension(:,:,:) :: dtend + integer, intent(in) :: dtidx(:,:), index_of_temperature, & + & index_of_x_wind, index_of_y_wind, index_of_process_pbl + real(kind=kind_phys), intent(out) :: & + & dusfc(:), dvsfc(:), & + & dtsfc(:), dqsfc(:), & + & hpbl(:) real(kind=kind_phys), intent(out) :: & - & dusfc(im), dvsfc(im), & - & dtsfc(im), dqsfc(im), & - & hpbl(im) + & dkt(:,:), dku(:,:) ! logical, intent(in) :: dspheat character(len=*), intent(out) :: errmsg @@ -120,7 +131,7 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntiw,ntke, & !*** !*** local variables !*** - integer i,is,k,kk,n,ndt,km1,kmpbl,kmscu,ntrac1 + integer i,is,k,kk,n,ndt,km1,kmpbl,kmscu,ntrac1,idtend integer lcld(im),kcld(im),krad(im),mrad(im) integer kx1(im), kpblx(im) ! @@ -130,8 +141,7 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntiw,ntke, & & qlx(im,km), thetae(im,km),thlx(im,km), & slx(im,km), svx(im,km), qtx(im,km), & tvx(im,km), pix(im,km), radx(im,km-1), - & dku(im,km-1),dkt(im,km-1), dkq(im,km-1), - & cku(im,km-1),ckt(im,km-1) + & dkq(im,km-1),cku(im,km-1), ckt(im,km-1) ! real(kind=kind_phys) plyr(im,km), rhly(im,km), cfly(im,km), & qstl(im,km) @@ -140,7 +150,7 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntiw,ntke, & & phih(im), phim(im), prn(im,km-1), & rbdn(im), rbup(im), thermal(im), & ustar(im), wstar(im), hpblx(im), - & ust3(im), wst3(im), + & ust3(im), wst3(im), rho_a(im), & z0(im), crb(im), & hgamt(im), hgamq(im), & wscale(im),vpert(im), @@ -157,7 +167,7 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntiw,ntke, & & f1(im,km), f2(im,km*(ntrac-1)) ! real(kind=kind_phys) elm(im,km), ele(im,km), - & ckz(im,km), chz(im,km), frik(im), + & ckz(im,km), chz(im,km), & diss(im,km-1),prod(im,km-1), & bf(im,km-1), shr2(im,km-1), & xlamue(im,km-1), xlamde(im,km-1), @@ -184,7 +194,7 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntiw,ntke, & real(kind=kind_phys) aphi16, aphi5, & wfac, cfac, & gamcrt, gamcrq, sfcfrac, - & conq, cont, conw, +! & conq, cont, conw, & dsdz2, dsdzt, dkmax, & dsig, dt2, dtodsd, & dtodsu, g, factor, dz, @@ -201,50 +211,50 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntiw,ntke, & & epsi, beta, chx, cqx, & rdt, rdz, qmin, qlmin, & rimin, rbcr, rbint, tdzmin, - & rlmn, rlmn1, rlmn2, + & rlmn, rlmn0, rlmn1, rlmn2, & rlmx, elmx, & ttend, utend, vtend, qtend, & zfac, zfmin, vk, spdk2, - & tkmin, tkminx, xkzinv, xkgdx, - & zlup, zldn, bsum, - & tem, tem1, tem2, + & tkmin, tkbmx, xkgdx, + & xkinv1, xkinv2, + & zlup, zldn, bsum, cs0, + & tem, tem1, tem2, tem3, & ptem, ptem0, ptem1, ptem2 -! - real(kind=kind_phys) xkzm_mp, xkzm_hp ! real(kind=kind_phys) ck0, ck1, ch0, ch1, ce0, rchck ! - real(kind=kind_phys) qlcr, zstblmax + real(kind=kind_phys) qlcr, zstblmax, hcrinv ! real(kind=kind_phys) h1 !! - parameter(wfac=7.0,cfac=3.0) + parameter(wfac=7.0,cfac=4.5) parameter(gamcrt=3.,gamcrq=0.,sfcfrac=0.1) parameter(vk=0.4,rimin=-100.) parameter(rbcr=0.25,zolcru=-0.02,tdzmin=1.e-3) - parameter(rlmn=30.,rlmn1=5.,rlmn2=10.) + parameter(rlmn=30.,rlmn0=5.,rlmn1=5.,rlmn2=10.) parameter(rlmx=300.,elmx=300.) parameter(prmin=0.25,prmax=4.0) parameter(pr0=1.0,prtke=1.0,prscu=0.67) parameter(f0=1.e-4,crbmin=0.15,crbmax=0.35) - parameter(tkmin=1.e-9,tkminx=0.2,dspmax=10.0) + parameter(tkmin=1.e-9,tkbmx=0.2,dspmax=10.0) parameter(qmin=1.e-8,qlmin=1.e-12,zfmin=1.e-8) parameter(aphi5=5.,aphi16=16.) parameter(elmfac=1.0,elefac=1.0,cql=100.) - parameter(dw2min=1.e-4,dkmax=1000.,xkgdx=5000.) - parameter(qlcr=3.5e-5,zstblmax=2500.,xkzinv=0.1) - parameter(h1=0.33333333) + parameter(dw2min=1.e-4,dkmax=1000.,xkgdx=3000.) + parameter(qlcr=3.5e-5,zstblmax=2500.) + parameter(xkinv1=0.15,xkinv2=0.3) + parameter(h1=0.33333333,hcrinv=250.) parameter(ck0=0.4,ck1=0.15,ch0=0.4,ch1=0.15) - parameter(ce0=0.4) + parameter(ce0=0.4,cs0=0.2) parameter(rchck=1.5,ndt=20) gravi=1.0/grav g=grav gocp=g/cp - cont=cp/g - conq=hvap/g - conw=1.0/g ! for del in pa -! parameter(cont=1000.*cp/g,conq=1000.*hvap/g,conw=1000./g) !kpa +! cont=cp/g +! conq=hvap/g +! conw=1.0/g ! for del in pa +!! parameter(cont=1000.*cp/g,conq=1000.*hvap/g,conw=1000./g) !kpa elocp=hvap/cp el2orc=hvap*hvap/(rv*cp) ! @@ -276,12 +286,9 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntiw,ntke, & buod(i,k) = 0. ckz(i,k) = ck1 chz(i,k) = ch1 - rlmnz(i,k) = rlmn + rlmnz(i,k) = rlmn0 enddo enddo - do i=1,im - frik(i) = 1.0 - enddo do i=1,im zi(i,km+1) = phii(i,km+1) * gravi enddo @@ -320,41 +327,22 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntiw,ntke, & !> - Compute background vertical diffusivities for scalars and momentum (xkzo and xkzmo) -!> - set background diffusivities as a function of -!! horizontal grid size with xkzm_h & xkzm_m for gdx >= 25km -!! and 0.01 for gdx=5m, i.e., -!! \n xkzm_hx = 0.01 + (xkzm_h - 0.01)/(xkgdx-5.) * (gdx-5.) -!! \n xkzm_mx = 0.01 + (xkzm_h - 0.01)/(xkgdx-5.) * (gdx-5.) - - do i=1,im - xkzm_mp = xkzm_m - xkzm_hp = xkzm_h -! - if( islimsk(i) == 1 .and. snwdph_lnd(i) > 10.0 ) then ! over land - if (rbsoil(i) > 0. .and. rbsoil(i) <= 0.25) then - xkzm_mp = xkzm_m * (1.0 - rbsoil(i)/0.25)**2 + - & 0.1 * (1.0 - (1.0-rbsoil(i)/0.25)**2) - xkzm_hp = xkzm_h * (1.0 - rbsoil(i)/0.25)**2 + - & 0.1 * (1.0 - (1.0-rbsoil(i)/0.25)**2) - else if (rbsoil(i) > 0.25) then - xkzm_mp = 0.1 - xkzm_hp = 0.1 - endif - endif +!> - set background diffusivities with xkzm_h & xkzm_m for gdx >= xkgdx and +!! as a function of horizontal grid size for gdx < xkgdx +!! \n xkzm_hx = xkzm_h * (gdx / xkgdx) +!! \n xkzm_mx = xkzm_m * (gdx / xkgdx) ! + do i=1,im kx1(i) = 1 tx1(i) = 1.0 / prsi(i,1) tx2(i) = tx1(i) if(gdx(i) >= xkgdx) then - xkzm_hx(i) = xkzm_hp - xkzm_mx(i) = xkzm_mp + xkzm_hx(i) = xkzm_h + xkzm_mx(i) = xkzm_m else - tem = 1. / (xkgdx - 5.) - tem1 = (xkzm_hp - 0.01) * tem - tem2 = (xkzm_mp - 0.01) * tem - ptem = gdx(i) - 5. - xkzm_hx(i) = 0.01 + tem1 * ptem - xkzm_mx(i) = 0.01 + tem2 * ptem + tem = gdx(i) / xkgdx + xkzm_hx(i) = xkzm_h * tem + xkzm_mx(i) = xkzm_m * tem endif enddo do k = 1,km1 @@ -363,19 +351,18 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntiw,ntke, & xkzmo(i,k) = 0.0 if (k < kinver(i)) then ! minimum turbulent mixing length - ptem = prsl(i,k) * tx1(i) + ptem = prsi(i,k+1) * tx1(i) tem1 = 1.0 - ptem tem2 = tem1 * tem1 * 2.5 tem2 = min(1.0, exp(-tem2)) rlmnz(i,k)= rlmn * tem2 - rlmnz(i,k)= max(rlmnz(i,k), rlmn1) + rlmnz(i,k)= max(rlmnz(i,k), rlmn0) ! vertical background diffusivity - ptem = prsi(i,k+1) * tx1(i) - tem1 = 1.0 - ptem tem2 = tem1 * tem1 * 10.0 tem2 = min(1.0, exp(-tem2)) xkzo(i,k) = xkzm_hx(i) * tem2 -! vertical background diffusivity for momentum +! vertical background diffusivity for +! momentum if (ptem >= xkzm_s) then xkzmo(i,k) = xkzm_mx(i) kx1(i) = k + 1 @@ -388,10 +375,11 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntiw,ntke, & endif enddo enddo - +! !> - Some output variables and logical flags are initialized do i = 1,im z0(i) = 0.01 * zorl(i) + rho_a(i) = prsl(i,1)/(rd*t1(i,1)*(1.+fv*max(q1(i,1,1),qmin))) dusfc(i) = 0. dvsfc(i) = 0. dtsfc(i) = 0. @@ -496,10 +484,14 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntiw,ntke, & ! !> - Initialize diffusion coefficients to 0 and calculate the total !! radiative heating rate (dku, dkt, radx) - do k=1,km1 + do k=1,km do i=1,im dku(i,k) = 0. dkt(i,k) = 0. + enddo + enddo + do k=1,km1 + do i=1,im dkq(i,k) = 0. cku(i,k) = 0. ckt(i,k) = 0. @@ -695,10 +687,54 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntiw,ntke, & hgamq(i) = evap(i)/wscale(i) vpert(i) = hgamt(i) + hgamq(i)*fv*theta(i,1) vpert(i) = max(vpert(i),0.) - vpert(i) = min(cfac*vpert(i),gamcrt) + tem = min(cfac*vpert(i),gamcrt) + thermal(i)= thermal(i) + tem endif enddo ! +! enhance the pbl height by considering the thermal excess +! (overshoot pbl top) +! + do i=1,im + flg(i) = .true. + if(pcnvflg(i)) then + flg(i) = .false. + rbup(i) = rbsoil(i) + endif + enddo + do k = 2, kmpbl + do i = 1, im + if(.not.flg(i)) then + rbdn(i) = rbup(i) + spdk2 = max((u1(i,k)**2+v1(i,k)**2),1.) + rbup(i) = (thlvx(i,k)-thermal(i))* + & (g*zl(i,k)/thlvx(i,1))/spdk2 + kpbl(i) = k + flg(i) = rbup(i) > crb(i) + endif + enddo + enddo + do i = 1,im + if(pcnvflg(i)) then + k = kpbl(i) + if(rbdn(i) >= crb(i)) then + rbint = 0. + elseif(rbup(i) <= crb(i)) then + rbint = 1. + else + rbint = (crb(i)-rbdn(i))/(rbup(i)-rbdn(i)) + endif + hpbl(i) = zl(i,k-1) + rbint*(zl(i,k)-zl(i,k-1)) + if(hpbl(i) < zi(i,kpbl(i))) then + kpbl(i) = kpbl(i) - 1 + endif + if(kpbl(i) <= 1) then + pcnvflg(i) = .false. + pblflg(i) = .false. + endif + endif + enddo +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! look for stratocumulus !> ## Determine whether stratocumulus layers exist and compute quantities @@ -833,38 +869,43 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntiw,ntke, & enddo enddo ! -! background diffusivity decreasing with increasing surface layer stability +! Above a threshold height (hcrinv), the background vertical +! diffusivities & mixing length +! in the inversion layers are set to much smaller values (xkinv1 & +! rlmn1) ! -! do i = 1, im -! if(.not.sfcflg(i)) then -! tem = (1. + 5. * rbsoil(i))**2. -!! tem = (1. + 5. * zol(i))**2. -! frik(i) = 0.1 + 0.9 / tem -! endif -! enddo -! -! do k = 1,km1 -! do i=1,im -! xkzo(i,k) = frik(i) * xkzo(i,k) -! xkzmo(i,k)= frik(i) * xkzmo(i,k) -! enddo -! enddo -! -!> ## The background vertical diffusivities in the inversion layers are limited -!! to be less than or equal to xkzinv +! Below the threshold height (hcrinv), the background vertical +! diffusivities & mixing length +! in the inversion layers are increased with increasing roughness +! length & vegetation fraction ! do k = 1,km1 do i=1,im -! tem1 = (tvx(i,k+1)-tvx(i,k)) * rdzt(i,k) -! if(tem1 > 1.e-5) then - tem1 = tvx(i,k+1)-tvx(i,k) - if(tem1 > 0. .and. islimsk(i) /= 1) then - xkzo(i,k) = min(xkzo(i,k), xkzinv) - xkzmo(i,k) = min(xkzmo(i,k), xkzinv) - rlmnz(i,k) = min(rlmnz(i,k), rlmn2) + if(zi(i,k+1) > hcrinv) then + tem1 = tvx(i,k+1)-tvx(i,k) + if(tem1 >= 0.) then + xkzo(i,k) = min(xkzo(i,k), xkinv1) + xkzmo(i,k) = min(xkzmo(i,k), xkinv1) + rlmnz(i,k) = min(rlmnz(i,k), rlmn1) + endif + else + tem1 = tvx(i,k+1)-tvx(i,k) + if(tem1 > 0.) then + ptem = xkzo(i,k) * zvfun(i) + xkzo(i,k) = min(max(ptem, xkinv2), xkzo(i,k)) + ptem = xkzmo(i,k) * zvfun(i) + xkzmo(i,k) = min(max(ptem, xkinv2), xkzmo(i,k)) + ptem = rlmnz(i,k) * zvfun(i) + rlmnz(i,k) = min(max(ptem, rlmn2), rlmnz(i,k)) + endif endif enddo enddo + do k = 2,km1 + do i=1,im + rlmnz(i,k) = 0.5 * (rlmnz(i,k-1) + rlmnz(i,k)) + enddo + enddo ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !> ## Compute an asymtotic mixing length @@ -877,8 +918,15 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntiw,ntke, & do n = k, km1 if(mlenflg) then dz = zl(i,n+1) - zl(i,n) - ptem = gotvx(i,n)*(thvx(i,n+1)-thvx(i,k))*dz -! ptem = gotvx(i,n)*(thlvx(i,n+1)-thlvx(i,k))*dz +! tem1 = 0.5 * (thvx(i,n) + thvx(i,n+1)) +!! tem1 = 0.5 * (thlvx(i,n) + thlvx(i,n+1)) + tem3=((u1(i,n+1)-u1(i,n))/dz)**2 + tem3=tem3+((v1(i,n+1)-v1(i,n))/dz)**2 + tem3=cs0*sqrt(tem3)*sqrt(tke(i,k)) + ptem = (gotvx(i,n)*(thvx(i,n+1)-thvx(i,k))+tem3)*dz +! ptem = (gotvx(i,n)*(thlvx(i,n+1)-thlvx(i,k)+tem3)*dz +! ptem = (gotvx(i,n)*(tem1-thvx(i,k))+tem3)*dz +!! ptem = (gotvx(i,n)*(tem1-thlvx(i,k)+tem3)*dz bsum = bsum + ptem zlup = zlup + dz if(bsum >= tke(i,k)) then @@ -902,13 +950,23 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntiw,ntke, & if(n == 1) then dz = zl(i,1) tem1 = tsea(i)*(1.+fv*max(q1(i,1,1),qmin)) +! tem1 = 0.5 * (tem1 + thvx(i,n)) +!! tem1 = 0.5 * (tem1 + thlvx(i,n)) + tem3 = (u1(i,1)/dz)**2 + tem3 = tem3+(v1(i,1)/dz)**2 + tem3 = cs0*sqrt(tem3)*sqrt(tke(i,1)) else dz = zl(i,n) - zl(i,n-1) tem1 = thvx(i,n-1) ! tem1 = thlvx(i,n-1) +! tem1 = 0.5 * (thvx(i,n-1) + thvx(i,n)) +!! tem1 = 0.5 * (thlvx(i,n-1) + thlvx(i,n)) + tem3 = ((u1(i,n)-u1(i,n-1))/dz)**2 + tem3 = tem3+((v1(i,n)-v1(i,n-1))/dz)**2 + tem3 = cs0*sqrt(tem3)*sqrt(tke(i,k)) endif - ptem = gotvx(i,n)*(thvx(i,k)-tem1)*dz -! ptem = gotvx(i,n)*(thlvx(i,k)-tem1)*dz + ptem = (gotvx(i,n)*(thvx(i,k)-tem1)+tem3)*dz +! ptem = (gotvx(i,n)*(thlvx(i,k)-tem1)+tem3)*dz bsum = bsum + ptem zldn = zldn + dz if(bsum >= tke(i,k)) then @@ -939,6 +997,10 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntiw,ntke, & !! where \f$l_{up}\f$ and \f$l_{down}\f$ are the distances that a parcel !! having an initial TKE can travel upward and downward before being stopped !! by buoyancy effects. +! +! Following Rodier et. al (2017), environmental wind shear effect on +! mixing length was included. +! ptem2 = min(zlup,zldn) rlam(i,k) = elmfac * ptem2 rlam(i,k) = max(rlam(i,k), tem1) @@ -1048,7 +1110,7 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntiw,ntke, & endif ptem = tem1 / (tem * elm(i,k)) tkmnz(i,k) = ptem * ptem - tkmnz(i,k) = min(tkmnz(i,k), tkminx) + tkmnz(i,k) = min(tkmnz(i,k), tkbmx) tkmnz(i,k) = max(tkmnz(i,k), tkmin) enddo enddo @@ -1295,6 +1357,13 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntiw,ntke, & rtg(i,k,ntke) = rtg(i,k,ntke)+qtend enddo enddo + if(ldiag3d) then + idtend = dtidx(ntke+100,index_of_process_pbl) + if(idtend>0) then + dtend(1:im,1:km,idtend) = dtend(1:im,1:km,idtend) + & + & (f1(1:im,1:km)-q1(1:im,1:km,ntke))*rdt + endif + endif c !> ## Compute tridiagonal matrix elements for heat and moisture c @@ -1417,22 +1486,32 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntiw,ntke, & qtend = (f2(i,k)-q1(i,k,1))*rdt tdt(i,k) = tdt(i,k)+ttend rtg(i,k,1) = rtg(i,k,1)+qtend - dtsfc(i) = dtsfc(i)+cont*del(i,k)*ttend - dqsfc(i) = dqsfc(i)+conq*del(i,k)*qtend +! dtsfc(i) = dtsfc(i)+cont*del(i,k)*ttend +! dqsfc(i) = dqsfc(i)+conq*del(i,k)*qtend enddo enddo + do i = 1,im + dtsfc(i) = rho_a(i) * cp * heat(i) + dqsfc(i) = rho_a(i) * hvap * evap(i) + enddo +! if(ldiag3d .and. .not. gen_tend) then - do k = 1,km - do i = 1,im - ttend = (f1(i,k)-t1(i,k))*rdt - dt3dt(i,k) = dt3dt(i,k)+ttend*delt + idtend=dtidx(index_of_temperature,index_of_process_pbl) + if(idtend>=1) then + do k = 1,km + do i = 1,im + ttend = (f1(i,k)-t1(i,k))*rdt + dtend(i,k,idtend) = dtend(i,k,idtend)+ttend*delt + enddo enddo - enddo - if(qdiag3d) then + endif + ! Send tendencies just for QV; other tracers are below. + idtend=dtidx(100+ntqv,index_of_process_pbl) + if(idtend>=1) then do k = 1,km do i = 1,im qtend = (f2(i,k)-q1(i,k,1))*rdt - dq3dt(i,k) = dq3dt(i,k)+qtend*delt + dtend(i,k,idtend) = dtend(i,k,idtend)+qtend*delt enddo enddo endif @@ -1448,14 +1527,21 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntiw,ntke, & enddo enddo enddo - if(ldiag3d .and. .not. gen_tend .and. qdiag3d .and. ntoz>0) then - kk=ntoz - is = (kk-1) * km - do k = 1, km - do i = 1, im - qtend = (f2(i,k+is)-q1(i,k,kk))*rdt - do3dt(i,k) = do3dt(i,k)+qtend*delt - enddo + if(ldiag3d .and. .not. gen_tend) then + ! Send tendencies for all tracers that were selected. + do kk = 2, ntrac1 + is = (kk-1) * km + idtend = dtidx(kk+100,index_of_process_pbl) + if(idtend>=1) then + if(kk/=ntke) then + do k = 1, km + do i = 1, im + qtend = (f2(i,k+is)-q1(i,k,kk))*rdt + dtend(i,k,idtend) = dtend(i,k,idtend)+qtend*delt + enddo + enddo + endif + endif enddo endif endif @@ -1472,12 +1558,15 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntiw,ntke, & enddo enddo if(ldiag3d .and. .not. gen_tend) then - do k = 1,km1 - do i = 1,im - ttend = diss(i,k) / cp - dt3dt(i,k) = dt3dt(i,k)+dspfac * ttend*delt + idtend=dtidx(index_of_temperature,index_of_process_pbl) + if(idtend>=1) then + do k = 1,km1 + do i = 1,im + ttend = diss(i,k) / cp + dtend(i,k,idtend) = dtend(i,k,idtend)+dspfac*ttend*delt + enddo enddo - enddo + endif endif endif c @@ -1551,19 +1640,35 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntiw,ntke, & vtend = (f2(i,k)-v1(i,k))*rdt du(i,k) = du(i,k)+utend dv(i,k) = dv(i,k)+vtend - dusfc(i) = dusfc(i)+conw*del(i,k)*utend - dvsfc(i) = dvsfc(i)+conw*del(i,k)*vtend +! dusfc(i) = dusfc(i)+conw*del(i,k)*utend +! dvsfc(i) = dvsfc(i)+conw*del(i,k)*vtend enddo enddo + do i = 1,im + dusfc(i) = -1.*rho_a(i)*stress(i)*u1(i,1)/spd1(i) + dvsfc(i) = -1.*rho_a(i)*stress(i)*v1(i,1)/spd1(i) + enddo +! if(ldiag3d .and. .not. gen_tend) then - do k = 1,km - do i = 1,im - utend = (f1(i,k)-u1(i,k))*rdt - vtend = (f2(i,k)-v1(i,k))*rdt - du3dt(i,k) = du3dt(i,k) + utend*delt - dv3dt(i,k) = dv3dt(i,k) + vtend*delt + idtend=dtidx(index_of_x_wind,index_of_process_pbl) + if(idtend>=1) then + do k = 1,km + do i = 1,im + utend = (f1(i,k)-u1(i,k))*rdt + dtend(i,k,idtend) = dtend(i,k,idtend) + utend*delt + enddo enddo - enddo + endif + + idtend=dtidx(index_of_y_wind,index_of_process_pbl) + if(idtend>=1) then + do k = 1,km + do i = 1,im + vtend = (f2(i,k)-v1(i,k))*rdt + dtend(i,k,idtend) = dtend(i,k,idtend) + vtend*delt + enddo + enddo + endif endif ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! diff --git a/physics/satmedmfvdifq.meta b/physics/satmedmfvdifq.meta index a57ce3839..598f9aa1f 100644 --- a/physics/satmedmfvdifq.meta +++ b/physics/satmedmfvdifq.meta @@ -7,6 +7,14 @@ [ccpp-arg-table] name = satmedmfvdifq_init type = scheme +[satmedmf] + standard_name = flag_for_scale_aware_TKE_moist_EDMF_PBL + long_name = flag for scale-aware TKE moist EDMF PBL scheme + units = flag + dimensions = () + type = logical + intent = in + optional = F [isatmedmf] standard_name = choice_of_scale_aware_TKE_moist_EDMF_PBL long_name = choice of scale-aware TKE moist EDMF PBL scheme @@ -54,7 +62,7 @@ intent = in optional = F [km] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -70,7 +78,7 @@ intent = in optional = F [ntcw] - standard_name = index_for_liquid_cloud_condensate + standard_name = index_for_liquid_cloud_condensate_vertical_diffusion_tracer long_name = tracer index for cloud condensate (or liquid water) units = index dimensions = () @@ -103,7 +111,7 @@ intent = in optional = F [rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -175,28 +183,28 @@ intent = in optional = F [dv] - standard_name = tendency_of_y_wind_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_y_wind long_name = updated tendency of the y wind units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [du] - standard_name = tendency_of_x_wind_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_x_wind long_name = updated tendency of the x wind units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [tdt] - standard_name = tendency_of_air_temperature_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_air_temperature long_name = updated tendency of the temperature units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -205,7 +213,7 @@ standard_name = tendency_of_vertically_diffused_tracer_concentration long_name = updated tendency of the tracers due to vertical diffusion in PBL scheme units = kg kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_vertical_diffusion_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_vertical_diffusion_tracers) type = real kind = kind_phys intent = inout @@ -214,7 +222,7 @@ standard_name = x_wind long_name = x component of layer wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -223,7 +231,7 @@ standard_name = y_wind long_name = y component of layer wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -232,7 +240,7 @@ standard_name = air_temperature long_name = layer mean air temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -241,25 +249,25 @@ standard_name = vertically_diffused_tracer_concentration long_name = tracer concentration diffused by PBL scheme units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_vertical_diffusion_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_vertical_diffusion_tracers) type = real kind = kind_phys intent = in optional = F [swh] - standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_timestep long_name = total sky shortwave heating rate units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [hlw] - standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step + standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_timestep long_name = total sky longwave heating rate units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -282,25 +290,17 @@ kind = kind_phys intent = in optional = F -[islimsk] - standard_name = sea_land_ice_mask - long_name = sea/land/ice mask (=0/1/2) - units = flag - dimensions = (horizontal_loop_extent) - type = integer - intent = in - optional = F -[snwdph_lnd] - standard_name = surface_snow_thickness_water_equivalent_over_land - long_name = water equivalent snow depth over land - units = mm +[zvfun] + standard_name = function_of_surface_roughness_length_and_green_vegetation_fraction + long_name = function of surface roughness length and green vegetation fraction + units = none dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in optional = F [psk] - standard_name = dimensionless_exner_function_at_lowest_model_interface + standard_name = surface_dimensionless_exner_function long_name = dimensionless Exner function at the surface interface units = none dimensions = (horizontal_loop_extent) @@ -372,8 +372,8 @@ intent = in optional = F [heat] - standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness - long_name = kinematic surface upward sensible heat flux + standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness_and_vegetation + long_name = kinematic surface upward sensible heat flux reduced by surface roughness and vegetation units = K m s-1 dimensions = (horizontal_loop_extent) type = real @@ -381,7 +381,7 @@ intent = in optional = F [evap] - standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness + standard_name = surface_upward_specific_humidity_flux long_name = kinematic surface upward latent heat flux units = kg kg-1 m s-1 dimensions = (horizontal_loop_extent) @@ -419,7 +419,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -428,7 +428,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = pres(k) - pres(k+1) units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -437,16 +437,16 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [prslk] - standard_name = dimensionless_exner_function_at_model_layers + standard_name = dimensionless_exner_function long_name = Exner function at layers units = none - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -455,7 +455,7 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -464,13 +464,13 @@ standard_name = geopotential long_name = geopotential at model layer centers units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [delt] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = time step for physics units = s dimensions = () @@ -531,6 +531,24 @@ kind = kind_phys intent = out optional = F +[dkt] + standard_name = atmosphere_heat_diffusivity + long_name = atmospheric heat diffusivity + units = m2 s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dku] + standard_name = atmosphere_momentum_diffusivity + long_name = atmospheric momentum diffusivity + units = m2 s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = out + optional = F [kinver] standard_name = index_of_highest_temperature_inversion long_name = index of highest temperature inversion @@ -540,7 +558,7 @@ intent = in optional = F [xkzm_m] - standard_name = atmosphere_momentum_diffusivity_background + standard_name = atmosphere_momentum_diffusivity_due_to_background long_name = background value of momentum diffusivity units = m2 s-1 dimensions = () @@ -549,7 +567,7 @@ intent = in optional = F [xkzm_h] - standard_name = atmosphere_heat_diffusivity_background + standard_name = atmosphere_heat_diffusivity_due_to_background long_name = background value of heat diffusivity units = m2 s-1 dimensions = () @@ -558,7 +576,7 @@ intent = in optional = F [xkzm_s] - standard_name = diffusivity_background_sigma_level + standard_name = sigma_pressure_threshold_at_upper_extent_of_background_diffusion long_name = sigma level threshold for background diffusivity units = none dimensions = () @@ -567,7 +585,7 @@ intent = in optional = F [dspfac] - standard_name = tke_dissipative_heating_factor + standard_name = multiplicative_tuning_parameter_for_tke_dissipative_heating long_name = tke dissipative heating factor units = none dimensions = () @@ -576,7 +594,7 @@ intent = in optional = F [bl_upfr] - standard_name = updraft_fraction_in_boundary_layer_mass_flux_scheme + standard_name = updraft_area_fraction_in_scale_aware_tke_moist_edmf_pbl_scheme long_name = updraft fraction in boundary layer mass flux scheme units = none dimensions = () @@ -585,7 +603,7 @@ intent = in optional = F [bl_dnfr] - standard_name = downdraft_fraction_in_boundary_layer_mass_flux_scheme + standard_name = downdraft_area_fraction_in_scale_aware_tke_moist_edmf_pbl_scheme long_name = downdraft fraction in boundary layer mass flux scheme units = none dimensions = () @@ -594,60 +612,72 @@ intent = in optional = F [ntoz] - standard_name = index_for_ozone + standard_name = index_of_ozone_mixing_ratio_in_tracer_concentration_array long_name = tracer index for ozone mixing ratio units = index dimensions = () type = integer intent = in optional = F -[du3dt] - standard_name = cumulative_change_in_x_wind_due_to_PBL - long_name = cumulative change in x wind due to PBL - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[ntqv] + standard_name = index_of_specific_humidity_in_tracer_concentration_array + long_name = tracer index for water vapor (specific humidity) + units = index + dimensions = () + type = integer + intent = in optional = F -[dv3dt] - standard_name = cumulative_change_in_y_wind_due_to_PBL - long_name = cumulative change in y wind due to PBL - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) +[dtend] + standard_name = cumulative_change_of_state_variables + long_name = diagnostic tendencies for state variables + units = various + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_cumulative_change_processes) type = real kind = kind_phys - intent = inout + intent = in optional = F -[dt3dt] - standard_name = cumulative_change_in_temperature_due_to_PBL - long_name = cumulative change in temperature due to PBL - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[dtidx] + standard_name = cumulative_change_of_state_variables_outer_index + long_name = index of state-variable and process in last dimension of diagnostic tendencies array AKA cumulative_change_index + units = index + dimensions = (number_of_tracers_plus_one_hundred,number_of_cumulative_change_processes) + type = integer + intent = in optional = F -[dq3dt] - standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL - long_name = cumulative change in water vapor specific humidity due to PBL - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[index_of_temperature] + standard_name = index_of_temperature_in_cumulative_change_index + long_name = index of temperature in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in optional = F -[do3dt] - standard_name = cumulative_change_in_ozone_mixing_ratio_due_to_PBL - long_name = cumulative change in ozone mixing ratio due to PBL - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[index_of_x_wind] + standard_name = index_of_x_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_y_wind] + standard_name = index_of_y_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_process_pbl] + standard_name = index_of_subgrid_scale_vertical_mixing_process_in_cumulative_change_index + long_name = index of subgrid scale vertical mixing process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in optional = F [gen_tend] - standard_name = flag_for_generic_planetary_boundary_layer_tendency + standard_name = flag_for_generic_tendency_due_to_planetary_boundary_layer long_name = true if GFS_PBL_generic should calculate tendencies units = flag dimensions = () @@ -655,20 +685,12 @@ intent = in optional = F [ldiag3d] - standard_name = flag_diagnostics_3D + standard_name = flag_for_diagnostics_3D long_name = flag for 3d diagnostic fields units = flag dimensions = () type = logical - intent = inout - optional = F -[qdiag3d] - standard_name = flag_tracer_diagnostics_3D - long_name = flag for 3d tracer diagnostic fields - units = flag - dimensions = () - type = logical - intent = inout + intent = in optional = F [errmsg] standard_name = ccpp_error_message diff --git a/physics/gmtb_scm_sfc_flux_spec.F90 b/physics/scm_sfc_flux_spec.F90 similarity index 87% rename from physics/gmtb_scm_sfc_flux_spec.F90 rename to physics/scm_sfc_flux_spec.F90 index 22730f9f2..398bff5d6 100644 --- a/physics/gmtb_scm_sfc_flux_spec.F90 +++ b/physics/scm_sfc_flux_spec.F90 @@ -1,7 +1,7 @@ -!> \file gmtb_scm_sfc_flux_spec.F90 +!> \file scm_sfc_flux_spec.F90 !! Contains code to calculate parameters needed by the rest of the GFS physics suite given specified surface fluxes. -module gmtb_scm_sfc_flux_spec +module scm_sfc_flux_spec implicit none @@ -10,12 +10,16 @@ module gmtb_scm_sfc_flux_spec !---------------- ! Public entities !---------------- - public gmtb_scm_sfc_flux_spec_init, gmtb_scm_sfc_flux_spec_run, gmtb_scm_sfc_flux_spec_finalize + public scm_sfc_flux_spec_init, scm_sfc_flux_spec_run, scm_sfc_flux_spec_finalize CONTAINS !******************************************************************************************* - subroutine gmtb_scm_sfc_flux_spec_init(lheatstrg, errmsg, errflg) +!! +!! \section arg_table_scm_sfc_flux_spec_init Argument Table +!! \htmlinclude scm_sfc_flux_spec_init.html +!! + subroutine scm_sfc_flux_spec_init(lheatstrg, errmsg, errflg) logical, intent(in) :: lheatstrg @@ -27,16 +31,16 @@ subroutine gmtb_scm_sfc_flux_spec_init(lheatstrg, errmsg, errflg) errflg = 1 return end if - end subroutine gmtb_scm_sfc_flux_spec_init + end subroutine scm_sfc_flux_spec_init - subroutine gmtb_scm_sfc_flux_spec_finalize() - end subroutine gmtb_scm_sfc_flux_spec_finalize + subroutine scm_sfc_flux_spec_finalize() + end subroutine scm_sfc_flux_spec_finalize !> \brief This routine calculates surface-related parameters given specified sensible and latent heat fluxes and a roughness length. Most of the calculation !! is "backing out" parameters that are calculated in sfc_dff.f from the known surface heat fluxes and roughness length. !! -!! \section arg_table_gmtb_scm_sfc_flux_spec_run Argument Table -!! \htmlinclude gmtb_scm_sfc_flux_spec_run.html +!! \section arg_table_scm_sfc_flux_spec_run Argument Table +!! \htmlinclude scm_sfc_flux_spec_run.html !! !! \section general_sfc_flux_spec General Algorithm !! -# Compute friction velocity from the wind speed at the lowest model layer, the height about the ground, and the roughness length. @@ -48,7 +52,7 @@ end subroutine gmtb_scm_sfc_flux_spec_finalize !! -# Calculate the Monin-Obukhov similarity function for heat and moisture from the bulk Richardson number and diagnosed similarity function for momentum. !! -# Calculate the surface drag coefficient for heat and moisture. !! -# Calculate the u and v wind at 10m. - subroutine gmtb_scm_sfc_flux_spec_run (u1, v1, z1, t1, q1, p1, roughness_length, spec_sh_flux, spec_lh_flux, & + subroutine scm_sfc_flux_spec_run (u1, v1, z1, t1, q1, p1, roughness_length, spec_sh_flux, spec_lh_flux, & exner_inverse, T_surf, cp, grav, hvap, rd, fvirt, vonKarman, sh_flux, lh_flux, sh_flux_chs, lh_flux_chs, u_star, sfc_stress, cm, ch, & fm, fh, rb, u10m, v10m, wind1, qss, t2m, q2m, errmsg, errflg) @@ -133,6 +137,6 @@ subroutine gmtb_scm_sfc_flux_spec_run (u1, v1, z1, t1, q1, p1, roughness_length, q2m(i) = 0.0 end do - end subroutine gmtb_scm_sfc_flux_spec_run + end subroutine scm_sfc_flux_spec_run -end module gmtb_scm_sfc_flux_spec +end module scm_sfc_flux_spec diff --git a/physics/gmtb_scm_sfc_flux_spec.meta b/physics/scm_sfc_flux_spec.meta similarity index 90% rename from physics/gmtb_scm_sfc_flux_spec.meta rename to physics/scm_sfc_flux_spec.meta index 1e004b7f9..2899bbdcc 100644 --- a/physics/gmtb_scm_sfc_flux_spec.meta +++ b/physics/scm_sfc_flux_spec.meta @@ -1,14 +1,14 @@ [ccpp-table-properties] - name = gmtb_scm_sfc_flux_spec + name = scm_sfc_flux_spec type = scheme dependencies = machine.F ######################################################################## [ccpp-arg-table] - name = gmtb_scm_sfc_flux_spec_init + name = scm_sfc_flux_spec_init type = scheme [lheatstrg] - standard_name = flag_for_canopy_heat_storage + standard_name = flag_for_canopy_heat_storage_in_land_surface_scheme long_name = flag for canopy heat storage parameterization units = flag dimensions = () @@ -35,10 +35,10 @@ ################################# [ccpp-arg-table] - name = gmtb_scm_sfc_flux_spec_run + name = scm_sfc_flux_spec_run type = scheme [u1] - standard_name = x_wind_at_lowest_model_layer + standard_name = x_wind_at_surface_adjacent_layer long_name = x component of 1st model layer wind units = m s-1 dimensions = (horizontal_loop_extent) @@ -47,7 +47,7 @@ intent = in optional = F [v1] - standard_name = y_wind_at_lowest_model_layer + standard_name = y_wind_at_surface_adjacent_layer long_name = y component of 1st model layer wind units = m s-1 dimensions = (horizontal_loop_extent) @@ -65,7 +65,7 @@ intent = in optional = F [t1] - standard_name = air_temperature_at_lowest_model_layer + standard_name = air_temperature_at_surface_adjacent_layer long_name = 1st model layer air temperature units = K dimensions = (horizontal_loop_extent) @@ -74,7 +74,7 @@ intent = in optional = F [q1] - standard_name = water_vapor_specific_humidity_at_lowest_model_layer + standard_name = specific_humidity_at_surface_adjacent_layer long_name = 1st model layer specific humidity units = kg kg-1 dimensions = (horizontal_loop_extent) @@ -83,7 +83,7 @@ intent = in optional = F [p1] - standard_name = air_pressure_at_lowest_model_layer + standard_name = air_pressure_at_surface_adjacent_layer long_name = Model layer 1 mean pressure units = Pa dimensions = (horizontal_loop_extent) @@ -101,7 +101,7 @@ intent = in optional = F [spec_sh_flux] - standard_name = specified_kinematic_surface_upward_sensible_heat_flux + standard_name = specified_surface_upward_temperature_flux long_name = specified kinematic surface upward sensible heat flux units = K m s-1 dimensions = (horizontal_loop_extent) @@ -110,7 +110,7 @@ intent = in optional = F [spec_lh_flux] - standard_name = specified_kinematic_surface_upward_latent_heat_flux + standard_name = specified_surface_upward_specific_humidity_flux long_name = specified kinematic surface upward latent heat flux units = kg kg-1 m s-1 dimensions = (horizontal_loop_extent) @@ -164,7 +164,7 @@ intent = in optional = F [rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -191,7 +191,7 @@ intent = in optional = F [sh_flux] - standard_name = kinematic_surface_upward_sensible_heat_flux + standard_name = surface_upward_temperature_flux long_name = surface upward sensible heat flux units = K m s-1 dimensions = (horizontal_loop_extent) @@ -200,7 +200,7 @@ intent = out optional = F [lh_flux] - standard_name = kinematic_surface_upward_latent_heat_flux + standard_name = surface_upward_specific_humidity_flux long_name = surface upward evaporation flux units = kg kg-1 m s-1 dimensions = (horizontal_loop_extent) @@ -218,7 +218,7 @@ intent = out optional = F [lh_flux_chs] - standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness + standard_name = surface_upward_specific_humidity_flux_reduced_by_surface_roughness long_name = kinematic surface upward latent heat flux reduced by surface roughness units = kg kg-1 m s-1 dimensions = (horizontal_loop_extent) @@ -326,7 +326,7 @@ intent = out optional = F [t2m] - standard_name = temperature_at_2m + standard_name = air_temperature_at_2m long_name = 2 meter temperature units = K dimensions = (horizontal_loop_extent) diff --git a/physics/set_soilveg_ruc.F90 b/physics/set_soilveg_ruc.F90 index e48f4ed88..cac4fd1e7 100644 --- a/physics/set_soilveg_ruc.F90 +++ b/physics/set_soilveg_ruc.F90 @@ -26,13 +26,14 @@ subroutine set_soilveg_ruc(me,isot,ivet,nlunit) real refsmc1, wltsmc1 NAMELIST /SOIL_VEG_RUC/ SLOPE_DATA, ALBTBL, Z0TBL, LEMITBL, & - & PCTBL, SHDTBL, & + & PCTBL, SHDTBL, & & IFORTBL, RSTBL, RGLTBL, HSTBL, SNUPTBL, LAITBL, MAXALB, & & LPARAM, TOPT_DATA, CMCMAX_DATA, CFACTR_DATA, & & RSMAX_DATA, BARE, NATURAL, CROP, URBAN, & & DEFINED_VEG, DEFINED_SOIL, DEFINED_SLOPE, & & BB, DRYSMC, HC, MAXSMC, REFSMC, SATPSI, SATDK, SATDW, & - & WLTSMC, QTZ, mosaic_soil, mosaic_lu, REFSMCnoah, WLTSMCnoah + & WLTSMC, QTZ, mosaic_soil, mosaic_lu, & + & REFSMCnoah, WLTSMCnoah, MAXSMCnoah if(ivet.eq.2) then ! Using umd veg classification diff --git a/physics/sfc_cice.f b/physics/sfc_cice.f index f845f6091..a07759f71 100644 --- a/physics/sfc_cice.f +++ b/physics/sfc_cice.f @@ -98,23 +98,23 @@ subroutine sfc_cice_run & use machine , only : kind_phys implicit none - real(kind=kind_phys), parameter :: one = 1.0_kind_phys - real(kind=kind_phys), parameter :: dsi = one/0.33_kind_phys - real (kind=kind_phys), intent(in) :: hvap, cp, rvrdm1, rd + real(kind=kind_phys), parameter :: one = 1.0_kind_phys + real(kind=kind_phys), parameter :: dsi = one/0.33_kind_phys + real(kind=kind_phys), intent(in) :: hvap, cp, rvrdm1, rd ! --- inputs: integer, intent(in) :: im logical, intent(in) :: cplflx ! real (kind=kind_phys), dimension(im), intent(in) :: u1, v1, & - real (kind=kind_phys), dimension(im), intent(in) :: & + real (kind=kind_phys), dimension(:), intent(in) :: & & t1, q1, cm, ch, prsl1, wind, dqsfc, dtsfc, dusfc, dvsfc &, snowd - logical, intent(in) :: flag_cice(im), flag_iter(im) + logical, dimension(:), intent(in) :: flag_cice, flag_iter ! --- outputs: - real (kind=kind_phys), dimension(im), intent(inout) :: qsurf, & + real (kind=kind_phys), dimension(:), intent(inout) :: qsurf, & & cmm, chh, evap, hflx, stress &, weasd, snwdph, ep ! diff --git a/physics/sfc_cice.meta b/physics/sfc_cice.meta index fc0361ec1..7c8b72b85 100644 --- a/physics/sfc_cice.meta +++ b/physics/sfc_cice.meta @@ -16,7 +16,7 @@ intent = in optional = F [cplflx] - standard_name = flag_for_flux_coupling + standard_name = flag_for_surface_flux_coupling long_name = flag controlling cplflx collection (default off) units = flag dimensions = () @@ -51,7 +51,7 @@ intent = in optional = F [rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -60,7 +60,7 @@ intent = in optional = F [t1] - standard_name = air_temperature_at_lowest_model_layer + standard_name = air_temperature_at_surface_adjacent_layer long_name = surface layer mean temperature units = K dimensions = (horizontal_loop_extent) @@ -69,7 +69,7 @@ intent = in optional = F [q1] - standard_name = water_vapor_specific_humidity_at_lowest_model_layer + standard_name = specific_humidity_at_surface_adjacent_layer long_name = surface layer mean specific humidity units = kg kg-1 dimensions = (horizontal_loop_extent) @@ -96,7 +96,7 @@ intent = in optional = F [prsl1] - standard_name = air_pressure_at_lowest_model_layer + standard_name = air_pressure_at_surface_adjacent_layer long_name = surface layer mean pressure units = Pa dimensions = (horizontal_loop_extent) @@ -130,7 +130,7 @@ intent = in optional = F [dqsfc] - standard_name = surface_upward_latent_heat_flux_for_coupling + standard_name = surface_upward_latent_heat_flux_from_coupled_process long_name = sfc latent heat flux for coupling units = W m-2 dimensions = (horizontal_loop_extent) @@ -139,7 +139,7 @@ intent = in optional = F [dtsfc] - standard_name = surface_upward_sensible_heat_flux_for_coupling + standard_name = surface_upward_sensible_heat_flux_from_coupled_process long_name = sfc sensible heat flux for coupling units = W m-2 dimensions = (horizontal_loop_extent) @@ -148,7 +148,7 @@ intent = in optional = F [dusfc] - standard_name = surface_x_momentum_flux_for_coupling + standard_name = surface_x_momentum_flux_from_coupled_process long_name = sfc x momentum flux for coupling units = Pa dimensions = (horizontal_loop_extent) @@ -157,7 +157,7 @@ intent = in optional = F [dvsfc] - standard_name = surface_y_momentum_flux_for_coupling + standard_name = surface_y_momentum_flux_from_coupled_process long_name = sfc y momentum flux for coupling units = Pa dimensions = (horizontal_loop_extent) @@ -166,7 +166,7 @@ intent = in optional = F [snowd] - standard_name = surface_snow_thickness_for_coupling + standard_name = lwe_surface_snow_from_coupled_process long_name = sfc snow depth in meters over sea ice for coupling units = m dimensions = (horizontal_loop_extent) diff --git a/physics/sfc_diag.f b/physics/sfc_diag.f index b78c9b2f7..c21d3a989 100644 --- a/physics/sfc_diag.f +++ b/physics/sfc_diag.f @@ -23,7 +23,7 @@ end subroutine sfc_diag_finalize !! @{ subroutine sfc_diag_run & & (im,grav,cp,eps,epsm1,ps,u1,v1,t1,q1,prslki, & - & evap,fm,fh,fm10,fh2,tskin,qsurf, & + & evap,fm,fh,fm10,fh2,tskin,qsurf,thsfc_loc, & & f10m,u10m,v10m,t2m,q2m,errmsg,errflg & & ) ! @@ -32,11 +32,12 @@ subroutine sfc_diag_run & implicit none ! integer, intent(in) :: im + logical, intent(in) :: thsfc_loc ! Flag for reference pot. temp. real(kind=kind_phys), intent(in) :: grav,cp,eps,epsm1 - real(kind=kind_phys), dimension(im), intent(in) :: & + real(kind=kind_phys), dimension(:), intent(in) :: & & ps, u1, v1, t1, q1, tskin, & & qsurf, prslki, evap, fm, fh, fm10, fh2 - real(kind=kind_phys), dimension(im), intent(out) :: & + real(kind=kind_phys), dimension(:), intent(out) :: & & f10m, u10m, v10m, t2m, q2m character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -74,11 +75,12 @@ subroutine sfc_diag_run & ! t2m(i) = t2m(i) * sig2k wrk = 1.0 - fhi -#ifdef GSD_SURFACE_FLUXES_BUGFIX - t2m(i) = tskin(i)*wrk + t1(i)*fhi - (grav+grav)/cp -#else - t2m(i) = tskin(i)*wrk + t1(i)*prslki(i)*fhi - (grav+grav)/cp -#endif + + if(thsfc_loc) then ! Use local potential temperature + t2m(i) = tskin(i)*wrk + t1(i)*prslki(i)*fhi - (grav+grav)/cp + else ! Use potential temperature referenced to 1000 hPa + t2m(i) = tskin(i)*wrk + t1(i)*fhi - (grav+grav)/cp + endif if(evap(i) >= 0.) then ! for evaporation>0, use inferred qsurf to deduce q2m q2m(i) = qsurf(i)*wrk + max(qmin,q1(i))*fhi diff --git a/physics/sfc_diag.meta b/physics/sfc_diag.meta index deebf23df..f897996ef 100644 --- a/physics/sfc_diag.meta +++ b/physics/sfc_diag.meta @@ -61,7 +61,7 @@ intent = in optional = F [u1] - standard_name = x_wind_at_lowest_model_layer_updated_by_physics + standard_name = x_wind_of_new_state_at_surface_adjacent_layer long_name = x component of 1st model layer wind units = m s-1 dimensions = (horizontal_loop_extent) @@ -70,7 +70,7 @@ intent = in optional = F [v1] - standard_name = y_wind_at_lowest_model_layer_updated_by_physics + standard_name = y_wind_of_new_state_at_surface_adjacent_layer long_name = y component of 1st model layer wind units = m s-1 dimensions = (horizontal_loop_extent) @@ -79,7 +79,7 @@ intent = in optional = F [t1] - standard_name = air_temperature_at_lowest_model_layer_updated_by_physics + standard_name = air_temperature_of_new_state_at_surface_adjacent_layer long_name = 1st model layer air temperature units = K dimensions = (horizontal_loop_extent) @@ -88,7 +88,7 @@ intent = in optional = F [q1] - standard_name = water_vapor_specific_humidity_at_lowest_model_layer_updated_by_physics + standard_name = specific_humidity_of_new_state_at_surface_adjacent_layer long_name = 1st model layer specific humidity units = kg kg-1 dimensions = (horizontal_loop_extent) @@ -106,7 +106,7 @@ intent = in optional = F [evap] - standard_name = kinematic_surface_upward_latent_heat_flux + standard_name = surface_upward_specific_humidity_flux long_name = surface upward evaporation flux units = kg kg-1 m s-1 dimensions = (horizontal_loop_extent) @@ -168,8 +168,16 @@ kind = kind_phys intent = in optional = F +[thsfc_loc] + standard_name = flag_for_reference_pressure_theta + long_name = flag for reference pressure in theta calculation + units = flag + dimensions = () + type = logical + intent = in + optional = F [f10m] - standard_name = ratio_of_wind_at_lowest_model_layer_and_wind_at_10m + standard_name = ratio_of_wind_at_surface_adjacent_layer_to_wind_at_10m long_name = ratio of fm10 and fm units = ratio dimensions = (horizontal_loop_extent) @@ -196,7 +204,7 @@ intent = out optional = F [t2m] - standard_name = temperature_at_2m + standard_name = air_temperature_at_2m long_name = temperature at 2 m units = K dimensions = (horizontal_loop_extent) diff --git a/physics/sfc_diag_post.F90 b/physics/sfc_diag_post.F90 index 767e98db5..1bf3e7e67 100644 --- a/physics/sfc_diag_post.F90 +++ b/physics/sfc_diag_post.F90 @@ -26,11 +26,11 @@ subroutine sfc_diag_post_run (im, lsm, lsm_noahmp, dry, lssav, dtf, con_eps, con integer, intent(in) :: im, lsm, lsm_noahmp logical, intent(in) :: lssav real(kind=kind_phys), intent(in) :: dtf, con_eps, con_epsm1 - logical , dimension(im), intent(in) :: dry - real(kind=kind_phys), dimension(im), intent(in) :: pgr, u10m, v10m + logical , dimension(:), intent(in) :: dry + real(kind=kind_phys), dimension(:), intent(in) :: pgr, u10m, v10m real(kind=kind_phys), dimension(:) , intent(in) :: t2mmp, q2mp - real(kind=kind_phys), dimension(im), intent(inout) :: t2m, q2m, tmpmin, tmpmax, spfhmin, spfhmax - real(kind=kind_phys), dimension(im), intent(inout) :: wind10mmax, u10mmax, v10mmax, dpt2m + real(kind=kind_phys), dimension(:), intent(inout) :: t2m, q2m, tmpmin, tmpmax, spfhmin, spfhmax + real(kind=kind_phys), dimension(:), intent(inout) :: wind10mmax, u10mmax, v10mmax, dpt2m character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg diff --git a/physics/sfc_diag_post.meta b/physics/sfc_diag_post.meta index 1da5bb2ea..8f4378566 100644 --- a/physics/sfc_diag_post.meta +++ b/physics/sfc_diag_post.meta @@ -16,7 +16,7 @@ intent = in optional = F [lsm] - standard_name = flag_for_land_surface_scheme + standard_name = control_for_land_surface_scheme long_name = flag for land surface model units = flag dimensions = () @@ -24,7 +24,7 @@ intent = in optional = F [lsm_noahmp] - standard_name = flag_for_noahmp_land_surface_scheme + standard_name = identifier_for_noahmp_land_surface_scheme long_name = flag for NOAH MP land surface model units = flag dimensions = () @@ -40,7 +40,7 @@ intent = in optional = F [lssav] - standard_name = flag_diagnostics + standard_name = flag_for_diagnostics long_name = logical flag for storing diagnostics units = flag dimensions = () @@ -48,7 +48,7 @@ intent = in optional = F [dtf] - standard_name = time_step_for_dynamics + standard_name = timestep_for_dynamics long_name = dynamics timestep units = s dimensions = () @@ -102,7 +102,7 @@ intent = in optional = F [t2m] - standard_name = temperature_at_2m + standard_name = air_temperature_at_2m long_name = 2 meter temperature units = K dimensions = (horizontal_loop_extent) diff --git a/physics/sfc_diff.f b/physics/sfc_diff.f index b7ef1ea68..0941b1144 100644 --- a/physics/sfc_diff.f +++ b/physics/sfc_diff.f @@ -11,6 +11,7 @@ module sfc_diff implicit none public :: sfc_diff_init, sfc_diff_run, sfc_diff_finalize + public :: stability private @@ -61,16 +62,16 @@ end subroutine sfc_diff_finalize !! - Calculate the exchange coefficients:\f$cm\f$, \f$ch\f$, and \f$stress\f$ as inputs of other \a sfc schemes. !! subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) - & ps,t1,q1,z1,wind, & !intent(in) + & ps,t1,q1,z1,garea,wind, & !intent(in) & prsl1,prslki,prsik1,prslk1, & !intent(in) & sigmaf,vegtype,shdmax,ivegsrc, & !intent(in) & z0pert,ztpert, & ! mg, sfc-perts !intent(in) & flag_iter,redrag, & !intent(in) & u10m,v10m,sfc_z0_type, & !hafs,z0 type !intent(in) & wet,dry,icy, & !intent(in) + & thsfc_loc, & !intent(in) & tskin_wat, tskin_lnd, tskin_ice, & !intent(in) & tsurf_wat, tsurf_lnd, tsurf_ice, & !intent(in) - & snwdph_wat,snwdph_lnd,snwdph_ice, & !intent(in) & z0rl_wat, z0rl_lnd, z0rl_ice, & !intent(inout) & z0rl_wav, & !intent(inout) & ustar_wat, ustar_lnd, ustar_ice, & !intent(inout) @@ -82,6 +83,8 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) & fh_wat, fh_lnd, fh_ice, & !intent(inout) & fm10_wat, fm10_lnd, fm10_ice, & !intent(inout) & fh2_wat, fh2_lnd, fh2_ice, & !intent(inout) + & ztmax_wat, ztmax_lnd, ztmax_ice, & !intent(inout) + & zvfun, & !intent(out) & errmsg, errflg) !intent(out) ! implicit none @@ -90,24 +93,25 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) integer, intent(in) :: im, ivegsrc integer, intent(in) :: sfc_z0_type ! option for calculating surface roughness length over ocean - integer, dimension(im), intent(in) :: vegtype + integer, dimension(:), intent(in) :: vegtype logical, intent(in) :: redrag ! reduced drag coeff. flag for high wind over sea (j.han) - logical, dimension(im), intent(in) :: flag_iter, wet, dry, icy + logical, dimension(:), intent(in) :: flag_iter, wet, dry, icy - real(kind=kind_phys), dimension(im), intent(in) :: u10m,v10m + logical, intent(in) :: thsfc_loc ! Flag for reference pressure in theta calculation + + real(kind=kind_phys), dimension(:), intent(in) :: u10m,v10m real(kind=kind_phys), intent(in) :: rvrdm1, eps, epsm1, grav - real(kind=kind_phys), dimension(im), intent(in) :: & - & ps,t1,q1,z1,prsl1,prslki,prsik1,prslk1, & + real(kind=kind_phys), dimension(:), intent(in) :: & + & ps,t1,q1,z1,garea,prsl1,prslki,prsik1,prslk1, & & wind,sigmaf,shdmax, & & z0pert,ztpert ! mg, sfc-perts - real(kind=kind_phys), dimension(im), intent(in) :: & + real(kind=kind_phys), dimension(:), intent(in) :: & & tskin_wat, tskin_lnd, tskin_ice, & - & tsurf_wat, tsurf_lnd, tsurf_ice, & - & snwdph_wat,snwdph_lnd,snwdph_ice + & tsurf_wat, tsurf_lnd, tsurf_ice - real(kind=kind_phys), dimension(im), intent(in) :: z0rl_wav - real(kind=kind_phys), dimension(im), intent(inout) :: & + real(kind=kind_phys), dimension(:), intent(in) :: z0rl_wav + real(kind=kind_phys), dimension(:), intent(inout) :: & & z0rl_wat, z0rl_lnd, z0rl_ice, & & ustar_wat, ustar_lnd, ustar_ice, & & cm_wat, cm_lnd, cm_ice, & @@ -117,7 +121,10 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) & fm_wat, fm_lnd, fm_ice, & & fh_wat, fh_lnd, fh_ice, & & fm10_wat, fm10_lnd, fm10_ice, & - & fh2_wat, fh2_lnd, fh2_ice + & fh2_wat, fh2_lnd, fh2_ice, & + & ztmax_wat, ztmax_lnd, ztmax_ice + real(kind=kind_phys), dimension(:), intent(out) :: zvfun +! character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! @@ -125,14 +132,17 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) ! integer i ! - real(kind=kind_phys) :: rat, thv1, restar, wind10m, + real(kind=kind_phys) :: rat, tv1, thv1, restar, wind10m, & czilc, tem1, tem2, virtfac +! - real(kind=kind_phys) :: tvs, z0, z0max, ztmax + real(kind=kind_phys) :: tvs, z0, z0max, ztmax, gdx +! + real(kind=kind_phys), parameter :: z0lo=0.1, z0up=1.0 ! real(kind=kind_phys), parameter :: & one=1.0_kp, zero=0.0_kp, half=0.5_kp, qmin=1.0e-8_kp - &, charnock=.014_kp, z0s_max=.317e-2_kp &! a limiting value at high winds over sea + &, charnock=.018_kp, z0s_max=.317e-2_kp &! a limiting value at high winds over sea &, zmin=1.0e-6_kp & &, vis=1.4e-5_kp, rnu=1.51e-5_kp, visi=one/vis & &, log01=log(0.01_kp), log05=log(0.05_kp), log07=log(0.07_kp) @@ -166,19 +176,36 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) do i=1,im if(flag_iter(i)) then + + ! Need to initialize ztmax arrays + ztmax_lnd(i) = 1. ! log(1) = 0 + ztmax_ice(i) = 1. ! log(1) = 0 + ztmax_wat(i) = 1. ! log(1) = 0 + virtfac = one + rvrdm1 * max(q1(i),qmin) - thv1 = t1(i) * prslki(i) * virtfac + + tv1 = t1(i) * virtfac ! Virtual temperature in middle of lowest layer + if(thsfc_loc) then ! Use local potential temperature + thv1 = t1(i) * prslki(i) * virtfac + else ! Use potential temperature reference to 1000 hPa + thv1 = t1(i) / prslk1(i) * virtfac + endif + + zvfun(i) = zero + gdx = sqrt(garea(i)) ! compute stability dependent exchange coefficients ! this portion of the code is presently suppressed ! if (dry(i)) then ! Some land -#ifdef GSD_SURFACE_FLUXES_BUGFIX - tvs = half * (tsurf_lnd(i)+tskin_lnd(i))/prsik1(i) - & * virtfac -#else - tvs = half * (tsurf_lnd(i)+tskin_lnd(i)) * virtfac -#endif + + if(thsfc_loc) then ! Use local potential temperature + tvs = half * (tsurf_lnd(i)+tskin_lnd(i)) * virtfac + else ! Use potential temperature referenced to 1000 hPa + tvs = half * (tsurf_lnd(i)+tskin_lnd(i))/prsik1(i) + & * virtfac + endif + z0max = max(zmin, min(0.01_kp * z0rl_lnd(i), z1(i))) !** xubin's new z0 over land tem1 = one - shdmax(i) @@ -225,31 +252,53 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) z0max = max(z0max, zmin) -! czilc = 10.0 ** (- (0.40/0.07) * z0) ! fei's canopy height dependance of czil - czilc = 0.8_kp - - tem1 = 1.0_kp - sigmaf(i) - ztmax = z0max*exp( - tem1*tem1 - & * czilc*ca*sqrt(ustar_lnd(i)*(0.01/1.5e-05))) - - +!! czilc = 10.0 ** (- (0.40/0.07) * z0) ! fei's canopy height dependance of czil +! czilc = 0.8_kp +! +! tem1 = 1.0_kp - sigmaf(i) +! ztmax_lnd(i) = z0max*exp( - tem1*tem1 +! & * czilc*ca*sqrt(ustar_lnd(i)*(0.01/1.5e-05))) +! + czilc = 10.0_kp ** (- 4.0_kp * z0max) ! Trier et al. (2011,WAF) + czilc = max(min(czilc, 0.8_kp), 0.08_kp) + tem1 = 1.0_kp - sigmaf(i) + czilc = czilc * tem1 * tem1 + ztmax_lnd(i) = z0max * exp( - czilc * ca + & * 258.2_kp * sqrt(ustar_lnd(i)*z0max) ) +! ! mg, sfc-perts: add surface perturbations to ztmax/z0max ratio over land if (ztpert(i) /= zero) then - ztmax = ztmax * (10.0_kp**ztpert(i)) + ztmax_lnd(i) = ztmax_lnd(i) * (10.0_kp**ztpert(i)) endif - ztmax = max(ztmax, zmin) + ztmax_lnd(i) = max(ztmax_lnd(i), zmin) +! +! compute a function of surface roughness & green vegetation fraction (zvfun) +! + tem1 = (z0max - z0lo) / (z0up - z0lo) + tem1 = min(max(tem1, zero), 1.0_kp) + tem2 = max(sigmaf(i), 0.1_kp) + zvfun(i) = sqrt(tem1 * tem2) ! call stability ! --- inputs: - & (z1(i), snwdph_lnd(i), thv1, wind(i), - & z0max, ztmax, tvs, grav, + & (z1(i), zvfun(i), gdx, tv1, thv1, wind(i), + & z0max, ztmax_lnd(i), tvs, grav, thsfc_loc, ! --- outputs: & rb_lnd(i), fm_lnd(i), fh_lnd(i), fm10_lnd(i), fh2_lnd(i), & cm_lnd(i), ch_lnd(i), stress_lnd(i), ustar_lnd(i)) endif ! Dry points if (icy(i)) then ! Some ice - tvs = half * (tsurf_ice(i)+tskin_ice(i)) * virtfac + + zvfun(i) = zero + + if(thsfc_loc) then ! Use local potential temperature + tvs = half * (tsurf_ice(i)+tskin_ice(i)) * virtfac + else ! Use potential temperature referenced to 1000 hPa + tvs = half * (tsurf_ice(i)+tskin_ice(i))/prsik1(i) + & * virtfac + endif + z0max = max(zmin, min(0.01_kp * z0rl_ice(i), z1(i))) !** xubin's new z0 over land and sea ice tem1 = one - shdmax(i) @@ -265,19 +314,27 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) z0max = max(z0max, zmin) -! czilc = 10.0 ** (- (0.40/0.07) * z0) ! fei's canopy height +!! czilc = 10.0 ** (- (0.40/0.07) * z0) ! fei's canopy height ! dependance of czil - czilc = 0.8_kp - - tem1 = 1.0_kp - sigmaf(i) - ztmax = z0max*exp( - tem1*tem1 - & * czilc*ca*sqrt(ustar_ice(i)*(0.01/1.5e-05))) - ztmax = max(ztmax, 1.0e-6) +! czilc = 0.8_kp +! +! tem1 = 1.0_kp - sigmaf(i) +! ztmax_ice(i) = z0max*exp( - tem1*tem1 +! & * czilc*ca*sqrt(ustar_ice(i)*(0.01/1.5e-05))) +! + czilc = 10.0_kp ** (- 4.0_kp * z0max) + czilc = max(min(czilc, 0.8_kp), 0.08_kp) + tem1 = 1.0_kp - sigmaf(i) + czilc = czilc * tem1 * tem1 + ztmax_ice(i) = z0max * exp( - czilc * ca + & * 258.2_kp * sqrt(ustar_ice(i)*z0max) ) +! + ztmax_ice(i) = max(ztmax_ice(i), 1.0e-6) ! call stability ! --- inputs: - & (z1(i), snwdph_ice(i), thv1, wind(i), - & z0max, ztmax, tvs, grav, + & (z1(i), zvfun(i), gdx, tv1, thv1, wind(i), + & z0max, ztmax_ice(i), tvs, grav, thsfc_loc, ! --- outputs: & rb_ice(i), fm_ice(i), fh_ice(i), fm10_ice(i), fh2_ice(i), & cm_ice(i), ch_ice(i), stress_ice(i), ustar_ice(i)) @@ -287,10 +344,19 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) ! the stuff now put into "stability" if (wet(i)) then ! Some open ocean - tvs = half * (tsurf_wat(i)+tskin_wat(i)) * virtfac + + zvfun(i) = zero + + if(thsfc_loc) then ! Use local potential temperature + tvs = half * (tsurf_wat(i)+tskin_wat(i)) * virtfac + else + tvs = half * (tsurf_wat(i)+tskin_wat(i))/prsik1(i) + & * virtfac + endif + z0 = 0.01_kp * z0rl_wat(i) z0max = max(zmin, min(z0,z1(i))) - ustar_wat(i) = sqrt(grav * z0 / charnock) +! ustar_wat(i) = sqrt(grav * z0 / charnock) wind10m = sqrt(u10m(i)*u10m(i)+v10m(i)*v10m(i)) !** test xubin's new z0 @@ -307,12 +373,12 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) ! rat taken from zeng, zhao and dickinson 1997 rat = min(7.0_kp, 2.67_kp * sqrt(sqrt(restar)) - 2.57_kp) - ztmax = max(z0max * exp(-rat), zmin) + ztmax_wat(i) = max(z0max * exp(-rat), zmin) ! if (sfc_z0_type == 6) then - call znot_t_v6(wind10m, ztmax) ! 10-m wind,m/s, ztmax(m) + call znot_t_v6(wind10m, ztmax_wat(i)) ! 10-m wind,m/s, ztmax(m) else if (sfc_z0_type == 7) then - call znot_t_v7(wind10m, ztmax) ! 10-m wind,m/s, ztmax(m) + call znot_t_v7(wind10m, ztmax_wat(i)) ! 10-m wind,m/s, ztmax(m) else if (sfc_z0_type > 0) then write(0,*)'no option for sfc_z0_type=',sfc_z0_type stop @@ -320,8 +386,8 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) ! call stability ! --- inputs: - & (z1(i), snwdph_wat(i), thv1, wind(i), - & z0max, ztmax, tvs, grav, + & (z1(i), zvfun(i), gdx, tv1, thv1, wind(i), + & z0max, ztmax_wat(i), tvs, grav, thsfc_loc, ! --- outputs: & rb_wat(i), fm_wat(i), fh_wat(i), fm10_wat(i), fh2_wat(i), & cm_wat(i), ch_wat(i), stress_wat(i), ustar_wat(i)) @@ -330,7 +396,10 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) ! if (sfc_z0_type >= 0) then if (sfc_z0_type == 0) then - z0 = (charnock / grav) * ustar_wat(i) * ustar_wat(i) +! z0 = (charnock / grav) * ustar_wat(i) * ustar_wat(i) + tem1 = 0.11 * vis / ustar_wat(i) + z0 = tem1 + (charnock/grav)*ustar_wat(i)*ustar_wat(i) + ! mbek -- toga-coare flux algorithm ! z0 = (charnock / grav) * ustar(i)*ustar(i) + arnu/ustar(i) @@ -358,7 +427,9 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) endif elseif (z0rl_wav(i) <= 1.0e-7_kp) then - z0 = (charnock / grav) * ustar_wat(i) * ustar_wat(i) +! z0 = (charnock / grav) * ustar_wat(i) * ustar_wat(i) + tem1 = 0.11 * vis / ustar_wat(i) + z0 = tem1 + (charnock/grav)*ustar_wat(i)*ustar_wat(i) if (redrag) then z0rl_wat(i) = 100.0_kp * max(min(z0, z0s_max),1.0e-7_kp) @@ -380,7 +451,8 @@ end subroutine sfc_diff_run !>\ingroup GFS_diff_main subroutine stability & ! --- inputs: - & ( z1, snwdph, thv1, wind, z0max, ztmax, tvs, grav, & + & ( z1, zvfun, gdx, tv1, thv1, wind, z0max, ztmax, tvs, grav, & + & thsfc_loc, & ! --- outputs: & rb, fm, fh, fm10, fh2, cm, ch, stress, ustar) !----- @@ -388,7 +460,8 @@ subroutine stability & integer, parameter :: kp = kind_phys ! --- inputs: real(kind=kind_phys), intent(in) :: & - & z1, snwdph, thv1, wind, z0max, ztmax, tvs, grav + & z1, zvfun, gdx, tv1, thv1, wind, z0max, ztmax, tvs, grav + logical, intent(in) :: thsfc_loc ! --- outputs: real(kind=kind_phys), intent(out) :: & @@ -397,40 +470,56 @@ subroutine stability & ! --- locals: real(kind=kind_phys), parameter :: alpha=5.0_kp, a0=-3.975_kp & &, a1=12.32_kp, alpha4=4.0_kp*alpha & - &, b1=-7.755_kp, b2=6.041_kp, alpha2=alpha+alpha & - &, beta=1.0_kp & + &, b1=-7.755_kp, b2=6.041_kp & + &, xkrefsqr=0.3_kp, xkmin=0.05_kp & + &, xkgdx=3000.0_kp & &, a0p=-7.941_kp, a1p=24.75_kp, b1p=-8.705_kp, b2p=7.899_kp& - &, ztmin1=-999.0_kp, zero=0.0_kp, one=1.0_kp + &, zolmin=-10.0_kp, zero=0.0_kp, one=1.0_kp real(kind=kind_phys) aa, aa0, bb, bb0, dtv, adtv, & hl1, hl12, pm, ph, pm10, ph2, & z1i, & fms, fhs, hl0, hl0inf, hlinf, & hl110, hlt, hltinf, olinf, - & tem1, tem2, ztmax1 + & tem1, tem2, zolmax + + real(kind=kind_phys) xkzo z1i = one / z1 - tem1 = z0max/z1 - if (abs(one-tem1) > 1.0e-6_kp) then - ztmax1 = - beta*log(tem1)/(alpha2*(one-tem1)) +! +! set background diffusivities with one for gdx >= xkgdx and +! as a function of horizontal grid size for gdx < xkgdx +! (i.e., gdx/xkgdx for gdx < xkgdx) +! + if(gdx >= xkgdx) then + xkzo = one else - ztmax1 = 99.0_kp + xkzo = gdx / xkgdx + endif + + tem1 = tv1 - tvs + if(tem1 > zero) then + tem2 = xkzo * zvfun + xkzo = min(max(tem2, xkmin), xkzo) endif - if( z0max < 0.05_kp .and. snwdph < 10.0_kp ) ztmax1 = 99.0_kp + + zolmax = xkrefsqr / sqrt(xkzo) ! compute stability indices (rb and hlinf) dtv = thv1 - tvs adtv = max(abs(dtv),0.001_kp) dtv = sign(1.,dtv) * adtv -#ifdef GSD_SURFACE_FLUXES_BUGFIX - rb = max(-5000.0_kp, grav * dtv * z1 - & / (thv1 * wind * wind)) -#else - rb = max(-5000.0_kp, (grav+grav) * dtv * z1 - & / ((thv1 + tvs) * wind * wind)) -#endif + + if(thsfc_loc) then ! Use local potential temperature + rb = max(-5000.0_kp, (grav+grav) * dtv * z1 + & / ((thv1 + tvs) * wind * wind)) + else ! Use potential temperature referenced to 1000 hPa + rb = max(-5000.0_kp, grav * dtv * z1 + & / (tv1 * wind * wind)) + endif + tem1 = one / z0max tem2 = one / ztmax fm = log((z0max+z1) * tem1) @@ -438,7 +527,7 @@ subroutine stability & fm10 = log((z0max+10.0_kp) * tem1) fh2 = log((ztmax+2.0_kp) * tem2) hlinf = rb * fm * fm / fh - hlinf = min(max(hlinf,ztmin1),ztmax1) + hlinf = min(max(hlinf,zolmin),zolmax) ! ! stable case ! @@ -457,7 +546,7 @@ subroutine stability & fms = fm - pm fhs = fh - ph hl1 = fms * fms * rb / fhs - hl1 = min(max(hl1, ztmin1), ztmax1) + hl1 = min(hl1, zolmax) endif ! ! second iteration @@ -472,11 +561,9 @@ subroutine stability & pm = aa0 - aa + log( (one+aa)/(one+aa0) ) ph = bb0 - bb + log( (one+bb)/(one+bb0) ) hl110 = hl1 * 10.0_kp * z1i - hl110 = min(max(hl110, ztmin1), ztmax1) aa = sqrt(one + alpha4 * hl110) pm10 = aa0 - aa + log( (one+aa)/(one+aa0) ) hl12 = (hl1+hl1) * z1i - hl12 = min(max(hl12,ztmin1),ztmax1) ! aa = sqrt(one + alpha4 * hl12) bb = sqrt(one + alpha4 * hl12) ph2 = bb0 - bb + log( (one+bb)/(one+bb0) ) @@ -488,7 +575,7 @@ subroutine stability & tem1 = 50.0_kp * z0max if(abs(olinf) <= tem1) then hlinf = -z1 / tem1 - hlinf = min(max(hlinf,ztmin1),ztmax1) + hlinf = max(hlinf, zolmin) endif ! ! get pm and ph @@ -498,10 +585,8 @@ subroutine stability & pm = (a0 + a1*hl1) * hl1 / (one+ (b1+b2*hl1) *hl1) ph = (a0p + a1p*hl1) * hl1 / (one+ (b1p+b2p*hl1)*hl1) hl110 = hl1 * 10.0_kp * z1i - hl110 = min(max(hl110, ztmin1), ztmax1) pm10 = (a0 + a1*hl110) * hl110/(one+(b1+b2*hl110)*hl110) hl12 = (hl1+hl1) * z1i - hl12 = min(max(hl12, ztmin1), ztmax1) ph2 = (a0p + a1p*hl12) * hl12/(one+(b1p+b2p*hl12)*hl12) else ! hlinf < 0.05 hl1 = -hlinf @@ -511,11 +596,9 @@ subroutine stability & ! pm = log(hl1) + 2.0 * hl1 ** (-.25) - .8776 ! ph = log(hl1) + 0.5 * hl1 ** (-.5) + 1.386 hl110 = hl1 * 10.0_kp * z1i - hl110 = min(max(hl110, ztmin1), ztmax1) pm10 = log(hl110) + 2.0_kp/sqrt(sqrt(hl110)) - 0.8776_kp ! pm10 = log(hl110) + 2. * hl110 ** (-.25) - .8776 hl12 = (hl1+hl1) * z1i - hl12 = min(max(hl12, ztmin1), ztmax1) ph2 = log(hl12) + 0.5_kp / sqrt(hl12) + 1.386_kp ! ph2 = log(hl12) + .5 * hl12 ** (-.5) + 1.386 endif diff --git a/physics/sfc_diff.meta b/physics/sfc_diff.meta index 9f03b3bf1..a5375ec38 100644 --- a/physics/sfc_diff.meta +++ b/physics/sfc_diff.meta @@ -61,7 +61,7 @@ intent = in optional = F [t1] - standard_name = air_temperature_at_lowest_model_layer + standard_name = air_temperature_at_surface_adjacent_layer long_name = 1st model layer air temperature units = K dimensions = (horizontal_loop_extent) @@ -70,7 +70,7 @@ intent = in optional = F [q1] - standard_name = water_vapor_specific_humidity_at_lowest_model_layer + standard_name = specific_humidity_at_surface_adjacent_layer long_name = 1st model layer specific humidity units = kg kg-1 dimensions = (horizontal_loop_extent) @@ -87,6 +87,24 @@ kind = kind_phys intent = in optional = F +[garea] + standard_name = cell_area + long_name = area of the grid cell + units = m2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[zvfun] + standard_name = function_of_surface_roughness_length_and_green_vegetation_fraction + long_name = function of surface roughness length and green vegetation fraction + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = out + optional = F [wind] standard_name = wind_speed_at_lowest_model_layer long_name = wind speed at lowest model level @@ -97,7 +115,7 @@ intent = in optional = F [prsl1] - standard_name = air_pressure_at_lowest_model_layer + standard_name = air_pressure_at_surface_adjacent_layer long_name = Model layer 1 mean pressure units = Pa dimensions = (horizontal_loop_extent) @@ -115,7 +133,7 @@ intent = in optional = F [prsik1] - standard_name = dimensionless_exner_function_at_lowest_model_interface + standard_name = surface_dimensionless_exner_function long_name = dimensionless Exner function at the ground surface units = none dimensions = (horizontal_loop_extent) @@ -124,7 +142,7 @@ intent = in optional = F [prslk1] - standard_name = dimensionless_exner_function_at_lowest_model_layer + standard_name = dimensionless_exner_function_at_surface_adjacent_layer long_name = dimensionless Exner function at the lowest model layer units = none dimensions = (horizontal_loop_extent) @@ -150,7 +168,7 @@ intent = in optional = F [shdmax] - standard_name = maximum_vegetation_area_fraction + standard_name = max_vegetation_area_fraction long_name = max fractnl cover of green veg units = frac dimensions = (horizontal_loop_extent) @@ -159,7 +177,7 @@ intent = in optional = F [ivegsrc] - standard_name = vegetation_type_dataset_choice + standard_name = control_for_vegetation_dataset long_name = land use dataset choice units = index dimensions = () @@ -193,7 +211,7 @@ intent = in optional = F [redrag] - standard_name = flag_for_reduced_drag_coefficient_over_sea + standard_name = flag_for_limited_surface_roughness_length_over_ocean long_name = flag for reduced drag coefficient over sea units = flag dimensions = () @@ -219,8 +237,8 @@ intent = in optional = F [sfc_z0_type] - standard_name = flag_for_surface_roughness_option_over_ocean - long_name = surface roughness options over ocean + standard_name = flag_for_surface_roughness_option_over_water + long_name = surface roughness options over water units = flag dimensions = () type = integer @@ -250,9 +268,17 @@ type = logical intent = in optional = F +[thsfc_loc] + standard_name = flag_for_reference_pressure_theta + long_name = flag for reference pressure in theta calculation + units = flag + dimensions = () + type = logical + intent = in + optional = F [tskin_wat] - standard_name = surface_skin_temperature_over_ocean_interstitial - long_name = surface skin temperature over ocean (temporary use as interstitial) + standard_name = surface_skin_temperature_over_water_interstitial + long_name = surface skin temperature over water (temporary use as interstitial) units = K dimensions = (horizontal_loop_extent) type = real @@ -278,8 +304,8 @@ intent = in optional = F [tsurf_wat] - standard_name = surface_skin_temperature_after_iteration_over_ocean - long_name = surface skin temperature after iteration over ocean + standard_name = surface_skin_temperature_after_iteration_over_water + long_name = surface skin temperature after iteration over water units = K dimensions = (horizontal_loop_extent) type = real @@ -304,36 +330,9 @@ kind = kind_phys intent = in optional = F -[snwdph_wat] - standard_name = surface_snow_thickness_water_equivalent_over_ocean - long_name = water equivalent snow depth over ocean - units = mm - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[snwdph_lnd] - standard_name = surface_snow_thickness_water_equivalent_over_land - long_name = water equivalent snow depth over land - units = mm - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[snwdph_ice] - standard_name = surface_snow_thickness_water_equivalent_over_ice - long_name = water equivalent snow depth over ice - units = mm - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F [z0rl_wat] - standard_name = surface_roughness_length_over_ocean_interstitial - long_name = surface roughness length over ocean (temporary use as interstitial) + standard_name = surface_roughness_length_over_water + long_name = surface roughness length over water (temporary use as interstitial) units = cm dimensions = (horizontal_loop_extent) type = real @@ -341,7 +340,7 @@ intent = inout optional = F [z0rl_lnd] - standard_name = surface_roughness_length_over_land_interstitial + standard_name = surface_roughness_length_over_land long_name = surface roughness length over land (temporary use as interstitial) units = cm dimensions = (horizontal_loop_extent) @@ -350,7 +349,7 @@ intent = inout optional = F [z0rl_ice] - standard_name = surface_roughness_length_over_ice_interstitial + standard_name = surface_roughness_length_over_ice long_name = surface roughness length over ice (temporary use as interstitial) units = cm dimensions = (horizontal_loop_extent) @@ -368,8 +367,8 @@ intent = in optional = F [ustar_wat] - standard_name = surface_friction_velocity_over_ocean - long_name = surface friction velocity over ocean + standard_name = surface_friction_velocity_over_water + long_name = surface friction velocity over water units = m s-1 dimensions = (horizontal_loop_extent) type = real @@ -395,8 +394,8 @@ intent = inout optional = F [cm_wat] - standard_name = surface_drag_coefficient_for_momentum_in_air_over_ocean - long_name = surface exchange coeff for momentum over ocean + standard_name = surface_drag_coefficient_for_momentum_in_air_over_water + long_name = surface exchange coeff for momentum over water units = none dimensions = (horizontal_loop_extent) type = real @@ -422,8 +421,8 @@ intent = inout optional = F [ch_wat] - standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ocean - long_name = surface exchange coeff heat & moisture over ocean + standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_water + long_name = surface exchange coeff heat surface exchange coeff heat & moisture over ocean moisture over water units = none dimensions = (horizontal_loop_extent) type = real @@ -449,8 +448,8 @@ intent = inout optional = F [rb_wat] - standard_name = bulk_richardson_number_at_lowest_model_level_over_ocean - long_name = bulk Richardson number at the surface over ocean + standard_name = bulk_richardson_number_at_lowest_model_level_over_water + long_name = bulk Richardson number at the surface over water units = none dimensions = (horizontal_loop_extent) type = real @@ -476,8 +475,8 @@ intent = inout optional = F [stress_wat] - standard_name = surface_wind_stress_over_ocean - long_name = surface wind stress over ocean + standard_name = surface_wind_stress_over_water + long_name = surface wind stress over water units = m2 s-2 dimensions = (horizontal_loop_extent) type = real @@ -503,8 +502,8 @@ intent = inout optional = F [fm_wat] - standard_name = Monin_Obukhov_similarity_function_for_momentum_over_ocean - long_name = Monin-Obukhov similarity function for momentum over ocean + standard_name = Monin_Obukhov_similarity_function_for_momentum_over_water + long_name = Monin-Obukhov similarity function for momentum over water units = none dimensions = (horizontal_loop_extent) type = real @@ -530,8 +529,8 @@ intent = inout optional = F [fh_wat] - standard_name = Monin_Obukhov_similarity_function_for_heat_over_ocean - long_name = Monin-Obukhov similarity function for heat over ocean + standard_name = Monin_Obukhov_similarity_function_for_heat_over_water + long_name = Monin-Obukhov similarity function for heat over water units = none dimensions = (horizontal_loop_extent) type = real @@ -557,8 +556,8 @@ intent = inout optional = F [fm10_wat] - standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_ocean - long_name = Monin-Obukhov similarity parameter for momentum at 10m over ocean + standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_water + long_name = Monin-Obukhov similarity parameter for momentum at 10m over water units = none dimensions = (horizontal_loop_extent) type = real @@ -584,8 +583,8 @@ intent = inout optional = F [fh2_wat] - standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m_over_ocean - long_name = Monin-Obukhov similarity parameter for heat at 2m over ocean + standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m_over_water + long_name = Monin-Obukhov similarity parameter for heat at 2m over water units = none dimensions = (horizontal_loop_extent) type = real @@ -610,6 +609,33 @@ kind = kind_phys intent = inout optional = F +[ztmax_wat] + standard_name = bounded_surface_roughness_length_for_heat_over_water + long_name = bounded surface roughness length for heat over water + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[ztmax_lnd] + standard_name = bounded_surface_roughness_length_for_heat_over_land + long_name = bounded surface roughness length for heat over land + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[ztmax_ice] + standard_name = bounded_surface_roughness_length_for_heat_over_ice + long_name = bounded surface roughness length for heat over ice + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/sfc_drv.f b/physics/sfc_drv.f index 45c501db2..817897fe7 100644 --- a/physics/sfc_drv.f +++ b/physics/sfc_drv.f @@ -4,7 +4,9 @@ !> This module contains the CCPP-compliant Noah land surface scheme driver. module lsm_noah + use machine, only: kind_phys use set_soilveg_mod, only: set_soilveg + use namelist_soilveg implicit none @@ -19,12 +21,17 @@ module lsm_noah !! \section arg_table_lsm_noah_init Argument Table !! \htmlinclude lsm_noah_init.html !! - subroutine lsm_noah_init(me, isot, ivegsrc, nlunit, - & errmsg, errflg) + subroutine lsm_noah_init(lsm, lsm_noah, me, isot, ivegsrc, nlunit, + & pores, resid, errmsg, errflg) implicit none + integer, intent(in) :: lsm + integer, intent(in) :: lsm_noah integer, intent(in) :: me, isot, ivegsrc, nlunit + + real (kind=kind_phys), dimension(:), intent(out) :: pores, resid + character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -32,6 +39,14 @@ subroutine lsm_noah_init(me, isot, ivegsrc, nlunit, errmsg = '' errflg = 0 + ! Consistency checks + if (lsm/=lsm_noah) then + write(errmsg,'(*(a))') 'Logic error: namelist choice of ', + & 'LSM is different from Noah' + errflg = 1 + return + end if + if (ivegsrc > 2) then errmsg = 'The NOAH LSM expects that the ivegsrc physics '// & 'namelist parameter is 0, 1, or 2. Exiting...' @@ -48,6 +63,9 @@ subroutine lsm_noah_init(me, isot, ivegsrc, nlunit, !--- initialize soil vegetation call set_soilveg(me, isot, ivegsrc, nlunit) + pores (:) = maxsmc (:) + resid (:) = drysmc (:) + end subroutine lsm_noah_init @@ -76,10 +94,12 @@ end subroutine lsm_noah_finalize ! call sfc_drv ! ! --- inputs: ! ! ( im, km, ps, t1, q1, soiltyp, vegtype, sigmaf, ! -! sfcemis, dlwflx, dswsfc, snet, delt, tg3, cm, ch, ! +! sfcemis, dlwflx, dswsfc, delt, tg3, cm, ch, ! ! prsl1, prslki, zf, land, wind, slopetyp, ! ! shdmin, shdmax, snoalb, sfalb, flag_iter, flag_guess, ! ! lheatstrg, isot, ivegsrc, ! +! albdvis_lnd, albdnir_lnd, albivis_lnd, albinir_lnd, ! +! adjvisbmd, adjnirbmd, adjvisdfd, adjnirdfd, ! ! --- in/outs: ! ! weasd, snwdph, tskin, tprcp, srflag, smc, stc, slc, ! ! canopy, trans, tsurf, zorl, ! @@ -115,7 +135,6 @@ end subroutine lsm_noah_finalize ! sfcemis - real, sfc lw emissivity ( fraction ) im ! ! dlwflx - real, total sky sfc downward lw flux ( w/m**2 ) im ! ! dswflx - real, total sky sfc downward sw flux ( w/m**2 ) im ! -! snet - real, total sky sfc netsw flx into ground(w/m**2) im ! ! delt - real, time interval (second) 1 ! ! tg3 - real, deep soil temperature (k) im ! ! cm - real, surface exchange coeff for momentum (m/s) im ! @@ -130,6 +149,14 @@ end subroutine lsm_noah_finalize ! shdmax - real, max fractnl cover of green veg (not used) im ! ! snoalb - real, upper bound on max albedo over deep snow im ! ! sfalb - real, mean sfc diffused sw albedo (fractional) im ! +! albdvis_lnd - real, sfc vis direct sw albedo over land im ! +! albdnir_lnd - real, sfc nir direct sw albedo over land im ! +! albivis_lnd - real, sfc vis diffused sw albedo over land im ! +! albinir_lnd - real, sfc nir diffused sw albedo over land im ! +! adjvisbmd - real, t adj sfc uv+vis-beam sw dnward flux im ! +! adjnirbmd - real, t adj sfc nir-beam sw dnward flux im ! +! adjvisdfd - real, t adj sfc uv+vis-diff sw dnward flux im ! +! adjnirdfd - real, t adj sfc nir-diff sw dnward flux im ! ! flag_iter- logical, im ! ! flag_guess-logical, im ! ! lheatstrg- logical, flag for canopy heat storage 1 ! @@ -185,11 +212,13 @@ end subroutine lsm_noah_finalize subroutine lsm_noah_run & & ( im, km, grav, cp, hvap, rd, eps, epsm1, rvrdm1, ps, & ! --- inputs: & t1, q1, soiltyp, vegtype, sigmaf, & - & sfcemis, dlwflx, dswsfc, snet, delt, tg3, cm, ch, & + & sfcemis, dlwflx, dswsfc, delt, tg3, cm, ch, & & prsl1, prslki, zf, land, wind, slopetyp, & & shdmin, shdmax, snoalb, sfalb, flag_iter, flag_guess, & & lheatstrg, isot, ivegsrc, & & bexppert, xlaipert, vegfpert,pertvegf, & ! sfc perts, mgehne + & albdvis_lnd, albdnir_lnd, albivis_lnd, albinir_lnd, & + & adjvisbmd, adjnirbmd, adjvisdfd, adjnirdfd, & ! --- in/outs: & weasd, snwdph, tskin, tprcp, srflag, smc, stc, slc, & & canopy, trans, tsurf, zorl, & @@ -199,7 +228,7 @@ subroutine lsm_noah_run & & smcwlt2, smcref2, wet1, errmsg, errflg & & ) ! - use machine , only : kind_phys + !use machine , only : kind_phys use funcphys, only : fpvs use surface_perturbation, only : ppfbet @@ -226,29 +255,31 @@ subroutine lsm_noah_run & & epsm1, rvrdm1 real (kind=kind_phys), intent(in) :: pertvegf - integer, dimension(im), intent(in) :: soiltyp, vegtype, slopetyp + integer, dimension(:), intent(in) :: soiltyp, vegtype, slopetyp - real (kind=kind_phys), dimension(im), intent(in) :: ps, & - & t1, q1, sigmaf, sfcemis, dlwflx, dswsfc, snet, tg3, cm, & + real (kind=kind_phys), dimension(:), intent(in) :: ps, & + & t1, q1, sigmaf, sfcemis, dlwflx, dswsfc, tg3, cm, & & ch, prsl1, prslki, wind, shdmin, shdmax, & & snoalb, sfalb, zf, & - & bexppert, xlaipert, vegfpert + & bexppert, xlaipert, vegfpert, & + & albdvis_lnd, albdnir_lnd, albivis_lnd, albinir_lnd, & + & adjvisbmd, adjnirbmd, adjvisdfd, adjnirdfd real (kind=kind_phys), intent(in) :: delt - logical, dimension(im), intent(in) :: flag_iter, flag_guess, land + logical, dimension(:), intent(in) :: flag_iter, flag_guess, land logical, intent(in) :: lheatstrg ! --- in/out: - real (kind=kind_phys), dimension(im), intent(inout) :: weasd, & + real (kind=kind_phys), dimension(:), intent(inout) :: weasd, & & snwdph, tskin, tprcp, srflag, canopy, trans, tsurf, zorl - real (kind=kind_phys), dimension(im,km), intent(inout) :: & + real (kind=kind_phys), dimension(:,:), intent(inout) :: & & smc, stc, slc ! --- output: - real (kind=kind_phys), dimension(im), intent(inout) :: sncovr1, & + real (kind=kind_phys), dimension(:), intent(inout) :: sncovr1, & & qsurf, gflux, drain, evap, hflx, ep, runoff, cmm, chh, & & evbs, evcw, sbsno, snowc, stm, snohf, smcwlt2, smcref2, & & wet1 @@ -382,7 +413,12 @@ subroutine lsm_noah_run & lwdn = dlwflx(i) !..downward lw flux at sfc in w/m2 swdn = dswsfc(i) !..downward sw flux at sfc in w/m2 - solnet = snet(i) !..net sw rad flx (dn-up) at sfc in w/m2 +!net sw rad flx (dn-up) at sfc in w/m2 + solnet = adjvisbmd(i)*(1-albdvis_lnd(i)) & + & +adjnirbmd(i)*(1-albdnir_lnd(i)) & + & +adjvisdfd(i)*(1-albivis_lnd(i)) & + & +adjnirdfd(i)*(1-albinir_lnd(i)) + sfcems = sfcemis(i) sfcprs = prsl1(i) @@ -551,8 +587,7 @@ subroutine lsm_noah_run & snwdph(i) = snowh * 1000.0_kind_phys weasd(i) = sneqv * 1000.0_kind_phys sncovr1(i) = sncovr -! ---- ... outside sflx, roughness uses cm as unit (update after snow's -! effect) +! ---- ... outside sflx, roughness uses cm as unit (update after snow's effect) zorl(i) = z0*100.0_kind_phys !> - Do not return the following output fields to parent model: diff --git a/physics/sfc_drv.meta b/physics/sfc_drv.meta index eb3f77a98..ad4e86a06 100644 --- a/physics/sfc_drv.meta +++ b/physics/sfc_drv.meta @@ -7,6 +7,22 @@ [ccpp-arg-table] name = lsm_noah_init type = scheme +[lsm] + standard_name = control_for_land_surface_scheme + long_name = flag for land surface model + units = flag + dimensions = () + type = integer + intent = in + optional = F +[lsm_noah] + standard_name = identifier_for_noah_land_surface_scheme + long_name = flag for NOAH land surface model + units = flag + dimensions = () + type = integer + intent = in + optional = F [me] standard_name = mpi_rank long_name = current MPI-rank @@ -16,7 +32,7 @@ intent = in optional = F [isot] - standard_name = soil_type_dataset_choice + standard_name = control_for_soil_type_dataset long_name = soil type dataset choice units = index dimensions = () @@ -24,7 +40,7 @@ intent = in optional = F [ivegsrc] - standard_name = vegetation_type_dataset_choice + standard_name = control_for_vegetation_dataset long_name = land use dataset choice units = index dimensions = () @@ -32,13 +48,29 @@ intent = in optional = F [nlunit] - standard_name = iounit_namelist + standard_name = iounit_of_namelist long_name = fortran unit number for file opens units = none dimensions = () type = integer intent = in optional = F +[pores] + standard_name = maximum_soil_moisture_content_for_land_surface_model + long_name = maximum soil moisture for a given soil type for land surface model + units = m + dimensions = (30) + type = real + intent = out + kind = kind_phys +[resid] + standard_name = minimum_soil_moisture_content_for_land_surface_model + long_name = minimum soil moisture for a given soil type for land surface model + units = m + dimensions = (30) + type = real + intent = out + kind = kind_phys [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP @@ -92,7 +124,7 @@ intent = in optional = F [km] - standard_name = soil_vertical_dimension + standard_name = vertical_dimension_of_soil long_name = soil vertical layer dimension units = count dimensions = () @@ -127,7 +159,7 @@ intent = in optional = F [rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -172,7 +204,7 @@ intent = in optional = F [t1] - standard_name = air_temperature_at_lowest_model_layer + standard_name = air_temperature_at_surface_adjacent_layer long_name = 1st model layer air temperature units = K dimensions = (horizontal_loop_extent) @@ -181,7 +213,7 @@ intent = in optional = F [q1] - standard_name = water_vapor_specific_humidity_at_lowest_model_layer + standard_name = specific_humidity_at_surface_adjacent_layer long_name = 1st model layer specific humidity units = kg kg-1 dimensions = (horizontal_loop_extent) @@ -241,17 +273,8 @@ kind = kind_phys intent = in optional = F -[snet] - standard_name = surface_net_downwelling_shortwave_flux - long_name = total sky surface net shortwave flux - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F [delt] - standard_name = time_step_for_dynamics + standard_name = timestep_for_dynamics long_name = dynamics time step units = s dimensions = () @@ -287,7 +310,7 @@ intent = in optional = F [prsl1] - standard_name = air_pressure_at_lowest_model_layer + standard_name = air_pressure_at_surface_adjacent_layer long_name = Model layer 1 mean pressure units = Pa dimensions = (horizontal_loop_extent) @@ -339,7 +362,7 @@ intent = in optional = F [shdmin] - standard_name = minimum_vegetation_area_fraction + standard_name = min_vegetation_area_fraction long_name = min fractional coverage of green veg units = frac dimensions = (horizontal_loop_extent) @@ -348,7 +371,7 @@ intent = in optional = F [shdmax] - standard_name = maximum_vegetation_area_fraction + standard_name = max_vegetation_area_fraction long_name = max fractnl cover of green veg (not used) units = frac dimensions = (horizontal_loop_extent) @@ -357,7 +380,7 @@ intent = in optional = F [snoalb] - standard_name = upper_bound_on_max_albedo_over_deep_snow + standard_name = upper_bound_of_max_albedo_assuming_deep_snow long_name = upper bound on max albedo over deep snow units = frac dimensions = (horizontal_loop_extent) @@ -366,7 +389,7 @@ intent = in optional = F [sfalb] - standard_name = surface_diffused_shortwave_albedo + standard_name = surface_albedo_for_diffused_shortwave_on_radiation_timestep long_name = mean surface diffused shortwave albedo units = frac dimensions = (horizontal_loop_extent) @@ -391,7 +414,7 @@ intent = in optional = F [lheatstrg] - standard_name = flag_for_canopy_heat_storage + standard_name = flag_for_canopy_heat_storage_in_land_surface_scheme long_name = flag for canopy heat storage parameterization units = flag dimensions = () @@ -399,7 +422,7 @@ intent = in optional = F [isot] - standard_name = soil_type_dataset_choice + standard_name = control_for_soil_type_dataset long_name = soil type dataset choice units = index dimensions = () @@ -407,7 +430,7 @@ intent = in optional = F [ivegsrc] - standard_name = vegetation_type_dataset_choice + standard_name = control_for_vegetation_dataset long_name = land use dataset choice units = index dimensions = () @@ -450,6 +473,78 @@ kind = kind_phys intent = in optional = F +[albdvis_lnd] + standard_name = surface_albedo_direct_visible_over_land + long_name = direct surface albedo visible band over land + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[albdnir_lnd] + standard_name = surface_albedo_direct_NIR_over_land + long_name = direct surface albedo NIR band over land + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[albivis_lnd] + standard_name = surface_albedo_diffuse_visible_over_land + long_name = diffuse surface albedo visible band over land + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[albinir_lnd] + standard_name = surface_albedo_diffuse_NIR_over_land + long_name = diffuse surface albedo NIR band over land + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[adjvisbmd] + standard_name = surface_downwelling_direct_ultraviolet_and_visible_shortwave_flux + long_name = surface downwelling beam ultraviolet plus visible shortwave flux at current time + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[adjnirbmd] + standard_name = surface_downwelling_direct_near_infrared_shortwave_flux + long_name = surface downwelling beam near-infrared shortwave flux at current time + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[adjvisdfd] + standard_name = surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_flux + long_name = surface downwelling diffuse ultraviolet plus visible shortwave flux at current time + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[adjnirdfd] + standard_name = surface_downwelling_diffuse_near_infrared_shortwave_flux + long_name = surface downwelling diffuse near-infrared shortwave flux at current time + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F [weasd] standard_name = water_equivalent_accumulated_snow_depth_over_land long_name = water equiv of acc snow depth over land @@ -487,7 +582,7 @@ intent = inout optional = F [srflag] - standard_name = flag_for_precipitation_type + standard_name = precipitation_type long_name = flag for snow or rain precipitation units = flag dimensions = (horizontal_loop_extent) @@ -496,10 +591,10 @@ intent = inout optional = F [smc] - standard_name = volume_fraction_of_soil_moisture + standard_name = volume_fraction_of_condensed_water_in_soil long_name = volumetric fraction of soil moisture units = frac - dimensions = (horizontal_loop_extent,soil_vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension_of_soil) type = real kind = kind_phys intent = inout @@ -508,16 +603,16 @@ standard_name = soil_temperature long_name = soil temperature units = K - dimensions = (horizontal_loop_extent,soil_vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension_of_soil) type = real kind = kind_phys intent = inout optional = F [slc] - standard_name = volume_fraction_of_unfrozen_soil_moisture + standard_name = volume_fraction_of_unfrozen_water_in_soil long_name = volume fraction of unfrozen soil moisture units = frac - dimensions = (horizontal_loop_extent,soil_vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension_of_soil) type = real kind = kind_phys intent = inout @@ -550,7 +645,7 @@ intent = inout optional = F [zorl] - standard_name = surface_roughness_length_over_land_interstitial + standard_name = surface_roughness_length_over_land long_name = surface roughness length over land (temporary use as interstitial) units = cm dimensions = (horizontal_loop_extent) diff --git a/physics/sfc_drv_ruc.F90 b/physics/sfc_drv_ruc.F90 index f6be851b1..f313f2fba 100644 --- a/physics/sfc_drv_ruc.F90 +++ b/physics/sfc_drv_ruc.F90 @@ -16,7 +16,12 @@ module lsm_ruc public :: lsm_ruc_init, lsm_ruc_run, lsm_ruc_finalize - real(kind=kind_phys), parameter :: zero = 0.0d0, one = 1.0d0, epsln = 1.0d-10 + real(kind=kind_phys), parameter :: zero = 0.0_kind_phys, one = 1.0_kind_phys, epsln = 1.0e-10_kind_phys + real(kind=kind_phys), dimension (2), parameter, private :: d = (/0.1,0.25/) + integer, dimension(20), parameter, private:: & + istwe = (/1,1,1,1,1,2,2,1,1,2,2,2,2,2,1,2,2,1,2,2/) ! IGBP 20 classes + + contains @@ -25,14 +30,21 @@ module lsm_ruc !! \section arg_table_lsm_ruc_init Argument Table !! \htmlinclude lsm_ruc_init.html !! - subroutine lsm_ruc_init (me, master, isot, ivegsrc, nlunit, & - flag_restart, flag_init, & - im, lsoil_ruc, lsoil, kice, nlev, & ! in - lsm_ruc, lsm, slmsk, stype, vtype, & ! in - tsfc_lnd, tsfc_wat, & ! in - tg3, smc, slc, stc, & ! in - zs, sh2o, smfrkeep, tslb, smois, wetness, & ! out - tsice, errmsg, errflg) + subroutine lsm_ruc_init (me, master, isot, ivegsrc, nlunit, & + flag_restart, flag_init, con_fvirt, con_rd, & + im, lsoil_ruc, lsoil, kice, nlev, & ! in + lsm_ruc, lsm, slmsk, stype, vtype, & ! in + q1, prsl1, tsfc_lnd, tsfc_ice, tsfc_wat, & ! in + tg3, smc, slc, stc, fice, min_seaice, & ! in + sncovr_lnd, sncovr_ice, snoalb, & ! in + facsf, facwf, alvsf, alvwf, alnsf, alnwf, & ! in + sfcqv_lnd, sfcqv_ice, & ! out + sfalb_lnd_bck, & ! out + semisbase, semis_lnd, semis_ice, & ! out + albdvis_lnd,albdnir_lnd,albivis_lnd,albinir_lnd, & ! out + albdvis_ice,albdnir_ice,albivis_ice,albinir_ice, & ! out + zs, sh2o, smfrkeep, tslb, smois, wetness, & ! out + tsice, pores, resid, errmsg, errflg) implicit none ! --- in @@ -45,31 +57,59 @@ subroutine lsm_ruc_init (me, master, isot, ivegsrc, nlunit, & integer, intent(in) :: kice integer, intent(in) :: nlev integer, intent(in) :: lsm_ruc, lsm - - - real (kind=kind_phys), dimension(im), intent(in) :: slmsk - real (kind=kind_phys), dimension(im), intent(in) :: stype - real (kind=kind_phys), dimension(im), intent(in) :: vtype - real (kind=kind_phys), dimension(im), intent(in) :: tsfc_lnd - real (kind=kind_phys), dimension(im), intent(in) :: tsfc_wat - real (kind=kind_phys), dimension(im), intent(in) :: tg3 - - real (kind=kind_phys), dimension(im,lsoil), intent(in) :: smc,slc,stc - + real (kind=kind_phys),intent(in) :: con_fvirt + real (kind=kind_phys),intent(in) :: con_rd + + + real (kind=kind_phys), dimension(:), intent(in) :: slmsk + real (kind=kind_phys), dimension(:), intent(in) :: stype + real (kind=kind_phys), dimension(:), intent(in) :: vtype + real (kind=kind_phys), dimension(:), intent(in) :: q1 + real (kind=kind_phys), dimension(:), intent(in) :: prsl1 + real (kind=kind_phys), dimension(:), intent(in) :: tsfc_lnd + real (kind=kind_phys), dimension(:), intent(in) :: tsfc_ice + real (kind=kind_phys), dimension(:), intent(in) :: tsfc_wat + real (kind=kind_phys), dimension(:), intent(in) :: tg3 + real (kind=kind_phys), dimension(:), intent(in) :: sncovr_lnd + real (kind=kind_phys), dimension(:), intent(in) :: sncovr_ice + real (kind=kind_phys), dimension(:), intent(in) :: snoalb + real (kind=kind_phys), dimension(:), intent(in) :: fice + real (kind=kind_phys), dimension(:), intent(in) :: facsf + real (kind=kind_phys), dimension(:), intent(in) :: facwf + real (kind=kind_phys), dimension(:), intent(in) :: alvsf + real (kind=kind_phys), dimension(:), intent(in) :: alvwf + real (kind=kind_phys), dimension(:), intent(in) :: alnsf + real (kind=kind_phys), dimension(:), intent(in) :: alnwf + + real (kind=kind_phys), dimension(:,:), intent(in) :: smc,slc,stc + real (kind=kind_phys), intent(in) :: min_seaice ! --- in/out: - real (kind=kind_phys), dimension(im), intent(inout) :: wetness + real (kind=kind_phys), dimension(:), intent(inout) :: wetness + +! --- inout + real (kind=kind_phys), dimension(:,:), intent(inout) :: sh2o, smfrkeep + real (kind=kind_phys), dimension(:,:), intent(inout) :: tslb, smois + real (kind=kind_phys), dimension(:), intent(inout) :: semis_lnd + real (kind=kind_phys), dimension(:), intent(inout) :: semis_ice + real (kind=kind_phys), dimension(:), intent(inout) :: & + albdvis_lnd, albdnir_lnd, albivis_lnd, albinir_lnd, & + albdvis_ice, albdnir_ice, albivis_ice, albinir_ice, & + sfcqv_lnd, sfcqv_ice ! --- out - real (kind=kind_phys), dimension(:), intent(out) :: zs - real (kind=kind_phys), dimension(im,lsoil_ruc), intent(inout) :: sh2o, smfrkeep - real (kind=kind_phys), dimension(im,lsoil_ruc), intent(inout) :: tslb, smois - real (kind=kind_phys), dimension(im,kice), intent(out) :: tsice + real (kind=kind_phys), dimension(:), intent(out) :: zs + real (kind=kind_phys), dimension(:), intent(inout) :: sfalb_lnd_bck + real (kind=kind_phys), dimension(:,:), intent(out) :: tsice + real (kind=kind_phys), dimension(:), intent(out) :: semisbase + real (kind=kind_phys), dimension(:), intent(out) :: pores, resid character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! --- local real (kind=kind_phys), dimension(lsoil_ruc) :: dzs + real (kind=kind_phys) :: alb_lnd, alb_ice + real (kind=kind_phys) :: q0, qs1 integer :: ipr, i, k logical :: debug_print integer, dimension(im) :: soiltyp, vegtype @@ -77,6 +117,14 @@ subroutine lsm_ruc_init (me, master, isot, ivegsrc, nlunit, & ! Initialize CCPP error handling variables errmsg = '' errflg = 0 + + ! Consistency checks + if (lsm/=lsm_ruc) then + write(errmsg,'(*(a))') 'Logic error: namelist choice of ', & + & 'LSM is different from RUC' + errflg = 1 + return + end if ipr = 10 debug_print = .false. @@ -113,6 +161,9 @@ subroutine lsm_ruc_init (me, master, isot, ivegsrc, nlunit, & !--- initialize soil vegetation call set_soilveg_ruc(me, isot, ivegsrc, nlunit) + pores (:) = maxsmc (:) + resid (:) = drysmc (:) + soiltyp(:) = 0 vegtype(:) = 0 @@ -136,11 +187,42 @@ subroutine lsm_ruc_init (me, master, isot, ivegsrc, nlunit, & if (soiltyp(i) < 1) soiltyp(i) = 14 if (vegtype(i) < 1) vegtype(i) = 17 endif - enddo + !-- initialize background emissivity + semisbase(i) = lemitbl(vegtype(i)) ! no snow effect + + if (.not.flag_restart) then + !-- land + semis_lnd(i) = semisbase(i) * (1.-sncovr_lnd(i)) & + + 0.99 * sncovr_lnd(i) + sfalb_lnd_bck(i) = 0.25*(alnsf(i) + alnwf(i) + alvsf(i) + alvwf(i)) & + * min(1., facsf(i)+facwf(i)) + alb_lnd = sfalb_lnd_bck(i) * (1. - sncovr_lnd(i)) & + + snoalb(i) * sncovr_lnd(i) + albdvis_lnd(i) = alb_lnd + albdnir_lnd(i) = alb_lnd + albivis_lnd(i) = alb_lnd + albinir_lnd(i) = alb_lnd + !-- ice + semis_ice(i) = 0.97 * (1. - sncovr_ice(i)) + 0.99 * sncovr_ice(i) + alb_ice = 0.55 * (1. - sncovr_ice(i)) + 0.75 * sncovr_ice(i) + albdvis_ice(i) = alb_ice + albdnir_ice(i) = alb_ice + albivis_ice(i) = alb_ice + albinir_ice(i) = alb_ice + + !-- initialize QV mixing ratio at the surface from atm. 1st level + q0 = max(q1(i)/(1.-q1(i)), 1.e-8) ! q1=specific humidity at level 1 (kg/kg) + qs1 = rslf(prsl1(i),tsfc_lnd(i)) !* qs1=sat. mixing ratio at level 1 (kg/kg) + q0 = min(qs1, q0) + sfcqv_lnd(i) = q0 + qs1 = rslf(prsl1(i),tsfc_ice(i)) + sfcqv_ice(i) = qs1 + endif ! .not. restart - call init_soil_depth_3 ( zs , dzs , lsoil_ruc ) + enddo ! i + + call init_soil_depth_3 ( zs , dzs , lsoil_ruc ) - !if( .not. flag_restart) then call rucinit (flag_restart, im, lsoil_ruc, lsoil, nlev, & ! in me, master, lsm_ruc, lsm, slmsk, & ! in soiltyp, vegtype, & ! in @@ -157,7 +239,6 @@ subroutine lsm_ruc_init (me, master, isot, ivegsrc, nlunit, & enddo enddo ! i - !endif ! flag_restart !-- end of initialization if ( debug_print) then @@ -202,10 +283,8 @@ end subroutine lsm_ruc_finalize ! soiltyp - integer, soil type (integer index) im ! ! vegtype - integer, vegetation type (integer index) im ! ! sigmaf - real, areal fractional cover of green vegetation im ! -! sfcemis - real, sfc lw emissivity ( fraction ) im ! ! dlwflx - real, total sky sfc downward lw flux ( w/m**2 ) im ! ! dswflx - real, total sky sfc downward sw flux ( w/m**2 ) im ! -! snet - real, total sky sfc netsw flx into ground(w/m**2) im ! ! delt - real, time interval (second) 1 ! ! tg3 - real, deep soil temperature (k) im ! ! cm - real, surface exchange coeff for momentum (m/s) im ! @@ -218,8 +297,6 @@ end subroutine lsm_ruc_finalize ! shdmin - real, min fractional coverage of green veg im ! ! shdmax - real, max fractnl cover of green veg (not used) im ! ! snoalb - real, upper bound on max albedo over deep snow im ! -! sfalb - real, mean sfc diffused sw albedo with effect ! -! of snow (fractional) im ! ! flag_iter- logical, im ! ! flag_guess-logical, im ! ! isot - integer, sfc soil type data source zobler or statsgo ! @@ -236,7 +313,6 @@ end subroutine lsm_ruc_finalize ! tslb - real, soil temp (k) im,km ! ! sh2o - real, liquid soil moisture im,km ! ! canopy - real, canopy moisture content (mm) im ! -! trans - real, total plant transpiration (m/s) im ! ! tsurf - real, surface skin temperature (after iteration) im ! ! ! ! outputs: ! @@ -250,6 +326,7 @@ end subroutine lsm_ruc_finalize ! evcw - real, canopy water evaporation (m/s) im ! ! sbsno - real, sublimation/deposit from snopack (m/s) im ! ! stm - real, total soil column moisture content (m) im ! +! trans - real, total plant transpiration (m/s) im ! ! zorl - real, surface roughness im ! ! wetness - real, normalized soil wetness im ! ! ! @@ -263,25 +340,46 @@ end subroutine lsm_ruc_finalize !! !>\section gen_lsmruc GSD RUC LSM General Algorithm subroutine lsm_ruc_run & ! inputs - & ( iter, me, master, kdt, im, nlev, lsoil_ruc, lsoil, zs, & - & t1, q1, qc, soiltyp, vegtype, sigmaf, laixy, & - & sfcemis, dlwflx, dswsfc, snet, delt, tg3, cm, ch, & - & prsl1, zf, wind, shdmin, shdmax, alvwf, alnwf, & - & snoalb, sfalb, flag_iter, flag_guess, isot, ivegsrc, fice, & - & smc, stc, slc, lsm_ruc, lsm, land, islimsk, rdlai, & + & ( iter, me, master, delt, kdt, im, nlev, lsm_ruc, lsm, & & imp_physics, imp_physics_gfdl, imp_physics_thompson, & - & smcwlt2, smcref2, do_mynnsfclay, & - & con_cp, con_rv, con_rd, con_g, con_pi, con_hvap, con_fvirt,& ! constants - & weasd, snwdph, tskin, tskin_wat, & ! in/outs - & rainnc, rainc, ice, snow, graupel, & ! in - & srflag, smois, tslb, sh2o, keepfr, smfrkeep, & ! in/outs, on RUC levels - & canopy, trans, tsurf, tsnow, zorl, & - & sfcqc, sfcdew, tice, sfcqv, & - & sncovr1, qsurf, gflux, drain, evap, hflx, & ! outputs - & rhosnf, runof, runoff, srunoff, & - & chh, cmm, evbs, evcw, sbsno, stm, wetness, & - & acsnow, snowfallac, & - & flag_init, flag_restart, errmsg, errflg & + & do_mynnsfclay, lsoil_ruc, lsoil, rdlai, zs, & + & t1, q1, qc, soiltyp, vegtype, sigmaf, laixy, & + & dlwflx, dswsfc, tg3, coszen, land, icy, lake, & + & rainnc, rainc, ice, snow, graupel, & + & prsl1, zf, wind, shdmin, shdmax, & + & srflag, sfalb_lnd_bck, snoalb, & + & isot, ivegsrc, fice, smcwlt2, smcref2, & + & min_lakeice, min_seaice, oceanfrac, & + ! --- constants + & con_cp, con_rd, con_rv, con_g, con_pi, con_hvap, & + & con_fvirt, & + ! for water + & ch_wat, tskin_wat, & + ! --- in/outs for ice and land + & semisbase, semis_lnd, semis_ice, sfalb_lnd, sfalb_ice, & + & sncovr1_lnd, weasd_lnd, snwdph_lnd, tskin_lnd, & + & sncovr1_ice, weasd_ice, snwdph_ice, tskin_ice, & + ! for land + & smois, tsice, tslb, sh2o, keepfr, smfrkeep, & ! on RUC levels + & canopy, trans, tsurf_lnd, tsnow_lnd, z0rl_lnd, & + & sfcqc_lnd, sfcqv_lnd, & + & qsurf_lnd, gflux_lnd, evap_lnd, hflx_lnd, & + & runof, runoff, srunoff, drain, & + & cm_lnd, ch_lnd, evbs, evcw, stm, wetness, & + & snowfallac_lnd, & + & albdvis_lnd, albdnir_lnd, albivis_lnd, albinir_lnd, & + ! for ice + & sfcqc_ice, sfcqv_ice, & + & tice, tsurf_ice, tsnow_ice, z0rl_ice, & + & qsurf_ice, gflux_ice, evap_ice, ep1d_ice, hflx_ice, & + & cm_ice, ch_ice, snowfallac_ice, & + & albdvis_ice, albdnir_ice, albivis_ice, albinir_ice, & + ! --- out + & rhosnf, sbsno, & + & cmm_lnd, chh_lnd, cmm_ice, chh_ice, & + ! + & flag_iter, flag_guess, flag_init, flag_restart, & + & flag_cice, frac_grid, errmsg, errflg & & ) implicit none @@ -289,6 +387,7 @@ subroutine lsm_ruc_run & ! inputs ! --- constant parameters: real(kind=kind_phys), parameter :: rhoh2o = 1000.0 real(kind=kind_phys), parameter :: stbolt = 5.670400e-8 + real(kind=kind_phys), parameter :: con_tice = 271.2 ! --- input: integer, intent(in) :: me, master @@ -296,84 +395,131 @@ subroutine lsm_ruc_run & ! inputs integer, intent(in) :: lsm_ruc, lsm integer, intent(in) :: imp_physics, imp_physics_gfdl, imp_physics_thompson - real (kind=kind_phys), dimension(im,lsoil), intent(inout) :: smc,stc,slc - - real (kind=kind_phys), dimension(im), intent(in) :: & - & t1, sigmaf, sfcemis, dlwflx, dswsfc, snet, tg3, cm, & - & ch, prsl1, wind, shdmin, shdmax, & - & snoalb, alvwf, alnwf, zf, qc, q1 - - real (kind=kind_phys), dimension(:), intent(in) :: laixy - - real (kind=kind_phys), intent(in) :: delt - real (kind=kind_phys), intent(in) :: con_cp, con_rv, con_g, & - con_pi, con_rd, & + real (kind=kind_phys), dimension(:), intent(in) :: & + & t1, sigmaf, laixy, dlwflx, dswsfc, tg3, & + & coszen, prsl1, wind, shdmin, shdmax, & + & sfalb_lnd_bck, snoalb, zf, qc, q1, & + ! for land + & cm_lnd, ch_lnd, & + ! for water + & ch_wat, tskin_wat, oceanfrac, & + ! for ice + & cm_ice, ch_ice + + real (kind=kind_phys), intent(in) :: delt, min_seaice, min_lakeice + real (kind=kind_phys), intent(in) :: con_cp, con_rv, con_g, & + con_pi, con_rd, & con_hvap, con_fvirt - logical, dimension(im), intent(in) :: flag_iter, flag_guess, land - integer, dimension(im), intent(in) :: islimsk ! sea/land/ice mask (=0/1/2) + logical, dimension(:), intent(in) :: flag_iter, flag_guess + logical, dimension(:), intent(in) :: land, icy, lake + logical, dimension(:), intent(in) :: flag_cice + logical, intent(in) :: frac_grid logical, intent(in) :: do_mynnsfclay logical, intent(in) :: rdlai ! --- in/out: - integer, dimension(im), intent(inout) :: soiltyp, vegtype - real (kind=kind_phys), dimension(lsoil_ruc), intent(in) :: zs - real (kind=kind_phys), dimension(im), intent(inout) :: weasd, & - & snwdph, tskin, tskin_wat, & - & srflag, canopy, trans, tsurf, zorl, tsnow, & - & sfcqc, sfcqv, sfcdew, fice, tice, sfalb, smcwlt2, smcref2 + integer, dimension(:), intent(inout) :: soiltyp, vegtype + real (kind=kind_phys), dimension(:), intent(in) :: zs + real (kind=kind_phys), dimension(:), intent(in) :: srflag + real (kind=kind_phys), dimension(:), intent(inout) :: & + & canopy, trans, smcwlt2, smcref2, & + ! for land + & weasd_lnd, snwdph_lnd, tskin_lnd, & + & tsurf_lnd, z0rl_lnd, tsnow_lnd, & + & sfcqc_lnd, sfcqv_lnd, & + ! for ice + & weasd_ice, snwdph_ice, tskin_ice, & + & tsurf_ice, z0rl_ice, tsnow_ice, & + & sfcqc_ice, sfcqv_ice, fice, tice + ! --- in - real (kind=kind_phys), dimension(im), intent(in) :: & + real (kind=kind_phys), dimension(:), intent(in) :: & & rainnc, rainc, ice, snow, graupel ! --- in/out: ! --- on RUC levels - real (kind=kind_phys), dimension(im,lsoil_ruc), intent(inout) :: & - & smois, tslb, sh2o, keepfr, smfrkeep + real (kind=kind_phys), dimension(:,:), intent(inout) :: & + & smois, tsice, tslb, sh2o, keepfr, smfrkeep ! --- output: - real (kind=kind_phys), dimension(im), intent(inout) :: sncovr1, & - & qsurf , gflux , evap , runof , drain , & - & runoff, srunoff, hflx, cmm, chh, & - & rhosnf, evbs, evcw, sbsno, stm, wetness, & - & acsnow, snowfallac + real (kind=kind_phys), dimension(:), intent(inout) :: & + & rhosnf, runof, drain, runoff, srunoff, evbs, evcw, & + & stm, wetness, semisbase, semis_lnd, semis_ice, & + & sfalb_lnd, sfalb_ice, & + ! for land + & sncovr1_lnd, qsurf_lnd, gflux_lnd, evap_lnd, & + & cmm_lnd, chh_lnd, hflx_lnd, sbsno, & + & snowfallac_lnd, & + ! for ice + & sncovr1_ice, qsurf_ice, gflux_ice, evap_ice, ep1d_ice, & + & cmm_ice, chh_ice, hflx_ice, snowfallac_ice + + real (kind=kind_phys), dimension(:), intent( out) :: & + & albdvis_lnd, albdnir_lnd, albivis_lnd, albinir_lnd, & + & albdvis_ice, albdnir_ice, albivis_ice, albinir_ice logical, intent(in) :: flag_init, flag_restart character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! --- locals: - real (kind=kind_phys), dimension(im) :: rch, rho, & - & q0, qs1, weasd_old, snwdph_old, & - & tprcp_old, srflag_old, tskin_old, canopy_old, & - & tsnow_old, snowfallac_old, acsnow_old, sfalb_old, & - & sfcqv_old, sfcqc_old, wetness_old, zorl_old, sncovr1_old + real (kind=kind_phys), dimension(im) :: rho, & + & q0, qs1, albbcksol, & + & tprcp_old, srflag_old, sr_old, canopy_old, wetness_old, & + ! for land + & weasd_lnd_old, snwdph_lnd_old, tskin_lnd_old, & + & tsnow_lnd_old, snowfallac_lnd_old, & + & sfcqv_lnd_old, sfcqc_lnd_old, z0rl_lnd_old, & + & sncovr1_lnd_old, & + ! for ice + & weasd_ice_old, snwdph_ice_old, tskin_ice_old, & + & tsnow_ice_old, snowfallac_ice_old, & + & sfcqv_ice_old, sfcqc_ice_old, z0rl_ice_old, & + & sncovr1_ice_old + real (kind=kind_phys), dimension(lsoil_ruc) :: et real (kind=kind_phys), dimension(im,lsoil_ruc,1) :: smsoil, & - slsoil, stsoil, smfrsoil, keepfrsoil + slsoil, stsoil, smfrsoil, keepfrsoil, stsice + real (kind=kind_phys), dimension(im,lsoil_ruc,1) :: smice, & + slice, stice, smfrice, keepfrice real (kind=kind_phys), dimension(im,lsoil_ruc) :: smois_old, & - & tslb_old, sh2o_old, keepfr_old, smfrkeep_old + & tsice_old, tslb_old, sh2o_old, & + & keepfr_old, smfrkeep_old real (kind=kind_phys),dimension (im,1,1) :: & & conflx2, sfcprs, sfctmp, q2, qcatm, rho2 real (kind=kind_phys),dimension (im,1) :: & - & albbck, alb, chs, flhc, flqc, wet, smmax, cmc, & - & dew, drip, ec, edir, ett, lh, esnow, etp, qfx, & - & acceta, ffrozp, lwdn, prcp, xland, xice, & + & albbck_lnd, alb_lnd, chs_lnd, flhc_lnd, flqc_lnd, & + & wet, wet_ice, smmax, cmc, drip, ec, edir, ett, & + & dew_lnd, lh_lnd, esnow_lnd, etp, qfx_lnd, acceta, & + & ffrozp, lwdn, prcp, xland, xland_wat, xice, xice_lnd, & & graupelncv, snowncv, rainncv, raincv, & - & solnet, sfcexc, & - & runoff1, runoff2, acrunoff, & - & sfcems, hfx, shdfac, shdmin1d, shdmax1d, & - & sneqv, snoalb1d, snowh, snoh, tsnav, & - & snomlt, sncovr, soilw, soilm, ssoil, soilt, tbot, & - & xlai, swdn, z0, znt, rhosnfr, infiltr, & - & precipfr, snfallac, acsn, & - & qsfc, qsg, qvg, qcg, soilt1, chklowq + & solnet_lnd, sfcexc, & + & runoff1, runoff2, acrunoff, semis_bck, & + & sfcems_lnd, hfx_lnd, shdfac, shdmin1d, shdmax1d, & + & sneqv_lnd, snoalb1d_lnd, snowh_lnd, snoh_lnd, tsnav_lnd, & + & snomlt_lnd, sncovr_lnd, soilw, soilm, ssoil_lnd, & + & soilt_lnd, tbot, & + & xlai, swdn, z0_lnd, znt_lnd, rhosnfr, infiltr, & + & precipfr, snfallac_lnd, acsn, & + & qsfc_lnd, qsg_lnd, qvg_lnd, qcg_lnd, soilt1_lnd, chklowq + ! ice + real (kind=kind_phys),dimension (im,1) :: & + & albbck_ice, alb_ice, chs_ice, flhc_ice, flqc_ice, & + & dew_ice, lh_ice, esnow_ice, qfx_ice, & + & solnet_ice, sfcems_ice, hfx_ice, & + & sneqv_ice, snoalb1d_ice, snowh_ice, snoh_ice, tsnav_ice, & + & snomlt_ice, sncovr_ice, ssoil_ice, soilt_ice, & + & z0_ice, znt_ice, snfallac_ice, & + & qsfc_ice, qsg_ice, qvg_ice, qcg_ice, soilt1_ice + real (kind=kind_phys) :: xice_threshold + real (kind=kind_phys) :: fwat, qsw, evapw, hfxw character(len=256) :: llanduse !< Land-use dataset. Valid values are : !! "USGS" (USGS 24/27 category dataset) and @@ -384,14 +530,16 @@ subroutine lsm_ruc_run & ! inputs real (kind=kind_phys), dimension(:,:,:), allocatable :: soilctop !< fractional soil type integer :: nsoil, iswater, isice - integer, dimension (1:im,1:1) :: stype, vtype + integer, dimension (1:im,1:1) :: stype_wat, vtype_wat + integer, dimension (1:im,1:1) :: stype_lnd, vtype_lnd + integer, dimension (1:im,1:1) :: stype_ice, vtype_ice integer :: ipr -! local + ! local integer :: ims,ime, its,ite, jms,jme, jts,jte, kms,kme, kts,kte - integer :: l, k, i, j, fractional_seaice - - logical :: flag(im) + integer :: l, k, i, j, fractional_seaice, ilst + real (kind=kind_phys) :: dm, cimin + logical :: flag(im), flag_ice(im), flag_ice_uncoupled(im) logical :: rdlai2d, myj, frpcpn logical :: debug_print ! @@ -405,6 +553,28 @@ subroutine lsm_ruc_run & ! inputs chklowq = 1. + do i = 1, im ! i - horizontal loop + flag_ice(i) = .false. + if (icy(i) .and. .not. flag_cice(i)) then + ! - uncoupled ice model + if (oceanfrac(i) > zero) then + cimin = min_seaice + else + cimin = min_lakeice + endif + if (fice(i) >= cimin) then + ! - ice fraction is above the threshold for ice + flag_ice(i) = .true. + endif + endif + ! - Set flag for ice points for uncoupled model (islmsk(i) == 4 when coupled to CICE) + ! - Exclude ice on the lakes if the lake model is turned on. + flag_ice_uncoupled(i) = (flag_ice(i) .and. .not. lake(i)) + !> - Set flag for land and ice points. + !- 10may19 - ice points are turned off. + flag(i) = land(i) .or. flag_ice_uncoupled(i) + enddo + if (isot == 1) then nscat = 19 ! stasgo else @@ -421,15 +591,13 @@ subroutine lsm_ruc_run & ! inputs if(debug_print) then write (0,*)'RUC LSM run' - write (0,*)'noah soil temp',ipr,stc(ipr,:) - write (0,*)'noah soil mois',ipr,smc(ipr,:) write (0,*)'soiltyp=',ipr,soiltyp(ipr) write (0,*)'vegtype=',ipr,vegtype(ipr) write (0,*)'kdt, iter =',kdt,iter write (0,*)'flag_init =',flag_init write (0,*)'flag_restart =',flag_restart endif - + ims = 1 its = 1 ime = 1 @@ -452,13 +620,13 @@ subroutine lsm_ruc_run & ! inputs landusef (:,:,:) = 0.0 soilctop (:,:,:) = 0.0 - ! -- number of soil categories + !> -- number of soil categories !if(isot == 1) then !nscat = 19 ! stasgo !else !nscat = 9 ! zobler !endif - !> - Set parameters for IGBP land-use data. + !> -- set parameters for IGBP land-use data if(ivegsrc == 1) then llanduse = 'MODI-RUC' ! IGBP iswater = 17 @@ -473,7 +641,8 @@ subroutine lsm_ruc_run & ! inputs if ( fractional_seaice == 0 ) then xice_threshold = 0.5 else if ( fractional_seaice == 1 ) then - xice_threshold = 0.02 + xice_threshold = 0.02 ! HRRR value + !xice_threshold = 0.15 ! consistent with GFS physics endif nsoil = lsoil_ruc @@ -491,63 +660,60 @@ subroutine lsm_ruc_run & ! inputs endif enddo - do i = 1, im ! i - horizontal loop - !> - Set flag for land and ice points. - !- 10may19 - ice points are turned off. - flag(i) = land(i) - if (land(i) .and. (vegtype(i)==iswater .or. (vegtype(i)==isice.and.islimsk(i)==2))) then - !write(errmsg,'(a,i0,a,i0)') 'Logic error in sfc_drv_ruc_run: for i=', i, & - ! ', land(i) is true but vegtype(i) is water or ice: ', vegtype(i) - !errflg = 1 - !return - if(flag_init .and. iter==1) then - write(0,'(a,i0,a,i0)') 'Warning: in sfc_drv_ruc_run: for i=', i, & - ', land(i) is true but vegtype(i) is water or ice: ', vegtype(i) - end if - end if - enddo - do i = 1, im ! i - horizontal loop if (flag(i) .and. flag_guess(i)) then !> - Save land-related prognostic fields for guess run. !if(me==0 .and. i==ipr) write (0,*)'before call to RUC guess run', i - weasd_old(i) = weasd(i) - snwdph_old(i) = snwdph(i) - tskin_old(i) = tskin(i) - canopy_old(i) = canopy(i) - !tprcp_old(i) = tprcp(i) - srflag_old(i) = srflag(i) - tsnow_old(i) = tsnow(i) - snowfallac_old(i) = snowfallac(i) - acsnow_old(i) = acsnow(i) - sfalb_old(i) = sfalb(i) - sfcqv_old(i) = sfcqv(i) - sfcqc_old(i) = sfcqc(i) - wetness_old(i) = wetness(i) - zorl_old(i) = zorl(i) - sncovr1_old(i) = sncovr1(i) + wetness_old(i) = wetness(i) + canopy_old(i) = canopy(i) + !srflag_old(i) = srflag(i) + !acsnow_old(i) = acsnow(i) + ! for land + weasd_lnd_old(i) = weasd_lnd(i) + snwdph_lnd_old(i) = snwdph_lnd(i) + tskin_lnd_old(i) = tskin_lnd(i) + tsnow_lnd_old(i) = tsnow_lnd(i) + snowfallac_lnd_old(i) = snowfallac_lnd(i) + sfcqv_lnd_old(i) = sfcqv_lnd(i) + sfcqc_lnd_old(i) = sfcqc_lnd(i) + z0rl_lnd_old(i) = z0rl_lnd(i) + sncovr1_lnd_old(i) = sncovr1_lnd(i) + ! for ice + weasd_ice_old(i) = weasd_ice(i) + snwdph_ice_old(i) = snwdph_ice(i) + tskin_ice_old(i) = tskin_ice(i) + tsnow_ice_old(i) = tsnow_ice(i) + snowfallac_ice_old(i) = snowfallac_ice(i) + sfcqv_ice_old(i) = sfcqv_ice(i) + sfcqc_ice_old(i) = sfcqc_ice(i) + z0rl_ice_old(i) = z0rl_ice(i) + sncovr1_ice_old(i) = sncovr1_ice(i) + do k = 1, lsoil_ruc smois_old(i,k) = smois(i,k) tslb_old(i,k) = tslb(i,k) sh2o_old(i,k) = sh2o(i,k) keepfr_old(i,k) = keepfr(i,k) smfrkeep_old(i,k) = smfrkeep(i,k) + ! for ice + tsice_old(i,k) = tsice(i,k) enddo endif - enddo + enddo ! im ! --- ... initialization block do j = 1, 1 do i = 1, im ! i - horizontal loop if (flag_iter(i) .and. flag(i)) then - !if(me==0 .and. i==ipr) write (0,*)'iter run', iter, i, flag_iter(i),flag_guess(i) - evap (i) = 0.0 - hflx (i) = 0.0 - gflux(i) = 0.0 + evap_lnd(i) = 0.0 + evap_ice(i) = 0.0 + hflx_lnd (i) = 0.0 + hflx_ice (i) = 0.0 + gflux_lnd(i) = 0.0 + gflux_ice(i) = 0.0 drain(i) = 0.0 canopy(i) = max(canopy(i), 0.0) - sfcdew(i) = 0.0 evbs (i) = 0.0 evcw (i) = 0.0 @@ -555,24 +721,31 @@ subroutine lsm_ruc_run & ! inputs sbsno(i) = 0.0 !local i,j arrays - dew(i,j) = 0.0 - soilm(i,j) = 0.0 - smmax(i,j) = 0.0 - hfx(i,j) = 0.0 - qfx(i,j) = 0.0 - lh(i,j) = 0.0 - acsn(i,j) = 0.0 - sfcexc(i,j) = 0.0 - acceta(i,j) = 0.0 - ssoil(i,j) = 0.0 - snomlt(i,j) = 0.0 - infiltr(i,j) = 0.0 - runoff1(i,j) = 0.0 - runoff2(i,j) = 0.0 - acrunoff(i,j) = 0.0 - snfallac(i,j) = 0.0 - rhosnfr(i,j) = 0.0 - precipfr(i,j) = 0.0 + dew_lnd(i,j) = 0.0 + dew_ice(i,j) = 0.0 + soilm(i,j) = 0.0 + smmax(i,j) = 0.0 + hfx_lnd(i,j) = 0.0 + hfx_ice(i,j) = 0.0 + qfx_lnd(i,j) = 0.0 + qfx_ice(i,j) = 0.0 + lh_lnd(i,j) = 0.0 + lh_ice(i,j) = 0.0 + acsn(i,j) = 0.0 + sfcexc(i,j) = 0.0 + acceta(i,j) = 0.0 + ssoil_lnd(i,j) = 0.0 + ssoil_ice(i,j) = 0.0 + snomlt_lnd(i,j) = 0.0 + snomlt_ice(i,j) = 0.0 + infiltr(i,j) = 0.0 + runoff1(i,j) = 0.0 + runoff2(i,j) = 0.0 + acrunoff(i,j) = 0.0 + snfallac_lnd(i,j) = 0.0 + snfallac_ice(i,j) = 0.0 + rhosnfr(i,j) = 0.0 + precipfr(i,j) = 0.0 endif enddo ! i=1,im @@ -583,10 +756,11 @@ subroutine lsm_ruc_run & ! inputs do i = 1, im if (flag_iter(i) .and. flag(i)) then q0(i) = max(q1(i)/(1.-q1(i)), 1.e-8) !* q1=specific humidity at level 1 (kg/kg) + rho(i) = prsl1(i) / (con_rd*t1(i)*(1.0+con_fvirt*q0(i))) qs1(i) = rslf(prsl1(i),t1(i)) !* qs1=sat. mixing ratio at level 1 (kg/kg) q0 (i) = min(qs1(i), q0(i)) - endif + endif ! flag_iter & flag enddo ! i !> - Prepare variables to run RUC LSM: @@ -610,6 +784,7 @@ subroutine lsm_ruc_run & ! inputs do j = 1, 1 ! 1:1 do i = 1, im ! i - horizontal loop + xice(i,j) = 0. if (flag_iter(i) .and. flag(i)) then if (frpcpn) then @@ -618,7 +793,7 @@ subroutine lsm_ruc_run & ! inputs ffrozp(i,j) = real(nint(srflag(i)),kind_phys) endif - !tgs - rdlai is .false. when the LAI data is not available in the + !-- rdlai is .false. when the LAI data is not available in the ! - INPUT/sfc_data.nc rdlai2d = rdlai @@ -642,84 +817,90 @@ subroutine lsm_ruc_run & ! inputs !!\n \a lwdn - lw dw radiation flux at surface (\f$W m^{-2}\f$) !!\n \a swdn - sw dw radiation flux at surface (\f$W m^{-2}\f$) -!!\n \a solnet - net sw radiation flux (dn-up) (\f$W m^{-2}\f$) !!\n \a prcp - time-step total precip (\f$kg m^{-2} \f$) !!\n \a raincv - time-step convective precip (\f$kg m^{-2} \f$) !!\n \a rainncv - time-step non-convective precip (\f$kg m^{-2} \f$) !!\n \a graupelncv - time-step graupel (\f$kg m^{-2} \f$) !!\n \a snowncv - time-step snow (\f$kg m^{-2} \f$) !!\n \a precipfr - time-step precipitation in solod form (\f$kg m^{-2} \f$) -!!\n \a qsfc - specific humidity at surface (\f$kg kg^{-1}\f$) -!!\n \a qvg - water vapor mixing ratio at surface (\f$kg kg^{-1}\f$) -!!\n \a qsg - saturated water vapor mixing ratio at surface (\f$kg kg^{-1}\f$) -!!\n \a qcg - cloud water mixing ratio at surface (\f$kg kg^{-1}\f$) +!!\n \a shdfac - areal fractional coverage of green vegetation (0.0-1.0) +!!\n \a shdmin - minimum areal fractional coverage of green vegetation -> !shdmin1d +!!\n \a shdmax - maximum areal fractional coverage of green vegetation -> !shdmax1d +!!\n \a tbot - bottom soil temperature (local yearly-mean sfc air temp) lwdn(i,j) = dlwflx(i) !..downward lw flux at sfc in w/m2 swdn(i,j) = dswsfc(i) !..downward sw flux at sfc in w/m2 - solnet(i,j) = dswsfc(i)*(1.-sfalb(i)) !snet(i) !..net sw rad flx (dn-up) at sfc in w/m2 ! all precip input to RUC LSM is in [mm] !prcp(i,j) = rhoh2o * tprcp(i) ! tprcp in [m] - convective plus explicit !raincv(i,j) = rhoh2o * rainc(i) ! total time-step convective precip !rainncv(i,j) = rhoh2o * max(rain(i)-rainc(i),0.0) ! total time-step explicit precip - prcp(i,j) = rhoh2o * (rainc(i)+rainnc(i)) ! [mm] - convective plus explicit - raincv(i,j) = rhoh2o * rainc(i) ! [mm] - total time-step convective precip - rainncv(i,j) = rhoh2o * rainnc(i) ! [mm] - total time-step explicit precip + !graupelncv(i,j) = rhoh2o * graupel(i) + !snowncv(i,j) = rhoh2o * snow(i) + prcp(i,j) = rhoh2o * (rainc(i)+rainnc(i)) ! tprcp in [m] - convective plus explicit + raincv(i,j) = rhoh2o * rainc(i) ! total time-step convective precip + rainncv(i,j) = rhoh2o * rainnc(i) ! total time-step explicit precip graupelncv(i,j) = rhoh2o * graupel(i) snowncv(i,j) = rhoh2o * snow(i) - !if(prcp(i,j) > 0. .and. i==21) then - !print *,'prcp(i,j),rainncv(i,j),graupelncv(i,j),snowncv(i,j),ffrozp(i,j)',i,j, & - ! prcp(i,j),rainncv(i,j),graupelncv(i,j),snowncv(i,j),ffrozp(i,j) - !endif + ! ice precipitation is not used + ! precipfr(i,j) = rainncv(i,j) * ffrozp(i,j) + ! ice not used ! precipfr(i,j) = rainncv(i,j) * ffrozp(i,j) + !acsn(i,j) = acsnow(i) + acsn(i,j) = 0.0 - qvg(i,j) = sfcqv(i) - qsfc(i,j) = sfcqv(i)/(1.+sfcqv(i)) - qsg(i,j) = rslf(prsl1(i),tsurf(i)) - qcg(i,j) = sfcqc(i) + ! --- units % + shdfac(i,j) = sigmaf(i)*100. + shdmin1d(i,j) = shdmin(i)*100. + shdmax1d(i,j) = shdmax(i)*100. + + tbot(i,j) = tg3(i) !> - 3. canopy/soil characteristics (s): !!\n \a vegtyp - vegetation type (integer index) -> vtype !!\n \a soiltyp - soil type (integer index) -> stype -!!\n \a shdfac - areal fractional coverage of green vegetation (0.0-1.0) -!!\n \a shdmin - minimum areal fractional coverage of green vegetation -> shdmin1d -!!\n \a shdmax - maximum areal fractional coverage of green vegetation -> shdmax1d -!!\n \a sfcems - surface emmisivity -> sfcemis -!!\n \a 0.5*(alvwf + alnwf) - backround snow-free surface albedo (fraction) -> albbck -!!\n \a snoalb - upper bound on maximum albedo over deep snow -> snoalb1d -!!\n \a sfalb - surface albedo including snow effect (unitless fraction) -> alb -!!\n \a tbot - bottom soil temperature (local yearly-mean sfc air temp) +!!\n \a sfcems - surface emmisivity -> sfcemis +!!\n \a sfalb_lnd_bck - backround snow-free surface albedo (fraction) -> albbck_lnd +!!\n \a snoalb - upper bound on maximum albedo over deep snow -> snoalb1d_lnd if(ivegsrc == 1) then ! IGBP - MODIS + vtype_wat(i,j) = 17 ! 17 - water (oceans and lakes) in MODIS + stype_wat(i,j) = 14 + xland_wat(i,j) = 2. ! xland = 2 for water + vtype_lnd(i,j) = vegtype(i) + stype_lnd(i,j) = soiltyp(i) + vtype_ice(i,j) = 15 ! MODIS + if(isot == 0) then + stype_ice(i,j) = 9 ! ZOBLER + else + stype_ice(i,j) = 16 ! STASGO + endif !> - Prepare land/ice/water masks for RUC LSM - !> - for land only - vtype(i,j) = vegtype(i) - stype(i,j) = soiltyp(i) + !SLMSK0 - SEA(0),LAND(1),ICE(2) MASK + !if(islmsk(i) == 0.) then + !elseif(islmsk(i) == 1.) then ! land + + if(land(i)) then ! some land + xland(i,j) = 1. + xice_lnd(i,j) = 0. + elseif(flag_ice_uncoupled(i)) then ! some ice xland(i,j) = 1. - xice(i,j) = 0. + xice(i,j) = fice(i) ! fraction of sea-ice + endif else write (0,*)'MODIS landuse is not available' endif - ! --- units % - shdfac(i,j) = sigmaf(i)*100. - shdmin1d(i,j) = shdmin(i)*100. - shdmax1d(i,j) = shdmax(i)*100. - - sfcems(i,j) = sfcemis(i) - - snoalb1d(i,j) = snoalb(i) - albbck(i,j) = max(0.01, 0.5 * (alvwf(i) + alnwf(i))) - alb(i,j) = sfalb(i) - if(rdlai2d) then xlai(i,j) = laixy(i) else xlai(i,j) = 0. endif - tbot(i,j) = tg3(i) + semis_bck(i,j) = semisbase(i) + + if (land(i)) then ! at least some land in the grid cell !> - 4. history (state) variables (h): !!\n \a cmc - canopy moisture content (\f$mm\f$) @@ -731,23 +912,51 @@ subroutine lsm_ruc_run & ! inputs !!\n \a smfrsoil(lsoil_ruc) - frozen soil moisture content (volumetric fraction) -> smfrsoil !!\n \a keepfrflag(lsoil_ruc) - flag for frozen soil physics: 0. or 1. !!\n \a wet - soil moisture availability at surface -!!\n \a snowh - actual snow depth (\f$m\f$) -!!\n \a sneqv - liquid water-equivalent snow depth (\f$m\f$) -!!\n \a sncovr - fraction of snow in the grid cell -!!\n \a ch - surface exchange coefficient for heat (\f$m s^{-1}\f$) -> chs -!!\n \a z0 - surface roughness (\f$m\f$) -> zorl(\f$cm\f$) +!!\n \a snowh_lnd - actual snow depth (\f$m\f$) +!!\n \a sneqv_lnd - liquid water-equivalent snow depth (\f$m\f$) +!!\n \a sncovr_lnd - fraction of snow in the grid cell +!!\n \a chh_lnd - surface exchange coefficient for heat (\f$m s^{-1}\f$) -> chs +!!\n \a z0_lnd - surface roughness (\f$m\f$) -> zorl(\f$cm\f$) +!!\n \a qsfc_lnd - specific humidity at surface (\f$kg kg^{-1}\f$) +!!\n \a qvg_lnd - water vapor mixing ratio at surface (\f$kg kg^{-1}\f$) +!!\n \a qsg_lnd - saturated water vapor mixing ratio at surface (\f$kg kg^{-1}\f$) +!!\n \a qcg_lnd - cloud water mixing ratio at surface (\f$kg kg^{-1}\f$) +!!\n \a solnet_lnd - net sw radiation flux (dn-up) (\f$W m^{-2}\f$) + + qvg_lnd(i,j) = sfcqv_lnd(i) + qsfc_lnd(i,j) = sfcqv_lnd(i)/(1.+sfcqv_lnd(i)) + qsg_lnd(i,j) = rslf(prsl1(i),tsurf_lnd(i)) + qcg_lnd(i,j) = sfcqc_lnd(i) + sncovr_lnd(i,j) = sncovr1_lnd(i) + if (kdt == 1) then + sfcems_lnd(i,j) = semisbase(i) * (1.-sncovr_lnd(i,j)) + 0.99 * sncovr_lnd(i,j) + else + sfcems_lnd(i,j) = semis_lnd(i) + endif + + if(coszen(i) > 0. .and. weasd_lnd(i) < 1.e-4) then + !-- solar zenith angle dependence when no snow + ilst=istwe(vegtype(i)) ! 1 or 2 + dm = (1.+2.*d(ilst))/(1.+2.*d(ilst)*coszen(i)) + albbcksol(i) = sfalb_lnd_bck(i)*dm + else + albbcksol(i) = sfalb_lnd_bck(i) + endif ! coszen > 0. + + snoalb1d_lnd(i,j) = snoalb(i) + albbck_lnd(i,j) = albbcksol(i) !sfalb_lnd_bck(i) + alb_lnd(i,j) = albbck_lnd(i,j) * (1.-sncovr_lnd(i,j)) + snoalb(i) * sncovr_lnd(i,j) ! sfalb_lnd(i) + solnet_lnd(i,j) = dswsfc(i)*(1.-alb_lnd(i,j)) !..net sw rad flx (dn-up) at sfc in w/m2 cmc(i,j) = canopy(i) ! [mm] - soilt(i,j) = tsurf(i) ! clu_q2m_iter + soilt_lnd(i,j) = tsurf_lnd(i) ! clu_q2m_iter ! sanity check for snow temperature tsnow - if (tsnow(i) > 0. .and. tsnow(i) < 273.15) then - soilt1(i,j) = tsnow(i) + if (tsnow_lnd(i) > 0. .and. tsnow_lnd(i) < 273.15) then + soilt1_lnd(i,j) = tsnow_lnd(i) else - soilt1(i,j) = tsurf(i) + soilt1_lnd(i,j) = tsurf_lnd(i) endif - - tsnav(i,j) = 0.5*(soilt(i,j) + soilt1(i,j)) - 273.15 - + tsnav_lnd(i,j) = 0.5*(soilt_lnd(i,j) + soilt1_lnd(i,j)) - 273.15 do k = 1, lsoil_ruc smsoil (i,k,j) = smois(i,k) slsoil (i,k,j) = sh2o(i,k) @@ -755,114 +964,73 @@ subroutine lsm_ruc_run & ! inputs smfrsoil(i,k,j) = smfrkeep(i,k) keepfrsoil(i,k,j) = keepfr(i,k) enddo - - if(stype(i,j) .ne. 14) then - ! land - if (wetness(i) > 0.) then - wet(i,j) = wetness(i) - else - wet(i,j) = max(0.0001,smsoil(i,1,j)/0.3) - endif + ! land + if (wetness(i) > 0.) then + wet(i,j) = wetness(i) else - ! water - wet(i,j) = 1. + wet(i,j) = max(0.0001,smsoil(i,1,j)/0.3) endif - snowh(i,j) = snwdph(i) * 0.001 ! convert from mm to m - sneqv(i,j) = weasd(i) ! [mm] - - snfallac(i,j) = snowfallac(i) - acsn(i,j) = acsnow(i) - - ! -- sanity checks on sneqv and snowh - if (sneqv(i,j) /= 0.0 .and. snowh(i,j) == 0.0) then - snowh(i,j) = 0.003 * sneqv(i,j) ! snow density ~300 kg m-3 + chs_lnd (i,j) = ch_lnd(i) * wind(i) ! compute conductance + flhc_lnd(i,j) = chs_lnd(i,j) * rho(i) * con_cp ! * (1. + 0.84*q2(i,1,j)) + flqc_lnd(i,j) = chs_lnd(i,j) * rho(i) * wet(i,j) + ! for output + cmm_lnd(i) = cm_lnd(i) * wind(i) + chh_lnd(i) = chs_lnd(i,j) * rho(i) + ! + snowh_lnd(i,j) = snwdph_lnd(i) * 0.001 ! convert from mm to m + sneqv_lnd(i,j) = weasd_lnd(i) ! [mm] + snfallac_lnd(i,j) = snowfallac_lnd(i) + !> -- sanity checks on sneqv and snowh + if (sneqv_lnd(i,j) /= 0.0 .and. snowh_lnd(i,j) == 0.0) then + snowh_lnd(i,j) = 0.003 * sneqv_lnd(i,j) ! snow density ~300 kg m-3 endif - if (snowh(i,j) /= 0.0 .and. sneqv(i,j) == 0.0) then - sneqv(i,j) = 300. * snowh(i,j) ! snow density ~300 kg m-3 + if (snowh_lnd(i,j) /= 0.0 .and. sneqv_lnd(i,j) == 0.0) then + sneqv_lnd(i,j) = 300. * snowh_lnd(i,j) ! snow density ~300 kg m-3 endif - if (sneqv(i,j) > 0. .and. snowh(i,j) > 0.) then - if(sneqv(i,j)/snowh(i,j) > 950.) then - sneqv(i,j) = 300. * snowh(i,j) + if (sneqv_lnd(i,j) > 0. .and. snowh_lnd(i,j) > 0.) then + if(sneqv_lnd(i,j)/snowh_lnd(i,j) > 950.) then + sneqv_lnd(i,j) = 300. * snowh_lnd(i,j) endif endif - sncovr(i,j) = sncovr1(i) - - chs(i,j) = ch(i) * wind(i) ! compute conductance - flhc(i,j) = chs(i,j) * rho(i) * con_cp * (1. + 0.84*q2(i,1,j)) - flqc(i,j) = chs(i,j) * rho(i) * wet(i,j) - ! for output - cmm(i) = cm(i) * wind(i) - chh(i) = chs(i,j) * rho(i) - ! - - ! ---- ... outside sflx, roughness uses cm as unit - z0(i,j) = zorl(i)/100. - znt(i,j) = zorl(i)/100. + !-- z0rl is in [cm] + z0_lnd(i,j) = z0rl_lnd(i)/100. + znt_lnd(i,j) = z0rl_lnd(i)/100. if(debug_print) then - if(i==ipr) then - write (0,*)'before RUC smsoil = ',smsoil(i,:,j), i,j - write (0,*)'stsoil = ',stsoil(i,:,j), i,j - write (0,*)'soilt = ',soilt(i,j), i,j - write (0,*)'wet = ',wet(i,j), i,j - write (0,*)'soilt1 = ',soilt1(i,j), i,j - write (0,*)'delt =',delt - write (0,*)'kdt =',kdt - write (0,*)'flag_init =',flag_init - write (0,*)'flag_restart =',flag_restart - write (0,*)'nsoil =',nsoil - write (0,*)'frpcpn =',frpcpn - write (0,*)'zs =',zs - write (0,*)'graupelncv(i,j) =',i,j,graupelncv(i,j) - write (0,*)'snowncv(i,j) =',i,j,snowncv(i,j) - write (0,*)'rainncv(i,j) =',i,j,rainncv(i,j) - write (0,*)'raincv(i,j) =',i,j,raincv(i,j) - write (0,*)'prcp(i,j) =',i,j,prcp(i,j) - write (0,*)'sneqv(i,j) =',i,j,sneqv(i,j) - write (0,*)'snowh(i,j) =',i,j,snowh(i,j) - write (0,*)'sncovr(i,j) =',i,j,sncovr(i,j) - write (0,*)'ffrozp(i,j) =',i,j,ffrozp(i,j) - write (0,*)'conflx2(i,1,j) =',i,j,conflx2(i,1,j) - write (0,*)'sfcprs(i,1,j) =',i,j,sfcprs(i,1,j) - write (0,*)'sfctmp(i,1,j) =',i,j,sfctmp(i,1,j) - write (0,*)'q2(i,1,j) =',i,j,q2(i,1,j) - write (0,*)'qcatm(i,1,j) =',i,j,qcatm(i,1,j) - write (0,*)'rho2(i,1,j) =',i,j,rho2(i,1,j) - write (0,*)'lwdn(i,j) =',i,j,lwdn(i,j) - write (0,*)'solnet(i,j) =',i,j,solnet(i,j) - write (0,*)'sfcems(i,j) =',i,j,sfcems(i,j) + if(me==0 ) then + write (0,*)'before LSMRUC for land' + write (0,*)'sfcems(i,j) =',i,j,sfcems_lnd(i,j) write (0,*)'chklowq(i,j) =',i,j,chklowq(i,j) - write (0,*)'chs(i,j) =',i,j,chs(i,j) - write (0,*)'flqc(i,j) =',i,j,flqc(i,j) - write (0,*)'flhc(i,j) =',i,j,flhc(i,j) + write (0,*)'chs(i,j) =',i,j,chs_lnd(i,j) + write (0,*)'flqc(i,j) =',i,j,flqc_lnd(i,j) + write (0,*)'flhc(i,j) =',i,j,flhc_lnd(i,j) write (0,*)'wet(i,j) =',i,j,wet(i,j) write (0,*)'cmc(i,j) =',i,j,cmc(i,j) write (0,*)'shdfac(i,j) =',i,j,shdfac(i,j) - write (0,*)'alb(i,j) =',i,j,alb(i,j) - write (0,*)'znt(i,j) =',i,j,znt(i,j) - write (0,*)'z0(i,j) =',i,j,z0(i,j) - write (0,*)'snoalb1d(i,j) =',i,j,snoalb1d(i,j) - write (0,*)'alb(i,j) =',i,j,alb(i,j) + write (0,*)'alb(i,j) =',i,j,alb_lnd(i,j) + write (0,*)'znt(i,j) =',i,j,znt_lnd(i,j) + write (0,*)'z0(i,j) =',i,j,z0_lnd(i,j) + write (0,*)'snoalb1d(i,j) =',i,j,snoalb1d_lnd(i,j) write (0,*)'landusef(i,:,j) =',i,j,landusef(i,:,j) write (0,*)'soilctop(i,:,j) =',i,j,soilctop(i,:,j) write (0,*)'nlcat=',nlcat write (0,*)'nscat=',nscat - write (0,*)'qsfc(i,j) =',i,j,qsfc(i,j) - write (0,*)'qvg(i,j) =',i,j,qvg(i,j) - write (0,*)'qsg(i,j) =',i,j,qsg(i,j) - write (0,*)'qcg(i,j) =',i,j,qcg(i,j) - write (0,*)'dew(i,j) =',i,j,dew(i,j) - write (0,*)'soilt(i,j) =',i,j,soilt(i,j) - write (0,*)'tskin(i) =',i,j,tskin(i) - write (0,*)'soilt1(i,j) =',i,j,soilt1(i,j) - write (0,*)'tsnav(i,j) =',i,j,tsnav(i,j) + write (0,*)'qsfc(i,j) =',i,j,qsfc_lnd(i,j) + write (0,*)'qvg(i,j) =',i,j,qvg_lnd(i,j) + write (0,*)'qsg(i,j) =',i,j,qsg_lnd(i,j) + write (0,*)'qcg(i,j) =',i,j,qcg_lnd(i,j) + write (0,*)'dew(i,j) =',i,j,dew_lnd(i,j) + write (0,*)'soilt(i,j) =',i,j,soilt_lnd(i,j) + write (0,*)'tskin(i) =',i,j,tskin_lnd(i) + write (0,*)'soilt1(i,j) =',i,j,soilt1_lnd(i,j) + write (0,*)'tsnav(i,j) =',i,j,tsnav_lnd(i,j) write (0,*)'tbot(i,j) =',i,j,tbot(i,j) - write (0,*)'vtype(i,j) =',i,j,vtype(i,j) - write (0,*)'stype(i,j) =',i,j,stype(i,j) + write (0,*)'vtype(i,j) =',i,j,vtype_lnd(i,j) + write (0,*)'stype(i,j) =',i,j,stype_lnd(i,j) write (0,*)'xland(i,j) =',i,j,xland(i,j) write (0,*)'xice(i,j) =',i,j,xice(i,j) write (0,*)'iswater=',iswater @@ -888,60 +1056,61 @@ subroutine lsm_ruc_run & ! inputs endif endif -!> - Call RUC LSM lsmruc(). - call lsmruc( delt, flag_init, flag_restart, kdt, iter, nsoil, & +!> - Call RUC LSM lsmruc() for land. + call lsmruc( & + & delt, flag_init, flag_restart, kdt, iter, nsoil, & & graupelncv(i,j), snowncv(i,j), rainncv(i,j), raincv(i,j), & - & zs, prcp(i,j), sneqv(i,j), snowh(i,j), sncovr(i,j), & + & zs, prcp(i,j), sneqv_lnd(i,j), snowh_lnd(i,j), & + & sncovr_lnd(i,j), & & ffrozp(i,j), frpcpn, & & rhosnfr(i,j), precipfr(i,j), & ! --- inputs: & conflx2(i,1,j), sfcprs(i,1,j), sfctmp(i,1,j), q2(i,1,j), & - & qcatm(i,1,j), rho2(i,1,j), & - & lwdn(i,j), solnet(i,j), sfcems(i,j), chklowq(i,j), & - & chs(i,j), flqc(i,j), flhc(i,j), & + & qcatm(i,1,j), rho2(i,1,j), semis_bck(i,j), lwdn(i,j), & + & swdn(i,j), solnet_lnd(i,j), sfcems_lnd(i,j), chklowq(i,j), & + & chs_lnd(i,j), flqc_lnd(i,j), flhc_lnd(i,j), & ! --- input/outputs: - & wet(i,j), cmc(i,j), shdfac(i,j), alb(i,j), znt(i,j), & - & z0(i,j), snoalb1d(i,j), albbck(i,j), xlai(i,j), & - & landusef(i,:,j), nlcat, & + & wet(i,j), cmc(i,j), shdfac(i,j), alb_lnd(i,j), znt_lnd(i,j), & + & z0_lnd(i,j), snoalb1d_lnd(i,j), albbck_lnd(i,j), & + & xlai(i,j), landusef(i,:,j), nlcat, & ! --- mosaic_lu and mosaic_soil are moved to the namelist ! & mosaic_lu, mosaic_soil, & & soilctop(i,:,j), nscat, & - & qsfc(i,j), qsg(i,j), qvg(i,j), qcg(i,j), dew(i,j), & - & soilt1(i,j), & - & tsnav(i,j), tbot(i,j), vtype(i,j), stype(i,j), xland(i,j), & - & iswater, isice, xice(i,j), xice_threshold, & + & qsfc_lnd(i,j), qsg_lnd(i,j), qvg_lnd(i,j), qcg_lnd(i,j), & + & dew_lnd(i,j), soilt1_lnd(i,j), & + & tsnav_lnd(i,j), tbot(i,j), vtype_lnd(i,j), stype_lnd(i,j), & + & xland(i,j), iswater, isice, xice_lnd(i,j), xice_threshold, & ! xice=0. for the land portion of grid area ! --- constants & con_cp, con_rv, con_rd, con_g, con_pi, con_hvap, stbolt, & ! --- input/outputs: & smsoil(i,:,j), slsoil(i,:,j), soilm(i,j), smmax(i,j), & - & stsoil(i,:,j), soilt(i,j), hfx(i,j), qfx(i,j), lh(i,j), & + & stsoil(i,:,j), soilt_lnd(i,j), & + & hfx_lnd(i,j), qfx_lnd(i,j), lh_lnd(i,j), & & infiltr(i,j), runoff1(i,j), runoff2(i,j), acrunoff(i,j), & - & sfcexc(i,j), acceta(i,j), ssoil(i,j), & - & snfallac(i,j), acsn(i,j), snomlt(i,j), & + & sfcexc(i,j), acceta(i,j), ssoil_lnd(i,j), & + & snfallac_lnd(i,j), acsn(i,j), snomlt_lnd(i,j), & & smfrsoil(i,:,j),keepfrsoil(i,:,j), .false., & & shdmin1d(i,j), shdmax1d(i,j), rdlai2d, & & ims,ime, jms,jme, kms,kme, & & its,ite, jts,jte, kts,kte ) - - if(debug_print) then - if(i==ipr) then - write (0,*)'after RUC smsoil = ',smsoil(i,:,j), i, j - write (0,*)'after sneqv(i,j) =',i,j,sneqv(i,j) - write (0,*)'after snowh(i,j) =',i,j,snowh(i,j) - write (0,*)'after sncovr(i,j) =',i,j,sncovr(i,j) - write (0,*)'after vtype(i,j) =',i,j,vtype(i,j) - write (0,*)'after stype(i,j) =',i,j,stype(i,j) + if(debug_print) then + write (0,*)'after LSMRUC for land' + write (0,*)'after sneqv(i,j) =',i,j,sneqv_lnd(i,j) + write (0,*)'after snowh(i,j) =',i,j,snowh_lnd(i,j) + write (0,*)'after sncovr(i,j) =',i,j,sncovr_lnd(i,j) + write (0,*)'after vtype(i,j) =',i,j,vtype_lnd(i,j) + write (0,*)'after stype(i,j) =',i,j,stype_lnd(i,j) write (0,*)'after wet(i,j) =',i,j,wet(i,j) write (0,*)'after cmc(i,j) =',i,j,cmc(i,j) - write (0,*)'after qsfc(i,j) =',i,j,qsfc(i,j) - write (0,*)'after qvg(i,j) =',i,j,qvg(i,j) - write (0,*)'after qsg(i,j) =',i,j,qsg(i,j) - write (0,*)'after qcg(i,j) =',i,j,qcg(i,j) - write (0,*)'after dew(i,j) =',i,j,dew(i,j) - write (0,*)'after soilt(i,j) =',i,j,soilt(i,j) - write (0,*)'after tskin(i) =',i,j,tskin(i) - write (0,*)'after soilt1(i,j) =',i,j,soilt1(i,j) - write (0,*)'after tsnav(i,j) =',i,j,tsnav(i,j) + write (0,*)'after qsfc(i,j) =',i,j,qsfc_lnd(i,j) + write (0,*)'after qvg(i,j) =',i,j,qvg_lnd(i,j) + write (0,*)'after qsg(i,j) =',i,j,qsg_lnd(i,j) + write (0,*)'after qcg(i,j) =',i,j,qcg_lnd(i,j) + write (0,*)'after dew(i,j) =',i,j,dew_lnd(i,j) + write (0,*)'after soilt(i,j) =',i,j,soilt_lnd(i,j) + write (0,*)'after tskin(i) =',i,j,tskin_lnd(i) + write (0,*)'after soilt1(i,j) =',i,j,soilt1_lnd(i,j) + write (0,*)'after tsnav(i,j) =',i,j,tsnav_lnd(i,j) write (0,*)'after smsoil(i,:,j)=',i,j,smsoil(i,:,j) write (0,*)'after slsoil(i,:,j)=',i,j,slsoil(i,:,j) write (0,*)'after stsoil(i,:,j)=',i,j,stsoil(i,:,j) @@ -949,18 +1118,17 @@ subroutine lsm_ruc_run & ! inputs write (0,*)'after keepfrsoil(i,:,j)=',i,j,keepfrsoil(i,:,j) write (0,*)'after soilm(i,j) =',i,j,soilm(i,j) write (0,*)'after smmax(i,j) =',i,j,smmax(i,j) - write (0,*)'after hfx(i,j) =',i,j,hfx(i,j) - write (0,*)'after qfx(i,j) =',i,j,qfx(i,j) - write (0,*)'after lh(i,j) =',i,j,lh(i,j) + write (0,*)'after hfx(i,j) =',i,j,hfx_lnd(i,j) + write (0,*)'after qfx(i,j) =',i,j,qfx_lnd(i,j) + write (0,*)'after lh(i,j) =',i,j,lh_lnd(i,j) write (0,*)'after infiltr(i,j) =',i,j,infiltr(i,j) write (0,*)'after runoff1(i,j) =',i,j,runoff1(i,j) write (0,*)'after runoff2(i,j) =',i,j,runoff2(i,j) - write (0,*)'after ssoil(i,j) =',i,j,ssoil(i,j) - write (0,*)'after snfallac(i,j) =',i,j,snfallac(i,j) + write (0,*)'after ssoil(i,j) =',i,j,ssoil_lnd(i,j) + write (0,*)'after snfallac(i,j) =',i,j,snfallac_lnd(i,j) write (0,*)'after acsn(i,j) =',i,j,acsn(i,j) - write (0,*)'after snomlt(i,j) =',i,j,snomlt(i,j) + write (0,*)'after snomlt(i,j) =',i,j,snomlt_lnd(i,j) endif - endif !> - RUC LSM: prepare variables for return to parent model and unit conversion. @@ -971,12 +1139,29 @@ subroutine lsm_ruc_run & ! inputs !!\n \a runoff1 - surface runoff (\f$m s^{-1}\f$), not infiltrating the surface !!\n \a runoff2 - subsurface runoff (\f$m s^{-1}\f$), drainage out bottom !!\n \a snoh - phase-change heat flux from snowmelt (w m-2) +!!\n \a lh - actual latent heat flux (\f$W m^{-2}\f$: positive, if upward from sfc) +!!\n \a hfx - sensible heat flux (\f$W m^{-2}\f$: positive, if upward from sfc) +!!\n \a ssoil - soil heat flux (\f$W m^{-2}\f$: negative if downward from surface) +!!\n \a runoff1 - surface runoff (\f$m s^{-1}\f$), not infiltrating the surface +!!\n \a runoff2 - subsurface runoff (\f$m s^{-1}\f$), drainage out bottom +!!\n \a snoh - phase-change heat flux from snowmelt (w m-2) ! +! --- ... do not return the following output fields to parent model +! ec - canopy water evaporation (m s-1) +! edir - direct soil evaporation (m s-1) +! et(nsoil)-plant transpiration from a particular root layer (m s-1) +! ett - total plant transpiration (m s-1) +! esnow - sublimation from (or deposition to if <0) snowpack (m s-1) +! drip - through-fall of precip and/or dew in excess of canopy +! water-holding capacity (m) +! snomlt - snow melt (m) (water equivalent) +! xlai - leaf area index (dimensionless) +! soilw - available soil moisture in root zone (unitless fraction +! between smcwlt and smcmax) +! soilm - total soil column moisture content (frozen+unfrozen) (m) +! nroot - number of root layers, a function of veg type, determined +! in subroutine redprm. - ! Interstitial - evap(i) = qfx(i,j) / rho(i) ! kinematic - hflx(i) = hfx(i,j) / (con_cp*rho(i)) ! kinematic - gflux(i) = ssoil(i,j) !evbs(i) = edir(i,j) !evcw(i) = ec(i,j) @@ -984,42 +1169,52 @@ subroutine lsm_ruc_run & ! inputs !sbsno(i) = esnow(i,j) !snohf(i) = snoh(i,j) - sfcdew(i) = dew(i,j) - qsurf(i) = qsfc(i,j) - sncovr1(i) = sncovr(i,j) - stm(i) = soilm(i,j) - tsurf(i) = soilt(i,j) - tice(i) = tsurf(i) - - runof (i) = runoff1(i,j) * 1000.0 ! unit conversion (from m s-1 to mm s-1 and kg m-2 s-1) - drain (i) = runoff2(i,j) * 1000.0 ! unit conversion (from m s-1 to mm s-1 and kg m-2 s-1) + ! Interstitial + evap_lnd(i) = qfx_lnd(i,j) / rho(i) ! kinematic + hflx_lnd(i) = hfx_lnd(i,j) / (con_cp*rho(i)) ! kinematic + gflux_lnd(i) = ssoil_lnd(i,j) + qsurf_lnd(i) = qsfc_lnd(i,j) + tsurf_lnd(i) = soilt_lnd(i,j) + stm(i) = soilm(i,j) * 1.e-3 ! convert to [m] + + runof (i) = runoff1(i,j) + drain (i) = runoff2(i,j) wetness(i) = wet(i,j) - ! State variables - tsnow(i) = soilt1(i,j) - sfcqc(i) = qcg(i,j) - sfcqv(i) = qvg(i,j) + ! tsnow(i) = soilt1(i,j) + sfcqv_lnd(i) = qvg_lnd(i,j) + sfcqc_lnd(i) = qcg_lnd(i,j) + ! --- ... units [m/s] = [g m-2 s-1] rhosnf(i) = rhosnfr(i,j) + !acsnow(i) = acsn(i,j) ! kg m-2 ! --- ... accumulated total runoff and surface runoff - runoff(i) = runoff(i) + (drain(i)+runof(i)) * delt ! kg m-2 - srunoff(i) = srunoff(i) + runof(i) * delt ! kg m-2 + runoff(i) = runoff(i) + (drain(i)+runof(i)) * delt * 0.001 ! kg m-2 + srunoff(i) = srunoff(i) + runof(i) * delt * 0.001 ! kg m-2 ! --- ... accumulated frozen precipitation (accumulation in lsmruc) - snowfallac(i) = snfallac(i,j) ! kg m-2 - acsnow(i) = acsn(i,j) ! kg m-2 - + snowfallac_lnd(i) = snfallac_lnd(i,j) ! kg m-2 ! --- ... unit conversion (from m to mm) - snwdph(i) = snowh(i,j) * 1000.0 + snwdph_lnd(i) = snowh_lnd(i,j) * 1000.0 - canopy(i) = cmc(i,j) ! mm - weasd(i) = sneqv(i,j) ! mm - sncovr1(i) = sncovr(i,j) + canopy(i) = cmc(i,j) ! mm + weasd_lnd(i) = sneqv_lnd(i,j) ! mm + sncovr1_lnd(i) = sncovr_lnd(i,j) ! ---- ... outside RUC LSM, roughness uses cm as unit ! (update after snow's effect) - zorl(i) = znt(i,j)*100. - sfalb(i)= alb(i,j) + z0rl_lnd(i) = znt_lnd(i,j)*100. + !-- semis_lnd is with snow effect + semis_lnd(i) = sfcems_lnd(i,j) + !-- semisbas is without snow effect, but can have vegetation mosaic effect + semisbase(i) = semis_bck(i,j) + !-- sfalb_lnd has snow effect + sfalb_lnd(i) = alb_lnd(i,j) + !-- fill in albdvis_lnd, albdnir_lnd, albivis_lnd, albinir_lnd, + albdvis_lnd(i) = sfalb_lnd(i) + albdnir_lnd(i) = sfalb_lnd(i) + albinir_lnd(i) = sfalb_lnd(i) + albinir_lnd(i) = sfalb_lnd(i) do k = 1, lsoil_ruc smois(i,k) = smsoil(i,k,j) @@ -1028,30 +1223,205 @@ subroutine lsm_ruc_run & ! inputs keepfr(i,k) = keepfrsoil(i,k,j) smfrkeep(i,k) = smfrsoil(i,k,j) enddo + if(debug_print) then + write (0,*)'LAND -i,j,stype_lnd,vtype_lnd',i,j,stype_lnd(i,j),vtype_lnd(i,j) + write (0,*)'i,j,tsurf_lnd(i)',i,j,tsurf_lnd(i) + write (0,*)'kdt,iter,stsoil(i,:,j)',kdt,iter,stsoil(i,:,j) + endif + endif ! end of land + + if (flag_ice_uncoupled(i)) then ! at least some ice in the grid cell + !-- ice point + + sncovr_ice(i,j) = sncovr1_ice(i) + !-- alb_ice* is computed in setalb called from rrtmg_sw_pre. + snoalb1d_ice(i,j) = 0.75 !alb_ice_snow(i) !0.75 is RAP value for max snow alb on ice + albbck_ice(i,j) = 0.55 !alb_ice_snowfree(i) !0.55 is RAP value for ice alb + alb_ice(i,j) = sfalb_ice(i) + solnet_ice(i,j) = dswsfc(i)*(1.-alb_ice(i,j)) + qvg_ice(i,j) = sfcqv_ice(i) + qsfc_ice(i,j) = sfcqv_ice(i)/(1.+sfcqv_ice(i)) + qsg_ice(i,j) = rslf(prsl1(i),tsurf_ice(i)) + qcg_ice(i,j) = sfcqc_ice(i) + semis_bck(i,j) = 0.99 + if (kdt == 1) then + sfcems_ice(i,j) = semisbase(i) * (1.-sncovr_ice(i,j)) + 0.99 * sncovr_ice(i,j) + else + sfcems_ice(i,j) = semis_ice(i) + endif + cmc(i,j) = canopy(i) ! [mm] + soilt_ice(i,j) = tsurf_ice(i) ! clu_q2m_iter + if (tsnow_ice(i) > 0. .and. tsnow_ice(i) < 273.15) then + soilt1_ice(i,j) = tsnow_ice(i) + else + soilt1_ice(i,j) = tsurf_ice(i) + endif + tsnav_ice(i,j) = 0.5*(soilt_ice(i,j) + soilt1_ice(i,j)) - 273.15 + do k = 1, lsoil_ruc + stsice (i,k,j) = tsice(i,k) + smice (i,k,j) = 1. + slice (i,k,j) = 0. + smfrice (i,k,j) = 1. + keepfrice(i,k,j) = 1. + enddo -! --- ... do not return the following output fields to parent model -! ec - canopy water evaporation (m s-1) -! edir - direct soil evaporation (m s-1) -! et(nsoil)-plant transpiration from a particular root layer (m s-1) -! ett - total plant transpiration (m s-1) -! esnow - sublimation from (or deposition to if <0) snowpack (m s-1) -! drip - through-fall of precip and/or dew in excess of canopy -! water-holding capacity (m) -! dew - dewfall (or frostfall for t<273.15) (m) -! snomlt - snow melt (m) (water equivalent) -! sncovr - fractional snow cover (unitless fraction, 0-1) -! for a given soil layer at the end of a time step -! xlai - leaf area index (dimensionless) -! soilw - available soil moisture in root zone (unitless fraction -! between smcwlt and smcmax) -! soilm - total soil column moisture content (frozen+unfrozen) (m) -! nroot - number of root layers, a function of veg type, determined -! in subroutine redprm. + wet_ice(i,j) = 1. + + chs_ice (i,j) = ch_ice(i) * wind(i) ! compute conductance + flhc_ice(i,j) = chs_ice(i,j) * rho(i) * con_cp ! * (1. + 0.84*q2(i,1,j)) + flqc_ice(i,j) = chs_ice(i,j) * rho(i) * wet_ice(i,j) + ! for output + cmm_ice(i) = cm_ice (i) * wind(i) + chh_ice(i) = chs_ice(i,j) * rho(i) + + + snowh_ice(i,j) = snwdph_ice(i) * 0.001 ! convert from mm to m + sneqv_ice(i,j) = weasd_ice(i) ! [mm] + snfallac_ice(i,j) = snowfallac_ice(i) + + !> -- sanity checks on sneqv and snowh + if (sneqv_ice(i,j) /= 0.0 .and. snowh_ice(i,j) == 0.0) then + snowh_ice(i,j) = 0.003 * sneqv_ice(i,j) ! snow density ~300 kg m-3 + endif + + if (snowh_ice(i,j) /= 0.0 .and. sneqv_ice(i,j) == 0.0) then + sneqv_ice(i,j) = 300. * snowh_ice(i,j) ! snow density ~300 kg m-3 + endif + + if (sneqv_ice(i,j) > 0. .and. snowh_ice(i,j) > 0.) then + if(sneqv_ice(i,j)/snowh_ice(i,j) > 950.) then + sneqv_ice(i,j) = 300. * snowh_ice(i,j) + endif + endif + + z0_ice(i,j) = z0rl_ice(i)/100. + znt_ice(i,j) = z0rl_ice(i)/100. + +!> - Call RUC LSM lsmruc() for ice. + call lsmruc( & + & delt, flag_init, flag_restart, kdt, iter, nsoil, & + & graupelncv(i,j), snowncv(i,j), rainncv(i,j), raincv(i,j), & + & zs, prcp(i,j), sneqv_ice(i,j), snowh_ice(i,j), & + & sncovr_ice(i,j), & + & ffrozp(i,j), frpcpn, & + & rhosnfr(i,j), precipfr(i,j), & +! --- inputs: + & conflx2(i,1,j), sfcprs(i,1,j), sfctmp(i,1,j), q2(i,1,j), & + & qcatm(i,1,j), rho2(i,1,j), semis_bck(i,j), lwdn(i,j), & + & swdn(i,j), solnet_ice(i,j), sfcems_ice(i,j), chklowq(i,j), & + & chs_ice(i,j), flqc_ice(i,j), flhc_ice(i,j), & +! --- input/outputs: + & wet_ice(i,j), cmc(i,j), shdfac(i,j), alb_ice(i,j), & + & znt_ice(i,j), z0_ice(i,j), snoalb1d_ice(i,j), & + & albbck_ice(i,j), xlai(i,j),landusef(i,:,j), nlcat, & +! --- mosaic_lu and mosaic_soil are moved to the namelist +! & mosaic_lu, mosaic_soil, & + & soilctop(i,:,j), nscat, & + & qsfc_ice(i,j), qsg_ice(i,j), qvg_ice(i,j), qcg_ice(i,j), & + & dew_ice(i,j), soilt1_ice(i,j), & + & tsnav_ice(i,j), tbot(i,j), vtype_ice(i,j), stype_ice(i,j), & + & xland(i,j), iswater, isice, xice(i,j), xice_threshold, & +! --- constants + & con_cp, con_rv, con_rd, con_g, con_pi, con_hvap, stbolt, & +! --- input/outputs: + & smice(i,:,j), slice(i,:,j), soilm(i,j), smmax(i,j), & + & stsice(i,:,j), soilt_ice(i,j), & + & hfx_ice(i,j), qfx_ice(i,j), lh_ice(i,j), & + & infiltr(i,j), runoff1(i,j), runoff2(i,j), acrunoff(i,j), & + & sfcexc(i,j), acceta(i,j), ssoil_ice(i,j), & + & snfallac_ice(i,j), acsn(i,j), snomlt_ice(i,j), & + & smfrice(i,:,j),keepfrice(i,:,j), .false., & + & shdmin1d(i,j), shdmax1d(i,j), rdlai2d, & + & ims,ime, jms,jme, kms,kme, & + & its,ite, jts,jte, kts,kte ) + + ! Interstitial + evap_ice(i) = qfx_ice(i,j) / rho(i) ! kinematic + ep1d_ice(i) = qfx_ice(i,j) * con_hvap + hflx_ice(i) = hfx_ice(i,j) / (con_cp*rho(i)) ! kinematic + gflux_ice(i) = ssoil_ice(i,j) - endif ! end if_flag_iter_and_flag_block + qsurf_ice(i) = qsfc_ice(i,j) + tsurf_ice(i) = soilt_ice(i,j) + + sfcqv_ice(i) = qvg_ice(i,j) + sfcqc_ice(i) = qcg_ice(i,j) + + snowfallac_ice(i) = snfallac_ice(i,j) ! kg m-2 + ! --- ... unit conversion (from m to mm) + snwdph_ice(i) = snowh_ice(i,j) * 1000.0 + weasd_ice(i) = sneqv_ice(i,j) ! mm + sncovr1_ice(i) = sncovr_ice(i,j) + z0rl_ice(i) = znt_ice(i,j)*100. + !-- semis_ice is with snow effect + semis_ice(i) = sfcems_ice(i,j) + !-- sfalb_ice is with snow effect + sfalb_ice(i) = alb_ice(i,j) + albdvis_ice(i) = sfalb_ice(i) + albdnir_ice(i) = sfalb_ice(i) + albinir_ice(i) = sfalb_ice(i) + albinir_ice(i) = sfalb_ice(i) + + + do k = 1, lsoil_ruc + tsice(i,k) = stsice(i,k,j) + if(.not. frac_grid .or. .not. land(i)) then + smois(i,k) = 1. + sh2o(i,k) = 0. + tslb(i,k) = stsice(i,k,j) + keepfr(i,k) = 1. + smfrkeep(i,k) = 1. + endif + enddo + if(debug_print) then + write (0,*)'ICE - i,j,stype_ice,vtype_ice)',i,j,stype_ice(i,j),vtype_ice(i,j) + write (0,*)'i,j,tsurf_ice(i)',i,j,tsurf_ice(i) + write (0,*)'kdt,iter,stsice(i,:,j)',kdt,iter,stsice(i,:,j) + endif + + endif ! ice + + + endif ! end if_flag_iter_and_flag enddo ! j enddo ! i + !-- Take care of fractional sea ice for uncoupled run with frac_grid=.false. + !-- When frac_grid=.true. GFS_surface_composite will take care of this. + do i = 1, im ! i - horizontal loop + if ( flag_iter(i) .and. flag(i) ) then + ! Do this only when the fractional grid is not turned on! + ! Compute composite for a fractional sea ice: fice(i) < 1. + ! This is needed for the 2-way coupling + ! in the upcoupled case (when sfc_cice is not used). + if(.not. frac_grid) then + if( flag_ice_uncoupled(i) .and. fice(i) < 1.) then + !write (0,*)'Fractional sea ice at i', i, fice(i) + fwat = 1.0 - fice(i) + ! Check if ice fraction is below the minimum value: 15% in GFS + ! physics. + if (fice(i) < cimin) then ! cimin - minimal ice fraction + write (0,*)'warning: ice fraction is low:', fice(i) + fice(i) = cimin + fwat = 1.0 - cimin + write (0,*)'fix ice fraction: reset it to:', fice(i), tskin_wat(i) + endif + + ! Compute the composite of ice and open water for 2-way coupling in the + ! uncoupled sea-ice model. Use ice variables for the composite. + tsurf_ice(i) = tsurf_ice(i) * fice(i) + min(con_tice,tskin_wat(i)) * fwat + chh_ice(i) = chh_ice(i) * fice(i) + ch_wat(i) * wind(i) * rho(i) * fwat + hfxw = ch_wat(i) * wind(i) * (min(con_tice,tskin_wat(i)) - t1(i)) + hflx_ice(i) = hflx_ice(i) * fice(i) + hfxw * fwat + qsw = rslf(prsl1(i),min(con_tice,tskin_wat(i))) + evapw = ch_wat(i) * wind(i) * (qsw - q0(i)) + evap_ice(i) = evap_ice(i) * fice(i) + evapw * fwat + qsurf_ice(i) = q1(i) + evap_ice(i) * rho(i) / chh_ice(i) + endif ! flag_ice_uncoupled(i) .and. fice(i) < 1. + endif ! flag_iter, icy, not frac_grid + endif + enddo ! i + !> - Restore land-related prognostic fields for guess run. do j = 1, 1 do i = 1, im @@ -1059,50 +1429,52 @@ subroutine lsm_ruc_run & ! inputs if(debug_print) write (0,*)'end ',i,flag_guess(i),flag_iter(i) if (flag_guess(i)) then if(debug_print) write (0,*)'guess run' - weasd(i) = weasd_old(i) - snwdph(i) = snwdph_old(i) - tskin(i) = tskin_old(i) - canopy(i) = canopy_old(i) - !tprcp(i) = tprcp_old(i) - srflag(i) = srflag_old(i) - tsnow(i) = tsnow_old(i) - snowfallac(i) = snowfallac_old(i) - acsnow(i) = acsnow_old(i) - sfalb(i) = sfalb_old(i) - sfcqv(i) = sfcqv_old(i) - sfcqc(i) = sfcqc_old(i) - wetness(i) = wetness_old(i) - zorl(i) = zorl_old(i) - sncovr1(i) = sncovr1_old(i) + + weasd_lnd(i) = weasd_lnd_old(i) + snwdph_lnd(i) = snwdph_lnd_old(i) + tskin_lnd(i) = tskin_lnd_old(i) + canopy(i) = canopy_old(i) + !srflag(i) = srflag_old(i) + tsnow_lnd(i) = tsnow_lnd_old(i) + snowfallac_lnd(i) = snowfallac_lnd_old(i) + !acsnow(i) = acsnow_old(i) + sfcqv_lnd(i) = sfcqv_lnd_old(i) + sfcqc_lnd(i) = sfcqc_lnd_old(i) + wetness(i) = wetness_old(i) + z0rl_lnd(i) = z0rl_lnd_old(i) + sncovr1_lnd(i) = sncovr1_lnd_old(i) + !ice + weasd_ice(i) = weasd_ice_old(i) + snwdph_ice(i) = snwdph_ice_old(i) + tskin_ice(i) = tskin_ice_old(i) + tsnow_ice(i) = tsnow_ice_old(i) + snowfallac_ice(i) = snowfallac_ice_old(i) + sfcqv_ice(i) = sfcqv_ice_old(i) + sfcqc_ice(i) = sfcqc_ice_old(i) + z0rl_ice(i) = z0rl_ice_old(i) + sncovr1_ice(i) = sncovr1_ice_old(i) + do k = 1, lsoil_ruc - smois(i,k) = smois_old(i,k) - tslb(i,k) = tslb_old(i,k) - sh2o(i,k) = sh2o_old(i,k) - keepfr(i,k) = keepfr_old(i,k) + smois(i,k) = smois_old(i,k) + tslb(i,k) = tslb_old(i,k) + tsice(i,k) = tsice_old(i,k) + sh2o(i,k) = sh2o_old(i,k) + keepfr(i,k) = keepfr_old(i,k) smfrkeep(i,k) = smfrkeep_old(i,k) enddo - else - if(debug_print) write (0,*)'iter run', i,j, tskin(i),tsurf(i) - tskin(i) = tsurf(i) - tice (i) = tsurf(i) - endif - endif + else ! flag_guess + if(debug_print) write (0,*)'iter run', i,j, tskin_ice(i),tsurf_ice(i) + tskin_lnd(i) = tsurf_lnd(i) + tskin_ice(i) = tsurf_ice(i) + tice(i) = tsurf_ice(i) + endif ! flag_guess + endif ! flag enddo ! i enddo ! j ! deallocate(soilctop) deallocate(landusef) ! - !! Update standard (Noah LSM) soil variables for physics - !! that require these variables and for debugging purposes - do i = 1, im - do k = 1, lsoil - smc(i,k) = smois(i,k) - slc(i,k) = sh2o(i,k) - stc(i,k) = tslb(i,k) - enddo - enddo - return !................................... end subroutine lsm_ruc_run @@ -1228,7 +1600,7 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in !! Check if RUC soil data (tslb, ...) is provided or not !if (minval(tslb)==maxval(tslb)) then - ! For restart runs, can assume that RUC soul data is provided + ! For restart runs, can assume that RUC soil data is provided if (.not.restart) then flag_sst = 0 diff --git a/physics/sfc_drv_ruc.meta b/physics/sfc_drv_ruc.meta index 061979d63..d3f3f7142 100644 --- a/physics/sfc_drv_ruc.meta +++ b/physics/sfc_drv_ruc.meta @@ -24,7 +24,7 @@ intent = in optional = F [isot] - standard_name = soil_type_dataset_choice + standard_name = control_for_soil_type_dataset long_name = soil type dataset choice units = index dimensions = () @@ -32,7 +32,7 @@ intent = in optional = F [ivegsrc] - standard_name = vegetation_type_dataset_choice + standard_name = control_for_vegetation_dataset long_name = land use dataset choice units = index dimensions = () @@ -40,7 +40,7 @@ intent = in optional = F [nlunit] - standard_name = iounit_namelist + standard_name = iounit_of_namelist long_name = fortran unit number for file opens units = none dimensions = () @@ -56,23 +56,41 @@ intent = in optional = F [flag_init] - standard_name = flag_for_first_time_step + standard_name = flag_for_first_timestep long_name = flag signaling first time step for time integration loop units = flag dimensions = () type = logical intent = in optional = F +[con_fvirt] + standard_name = ratio_of_vapor_to_dry_air_gas_constants_minus_one + long_name = rv/rd - 1 (rv = ideal gas constant for water vapor) + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[con_rd] + standard_name = gas_constant_of_dry_air + long_name = ideal gas constant for dry air + units = J kg-1 K-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F [im] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent + standard_name = horizontal_dimension + long_name = horizontal dimension units = count dimensions = () type = integer intent = in optional = F [lsoil_ruc] - standard_name = soil_vertical_dimension_for_land_surface_model + standard_name = vertical_dimension_of_soil_internal_to_land_surface_scheme long_name = number of soil layers internal to land surface model units = count dimensions = () @@ -80,7 +98,7 @@ intent = in optional = F [lsoil] - standard_name = soil_vertical_dimension + standard_name = vertical_dimension_of_soil long_name = soil vertical layer dimension units = count dimensions = () @@ -88,7 +106,7 @@ intent = in optional = F [kice] - standard_name = ice_vertical_dimension + standard_name = vertical_dimension_of_sea_ice long_name = vertical loop extent for ice levels, start at 1 units = count dimensions = () @@ -96,7 +114,7 @@ intent = in optional = F [nlev] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () @@ -104,7 +122,7 @@ intent = in optional = F [lsm_ruc] - standard_name = flag_for_ruc_land_surface_scheme + standard_name = identifier_for_ruc_land_surface_scheme long_name = flag for RUC land surface model units = flag dimensions = () @@ -112,7 +130,7 @@ intent = in optional = F [lsm] - standard_name = flag_for_land_surface_scheme + standard_name = control_for_land_surface_scheme long_name = flag for land surface model units = flag dimensions = () @@ -120,7 +138,7 @@ intent = in optional = F [slmsk] - standard_name = sea_land_ice_mask_real + standard_name = area_type long_name = landmask: sea/land/ice=0/1/2 units = flag dimensions = (horizontal_dimension) @@ -144,7 +162,25 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = inout + intent = in + optional = F +[q1] + standard_name = specific_humidity_at_surface_adjacent_layer + long_name = water vapor specific humidity at lowest model layer + units = kg kg-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[prsl1] + standard_name = air_pressure_at_surface_adjacent_layer + long_name = mean pressure at lowest model layer + units = Pa + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in optional = F [tsfc_lnd] standard_name = surface_skin_temperature @@ -153,7 +189,16 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = inout + intent = in + optional = F +[tsfc_ice] + standard_name = sea_ice_temperature + long_name = sea ice surface skin temperature + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in optional = F [tsfc_wat] standard_name = sea_surface_temperature @@ -162,7 +207,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = inout + intent = in optional = F [tg3] standard_name = deep_soil_temperature @@ -174,19 +219,19 @@ intent = in optional = F [smc] - standard_name = volume_fraction_of_soil_moisture + standard_name = volume_fraction_of_condensed_water_in_soil long_name = total soil moisture units = frac - dimensions = (horizontal_dimension,soil_vertical_dimension) + dimensions = (horizontal_dimension,vertical_dimension_of_soil) type = real kind = kind_phys intent = in optional = F [slc] - standard_name = volume_fraction_of_unfrozen_soil_moisture + standard_name = volume_fraction_of_unfrozen_water_in_soil long_name = liquid soil moisture units = frac - dimensions = (horizontal_dimension,soil_vertical_dimension) + dimensions = (horizontal_dimension,vertical_dimension_of_soil) type = real kind = kind_phys intent = in @@ -195,16 +240,241 @@ standard_name = soil_temperature long_name = soil temperature units = K - dimensions = (horizontal_dimension,soil_vertical_dimension) + dimensions = (horizontal_dimension,vertical_dimension_of_soil) + type = real + kind = kind_phys + intent = in + optional = F +[fice] + standard_name = sea_ice_area_fraction_of_sea_area_fraction + long_name = ice fraction over open water + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[min_seaice] + standard_name = min_sea_ice_area_fraction + long_name = minimum sea ice value + units = frac + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[sncovr_lnd] + standard_name = surface_snow_area_fraction_over_land + long_name = surface snow area fraction over land + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[sncovr_ice] + standard_name = surface_snow_area_fraction_over_ice + long_name = surface snow area fraction over ice + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[snoalb] + standard_name = upper_bound_of_max_albedo_assuming_deep_snow + long_name = maximum snow albedo + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[facsf] + standard_name = strong_cosz_area_fraction + long_name = fractional coverage with strong cosz dependency + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[facwf] + standard_name = weak_cosz_area_fraction + long_name = fractional coverage with weak cosz dependency + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[alvsf] + standard_name = vis_albedo_strong_cosz + long_name = mean vis albedo with strong cosz dependency + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[alvwf] + standard_name = vis_albedo_weak_cosz + long_name = mean vis albedo with weak cosz dependency + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[alnsf] + standard_name = nir_albedo_strong_cosz + long_name = mean nir albedo with strong cosz dependency + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[alnwf] + standard_name = nir_albedo_weak_cosz + long_name = mean nir albedo with weak cosz dependency + units = frac + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in optional = F +[sfcqv_lnd] + standard_name = water_vapor_mixing_ratio_at_surface_over_land + long_name = water vapor mixing ratio at surface over land + units = kg kg-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[sfcqv_ice] + standard_name = water_vapor_mixing_ratio_at_surface_over_ice + long_name = water vapor mixing ratio at surface over ice + units = kg kg-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[sfalb_lnd_bck] + standard_name =surface_snow_free_albedo_over_land + long_name = surface snow-free albedo over ice + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[semisbase] + standard_name = baseline_surface_longwave_emissivity + long_name = baseline surface lw emissivity in fraction + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[semis_lnd] + standard_name = surface_longwave_emissivity_over_land + long_name = surface lw emissivity in fraction over land + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[semis_ice] + standard_name = surface_longwave_emissivity_over_ice + long_name = surface lw emissivity in fraction over ice + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[albdvis_lnd] + standard_name = surface_albedo_direct_visible_over_land + long_name = direct surface albedo visible band over land + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[albdnir_lnd] + standard_name = surface_albedo_direct_NIR_over_land + long_name = direct surface albedo NIR band over land + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[albivis_lnd] + standard_name = surface_albedo_diffuse_visible_over_land + long_name = diffuse surface albedo visible band over land + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[albinir_lnd] + standard_name = surface_albedo_diffuse_NIR_over_land + long_name = diffuse surface albedo NIR band over land + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[albdvis_ice] + standard_name = surface_albedo_direct_visible_over_ice + long_name = direct surface albedo visible band over ice + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[albdnir_ice] + standard_name = surface_albedo_direct_NIR_over_ice + long_name = direct surface albedo NIR band over ice + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[albivis_ice] + standard_name = surface_albedo_diffuse_visible_over_ice + long_name = diffuse surface albedo visible band over ice + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[albinir_ice] + standard_name = surface_albedo_diffuse_NIR_over_ice + long_name = diffuse surface albedo NIR band over ice + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [zs] - standard_name = depth_of_soil_levels_for_land_surface_model + standard_name = depth_of_soil_layers long_name = depth of soil levels for land surface model units = m - dimensions = (soil_vertical_dimension_for_land_surface_model) + dimensions = (vertical_dimension_of_soil_internal_to_land_surface_scheme) type = real kind = kind_phys intent = out @@ -213,7 +483,7 @@ standard_name = volume_fraction_of_unfrozen_soil_moisture_for_land_surface_model long_name = volume fraction of unfrozen soil moisture for lsm units = frac - dimensions = (horizontal_dimension,soil_vertical_dimension_for_land_surface_model) + dimensions = (horizontal_dimension,vertical_dimension_of_soil_internal_to_land_surface_scheme) type = real kind = kind_phys intent = inout @@ -222,7 +492,7 @@ standard_name = volume_fraction_of_frozen_soil_moisture_for_land_surface_model long_name = volume fraction of frozen soil moisture for lsm units = frac - dimensions = (horizontal_dimension,soil_vertical_dimension_for_land_surface_model) + dimensions = (horizontal_dimension,vertical_dimension_of_soil_internal_to_land_surface_scheme) type = real kind = kind_phys intent = inout @@ -231,7 +501,7 @@ standard_name = soil_temperature_for_land_surface_model long_name = soil temperature for land surface model units = K - dimensions = (horizontal_dimension,soil_vertical_dimension_for_land_surface_model) + dimensions = (horizontal_dimension,vertical_dimension_of_soil_internal_to_land_surface_scheme) type = real kind = kind_phys intent = inout @@ -240,7 +510,7 @@ standard_name = volume_fraction_of_soil_moisture_for_land_surface_model long_name = volumetric fraction of soil moisture for lsm units = frac - dimensions = (horizontal_dimension,soil_vertical_dimension_for_land_surface_model) + dimensions = (horizontal_dimension,vertical_dimension_of_soil_internal_to_land_surface_scheme) type = real kind = kind_phys intent = inout @@ -255,14 +525,30 @@ intent = inout optional = F [tsice] - standard_name = internal_ice_temperature + standard_name = temperature_in_ice_layer long_name = sea ice internal temperature units = K - dimensions = (horizontal_dimension,ice_vertical_dimension) + dimensions = (horizontal_dimension,vertical_dimension_of_sea_ice) type = real kind = kind_phys intent = out optional = F +[pores] + standard_name = maximum_soil_moisture_content_for_land_surface_model + long_name = maximum soil moisture for a given soil type for land surface model + units = m + dimensions = (30) + type = real + intent = out + kind = kind_phys +[resid] + standard_name = minimum_soil_moisture_content_for_land_surface_model + long_name = minimum soil moisture for a given soil type for land surface model + units = m + dimensions = (30) + type = real + intent = out + kind = kind_phys [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP @@ -331,8 +617,17 @@ type = integer intent = in optional = F +[delt] + standard_name = timestep_for_dynamics + long_name = physics time step + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F [kdt] - standard_name = index_of_time_step + standard_name = index_of_timestep long_name = current number of time steps units = index dimensions = () @@ -348,49 +643,105 @@ intent = in optional = F [nlev] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () type = integer intent = in optional = F -[lsoil_ruc] - standard_name = soil_vertical_dimension_for_land_surface_model - long_name = number of soil layers internal to land surface model - units = count +[lsm_ruc] + standard_name = identifier_for_ruc_land_surface_scheme + long_name = flag for RUC land surface model + units = flag dimensions = () type = integer intent = in optional = F -[lsoil] - standard_name = soil_vertical_dimension - long_name = soil vertical layer dimension - units = count +[lsm] + standard_name = control_for_land_surface_scheme + long_name = flag for land surface model + units = flag dimensions = () type = integer intent = in optional = F -[zs] - standard_name = depth_of_soil_levels_for_land_surface_model - long_name = depth of soil levels for land surface model - units = m - dimensions = (soil_vertical_dimension_for_land_surface_model) - type = real - kind = kind_phys +[imp_physics] + standard_name = control_for_microphysics_scheme + long_name = choice of microphysics scheme + units = flag + dimensions = () + type = integer intent = in optional = F -[t1] - standard_name = air_temperature_at_lowest_model_layer - long_name = mean temperature at lowest model layer - units = K - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys +[imp_physics_gfdl] + standard_name = identifier_for_gfdl_microphysics_scheme + long_name = choice of GFDL microphysics scheme + units = flag + dimensions = () + type = integer intent = in optional = F -[q1] - standard_name = water_vapor_specific_humidity_at_lowest_model_layer +[imp_physics_thompson] + standard_name = identifier_for_thompson_microphysics_scheme + long_name = choice of Thompson microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[do_mynnsfclay] + standard_name = flag_for_mellor_yamada_nakanishi_niino_surface_layer_scheme + long_name = flag to activate MYNN surface layer + units = flag + dimensions = () + type = logical + intent = in + optional = F +[lsoil_ruc] + standard_name = vertical_dimension_of_soil_internal_to_land_surface_scheme + long_name = number of soil layers internal to land surface model + units = count + dimensions = () + type = integer + intent = in + optional = F +[lsoil] + standard_name = vertical_dimension_of_soil + long_name = soil vertical layer dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[rdlai] + standard_name = flag_for_reading_leaf_area_index_from_input + long_name = flag for reading leaf area index from initial conditions for RUC LSM + units = flag + dimensions = () + type = logical + intent = in + optional = F +[zs] + standard_name = depth_of_soil_layers + long_name = depth of soil levels for land surface model + units = m + dimensions = (vertical_dimension_of_soil_internal_to_land_surface_scheme) + type = real + kind = kind_phys + intent = in + optional = F +[t1] + standard_name = air_temperature_at_surface_adjacent_layer + long_name = mean temperature at lowest model layer + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[q1] + standard_name = specific_humidity_at_surface_adjacent_layer long_name = water vapor specific humidity at lowest model layer units = kg kg-1 dimensions = (horizontal_loop_extent) @@ -399,8 +750,8 @@ intent = in optional = F [qc] - standard_name = cloud_condensed_water_mixing_ratio_at_lowest_model_layer - long_name = moist (dry+vapor, no condensates) mixing ratio of cloud water at lowest model layer + standard_name = cloud_liquid_water_mixing_ratio_at_surface_adjacent_layer + long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) at lowest model layer units = kg kg-1 dimensions = (horizontal_loop_extent) type = real @@ -441,15 +792,6 @@ kind = kind_phys intent = in optional = F -[sfcemis] - standard_name = surface_longwave_emissivity_over_land_interstitial - long_name = surface lw emissivity in fraction over land (temporary use as interstitial) - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = inout - optional = F [dlwflx] standard_name = surface_downwelling_longwave_flux long_name = surface downwelling longwave flux at current time @@ -468,53 +810,95 @@ kind = kind_phys intent = in optional = F -[snet] - standard_name = surface_net_downwelling_shortwave_flux - long_name = surface net downwelling shortwave flux at current time - units = W m-2 +[tg3] + standard_name = deep_soil_temperature + long_name = deep soil temperature + units = K dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in optional = F -[delt] - standard_name = time_step_for_dynamics - long_name = physics time step - units = s - dimensions = () +[coszen] + standard_name = instantaneous_cosine_of_zenith_angle + long_name = cosine of zenith angle at current time + units = none + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in optional = F -[tg3] - standard_name = deep_soil_temperature - long_name = deep soil temperature - units = K +[land] + standard_name = flag_nonzero_land_surface_fraction + long_name = flag indicating presence of some land surface area fraction + units = flag + dimensions = (horizontal_loop_extent) + type = logical + intent = in + optional = F +[icy] + standard_name = flag_nonzero_sea_ice_surface_fraction + long_name = flag indicating presence of some sea ice surface area fraction + units = flag + dimensions = (horizontal_loop_extent) + type = logical + intent = in + optional = F +[lake] + standard_name = flag_for_using_flake + long_name = flag indicating lake points using flake model + units = flag + dimensions = (horizontal_loop_extent) + type = logical + intent = in + optional = F +[rainnc] + standard_name = lwe_thickness_of_explicit_precipitation_amount_on_previous_timestep + long_name = explicit rainfall from previous timestep + units = m dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in optional = F -[cm] - standard_name = surface_drag_coefficient_for_momentum_in_air_over_land - long_name = surface exchange coeff for momentum over land - units = none +[rainc] + standard_name = lwe_thickness_of_convective_precipitation_amount_on_previous_timestep + long_name = convective_precipitation_amount from previous timestep + units = m dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in optional = F -[ch] - standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_land - long_name = surface exchange coeff heat & moisture over land - units = none +[ice] + standard_name = lwe_thickness_of_ice_precipitation_amount_on_previous_timestep + long_name = ice amount from previous timestep + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[snow] + standard_name = snow_mass_on_previous_timestep + long_name = snow amount from previous timestep + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[graupel] + standard_name = lwe_thickness_of_graupel_amount_on_previous_timestep + long_name = graupel amount from previous timestep + units = m dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in optional = F [prsl1] - standard_name = air_pressure_at_lowest_model_layer + standard_name = air_pressure_at_surface_adjacent_layer long_name = mean pressure at lowest model layer units = Pa dimensions = (horizontal_loop_extent) @@ -541,7 +925,7 @@ intent = in optional = F [shdmin] - standard_name = minimum_vegetation_area_fraction + standard_name = min_vegetation_area_fraction long_name = min fractional coverage of green vegetation units = frac dimensions = (horizontal_loop_extent) @@ -550,7 +934,7 @@ intent = in optional = F [shdmax] - standard_name = maximum_vegetation_area_fraction + standard_name = max_vegetation_area_fraction long_name = max fractional coverage of green vegetation units = frac dimensions = (horizontal_loop_extent) @@ -558,18 +942,18 @@ kind = kind_phys intent = in optional = F -[alvwf] - standard_name = mean_vis_albedo_with_weak_cosz_dependency - long_name = mean vis albedo with weak cosz dependency - units = frac +[srflag] + standard_name = precipitation_type + long_name = snow/rain flag for precipitation + units = flag dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in optional = F -[alnwf] - standard_name = mean_nir_albedo_with_weak_cosz_dependency - long_name = mean nir albedo with weak cosz dependency +[sfalb_lnd_bck] + standard_name =surface_snow_free_albedo_over_land + long_name = surface snow-free albedo over ice units = frac dimensions = (horizontal_loop_extent) type = real @@ -577,7 +961,7 @@ intent = in optional = F [snoalb] - standard_name = upper_bound_on_max_albedo_over_deep_snow + standard_name = upper_bound_of_max_albedo_assuming_deep_snow long_name = maximum snow albedo units = frac dimensions = (horizontal_loop_extent) @@ -585,33 +969,8 @@ kind = kind_phys intent = in optional = F -[sfalb] - standard_name = surface_diffused_shortwave_albedo - long_name = mean surface diffused sw albedo - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = inout - optional = F -[flag_iter] - standard_name = flag_for_iteration - long_name = flag for iteration - units = flag - dimensions = (horizontal_loop_extent) - type = logical - intent = in - optional = F -[flag_guess] - standard_name = flag_for_guess_run - long_name = flag for guess run - units = flag - dimensions = (horizontal_loop_extent) - type = logical - intent = in - optional = F [isot] - standard_name = soil_type_dataset_choice + standard_name = control_for_soil_type_dataset long_name = soil type dataset choice units = index dimensions = () @@ -619,7 +978,7 @@ intent = in optional = F [ivegsrc] - standard_name = vegetation_type_dataset_choice + standard_name = control_for_vegetation_dataset long_name = land use dataset choice units = index dimensions = () @@ -627,7 +986,7 @@ intent = in optional = F [fice] - standard_name = sea_ice_concentration + standard_name = sea_ice_area_fraction_of_sea_area_fraction long_name = ice fraction over open water units = frac dimensions = (horizontal_loop_extent) @@ -635,121 +994,49 @@ kind = kind_phys intent = inout optional = F -[smc] - standard_name = volume_fraction_of_soil_moisture - long_name = total soil moisture +[smcwlt2] + standard_name = volume_fraction_of_condensed_water_in_soil_at_wilting_point + long_name = soil water fraction at wilting point units = frac - dimensions = (horizontal_loop_extent,soil_vertical_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout optional = F -[stc] - standard_name = soil_temperature - long_name = soil temperature - units = K - dimensions = (horizontal_loop_extent,soil_vertical_dimension) +[smcref2] + standard_name = threshold_volume_fraction_of_condensed_water_in_soil + long_name = soil moisture threshold + units = frac + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout optional = F -[slc] - standard_name = volume_fraction_of_unfrozen_soil_moisture - long_name = liquid soil moisture +[min_lakeice] + standard_name = min_lake_ice_area_fraction + long_name = minimum lake ice value units = frac - dimensions = (horizontal_loop_extent,soil_vertical_dimension) + dimensions = () type = real kind = kind_phys - intent = inout - optional = F -[lsm_ruc] - standard_name = flag_for_ruc_land_surface_scheme - long_name = flag for RUC land surface model - units = flag - dimensions = () - type = integer - intent = in - optional = F -[lsm] - standard_name = flag_for_land_surface_scheme - long_name = flag for land surface model - units = flag - dimensions = () - type = integer - intent = in - optional = F -[land] - standard_name = flag_nonzero_land_surface_fraction - long_name = flag indicating presence of some land surface area fraction - units = flag - dimensions = (horizontal_loop_extent) - type = logical intent = in optional = F -[islimsk] - standard_name = sea_land_ice_mask - long_name = sea/land/ice mask (=0/1/2) - units = flag - dimensions = (horizontal_loop_extent) - type = integer - intent = in - optional = F -[rdlai] - standard_name = flag_for_reading_leaf_area_index_from_input - long_name = flag for reading leaf area index from initial conditions for RUC LSM - units = flag - dimensions = () - type = logical - intent = in - optional = F -[imp_physics] - standard_name = flag_for_microphysics_scheme - long_name = choice of microphysics scheme - units = flag - dimensions = () - type = integer - intent = in - optional = F -[imp_physics_gfdl] - standard_name = flag_for_gfdl_microphysics_scheme - long_name = choice of GFDL microphysics scheme - units = flag - dimensions = () - type = integer - intent = in - optional = F -[imp_physics_thompson] - standard_name = flag_for_thompson_microphysics_scheme - long_name = choice of Thompson microphysics scheme - units = flag - dimensions = () - type = integer - intent = in - optional = F -[smcwlt2] - standard_name = volume_fraction_of_condensed_water_in_soil_at_wilting_point - long_name = soil water fraction at wilting point +[min_seaice] + standard_name = min_sea_ice_area_fraction + long_name = minimum sea ice value units = frac - dimensions = (horizontal_loop_extent) + dimensions = () type = real kind = kind_phys - intent = inout + intent = in optional = F -[smcref2] - standard_name = threshold_volume_fraction_of_condensed_water_in_soil - long_name = soil moisture threshold +[oceanfrac] + standard_name = sea_area_fraction + long_name = fraction of horizontal grid area occupied by ocean units = frac dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = inout - optional = F -[do_mynnsfclay] - standard_name = do_mynnsfclay - long_name = flag to activate MYNN surface layer - units = flag - dimensions = () - type = logical intent = in optional = F [con_cp] @@ -761,18 +1048,18 @@ kind = kind_phys intent = in optional = F -[con_rv] - standard_name = gas_constant_water_vapor - long_name = ideal gas constant for water vapor +[con_rd] + standard_name = gas_constant_of_dry_air + long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () type = real kind = kind_phys intent = in optional = F -[con_rd] - standard_name = gas_constant_dry_air - long_name = ideal gas constant for dry air +[con_rv] + standard_name = gas_constant_water_vapor + long_name = ideal gas constant for water vapor units = J kg-1 K-1 dimensions = () type = real @@ -815,91 +1102,136 @@ kind = kind_phys intent = in optional = F -[weasd] - standard_name = water_equivalent_accumulated_snow_depth_over_land - long_name = water equiv of acc snow depth over land - units = mm +[ch_wat] + standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_water + long_name = surface exchange coeff heat surface exchange coeff heat & moisture over ocean moisture over water + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[tskin_wat] + standard_name = surface_skin_temperature_over_water_interstitial + long_name = surface skin temperature over water (temporary use as interstitial) + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[semisbase] + standard_name = baseline_surface_longwave_emissivity + long_name = baseline surface lw emissivity in fraction + units = frac dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout optional = F -[snwdph] - standard_name = surface_snow_thickness_water_equivalent_over_land - long_name = water equivalent snow depth over land - units = mm +[semis_lnd] + standard_name = surface_longwave_emissivity_over_land + long_name = surface lw emissivity in fraction over land + units = frac dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout optional = F -[tskin] - standard_name = surface_skin_temperature_over_land_interstitial - long_name = surface skin temperature over land use as interstitial - units = K +[semis_ice] + standard_name = surface_longwave_emissivity_over_ice + long_name = surface lw emissivity in fraction over ice + units = frac dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout optional = F -[tskin_wat] - standard_name = surface_skin_temperature_over_ocean_interstitial - long_name = surface skin temperature over ocean (temporary use as interstitial) - units = K +[sfalb_lnd] + standard_name = surface_diffused_shortwave_albedo_over_land + long_name = mean surface diffused sw albedo over land + units = frac dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout optional = F -[rainnc] - standard_name = lwe_thickness_of_explicit_rainfall_amount_from_previous_timestep - long_name = explicit rainfall from previous timestep - units = m +[sfalb_ice] + standard_name = surface_diffused_shortwave_albedo_over_ice + long_name = mean surface diffused sw albedo over ice + units = frac dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = in + intent = inout optional = F -[rainc] - standard_name = lwe_thickness_of_convective_precipitation_amount_from_previous_timestep - long_name = convective_precipitation_amount from previous timestep - units = m +[sncovr1_lnd] + standard_name = surface_snow_area_fraction_over_land + long_name = surface snow area fraction over land + units = frac dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = in + intent = inout optional = F -[ice] - standard_name = lwe_thickness_of_ice_amount_from_previous_timestep - long_name = ice amount from previous timestep - units = m +[weasd_lnd] + standard_name = water_equivalent_accumulated_snow_depth_over_land + long_name = water equiv of acc snow depth over land + units = mm dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = in + intent = inout optional = F -[snow] - standard_name = lwe_thickness_of_snow_amount_from_previous_timestep - long_name = snow amount from previous timestep - units = m +[snwdph_lnd] + standard_name = surface_snow_thickness_water_equivalent_over_land + long_name = water equivalent snow depth over land + units = mm dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = in + intent = inout optional = F -[graupel] - standard_name = lwe_thickness_of_graupel_amount_from_previous_timestep - long_name = graupel amount from previous timestep - units = m +[tskin_lnd] + standard_name = surface_skin_temperature_over_land_interstitial + long_name = surface skin temperature over land use as interstitial + units = K dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = in + intent = inout optional = F -[srflag] - standard_name = flag_for_precipitation_type - long_name = snow/rain flag for precipitation - units = flag +[sncovr1_ice] + standard_name = surface_snow_area_fraction_over_ice + long_name = surface snow area fraction over ice + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[weasd_ice] + standard_name = water_equivalent_accumulated_snow_depth_over_ice + long_name = water equiv of acc snow depth over ice + units = mm + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[snwdph_ice] + standard_name = surface_snow_thickness_water_equivalent_over_ice + long_name = water equivalent snow depth over ice + units = mm + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[tskin_ice] + standard_name = surface_skin_temperature_over_ice_interstitial + long_name = surface skin temperature over ice (temporary use as interstitial) + units = K dimensions = (horizontal_loop_extent) type = real kind = kind_phys @@ -909,7 +1241,16 @@ standard_name = volume_fraction_of_soil_moisture_for_land_surface_model long_name = volumetric fraction of soil moisture for lsm units = frac - dimensions = (horizontal_loop_extent,soil_vertical_dimension_for_land_surface_model) + dimensions = (horizontal_loop_extent,vertical_dimension_of_soil_internal_to_land_surface_scheme) + type = real + kind = kind_phys + intent = inout + optional = F +[tsice] + standard_name = temperature_in_ice_layer + long_name = sea ice internal temperature + units = K + dimensions = (horizontal_loop_extent,vertical_dimension_of_sea_ice) type = real kind = kind_phys intent = inout @@ -918,7 +1259,7 @@ standard_name = soil_temperature_for_land_surface_model long_name = soil temperature for land surface model units = K - dimensions = (horizontal_loop_extent,soil_vertical_dimension_for_land_surface_model) + dimensions = (horizontal_loop_extent,vertical_dimension_of_soil_internal_to_land_surface_scheme) type = real kind = kind_phys intent = inout @@ -927,16 +1268,16 @@ standard_name = volume_fraction_of_unfrozen_soil_moisture_for_land_surface_model long_name = volume fraction of unfrozen soil moisture for lsm units = frac - dimensions = (horizontal_loop_extent,soil_vertical_dimension_for_land_surface_model) + dimensions = (horizontal_loop_extent,vertical_dimension_of_soil_internal_to_land_surface_scheme) type = real kind = kind_phys intent = inout optional = F [keepfr] - standard_name = flag_for_frozen_soil_physics + standard_name = control_for_frozen_soil_physics long_name = flag for frozen soil physics (RUC) units = flag - dimensions = (horizontal_loop_extent,soil_vertical_dimension_for_land_surface_model) + dimensions = (horizontal_loop_extent,vertical_dimension_of_soil_internal_to_land_surface_scheme) type = real kind = kind_phys intent = inout @@ -945,7 +1286,7 @@ standard_name = volume_fraction_of_frozen_soil_moisture_for_land_surface_model long_name = volume fraction of frozen soil moisture for lsm units = frac - dimensions = (horizontal_loop_extent,soil_vertical_dimension_for_land_surface_model) + dimensions = (horizontal_loop_extent,vertical_dimension_of_soil_internal_to_land_surface_scheme) type = real kind = kind_phys intent = inout @@ -966,9 +1307,9 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = out + intent = inout optional = F -[tsurf] +[tsurf_lnd] standard_name = surface_skin_temperature_after_iteration_over_land long_name = surface skin temperature after iteration over land units = K @@ -977,17 +1318,17 @@ kind = kind_phys intent = inout optional = F -[tsnow] - standard_name = snow_temperature_bottom_first_layer - long_name = snow temperature at the bottom of first snow layer +[tsnow_lnd] + standard_name = temperature_in_surface_snow_at_surface_adjacent_layer_over_land + long_name = snow temperature at the bottom of first snow layer over land units = K dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout optional = F -[zorl] - standard_name = surface_roughness_length_over_land_interstitial +[z0rl_lnd] + standard_name = surface_roughness_length_over_land long_name = surface roughness length over land (temporary use as interstitial) units = cm dimensions = (horizontal_loop_extent) @@ -995,52 +1336,25 @@ kind = kind_phys intent = inout optional = F -[sfcqc] - standard_name = cloud_condensed_water_mixing_ratio_at_surface - long_name = moist cloud water mixing ratio at surface +[sfcqc_lnd] + standard_name = cloud_condensed_water_mixing_ratio_at_surface_over_land + long_name = moist cloud water mixing ratio at surface over land units = kg kg-1 dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout optional = F -[sfcdew] - standard_name = surface_condensation_mass - long_name = surface condensation mass - units = kg m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = inout - optional = F -[tice] - standard_name = sea_ice_temperature_interstitial - long_name = sea ice surface skin temperature use as interstitial - units = K - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = inout - optional = F -[sfcqv] - standard_name = water_vapor_mixing_ratio_at_surface - long_name = water vapor mixing ratio at surface +[sfcqv_lnd] + standard_name = water_vapor_mixing_ratio_at_surface_over_land + long_name = water vapor mixing ratio at surface over land units = kg kg-1 dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout optional = F -[sncovr1] - standard_name = surface_snow_area_fraction_over_land - long_name = surface snow area fraction - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = inout - optional = F -[qsurf] +[qsurf_lnd] standard_name = surface_specific_humidity_over_land long_name = surface air saturation specific humidity over land units = kg kg-1 @@ -1049,50 +1363,32 @@ kind = kind_phys intent = inout optional = F -[gflux] +[gflux_lnd] standard_name = upward_heat_flux_in_soil_over_land long_name = soil heat flux over land units = W m-2 dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = out - optional = F -[drain] - standard_name = subsurface_runoff_flux - long_name = subsurface runoff flux - units = kg m-2 s-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = out + intent = inout optional = F -[evap] +[evap_lnd] standard_name = kinematic_surface_upward_latent_heat_flux_over_land long_name = kinematic surface upward evaporation flux over land units = kg kg-1 m s-1 dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = out + intent = inout optional = F -[hflx] +[hflx_lnd] standard_name = kinematic_surface_upward_sensible_heat_flux_over_land long_name = kinematic surface upward sensible heat flux over land units = K m s-1 dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = out - optional = F -[rhosnf] - standard_name = density_of_frozen_precipitation - long_name = density of frozen precipitation - units = kg m-3 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = out + intent = inout optional = F [runof] standard_name = surface_runoff_flux @@ -1101,7 +1397,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = out + intent = inout optional = F [runoff] standard_name = total_runoff @@ -1121,23 +1417,32 @@ kind = kind_phys intent = inout optional = F -[chh] - standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_land - long_name = thermal exchange coefficient over land +[drain] + standard_name = subsurface_runoff_flux + long_name = subsurface runoff flux units = kg m-2 s-1 dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout optional = F -[cmm] - standard_name = surface_drag_wind_speed_for_momentum_in_air_over_land - long_name = momentum exchange coefficient over land - units = m s-1 +[cm_lnd] + standard_name = surface_drag_coefficient_for_momentum_in_air_over_land + long_name = surface exchange coeff for momentum over land + units = none dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = inout + intent = in + optional = F +[ch_lnd] + standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_land + long_name = surface exchange coeff heat & moisture over land + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in optional = F [evbs] standard_name = soil_upward_latent_heat_flux @@ -1146,7 +1451,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = out + intent = inout optional = F [evcw] standard_name = canopy_upward_latent_heat_flux @@ -1155,16 +1460,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = out - optional = F -[sbsno] - standard_name = snow_deposition_sublimation_upward_latent_heat_flux - long_name = latent heat flux from snow depo/subl - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = out + intent = inout optional = F [stm] standard_name = soil_moisture_content @@ -1184,26 +1480,285 @@ kind = kind_phys intent = inout optional = F -[acsnow] - standard_name = accumulated_water_equivalent_of_frozen_precip - long_name = snow water equivalent of run-total frozen precip +[snowfallac_lnd] + standard_name = surface_snow_amount_over_land + long_name = run-total snow accumulation on the ground over land units = kg m-2 dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout optional = F -[snowfallac] - standard_name = total_accumulated_snowfall - long_name = run-total snow accumulation on the ground +[albdvis_lnd] + standard_name = surface_albedo_direct_visible_over_land + long_name = direct surface albedo visible band over land + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = out + optional = F +[albdnir_lnd] + standard_name = surface_albedo_direct_NIR_over_land + long_name = direct surface albedo NIR band over land + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = out + optional = F +[albivis_lnd] + standard_name = surface_albedo_diffuse_visible_over_land + long_name = diffuse surface albedo visible band over land + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = out + optional = F +[albinir_lnd] + standard_name = surface_albedo_diffuse_NIR_over_land + long_name = diffuse surface albedo NIR band over land + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = out + optional = F +[sfcqc_ice] + standard_name = cloud_condensed_water_mixing_ratio_at_surface_over_ice + long_name = moist cloud water mixing ratio at surface over ice + units = kg kg-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[sfcqv_ice] + standard_name = water_vapor_mixing_ratio_at_surface_over_ice + long_name = water vapor mixing ratio at surface over ice + units = kg kg-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[tice] + standard_name = sea_ice_temperature_interstitial + long_name = sea ice surface skin temperature use as interstitial + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[tsurf_ice] + standard_name = surface_skin_temperature_after_iteration_over_ice + long_name = surface skin temperature after iteration over ice + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[tsnow_ice] + standard_name = temperature_in_surface_snow_at_surface_adjacent_layer_over_ice + long_name = snow temperature at the bottom of first snow layer over ice + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[z0rl_ice] + standard_name = surface_roughness_length_over_ice + long_name = surface roughness length over ice (temporary use as interstitial) + units = cm + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[qsurf_ice] + standard_name = surface_specific_humidity_over_ice + long_name = surface air saturation specific humidity over ice + units = kg kg-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[gflux_ice] + standard_name = upward_heat_flux_in_soil_over_ice + long_name = soil heat flux over ice + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[evap_ice] + standard_name = kinematic_surface_upward_latent_heat_flux_over_ice + long_name = kinematic surface upward latent heat flux over ice + units = kg kg-1 m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[ep1d_ice] + standard_name = surface_upward_potential_latent_heat_flux_over_ice + long_name = surface upward potential latent heat flux over ice + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[hflx_ice] + standard_name = kinematic_surface_upward_sensible_heat_flux_over_ice + long_name = kinematic surface upward sensible heat flux over ice + units = K m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[cm_ice] + standard_name = surface_drag_coefficient_for_momentum_in_air_over_ice + long_name = surface exchange coeff for momentum over ice + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[ch_ice] + standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ice + long_name = surface exchange coeff heat & moisture over ice + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[snowfallac_ice] + standard_name = surface_snow_amount_over_ice + long_name = run-total snow accumulation on the ground over ice units = kg m-2 dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout optional = F +[albdvis_ice] + standard_name = surface_albedo_direct_visible_over_ice + long_name = direct surface albedo visible band over ice + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = out + optional = F +[albdnir_ice] + standard_name = surface_albedo_direct_NIR_over_ice + long_name = direct surface albedo NIR band over ice + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = out + optional = F +[albivis_ice] + standard_name = surface_albedo_diffuse_visible_over_ice + long_name = diffuse surface albedo visible band over ice + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = out + optional = F +[albinir_ice] + standard_name = surface_albedo_diffuse_NIR_over_ice + long_name = diffuse surface albedo NIR band over ice + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = out + optional = F +[rhosnf] + standard_name = frozen_precipitation_density + long_name = density of frozen precipitation + units = kg m-3 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[sbsno] + standard_name = snow_deposition_sublimation_upward_latent_heat_flux + long_name = latent heat flux from snow depo/subl + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[cmm_lnd] + standard_name = surface_drag_wind_speed_for_momentum_in_air_over_land + long_name = momentum exchange coefficient over land + units = m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[chh_lnd] + standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_land + long_name = thermal exchange coefficient over land + units = kg m-2 s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[cmm_ice] + standard_name = surface_drag_wind_speed_for_momentum_in_air_over_ice + long_name = momentum exchange coefficient over ice + units = m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[chh_ice] + standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_ice + long_name = thermal exchange coefficient over ice + units = kg m-2 s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[flag_iter] + standard_name = flag_for_iteration + long_name = flag for iteration + units = flag + dimensions = (horizontal_loop_extent) + type = logical + intent = in + optional = F +[flag_guess] + standard_name = flag_for_guess_run + long_name = flag for guess run + units = flag + dimensions = (horizontal_loop_extent) + type = logical + intent = in + optional = F [flag_init] - standard_name = flag_for_first_time_step + standard_name = flag_for_first_timestep long_name = flag signaling first time step for time integration loop units = flag dimensions = () @@ -1218,6 +1773,22 @@ type = logical intent = in optional = F +[flag_cice] + standard_name = flag_for_cice + long_name = flag for cice + units = flag + dimensions = (horizontal_loop_extent) + type = logical + intent = in + optional = F +[frac_grid] + standard_name = flag_for_fractional_landmask + long_name = flag for fractional grid + units = flag + dimensions = () + type = logical + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/sfc_noah_wrfv4.F90 b/physics/sfc_noah_wrfv4.F90 index c435b2d38..038adf1c6 100644 --- a/physics/sfc_noah_wrfv4.F90 +++ b/physics/sfc_noah_wrfv4.F90 @@ -94,7 +94,8 @@ end subroutine sfc_noah_wrfv4_finalize !! !> \section general_noah_wrfv4_drv NOAH LSM WRFv4 General Algorithm !> @{ - subroutine sfc_noah_wrfv4_run (im, isice, flag_lsm, flag_lsm_glacier, srflag, isurban, rdlai, & + subroutine sfc_noah_wrfv4_run ( & + im, isice, flag_lsm, flag_lsm_glacier, srflag, isurban, rdlai, & ua_phys, usemonalb, aoasis, fasdas, dt, zlvl, & nsoil, sthick, lwdn, soldn, solnet, sfcprs, prcp, sfctmp, q1k, & th1, qs1, dqsdt2, vegtyp, soiltyp, slopetyp, shdfac, shmin, & @@ -118,20 +119,20 @@ subroutine sfc_noah_wrfv4_run (im, isice, flag_lsm, flag_lsm_glacier, srflag, is real(kind=kind_phys), intent(in) :: dt, cp, rd, sigma, cph2o, cpice, lsubf - integer, dimension(im), intent(in) :: vegtyp, soiltyp, slopetyp - logical, dimension(im), intent(in) :: flag_lsm, flag_lsm_glacier - real(kind=kind_phys), dimension(im), intent(in) :: srflag, zlvl, lwdn, soldn, solnet, & + integer, dimension(:), intent(in) :: vegtyp, soiltyp, slopetyp + logical, dimension(:), intent(in) :: flag_lsm, flag_lsm_glacier + real(kind=kind_phys), dimension(:), intent(in) :: srflag, zlvl, lwdn, soldn, solnet, & sfcprs, prcp, sfctmp, q1k, th1, qs1, & dqsdt2, shmin, shmax, snoalb, tbot - real(kind=kind_phys), dimension(nsoil), intent(in) :: sthick + real(kind=kind_phys), dimension(:), intent(in) :: sthick - real(kind=kind_phys), dimension(im), intent(inout) :: shdfac, albbrd, z0brd, z0k, emissi, & + real(kind=kind_phys), dimension(:), intent(inout) :: shdfac, albbrd, z0brd, z0k, emissi, & cmc, t1, snowhk, sneqv, chk, flx1, & flx2, flx3, ribb, snotime - real(kind=kind_phys), dimension(im,nsoil), intent(inout) :: stc, smc, swc + real(kind=kind_phys), dimension(:,:), intent(inout) :: stc, smc, swc !variables that are intent(out) in module_sf_noahlsm, but are inout here due to being set within an IF statement - real(kind=kind_phys), dimension(im), intent(inout) :: embrd, sheat, eta, ec, & + real(kind=kind_phys), dimension(:), intent(inout) :: embrd, sheat, eta, ec, & edir, ett, esnow, etp, ssoil, sncovr, & runoff1, runoff2, soilm, qsurf, smcwlt, & smcref, smcmax diff --git a/physics/sfc_noah_wrfv4.meta b/physics/sfc_noah_wrfv4.meta index 1895c56bf..e0f2538f6 100644 --- a/physics/sfc_noah_wrfv4.meta +++ b/physics/sfc_noah_wrfv4.meta @@ -8,7 +8,7 @@ name = sfc_noah_wrfv4_init type = scheme [lsm] - standard_name = flag_for_land_surface_scheme + standard_name = control_for_land_surface_scheme long_name = flag for land surface model units = flag dimensions = () @@ -16,7 +16,7 @@ intent = in optional = F [lsm_noah_wrfv4] - standard_name = flag_for_noah_wrfv4_land_surface_scheme + standard_name = identifier_for_noah_wrfv4_land_surface_scheme long_name = flag for NOAH WRFv4 land surface model units = flag dimensions = () @@ -24,7 +24,7 @@ intent = in optional = F [nsoil] - standard_name = soil_vertical_dimension + standard_name = vertical_dimension_of_soil long_name = soil vertical layer dimension units = count dimensions = () @@ -40,7 +40,7 @@ intent = in optional = F [fasdas] - standard_name = flag_flux_adjusting_surface_data_assimilation_system + standard_name = control_for_flux_adjusting_surface_data_assimilation_system long_name = flag to use the flux adjusting surface data assimilation system for NOAH LSM WRFv4 (see module_sf_noahlsm.F) units = flag dimensions = () @@ -108,7 +108,7 @@ intent = in optional = F [isice] - standard_name = ice_vegetation_category + standard_name = index_of_ice_vegetation_category long_name = index of the permanent snow/ice category in the chosen vegetation dataset units = index dimensions = () @@ -132,7 +132,7 @@ intent = in optional = F [srflag] - standard_name = flag_for_precipitation_type + standard_name = precipitation_type long_name = flag for snow or rain precipitation units = flag dimensions = (horizontal_loop_extent) @@ -141,7 +141,7 @@ intent = in optional = F [isurban] - standard_name = urban_vegetation_category + standard_name = index_of_urban_vegetation_category long_name = index of the urban vegetation category in the chosen vegetation dataset units = index dimensions = () @@ -165,7 +165,7 @@ intent = in optional = F [usemonalb] - standard_name = flag_for_reading_surface_diffused_shortwave_albedo_from_input + standard_name = flag_for_reading_surface_albedo_for_diffused_shortwave_from_input long_name = flag for reading surface diffused shortwave albedo for NOAH LSM WRFv4 (see module_sf_noahlsm.F) units = flag dimensions = () @@ -173,7 +173,7 @@ intent = in optional = F [aoasis] - standard_name = potential_evaporation_multiplicative_factor + standard_name = multiplicative_tuning_parameter_for_potential_evaporation long_name = potential evaporation multiplicative factor for NOAH LSM WRFv4 (see module_sf_noahlsm.F) units = none dimensions = () @@ -182,7 +182,7 @@ intent = in optional = F [fasdas] - standard_name = flag_flux_adjusting_surface_data_assimilation_system + standard_name = control_for_flux_adjusting_surface_data_assimilation_system long_name = flag to use the flux adjusting surface data assimilation system for NOAH LSM WRFv4 (see module_sf_noahlsm.F) units = flag dimensions = () @@ -190,7 +190,7 @@ intent = in optional = F [dt] - standard_name = time_step_for_dynamics + standard_name = timestep_for_dynamics long_name = dynamics timestep units = s dimensions = () @@ -208,7 +208,7 @@ intent = in optional = F [nsoil] - standard_name = soil_vertical_dimension + standard_name = vertical_dimension_of_soil long_name = soil vertical layer dimension units = count dimensions = () @@ -216,10 +216,10 @@ intent = in optional = F [sthick] - standard_name = soil_layer_thickness + standard_name = thickness_of_soil_layers_for_land_surface_model long_name = soil layer thickness units = m - dimensions = (soil_vertical_dimension) + dimensions = (vertical_dimension_of_soil) type = real kind = kind_phys intent = in @@ -252,7 +252,7 @@ intent = in optional = F [sfcprs] - standard_name = air_pressure_at_lowest_model_layer + standard_name = air_pressure_at_surface_adjacent_layer long_name = Model layer 1 mean pressure units = Pa dimensions = (horizontal_loop_extent) @@ -270,7 +270,7 @@ intent = in optional = F [sfctmp] - standard_name = air_temperature_at_lowest_model_layer + standard_name = air_temperature_at_surface_adjacent_layer long_name = 1st model layer air temperature units = K dimensions = (horizontal_loop_extent) @@ -348,7 +348,7 @@ intent = inout optional = F [shmin] - standard_name = minimum_vegetation_area_fraction + standard_name = min_vegetation_area_fraction long_name = min fractional coverage of green vegetation units = frac dimensions = (horizontal_loop_extent) @@ -357,7 +357,7 @@ intent = in optional = F [shmax] - standard_name = maximum_vegetation_area_fraction + standard_name = max_vegetation_area_fraction long_name = max fractional coverage of green vegetation units = frac dimensions = (horizontal_loop_extent) @@ -366,7 +366,7 @@ intent = in optional = F [albbrd] - standard_name = surface_diffused_shortwave_albedo + standard_name = surface_albedo_for_diffused_shortwave_on_radiation_timestep long_name = mean surface diffused shortwave albedo units = frac dimensions = (horizontal_loop_extent) @@ -375,7 +375,7 @@ intent = inout optional = F [snoalb] - standard_name = upper_bound_on_max_albedo_over_deep_snow + standard_name = upper_bound_of_max_albedo_assuming_deep_snow long_name = maximum snow albedo units = frac dimensions = (horizontal_loop_extent) @@ -402,7 +402,7 @@ intent = inout optional = F [z0k] - standard_name = surface_roughness_length_over_land_interstitial + standard_name = surface_roughness_length_over_land long_name = surface roughness length over land (temporary use as interstitial) units = m dimensions = (horizontal_loop_extent) @@ -450,25 +450,25 @@ standard_name = soil_temperature long_name = soil temperature units = K - dimensions = (horizontal_loop_extent,soil_vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension_of_soil) type = real kind = kind_phys intent = inout optional = F [smc] - standard_name = volume_fraction_of_soil_moisture + standard_name = volume_fraction_of_condensed_water_in_soil long_name = volumetric fraction of soil moisture units = frac - dimensions = (horizontal_loop_extent,soil_vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension_of_soil) type = real kind = kind_phys intent = inout optional = F [swc] - standard_name = volume_fraction_of_unfrozen_soil_moisture + standard_name = volume_fraction_of_unfrozen_water_in_soil long_name = volume fraction of unfrozen soil moisture units = frac - dimensions = (horizontal_loop_extent,soil_vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension_of_soil) type = real kind = kind_phys intent = inout @@ -510,7 +510,7 @@ intent = in optional = F [rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -735,7 +735,7 @@ intent = inout optional = F [opt_thcnd] - standard_name = flag_for_thermal_conductivity_option + standard_name = control_for_land_surface_scheme_thermal_conductivity_option long_name = choice for thermal conductivity option (see module_sf_noahlsm) units = index dimensions = () @@ -749,7 +749,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = in + intent = inout optional = F [errmsg] standard_name = ccpp_error_message diff --git a/physics/sfc_noah_wrfv4_interstitial.F90 b/physics/sfc_noah_wrfv4_interstitial.F90 index b30f8a131..7b37de568 100644 --- a/physics/sfc_noah_wrfv4_interstitial.F90 +++ b/physics/sfc_noah_wrfv4_interstitial.F90 @@ -144,21 +144,21 @@ subroutine sfc_noah_wrfv4_pre_run (im, nsoil, ialb, isice, land, & ! Note that the version of NOAH LSM expected here is "generic" - there are no urban, fasdas, or ! or University of Arizona(?) additions. - integer, intent(in) :: im, nsoil, ialb, isice - logical, intent(in) :: restart, first_time_step - real(kind=kind_phys), intent(in) :: dt, rhowater, rd, rvrdm1, eps, epsm1 - - logical, dimension(im), intent(in) :: flag_guess, flag_iter, land - real(kind=kind_phys), dimension(im), intent(in) :: sfcprs, tprcp, sfctmp, q1, prslki, wind, cm, ch, snwdph - real(kind=kind_phys), dimension(im), intent(in) :: weasd, tsfc, vtype - real(kind=kind_phys), dimension(im,nsoil), intent(in) :: smc, stc, slc - - logical, dimension(im), intent(inout) :: flag_lsm, flag_lsm_glacier - real(kind=kind_phys), dimension(im), intent(inout) :: snoalb, prcp, q2k, rho1, qs1, th1, dqsdt2, canopy, cmc, snowhk, chk, cmm, chh - real(kind=kind_phys), dimension(im), intent(inout) :: weasd_save, snwdph_save, tsfc_save, canopy_save - real(kind=kind_phys), dimension(im,nsoil), intent(inout) :: smc_save, stc_save, slc_save - real(kind=kind_phys), dimension(im), intent(inout) :: ep, evap, hflx, gflux, drain, evbs, evcw, trans, sbsno, snowc, snohf - real(kind=kind_phys), dimension(nsoil), intent(inout) :: sthick + integer, intent(in) :: im, nsoil, ialb, isice + logical, intent(in) :: restart, first_time_step + real(kind=kind_phys), intent(in) :: dt, rhowater, rd, rvrdm1, eps, epsm1 + + logical, dimension(:), intent(in) :: flag_guess, flag_iter, land + real(kind=kind_phys), dimension(:), intent(in) :: sfcprs, tprcp, sfctmp, q1, prslki, wind, cm, ch, snwdph + real(kind=kind_phys), dimension(:), intent(in) :: weasd, tsfc, vtype + real(kind=kind_phys), dimension(:,:), intent(in) :: smc, stc, slc + + logical, dimension(:), intent(inout) :: flag_lsm, flag_lsm_glacier + real(kind=kind_phys), dimension(:), intent(inout) :: snoalb, prcp, q2k, rho1, qs1, th1, dqsdt2, canopy, cmc, snowhk, chk, cmm, chh + real(kind=kind_phys), dimension(:), intent(inout) :: weasd_save, snwdph_save, tsfc_save, canopy_save + real(kind=kind_phys), dimension(:,:), intent(inout) :: smc_save, stc_save, slc_save + real(kind=kind_phys), dimension(:), intent(inout) :: ep, evap, hflx, gflux, drain, evbs, evcw, trans, sbsno, snowc, snohf + real(kind=kind_phys), dimension(:), intent(inout) :: sthick character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -688,17 +688,17 @@ subroutine sfc_noah_wrfv4_post_run (im, nsoil, land, flag_guess, flag_lsm, & implicit none integer, intent(in) :: im, nsoil - logical, dimension(im), intent(in) :: land, flag_guess, flag_lsm + logical, dimension(:), intent(in) :: land, flag_guess, flag_lsm real(kind=kind_phys), intent(in) :: rhowater, cp, hvap - real(kind=kind_phys), dimension(im), intent(in) :: cmc, rho1, sheat, eta, & + real(kind=kind_phys), dimension(:), intent(in) :: cmc, rho1, sheat, eta, & flx1, flx2, flx3, sncovr, runoff1, runoff2, soilm, snowhk - real(kind=kind_phys), dimension(im), intent(in) :: weasd_save, snwdph_save, tsfc_save, tsurf, canopy_save, smcmax - real(kind=kind_phys), dimension(im,nsoil), intent(in) :: smc_save, stc_save, slc_save + real(kind=kind_phys), dimension(:), intent(in) :: weasd_save, snwdph_save, tsfc_save, tsurf, canopy_save, smcmax + real(kind=kind_phys), dimension(:,:), intent(in) :: smc_save, stc_save, slc_save - real(kind=kind_phys), dimension(im), intent(inout) :: canopy, shflx, lhflx, & + real(kind=kind_phys), dimension(:), intent(inout) :: canopy, shflx, lhflx, & snohf, snowc, runoff, drain, stm, wet1 - real(kind=kind_phys), dimension(im), intent(inout) :: weasd, snwdph, tsfc - real(kind=kind_phys), dimension(im, nsoil), intent(inout) :: smc, stc, slc + real(kind=kind_phys), dimension(:), intent(inout) :: weasd, snwdph, tsfc + real(kind=kind_phys), dimension(:,:), intent(inout) :: smc, stc, slc character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg diff --git a/physics/sfc_noah_wrfv4_interstitial.meta b/physics/sfc_noah_wrfv4_interstitial.meta index b6ebcfe39..114348ac1 100644 --- a/physics/sfc_noah_wrfv4_interstitial.meta +++ b/physics/sfc_noah_wrfv4_interstitial.meta @@ -8,7 +8,7 @@ name = sfc_noah_wrfv4_pre_init type = scheme [lsm] - standard_name = flag_for_land_surface_scheme + standard_name = control_for_land_surface_scheme long_name = flag for land surface model units = flag dimensions = () @@ -16,7 +16,7 @@ intent = in optional = F [lsm_noah_wrfv4] - standard_name = flag_for_noah_wrfv4_land_surface_scheme + standard_name = identifier_for_noah_wrfv4_land_surface_scheme long_name = flag for NOAH WRFv4 land surface model units = flag dimensions = () @@ -24,7 +24,7 @@ intent = in optional = F [veg_data_choice] - standard_name = vegetation_type_dataset_choice + standard_name = control_for_vegetation_dataset long_name = land use dataset choice units = index dimensions = () @@ -32,7 +32,7 @@ intent = in optional = F [soil_data_choice] - standard_name = soil_type_dataset_choice + standard_name = control_for_soil_type_dataset long_name = soil type dataset choice units = index dimensions = () @@ -40,7 +40,7 @@ intent = in optional = F [isurban] - standard_name = urban_vegetation_category + standard_name = index_of_urban_vegetation_category long_name = index of the urban vegetation category in the chosen vegetation dataset units = index dimensions = () @@ -48,7 +48,7 @@ intent = inout optional = F [isice] - standard_name = ice_vegetation_category + standard_name = index_of_ice_vegetation_category long_name = index of the permanent snow/ice category in the chosen vegetation dataset units = index dimensions = () @@ -56,7 +56,7 @@ intent = inout optional = F [iswater] - standard_name = water_vegetation_category + standard_name = index_of_water_vegetation_category long_name = index of the water body vegetation category in the chosen vegetation dataset units = index dimensions = () @@ -116,7 +116,7 @@ intent = in optional = F [nsoil] - standard_name = soil_vertical_dimension + standard_name = vertical_dimension_of_soil long_name = soil vertical layer dimension units = count dimensions = () @@ -124,7 +124,7 @@ intent = in optional = F [ialb] - standard_name = flag_for_using_climatology_albedo + standard_name = control_for_surface_albedo long_name = flag for using climatology alb, based on sfc type units = flag dimensions = () @@ -132,7 +132,7 @@ intent = in optional = F [isice] - standard_name = ice_vegetation_category + standard_name = index_of_ice_vegetation_category long_name = index of the permanent snow/ice category in the chosen vegetation dataset units = index dimensions = () @@ -172,7 +172,7 @@ intent = in optional = F [first_time_step] - standard_name = flag_for_first_time_step + standard_name = flag_for_first_timestep long_name = flag for first time step for time integration loop (cold/warmstart) units = flag dimensions = () @@ -196,7 +196,7 @@ intent = inout optional = F [dt] - standard_name = time_step_for_dynamics + standard_name = timestep_for_dynamics long_name = dynamics timestep units = s dimensions = () @@ -205,7 +205,7 @@ intent = in optional = F [rhowater] - standard_name = liquid_water_density + standard_name = fresh_liquid_water_density_at_0c long_name = density of liquid water units = kg m-3 dimensions = () @@ -214,7 +214,7 @@ intent = in optional = F [rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -250,7 +250,7 @@ intent = in optional = F [sfcprs] - standard_name = air_pressure_at_lowest_model_layer + standard_name = air_pressure_at_surface_adjacent_layer long_name = Model layer 1 mean pressure units = Pa dimensions = (horizontal_loop_extent) @@ -268,7 +268,7 @@ intent = in optional = F [sfctmp] - standard_name = air_temperature_at_lowest_model_layer + standard_name = air_temperature_at_surface_adjacent_layer long_name = 1st model layer air temperature units = K dimensions = (horizontal_loop_extent) @@ -277,7 +277,7 @@ intent = in optional = F [q1] - standard_name = water_vapor_specific_humidity_at_lowest_model_layer + standard_name = specific_humidity_at_surface_adjacent_layer long_name = 1st model layer specific humidity units = kg kg-1 dimensions = (horizontal_loop_extent) @@ -358,10 +358,10 @@ intent = in optional = F [smc] - standard_name = volume_fraction_of_soil_moisture + standard_name = volume_fraction_of_condensed_water_in_soil long_name = volumetric fraction of soil moisture units = frac - dimensions = (horizontal_loop_extent,soil_vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension_of_soil) type = real kind = kind_phys intent = in @@ -370,22 +370,22 @@ standard_name = soil_temperature long_name = soil temperature units = K - dimensions = (horizontal_loop_extent,soil_vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension_of_soil) type = real kind = kind_phys intent = in optional = F [slc] - standard_name = volume_fraction_of_unfrozen_soil_moisture + standard_name = volume_fraction_of_unfrozen_water_in_soil long_name = liquid soil moisture units = frac - dimensions = (horizontal_loop_extent,soil_vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension_of_soil) type = real kind = kind_phys intent = in optional = F [snoalb] - standard_name = upper_bound_on_max_albedo_over_deep_snow + standard_name = upper_bound_of_max_albedo_assuming_deep_snow long_name = maximum snow albedo units = frac dimensions = (horizontal_loop_extent) @@ -541,7 +541,7 @@ standard_name = volume_fraction_of_soil_moisture_save long_name = total soil moisture before entering a physics scheme units = frac - dimensions = (horizontal_loop_extent,soil_vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension_of_soil) type = real kind = kind_phys intent = inout @@ -550,7 +550,7 @@ standard_name = soil_temperature_save long_name = soil temperature before entering a physics scheme units = K - dimensions = (horizontal_loop_extent,soil_vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension_of_soil) type = real kind = kind_phys intent = inout @@ -559,7 +559,7 @@ standard_name = volume_fraction_of_unfrozen_soil_moisture_save long_name = liquid soil moisture before entering a physics scheme units = frac - dimensions = (horizontal_loop_extent,soil_vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension_of_soil) type = real kind = kind_phys intent = inout @@ -664,10 +664,10 @@ intent = inout optional = F [sthick] - standard_name = soil_layer_thickness + standard_name = thickness_of_soil_layers_for_land_surface_model long_name = soil layer thickness units = m - dimensions = (soil_vertical_dimension) + dimensions = (vertical_dimension_of_soil) type = real kind = kind_phys intent = inout @@ -709,7 +709,7 @@ intent = in optional = F [nsoil] - standard_name = soil_vertical_dimension + standard_name = vertical_dimension_of_soil long_name = soil vertical layer dimension units = count dimensions = () @@ -741,7 +741,7 @@ intent = in optional = F [rhowater] - standard_name = liquid_water_density + standard_name = fresh_liquid_water_density_at_0c long_name = density of liquid water units = kg m-3 dimensions = () @@ -924,7 +924,7 @@ standard_name = volume_fraction_of_soil_moisture_save long_name = total soil moisture before entering a physics scheme units = frac - dimensions = (horizontal_loop_extent,soil_vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension_of_soil) type = real kind = kind_phys intent = in @@ -933,7 +933,7 @@ standard_name = soil_temperature_save long_name = soil temperature before entering a physics scheme units = K - dimensions = (horizontal_loop_extent,soil_vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension_of_soil) type = real kind = kind_phys intent = in @@ -942,7 +942,7 @@ standard_name = volume_fraction_of_unfrozen_soil_moisture_save long_name = liquid soil moisture before entering a physics scheme units = frac - dimensions = (horizontal_loop_extent,soil_vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension_of_soil) type = real kind = kind_phys intent = in @@ -1056,10 +1056,10 @@ intent = inout optional = F [smc] - standard_name = volume_fraction_of_soil_moisture + standard_name = volume_fraction_of_condensed_water_in_soil long_name = volumetric fraction of soil moisture units = frac - dimensions = (horizontal_loop_extent,soil_vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension_of_soil) type = real kind = kind_phys intent = inout @@ -1068,16 +1068,16 @@ standard_name = soil_temperature long_name = soil temperature units = K - dimensions = (horizontal_loop_extent,soil_vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension_of_soil) type = real kind = kind_phys intent = inout optional = F [slc] - standard_name = volume_fraction_of_unfrozen_soil_moisture + standard_name = volume_fraction_of_unfrozen_water_in_soil long_name = liquid soil moisture units = frac - dimensions = (horizontal_loop_extent,soil_vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension_of_soil) type = real kind = kind_phys intent = inout diff --git a/physics/sfc_noahmp_drv.F90 b/physics/sfc_noahmp_drv.F90 new file mode 100644 index 000000000..129601e94 --- /dev/null +++ b/physics/sfc_noahmp_drv.F90 @@ -0,0 +1,1538 @@ +#define CCPP +!> \file sfc_noahmp_drv.F90 +!! This file contains the NoahMP land surface scheme driver. + +!>\defgroup NoahMP_LSM NoahMP LSM Model +!! \brief This is the NoahMP LSM driver module, with the functionality of +!! preparing variables to run the NoahMP LSM subroutine noahmp_sflx(), calling NoahMP LSM and post-processing +!! variables for return to the parent model suite including unit conversion, as well +!! as diagnotics calculation. + +!> This module contains the CCPP-compliant NoahMP land surface model driver. + module noahmpdrv + + implicit none + + private + + public :: noahmpdrv_init, noahmpdrv_run, noahmpdrv_finalize + + contains + +!> \ingroup NoahMP_LSM +!! \brief This subroutine is called during the CCPP initialization phase and calls set_soilveg() to +!! initialize soil and vegetation parameters for the chosen soil and vegetation data sources. +!! \section arg_table_noahmpdrv_init Argument Table +!! \htmlinclude noahmpdrv_init.html +!! + subroutine noahmpdrv_init(lsm, lsm_noahmp, me, isot, ivegsrc, & + nlunit, pores, resid, & + errmsg, errflg) + + use machine, only: kind_phys + use set_soilveg_mod, only: set_soilveg + use namelist_soilveg + + implicit none + integer, intent(in) :: lsm + integer, intent(in) :: lsm_noahmp + integer, intent(in) :: me, isot, ivegsrc, nlunit + + real (kind=kind_phys), dimension(:), intent(out) :: pores, resid + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + ! Consistency checks + if (lsm/=lsm_noahmp) then + write(errmsg,'(*(a))') 'Logic error: namelist choice of ', & + & 'LSM is different from Noah' + errflg = 1 + return + end if + + if (ivegsrc /= 1) then + errmsg = 'The NOAHMP LSM expects that the ivegsrc physics '// & + 'namelist parameter is 1. Exiting...' + errflg = 1 + return + end if + if (isot /= 1) then + errmsg = 'The NOAHMP LSM expects that the isot physics '// & + 'namelist parameter is 1. Exiting...' + errflg = 1 + return + end if + + !--- initialize soil vegetation + call set_soilveg(me, isot, ivegsrc, nlunit) + + pores (:) = maxsmc (:) + resid (:) = drysmc (:) + + end subroutine noahmpdrv_init + + subroutine noahmpdrv_finalize + end subroutine noahmpdrv_finalize + +!> \ingroup NoahMP_LSM +!! \brief This subroutine is the main CCPP entry point for the NoahMP LSM. +!! \section arg_table_noahmpdrv_run Argument Table +!! \htmlinclude noahmpdrv_run.html +!! +!! \section general_noahmpdrv NoahMP Driver General Algorithm +!! @{ +!! - Initialize CCPP error handling variables. +!! - Set a flag to only continue with each grid cell if the fraction of land is non-zero. +!! - This driver may be called as part of an iterative loop. If called as the first "guess" run, +!! save land-related prognostic fields to restore. +!! - Initialize output variables to zero and prepare variables for input into the NoahMP LSM. +!! - Call transfer_mp_parameters() to fill a derived datatype for input into the NoahMP LSM. +!! - Call noahmp_options() to set module-level scheme options for the NoahMP LSM. +!! - If the vegetation type is ice for the grid cell, call noahmp_options_glacier() to set +!! module-level scheme options for NoahMP Glacier and call noahmp_glacier(). +!! - For other vegetation types, call noahmp_sflx(), the entry point of the NoahMP LSM. +!! - Set output variables from the output of noahmp_glacier() and/or noahmp_sflx(). +!! - Call penman() to calculate potential evaporation. +!! - Calculate the surface specific humidity and convert surface sensible and latent heat fluxes in W m-2 from their kinematic values. +!! - If a "guess" run, restore the land-related prognostic fields. +! ! +!----------------------------------- + subroutine noahmpdrv_run & +!................................... +! --- inputs: + ( im, km, lsnowl, itime, ps, u1, v1, t1, q1, soiltyp, & + vegtype, sigmaf, dlwflx, dswsfc, snet, delt, tg3, cm, ch, & + prsl1, prslki, zf, dry, wind, slopetyp, & + shdmin, shdmax, snoalb, sfalb, flag_iter, flag_guess, & + idveg, iopt_crs, iopt_btr, iopt_run, iopt_sfc, iopt_frz, & + iopt_inf, iopt_rad, iopt_alb, iopt_snf, iopt_tbot, & + iopt_stc, xlatin, xcoszin, iyrlen, julian, & + rainn_mp, rainc_mp, snow_mp, graupel_mp, ice_mp, & + con_hvap, con_cp, con_jcal, rhoh2o, con_eps, con_epsm1, & + con_fvirt, con_rd, con_hfus, & + +! --- in/outs: + weasd, snwdph, tskin, tprcp, srflag, smc, stc, slc, & + canopy, trans, tsurf, zorl, & + +! --- Noah MP specific + + snowxy, tvxy, tgxy, canicexy, canliqxy, eahxy, tahxy, cmxy,& + chxy, fwetxy, sneqvoxy, alboldxy, qsnowxy, wslakexy, zwtxy,& + waxy, wtxy, tsnoxy, zsnsoxy, snicexy, snliqxy, lfmassxy, & + rtmassxy, stmassxy, woodxy, stblcpxy, fastcpxy, xlaixy, & + xsaixy, taussxy, smoiseq, smcwtdxy, deeprechxy, rechxy, & + albdvis, albdnir, albivis, albinir,emiss, & + +! --- outputs: + sncovr1, qsurf, gflux, drain, evap, hflx, ep, runoff, & + cmm, chh, evbs, evcw, sbsno, snowc, stm, snohf, & + smcwlt2, smcref2, wet1, t2mmp, q2mp, errmsg, errflg) + + use machine , only : kind_phys + use funcphys, only : fpvs + + use module_sf_noahmplsm + use module_sf_noahmp_glacier + use noahmp_tables, only : isice_table, co2_table, o2_table, & + isurban_table,smcref_table,smcdry_table, & + smcmax_table,co2_table,o2_table, & + saim_table,laim_table + + implicit none + + real(kind=kind_phys), parameter :: a2 = 17.2693882 + real(kind=kind_phys), parameter :: a3 = 273.16 + real(kind=kind_phys), parameter :: a4 = 35.86 + real(kind=kind_phys), parameter :: a23m4 = a2*(a3-a4) + + real, parameter :: undefined = 9.99e20_kind_phys + + integer, parameter :: nsoil = 4 ! hardwired to Noah + integer, parameter :: nsnow = 3 ! max. snow layers + + real(kind=kind_phys), save :: zsoil(nsoil) + data zsoil / -0.1, -0.4, -1.0, -2.0 / + +! +! --- CCPP interface fields (in call order) +! + + integer , intent(in) :: im ! horiz dimension and num of used pts + integer , intent(in) :: km ! vertical soil layer dimension + integer , intent(in) :: lsnowl ! lower bound for snow level arrays + integer , intent(in) :: itime ! NOT USED + real(kind=kind_phys), dimension(:) , intent(in) :: ps ! surface pressure [Pa] + real(kind=kind_phys), dimension(:) , intent(in) :: u1 ! u-component of wind [m/s] + real(kind=kind_phys), dimension(:) , intent(in) :: v1 ! u-component of wind [m/s] + real(kind=kind_phys), dimension(:) , intent(in) :: t1 ! layer 1 temperature [K] + real(kind=kind_phys), dimension(:) , intent(in) :: q1 ! layer 1 specific humidity [kg/kg] + integer , dimension(:) , intent(in) :: soiltyp ! soil type (integer index) + integer , dimension(:) , intent(in) :: vegtype ! vegetation type (integer index) + real(kind=kind_phys), dimension(:) , intent(in) :: sigmaf ! areal fractional cover of green vegetation + real(kind=kind_phys), dimension(:) , intent(in) :: dlwflx ! downward longwave radiation [W/m2] + real(kind=kind_phys), dimension(:) , intent(in) :: dswsfc ! downward shortwave radiation [W/m2] + real(kind=kind_phys), dimension(:) , intent(in) :: snet ! total sky sfc netsw flx into ground[W/m2] + real(kind=kind_phys) , intent(in) :: delt ! time interval [s] + real(kind=kind_phys), dimension(:) , intent(in) :: tg3 ! deep soil temperature [K] + real(kind=kind_phys), dimension(:) , intent(in) :: cm ! surface exchange coeff for momentum [-] + real(kind=kind_phys), dimension(:) , intent(in) :: ch ! surface exchange coeff heat & moisture[-] + real(kind=kind_phys), dimension(:) , intent(in) :: prsl1 ! sfc layer 1 mean pressure [Pa] + real(kind=kind_phys), dimension(:) , intent(in) :: prslki ! to calculate potential temperature + real(kind=kind_phys), dimension(:) , intent(in) :: zf ! height of bottom layer [m] + logical , dimension(:) , intent(in) :: dry ! = T if a point with any land + real(kind=kind_phys), dimension(:) , intent(in) :: wind ! wind speed [m/s] + integer , dimension(:) , intent(in) :: slopetyp ! surface slope classification + real(kind=kind_phys), dimension(:) , intent(in) :: shdmin ! min green vegetation coverage [fraction] + real(kind=kind_phys), dimension(:) , intent(in) :: shdmax ! max green vegetation coverage [fraction] + real(kind=kind_phys), dimension(:) , intent(in) :: snoalb ! upper bound on max albedo over deep snow + real(kind=kind_phys), dimension(:) , intent(inout) :: sfalb ! mean surface albedo [fraction] + logical , dimension(:) , intent(in) :: flag_iter ! + logical , dimension(:) , intent(in) :: flag_guess ! + integer , intent(in) :: idveg ! option for dynamic vegetation + integer , intent(in) :: iopt_crs ! option for canopy stomatal resistance + integer , intent(in) :: iopt_btr ! option for soil moisture factor for stomatal resistance + integer , intent(in) :: iopt_run ! option for runoff and groundwater + integer , intent(in) :: iopt_sfc ! option for surface layer drag coeff (ch & cm) + integer , intent(in) :: iopt_frz ! option for supercooled liquid water (or ice fraction) + integer , intent(in) :: iopt_inf ! option for frozen soil permeability + integer , intent(in) :: iopt_rad ! option for radiation transfer + integer , intent(in) :: iopt_alb ! option for ground snow surface albedo + integer , intent(in) :: iopt_snf ! option for partitioning precipitation into rainfall & snowfall + integer , intent(in) :: iopt_tbot ! option for lower boundary condition of soil temperature + integer , intent(in) :: iopt_stc ! option for snow/soil temperature time scheme (only layer 1) + real(kind=kind_phys), dimension(:) , intent(in) :: xlatin ! latitude + real(kind=kind_phys), dimension(:) , intent(in) :: xcoszin ! cosine of zenith angle + integer , intent(in) :: iyrlen ! year length [days] + real(kind=kind_phys) , intent(in) :: julian ! julian day of year + real(kind=kind_phys), dimension(:) , intent(in) :: rainn_mp ! microphysics non-convective precipitation [mm] + real(kind=kind_phys), dimension(:) , intent(in) :: rainc_mp ! microphysics convective precipitation [mm] + real(kind=kind_phys), dimension(:) , intent(in) :: snow_mp ! microphysics snow [mm] + real(kind=kind_phys), dimension(:) , intent(in) :: graupel_mp ! microphysics graupel [mm] + real(kind=kind_phys), dimension(:) , intent(in) :: ice_mp ! microphysics ice/hail [mm] + real(kind=kind_phys) , intent(in) :: con_hvap ! latent heat condensation [J/kg] + real(kind=kind_phys) , intent(in) :: con_cp ! specific heat air [J/kg/K] + real(kind=kind_phys) , intent(in) :: con_jcal ! joules per calorie (not used) + real(kind=kind_phys) , intent(in) :: rhoh2o ! density of water [kg/m^3] + real(kind=kind_phys) , intent(in) :: con_eps ! Rd/Rv + real(kind=kind_phys) , intent(in) :: con_epsm1 ! Rd/Rv - 1 + real(kind=kind_phys) , intent(in) :: con_fvirt ! Rv/Rd - 1 + real(kind=kind_phys) , intent(in) :: con_rd ! gas constant air [J/kg/K] + real(kind=kind_phys) , intent(in) :: con_hfus ! lat heat H2O fusion [J/kg] + real(kind=kind_phys), dimension(:) , intent(inout) :: weasd ! water equivalent accumulated snow depth [mm] + real(kind=kind_phys), dimension(:) , intent(inout) :: snwdph ! snow depth [mm] + real(kind=kind_phys), dimension(:) , intent(inout) :: tskin ! ground surface skin temperature [K] + real(kind=kind_phys), dimension(:) , intent(inout) :: tprcp ! total precipitation [m] + real(kind=kind_phys), dimension(:) , intent(inout) :: srflag ! snow/rain flag for precipitation + real(kind=kind_phys), dimension(:,:) , intent(inout) :: smc ! total soil moisture content [m3/m3] + real(kind=kind_phys), dimension(:,:) , intent(inout) :: stc ! soil temp [K] + real(kind=kind_phys), dimension(:,:) , intent(inout) :: slc ! liquid soil moisture [m3/m3] + real(kind=kind_phys), dimension(:) , intent(inout) :: canopy ! canopy moisture content [mm] + real(kind=kind_phys), dimension(:) , intent(inout) :: trans ! total plant transpiration [m/s] + real(kind=kind_phys), dimension(:) , intent(inout) :: tsurf ! surface skin temperature [after iteration] + real(kind=kind_phys), dimension(:) , intent(inout) :: zorl ! surface roughness [cm] + real(kind=kind_phys), dimension(:) , intent(inout) :: snowxy ! actual no. of snow layers + real(kind=kind_phys), dimension(:) , intent(inout) :: tvxy ! vegetation leaf temperature [K] + real(kind=kind_phys), dimension(:) , intent(inout) :: tgxy ! bulk ground surface temperature [K] + real(kind=kind_phys), dimension(:) , intent(inout) :: canicexy ! canopy-intercepted ice [mm] + real(kind=kind_phys), dimension(:) , intent(inout) :: canliqxy ! canopy-intercepted liquid water [mm] + real(kind=kind_phys), dimension(:) , intent(inout) :: eahxy ! canopy air vapor pressure [Pa] + real(kind=kind_phys), dimension(:) , intent(inout) :: tahxy ! canopy air temperature [K] + real(kind=kind_phys), dimension(:) , intent(inout) :: cmxy ! bulk momentum drag coefficient [m/s] + real(kind=kind_phys), dimension(:) , intent(inout) :: chxy ! bulk sensible heat exchange coefficient [m/s] + real(kind=kind_phys), dimension(:) , intent(inout) :: fwetxy ! wetted or snowed fraction of the canopy [-] + real(kind=kind_phys), dimension(:) , intent(inout) :: sneqvoxy ! snow mass at last time step[mm h2o] + real(kind=kind_phys), dimension(:) , intent(inout) :: alboldxy ! snow albedo at last time step [-] + real(kind=kind_phys), dimension(:) , intent(inout) :: qsnowxy ! snowfall on the ground [mm/s] + real(kind=kind_phys), dimension(:) , intent(inout) :: wslakexy ! lake water storage [mm] + real(kind=kind_phys), dimension(:) , intent(inout) :: zwtxy ! water table depth [m] + real(kind=kind_phys), dimension(:) , intent(inout) :: waxy ! water in the "aquifer" [mm] + real(kind=kind_phys), dimension(:) , intent(inout) :: wtxy ! groundwater storage [mm] + real(kind=kind_phys), dimension(:,lsnowl:), intent(inout) :: tsnoxy ! snow temperature [K] + real(kind=kind_phys), dimension(:,lsnowl:), intent(inout) :: zsnsoxy ! snow/soil layer depth [m] + real(kind=kind_phys), dimension(:,lsnowl:), intent(inout) :: snicexy ! snow layer ice [mm] + real(kind=kind_phys), dimension(:,lsnowl:), intent(inout) :: snliqxy ! snow layer liquid water [mm] + real(kind=kind_phys), dimension(:) , intent(inout) :: lfmassxy ! leaf mass [g/m2] + real(kind=kind_phys), dimension(:) , intent(inout) :: rtmassxy ! mass of fine roots [g/m2] + real(kind=kind_phys), dimension(:) , intent(inout) :: stmassxy ! stem mass [g/m2] + real(kind=kind_phys), dimension(:) , intent(inout) :: woodxy ! mass of wood (incl. woody roots) [g/m2] + real(kind=kind_phys), dimension(:) , intent(inout) :: stblcpxy ! stable carbon in deep soil [g/m2] + real(kind=kind_phys), dimension(:) , intent(inout) :: fastcpxy ! short-lived carbon, shallow soil [g/m2] + real(kind=kind_phys), dimension(:) , intent(inout) :: xlaixy ! leaf area index [m2/m2] + real(kind=kind_phys), dimension(:) , intent(inout) :: xsaixy ! stem area index [m2/m2] + real(kind=kind_phys), dimension(:) , intent(inout) :: taussxy ! snow age factor [-] + real(kind=kind_phys), dimension(:,:) , intent(inout) :: smoiseq ! eq volumetric soil moisture [m3/m3] + real(kind=kind_phys), dimension(:) , intent(inout) :: smcwtdxy ! soil moisture content in the layer to the water table when deep + real(kind=kind_phys), dimension(:) , intent(inout) :: deeprechxy ! recharge to the water table when deep + real(kind=kind_phys), dimension(:) , intent(inout) :: rechxy ! recharge to the water table + real(kind=kind_phys), dimension(:) , intent(out) :: albdvis ! albedo - direct visible [fraction] + real(kind=kind_phys), dimension(:) , intent(out) :: albdnir ! albedo - direct NIR [fraction] + real(kind=kind_phys), dimension(:) , intent(out) :: albivis ! albedo - diffuse visible [fraction] + real(kind=kind_phys), dimension(:) , intent(out) :: albinir ! albedo - diffuse NIR [fraction] + real(kind=kind_phys), dimension(:) , intent(out) :: emiss ! sfc lw emissivity [fraction] + real(kind=kind_phys), dimension(:) , intent(out) :: sncovr1 ! snow cover over land [fraction] + real(kind=kind_phys), dimension(:) , intent(out) :: qsurf ! specific humidity at sfc [kg/kg] + real(kind=kind_phys), dimension(:) , intent(out) :: gflux ! soil heat flux [W/m2] + real(kind=kind_phys), dimension(:) , intent(out) :: drain ! subsurface runoff [mm/s] + real(kind=kind_phys), dimension(:) , intent(out) :: evap ! total latent heat flux [W/m2] + real(kind=kind_phys), dimension(:) , intent(out) :: hflx ! sensible heat flux [W/m2] + real(kind=kind_phys), dimension(:) , intent(out) :: ep ! potential evaporation [mm/s?] + real(kind=kind_phys), dimension(:) , intent(out) :: runoff ! surface runoff [mm/s] + real(kind=kind_phys), dimension(:) , intent(out) :: cmm ! cm*U [m/s] + real(kind=kind_phys), dimension(:) , intent(out) :: chh ! ch*U*rho [kg/m2/s] + real(kind=kind_phys), dimension(:) , intent(out) :: evbs ! direct soil evaporation [m/s] + real(kind=kind_phys), dimension(:) , intent(out) :: evcw ! canopy water evaporation [m/s] + real(kind=kind_phys), dimension(:) , intent(out) :: sbsno ! sublimation/deposit from snopack [W/m2] + real(kind=kind_phys), dimension(:) , intent(out) :: snowc ! fractional snow cover [-] + real(kind=kind_phys), dimension(:) , intent(out) :: stm ! total soil column moisture content [mm] + real(kind=kind_phys), dimension(:) , intent(out) :: snohf ! snow/freezing-rain latent heat flux [W/m2] + real(kind=kind_phys), dimension(:) , intent(out) :: smcwlt2 ! dry soil moisture threshold [m3/m3] + real(kind=kind_phys), dimension(:) , intent(out) :: smcref2 ! soil moisture threshold [m3/m3] + real(kind=kind_phys), dimension(:) , intent(out) :: wet1 ! normalized surface soil saturated fraction + real(kind=kind_phys), dimension(:) , intent(out) :: t2mmp ! combined T2m from tiles + real(kind=kind_phys), dimension(:) , intent(out) :: q2mp ! combined q2m from tiles + character(len=*) , intent(out) :: errmsg + integer , intent(out) :: errflg + +! +! --- some new options, hard code for now +! + + integer :: iopt_rsf = 4 ! option for surface resistance + integer :: iopt_soil = 1 ! option for soil parameter treatment + integer :: iopt_pedo = 1 ! option for pedotransfer function + integer :: iopt_crop = 0 ! option for crop model + integer :: iopt_gla = 2 ! option for glacier treatment + +! +! --- guess iteration fields - target for removal +! + + real(kind=kind_phys), dimension(im) :: weasd_old + real(kind=kind_phys), dimension(im) :: snwdph_old + real(kind=kind_phys), dimension(im) :: tskin_old + real(kind=kind_phys), dimension(im) :: canopy_old + real(kind=kind_phys), dimension(im) :: tprcp_old + real(kind=kind_phys), dimension(im) :: srflag_old + real(kind=kind_phys), dimension(im) :: snow_old + real(kind=kind_phys), dimension(im) :: tv_old + real(kind=kind_phys), dimension(im) :: tg_old + real(kind=kind_phys), dimension(im) :: canice_old + real(kind=kind_phys), dimension(im) :: canliq_old + real(kind=kind_phys), dimension(im) :: eah_old + real(kind=kind_phys), dimension(im) :: tah_old + real(kind=kind_phys), dimension(im) :: fwet_old + real(kind=kind_phys), dimension(im) :: sneqvo_old + real(kind=kind_phys), dimension(im) :: albold_old + real(kind=kind_phys), dimension(im) :: qsnow_old + real(kind=kind_phys), dimension(im) :: wslake_old + real(kind=kind_phys), dimension(im) :: zwt_old + real(kind=kind_phys), dimension(im) :: wa_old + real(kind=kind_phys), dimension(im) :: wt_old + real(kind=kind_phys), dimension(im) :: lfmass_old + real(kind=kind_phys), dimension(im) :: rtmass_old + real(kind=kind_phys), dimension(im) :: stmass_old + real(kind=kind_phys), dimension(im) :: wood_old + real(kind=kind_phys), dimension(im) :: stblcp_old + real(kind=kind_phys), dimension(im) :: fastcp_old + real(kind=kind_phys), dimension(im) :: xlai_old + real(kind=kind_phys), dimension(im) :: xsai_old + real(kind=kind_phys), dimension(im) :: tauss_old + real(kind=kind_phys), dimension(im) :: smcwtd_old + real(kind=kind_phys), dimension(im) :: rech_old + real(kind=kind_phys), dimension(im) :: deeprech_old + real(kind=kind_phys), dimension(im, km) :: smc_old + real(kind=kind_phys), dimension(im, km) :: stc_old + real(kind=kind_phys), dimension(im, km) :: slc_old + real(kind=kind_phys), dimension(im, km) :: smoiseq_old + real(kind=kind_phys), dimension(im,lsnowl: 0) :: tsno_old + real(kind=kind_phys), dimension(im,lsnowl: 0) :: snice_old + real(kind=kind_phys), dimension(im,lsnowl: 0) :: snliq_old + real(kind=kind_phys), dimension(im,lsnowl:km) :: zsnso_old + real(kind=kind_phys), dimension(im,lsnowl:km) :: tsnso_old + +! +! --- local inputs to noah-mp and glacier subroutines; listed in order in noah-mp call +! + ! intent + integer :: i_location ! in | grid index + integer :: j_location ! in | grid index (not used in ccpp) + real (kind=kind_phys) :: latitude ! in | latitude [radians] + integer :: year_length ! in | number of days in the current year + real (kind=kind_phys) :: julian_day ! in | julian day of year [floating point] + real (kind=kind_phys) :: cosine_zenith ! in | cosine solar zenith angle [-1,1] + real (kind=kind_phys) :: timestep ! in | time step [sec] + real (kind=kind_phys) :: spatial_scale ! in | spatial scale [m] (not used in noah-mp) + real (kind=kind_phys) :: atmosphere_thickness ! in | thickness of lowest atmo layer [m] (not used in noah-mp) + integer :: soil_levels ! in | soil levels + real (kind=kind_phys), dimension( 1:nsoil) :: soil_interface_depth ! in | soil layer-bottom depth from surface [m] + integer :: max_snow_levels ! in | maximum number of snow levels + real (kind=kind_phys) :: vegetation_frac ! in | vegetation fraction [0.0-1.0] + real (kind=kind_phys) :: max_vegetation_frac ! in | annual maximum vegetation fraction [0.0-1.0] + integer :: vegetation_category ! in | vegetation category + integer :: ice_flag ! in | ice flag (1->ice) + integer :: surface_type ! in | surface type flag 1->soil; 2->lake + integer :: crop_type ! in | crop type category + real (kind=kind_phys), dimension( 1:nsoil) :: eq_soil_water_vol ! in | (opt_run=5) equilibrium soil water content [m3/m3] + real (kind=kind_phys) :: temperature_forcing ! in | forcing air temperature [K] + real (kind=kind_phys) :: air_pressure_surface ! in | surface air pressure [Pa] + real (kind=kind_phys) :: air_pressure_forcing ! in | forcing air pressure [Pa] + real (kind=kind_phys) :: uwind_forcing ! in | forcing u-wind [m/s] + real (kind=kind_phys) :: vwind_forcing ! in | forcing v-wind [m/s] + real (kind=kind_phys) :: spec_humidity_forcing ! in | forcing mixing ratio [kg/kg] + real (kind=kind_phys) :: cloud_water_forcing ! in | cloud water mixing ratio [kg/kg] (not used in noah-mp) + real (kind=kind_phys) :: sw_radiation_forcing ! in | forcing downward shortwave radiation [W/m2] + real (kind=kind_phys) :: radiation_lw_forcing ! in | forcing downward longwave radiation [W/m2] + real (kind=kind_phys) :: precipitation_forcing ! in | total precipitation [mm/s] + real (kind=kind_phys) :: precip_convective ! in | convective precipitation [mm/s] + real (kind=kind_phys) :: precip_non_convective ! in | non-convective precipitation [mm/s] + real (kind=kind_phys) :: precip_sh_convective ! in | shallow convective precipitation [mm/s] + real (kind=kind_phys) :: precip_snow ! in | snow precipitation [mm/s] + real (kind=kind_phys) :: precip_graupel ! in | graupel precipitation [mm/s] + real (kind=kind_phys) :: precip_hail ! in | hail precipitation [mm/s] + real (kind=kind_phys) :: temperature_soil_bot ! in | soil bottom boundary condition temperature [K] + real (kind=kind_phys) :: co2_air ! in | atmospheric co2 concentration [Pa] + real (kind=kind_phys) :: o2_air ! in | atmospheric o2 concentration [Pa] + real (kind=kind_phys) :: foliage_nitrogen ! in | foliage nitrogen [%] [1-saturated] + real (kind=kind_phys), dimension(-nsnow+1: 0) :: snow_ice_frac_old ! in | snow ice fraction at last timestep [-] + real (kind=kind_phys) :: forcing_height ! inout | forcing height [m] + real (kind=kind_phys) :: snow_albedo_old ! inout | snow albedo at last time step (class option) [-] + real (kind=kind_phys) :: snow_water_equiv_old ! inout | snow water equivalent at last time step [mm] + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: temperature_snow_soil ! inout | snow/soil temperature [K] + real (kind=kind_phys), dimension( 1:nsoil) :: soil_liquid_vol ! inout | volumetric liquid soil moisture [m3/m3] + real (kind=kind_phys), dimension( 1:nsoil) :: soil_moisture_vol ! inout | volumetric soil moisture (ice + liq.) [m3/m3] + real (kind=kind_phys) :: temperature_canopy_air! inout | canopy air tmeperature [K] + real (kind=kind_phys) :: vapor_pres_canopy_air ! inout | canopy air vapor pressure [Pa] + real (kind=kind_phys) :: canopy_wet_fraction ! inout | wetted or snowed fraction of canopy (-) + real (kind=kind_phys) :: canopy_liquid ! inout | canopy intercepted liquid [mm] + real (kind=kind_phys) :: canopy_ice ! inout | canopy intercepted ice [mm] + real (kind=kind_phys) :: temperature_leaf ! inout | leaf temperature [K] + real (kind=kind_phys) :: temperature_ground ! inout | grid ground surface temperature [K] + real (kind=kind_phys) :: spec_humidity_surface ! inout | surface specific humidty [kg/kg] + real (kind=kind_phys) :: snowfall ! inout | land model partitioned snowfall [mm/s] + real (kind=kind_phys) :: rainfall ! inout | land model partitioned rainfall [mm/s] + integer :: snow_levels ! inout | active snow levels [-] + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: interface_depth ! inout | layer-bottom depth from snow surf [m] + real (kind=kind_phys) :: snow_depth ! inout | snow depth [m] + real (kind=kind_phys) :: snow_water_equiv ! inout | snow water equivalent [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0) :: snow_level_ice ! inout | snow level ice [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0) :: snow_level_liquid ! inout | snow level liquid [mm] + real (kind=kind_phys) :: depth_water_table ! inout | depth to water table [m] + real (kind=kind_phys) :: aquifer_water ! inout | water storage in aquifer [mm] + real (kind=kind_phys) :: saturated_water ! inout | water in aquifer+saturated soil [mm] + real (kind=kind_phys) :: lake_water ! inout | lake water storage (can be neg.) [mm] + real (kind=kind_phys) :: leaf_carbon ! inout | leaf mass [g/m2] + real (kind=kind_phys) :: root_carbon ! inout | mass of fine roots [g/m2] + real (kind=kind_phys) :: stem_carbon ! inout | stem mass [g/m2] + real (kind=kind_phys) :: wood_carbon ! inout | mass of wood (incl. woody roots) [g/m2] + real (kind=kind_phys) :: soil_carbon_stable ! inout | stable soil carbon [g/m2] + real (kind=kind_phys) :: soil_carbon_fast ! inout | short-lived soil carbon [g/m2] + real (kind=kind_phys) :: leaf_area_index ! inout | leaf area index [-] + real (kind=kind_phys) :: stem_area_index ! inout | stem area index [-] + real (kind=kind_phys) :: cm_noahmp ! inout | grid momentum drag coefficient [m/s] + real (kind=kind_phys) :: ch_noahmp ! inout | grid heat exchange coefficient [m/s] + real (kind=kind_phys) :: snow_age ! inout | non-dimensional snow age [-] + real (kind=kind_phys) :: grain_carbon ! inout | grain mass [g/m2] + real (kind=kind_phys) :: growing_deg_days ! inout | growing degree days [-] + integer :: plant_growth_stage ! inout | plant growing stage [-] + real (kind=kind_phys) :: soil_moisture_wtd ! inout | (opt_run=5) soil water content between bottom of the soil and water table [m3/m3] + real (kind=kind_phys) :: deep_recharge ! inout | (opt_run=5) recharge to or from the water table when deep [m] + real (kind=kind_phys) :: recharge ! inout | (opt_run=5) recharge to or from the water table when shallow [m] (diagnostic) + real (kind=kind_phys) :: z0_total ! out | weighted z0 sent to coupled model [m] + real (kind=kind_phys) :: sw_absorbed_total ! out | total absorbed solar radiation [W/m2] + real (kind=kind_phys) :: sw_reflected_total ! out | total reflected solar radiation [W/m2] + real (kind=kind_phys) :: lw_absorbed_total ! out | total net lw rad [W/m2] [+ to atm] + real (kind=kind_phys) :: sensible_heat_total ! out | total sensible heat [W/m2] [+ to atm] + real (kind=kind_phys) :: ground_heat_total ! out | ground heat flux [W/m2] [+ to soil] + real (kind=kind_phys) :: latent_heat_canopy ! out | canopy evaporation heat flux [W/m2] [+ to atm] + real (kind=kind_phys) :: latent_heat_ground ! out | ground evaporation heat flux [W/m2] [+ to atm] + real (kind=kind_phys) :: transpiration_heat ! out | transpiration heat flux [W/m2] [+ to atm] + real (kind=kind_phys) :: evaporation_canopy ! out | canopy evaporation [mm/s] + real (kind=kind_phys) :: transpiration ! out | transpiration [mm/s] + real (kind=kind_phys) :: evaporation_soil ! out | soil surface evaporation [mm/s] + real (kind=kind_phys) :: temperature_radiative ! out | surface radiative temperature [K] + real (kind=kind_phys) :: temperature_bare_grd ! out | bare ground surface temperature [K] + real (kind=kind_phys) :: temperature_veg_grd ! out | below_canopy ground surface temperature [K] + real (kind=kind_phys) :: temperature_veg_2m ! out | vegetated 2-m air temperature [K] + real (kind=kind_phys) :: temperature_bare_2m ! out | bare ground 2-m air temperature [K] + real (kind=kind_phys) :: spec_humidity_veg_2m ! out | vegetated 2-m air specific humidity [K] + real (kind=kind_phys) :: spec_humidity_bare_2m ! out | bare ground 2-m air specfic humidity [K] + real (kind=kind_phys) :: runoff_surface ! out | surface runoff [mm/s] + real (kind=kind_phys) :: runoff_baseflow ! out | baseflow runoff [mm/s] + real (kind=kind_phys) :: par_absorbed ! out | absorbed photosynthesis active radiation [W/m2] + real (kind=kind_phys) :: photosynthesis ! out | total photosynthesis [umol CO2/m2/s] [+ out] + real (kind=kind_phys) :: sw_absorbed_veg ! out | solar radiation absorbed by vegetation [W/m2] + real (kind=kind_phys) :: sw_absorbed_ground ! out | solar radiation absorbed by ground [W/m2] + real (kind=kind_phys) :: snow_cover_fraction ! out | snow cover fraction on the ground [-] + real (kind=kind_phys) :: net_eco_exchange ! out | net ecosystem exchange [g/m2/s CO2] + real (kind=kind_phys) :: global_prim_prod ! out | global primary production [g/m2/s C] + real (kind=kind_phys) :: net_prim_prod ! out | net primary productivity [g/m2/s C] + real (kind=kind_phys) :: vegetation_fraction ! out | vegetation fraction [0.0-1.0] + real (kind=kind_phys) :: albedo_total ! out | total surface albedo [-] + real (kind=kind_phys) :: snowmelt_out ! out | snowmelt out bottom of pack [mm/s] + real (kind=kind_phys) :: snowmelt_shallow ! out | shallow snow melt [mm] + real (kind=kind_phys) :: snowmelt_shallow_1 ! out | additional shallow snow melt [mm] + real (kind=kind_phys) :: snowmelt_shallow_2 ! out | additional shallow snow melt [mm] + real (kind=kind_phys) :: rs_sunlit ! out | sunlit leaf stomatal resistance [s/m] + real (kind=kind_phys) :: rs_shaded ! out | shaded leaf stomatal resistance [s/m] + real (kind=kind_phys), dimension(1:2) :: albedo_direct ! out | direct vis/nir albedo [-] + real (kind=kind_phys), dimension(1:2) :: albedo_diffuse ! out | diffuse vis/nir albedo [-] + real (kind=kind_phys), dimension(1:2) :: albedo_direct_snow ! out | direct vis/nir snow albedo [-] + real (kind=kind_phys), dimension(1:2) :: albedo_diffuse_snow ! out | diffuse vis/nir snow albedo [-] + real (kind=kind_phys) :: canopy_gap_fraction ! out | between canopy gap fraction [-] + real (kind=kind_phys) :: incanopy_gap_fraction ! out | within canopy gap fraction for beam [-] + real (kind=kind_phys) :: ch_vegetated ! out | vegetated heat exchange coefficient [m/s] + real (kind=kind_phys) :: ch_bare_ground ! out | bare-ground heat exchange coefficient [m/s] + real (kind=kind_phys) :: emissivity_total ! out | grid emissivity [-] + real (kind=kind_phys) :: sensible_heat_grd_veg ! out | below-canopy ground sensible heat flux [W/m2] + real (kind=kind_phys) :: sensible_heat_leaf ! out | leaf-to-canopy sensible heat flux [W/m2] + real (kind=kind_phys) :: sensible_heat_grd_bar ! out | bare ground sensible heat flux [W/m2] + real (kind=kind_phys) :: latent_heat_grd_veg ! out | below-canopy ground evaporation heat flux [W/m2] + real (kind=kind_phys) :: latent_heat_grd_bare ! out | bare ground evaporation heat flux [W/m2] + real (kind=kind_phys) :: ground_heat_veg ! out | below-canopy ground heat flux [W/m2] + real (kind=kind_phys) :: ground_heat_bare ! out | bare ground heat flux [W/m2] + real (kind=kind_phys) :: lw_absorbed_grd_veg ! out | below-canopy ground absorbed longwave radiation [W/m2] + real (kind=kind_phys) :: lw_absorbed_leaf ! out | leaf absorbed longwave radiation [W/m2] + real (kind=kind_phys) :: lw_absorbed_grd_bare ! out | bare ground net longwave radiation [W/m2] + real (kind=kind_phys) :: latent_heat_trans ! out | transpiration [W/m2] + real (kind=kind_phys) :: latent_heat_leaf ! out | leaf evaporation [W/m2] + real (kind=kind_phys) :: ch_leaf ! out | leaf exchange coefficient [m/s] + real (kind=kind_phys) :: ch_below_canopy ! out | below-canopy exchange coefficient [m/s] + real (kind=kind_phys) :: ch_vegetated_2m ! out | 2-m vegetated heat exchange coefficient [m/s] + real (kind=kind_phys) :: ch_bare_ground_2m ! out | 2-m bare-ground heat exchange coefficient [m/s] + real (kind=kind_phys) :: precip_frozen_frac ! out | precipitation snow fraction [-] + real (kind=kind_phys) :: precip_adv_heat_veg ! out | precipitation advected heat - vegetation net [W/m2] + real (kind=kind_phys) :: precip_adv_heat_grd_v ! out | precipitation advected heat - below-canopy net [W/m2] + real (kind=kind_phys) :: precip_adv_heat_grd_b ! out | precipitation advected heat - bare ground net [W/m2] + real (kind=kind_phys) :: precip_adv_heat_total ! out | precipitation advected heat - total [W/m2) + real (kind=kind_phys) :: snow_sublimation ! out | snow sublimation [W/m2] + real (kind=kind_phys) :: lai_sunlit ! out | sunlit leaf area index [m2/m2] + real (kind=kind_phys) :: lai_shaded ! out | shaded leaf area index [m2/m2] + real (kind=kind_phys) :: leaf_air_resistance ! out | leaf boundary layer resistance [s/m] + +! +! --- local variable +! + + integer :: soil_category(nsoil) + integer :: slope_category + integer :: soil_color_category + + real (kind=kind_phys) :: spec_humidity_sat ! saturation specific humidity + real (kind=kind_phys) :: vapor_pressure_sat ! saturation vapor pressure + real (kind=kind_phys) :: latent_heat_total ! total latent heat flux [W/m2] + real (kind=kind_phys) :: density ! air density + real (kind=kind_phys) :: virtual_temperature ! used for penman calculation and density + real (kind=kind_phys) :: potential_evaporation ! used for penman calculation + real (kind=kind_phys) :: potential_temperature ! used for penman calculation + real (kind=kind_phys) :: penman_radiation ! used for penman calculation + real (kind=kind_phys) :: dqsdt ! used for penman calculation + real (kind=kind_phys) :: precip_freeze_frac_in ! used for penman calculation + + logical :: is_snowing ! used for penman calculation + logical :: is_freeze_rain ! used for penman calculation + integer :: i, k + +! +! --- local derived constants: +! + + type(noahmp_parameters) :: parameters + +! +! --- end declaration +! + +! +! --- Initialize CCPP error handling variables +! + errmsg = '' + errflg = 0 + +! +! --- save land-related prognostic fields for guess run TARGET FOR REMOVAL +! + do i = 1, im + if (dry(i) .and. flag_guess(i)) then + weasd_old(i) = weasd(i) + snwdph_old(i) = snwdph(i) + tskin_old(i) = tskin(i) + canopy_old(i) = canopy(i) + tprcp_old(i) = tprcp(i) + srflag_old(i) = srflag(i) + snow_old(i) = snowxy(i) + tv_old(i) = tvxy(i) + tg_old(i) = tgxy(i) + canice_old(i) = canicexy(i) + canliq_old(i) = canliqxy(i) + eah_old(i) = eahxy(i) + tah_old(i) = tahxy(i) + fwet_old(i) = fwetxy(i) + sneqvo_old(i) = sneqvoxy(i) + albold_old(i) = alboldxy(i) + qsnow_old(i) = qsnowxy(i) + wslake_old(i) = wslakexy(i) + zwt_old(i) = zwtxy(i) + wa_old(i) = waxy(i) + wt_old(i) = wtxy(i) + lfmass_old(i) = lfmassxy(i) + rtmass_old(i) = rtmassxy(i) + stmass_old(i) = stmassxy(i) + wood_old(i) = woodxy(i) + stblcp_old(i) = stblcpxy(i) + fastcp_old(i) = fastcpxy(i) + xlai_old(i) = xlaixy(i) + xsai_old(i) = xsaixy(i) + tauss_old(i) = taussxy(i) + smcwtd_old(i) = smcwtdxy(i) + rech_old(i) = rechxy(i) + deeprech_old(i) = deeprechxy(i) + + do k = 1, km + smc_old(i,k) = smc(i,k) + stc_old(i,k) = stc(i,k) + slc_old(i,k) = slc(i,k) + smoiseq_old(i,k) = smoiseq(i,k) + end do + + do k = -2, 0 + tsno_old(i,k) = tsnoxy(i,k) + snice_old(i,k) = snicexy(i,k) + snliq_old(i,k) = snliqxy(i,k) + end do + + do k = -2, km + zsnso_old (i,k) = zsnsoxy(i,k) + end do + + end if ! dry(i) .and. flag_guess(i) + + end do ! im _old loop + + do i = 1, im + + if (flag_iter(i) .and. dry(i)) then + +! +! --- variable checks and derived fields +! + + if(vegtype(i) == isice_table ) then + if(weasd(i) < 0.1) then + weasd(i) = 0.1 + end if + end if + +! +! --- noah-mp input variables (except snow_ice_frac_old done later) +! + + i_location = i + j_location = -9999 + latitude = xlatin(i) + year_length = iyrlen + julian_day = julian + cosine_zenith = xcoszin(i) + timestep = delt + spatial_scale = -9999.0 + atmosphere_thickness = -9999.0 + soil_levels = km + soil_interface_depth = zsoil + max_snow_levels = nsnow + vegetation_frac = sigmaf(i) + max_vegetation_frac = shdmax(i) + vegetation_category = vegtype(i) + surface_type = 1 + crop_type = 0 + eq_soil_water_vol = smoiseq(i,:) ! only need for run=5 + temperature_forcing = t1(i) + air_pressure_surface = ps(i) + air_pressure_forcing = prsl1(i) + uwind_forcing = u1(i) + vwind_forcing = v1(i) + + spec_humidity_forcing = max(q1(i), 1.e-8) ! specific humidity at level 1 (kg/kg) + virtual_temperature = temperature_forcing * & + (1.0 + con_fvirt * spec_humidity_forcing) ! virtual temperature + vapor_pressure_sat = fpvs( temperature_forcing ) ! sat. vapor pressure at level 1 (Pa) + spec_humidity_sat = con_eps*vapor_pressure_sat / & + (prsl1(i) + con_epsm1*vapor_pressure_sat) ! sat. specific humidity at level 1 (kg/kg) + spec_humidity_sat = max(spec_humidity_sat, 1.e-8) ! lower limit sat. specific humidity (kg/kg) + spec_humidity_forcing = min(spec_humidity_sat,spec_humidity_forcing) ! limit specific humidity at level 1 (kg/kg) + + cloud_water_forcing = -9999.0 + sw_radiation_forcing = dswsfc(i) + radiation_lw_forcing = dlwflx(i) + precipitation_forcing = 1000.0 * tprcp(i) / delt + precip_convective = rainc_mp(i) + precip_non_convective = rainn_mp(i) + precip_sh_convective = 0. + precip_snow = snow_mp(i) + precip_graupel = graupel_mp(i) + precip_hail = ice_mp(i) + temperature_soil_bot = tg3(i) + co2_air = co2_table * air_pressure_forcing + o2_air = o2_table * air_pressure_forcing + foliage_nitrogen = 1.0 + +! +! --- noah-mp inout variables +! + + forcing_height = zf(i) + snow_albedo_old = alboldxy(i) + snow_water_equiv_old = sneqvoxy(i) + temperature_snow_soil(-2: 0) = tsnoxy(i,:) + temperature_snow_soil( 1:km) = stc(i,:) + soil_liquid_vol = slc(i,:) + soil_moisture_vol = smc(i,:) + temperature_canopy_air = tahxy(i) + vapor_pres_canopy_air = eahxy(i) + canopy_wet_fraction = fwetxy(i) + canopy_liquid = canliqxy(i) + canopy_ice = canicexy(i) + temperature_leaf = tvxy(i) + temperature_ground = tgxy(i) + spec_humidity_surface = undefined ! doesn't need inout; should be out + snowfall = qsnowxy(i) ! doesn't need inout; should be out + rainfall = -9999.0 ! doesn't need inout; should be out + snow_levels = nint(snowxy(i)) + interface_depth = zsnsoxy(i,:) + snow_depth = snwdph(i) * 0.001 ! convert from mm to m + snow_water_equiv = weasd(i) + if (snow_water_equiv /= 0.0 .and. snow_depth == 0.0) then + snow_depth = 10.0 * snow_water_equiv /1000.0 + endif + snow_level_ice = snicexy(i,:) + snow_level_liquid = snliqxy(i,:) + depth_water_table = zwtxy(i) + aquifer_water = waxy(i) + saturated_water = wtxy(i) + lake_water = wslakexy(i) + leaf_carbon = lfmassxy(i) + root_carbon = rtmassxy(i) + stem_carbon = stmassxy(i) + wood_carbon = woodxy(i) + soil_carbon_stable = stblcpxy(i) + soil_carbon_fast = fastcpxy(i) + leaf_area_index = xlaixy(i) + stem_area_index = xsaixy(i) + cm_noahmp = cmxy(i) + ch_noahmp = chxy(i) + snow_age = taussxy(i) +! grain_carbon ! new variable +! growing_deg_days ! new variable +! plant_growth_stage ! new variable + soil_moisture_wtd = smcwtdxy(i) + deep_recharge = deeprechxy(i) + recharge = rechxy(i) + + snow_ice_frac_old = 0.0 + do k = snow_levels+1, 0 + if(snow_level_ice(k) > 0.0 ) & + snow_ice_frac_old(k) = snow_level_ice(k) /(snow_level_ice(k)+snow_level_liquid(k)) + end do + +! +! --- some outputs for atm model? +! + density = air_pressure_forcing / (con_rd * virtual_temperature) + chh(i) = ch(i) * wind(i) * density + cmm(i) = cm(i) * wind(i) +! +! --- noah-mp additional variables +! + + soil_category = soiltyp(i) + slope_category = slopetyp(i) + soil_color_category = 4 + + call transfer_mp_parameters(vegetation_category,soil_category, & + slope_category,soil_color_category,crop_type,parameters) + + call noahmp_options(idveg ,iopt_crs, iopt_btr , iopt_run, iopt_sfc, & + iopt_frz, iopt_inf , iopt_rad, iopt_alb, & + iopt_snf, iopt_tbot, iopt_stc, & + iopt_rsf, iopt_soil, iopt_pedo, iopt_crop ) + + if ( vegetation_category == isice_table ) then + + if (precipitation_forcing > 0.0) then + if (srflag(i) > 0.0) then + snowfall = srflag(i) * precipitation_forcing ! need snowfall for glacier snow age + endif + endif + + ice_flag = -1 + temperature_soil_bot = min(temperature_soil_bot,263.15) + + call noahmp_options_glacier(iopt_alb, iopt_snf, iopt_tbot, iopt_stc, iopt_gla ) + + call noahmp_glacier ( & + i_location ,1 ,cosine_zenith ,nsnow , & + nsoil ,timestep , & + temperature_forcing ,air_pressure_forcing ,uwind_forcing ,vwind_forcing , & + spec_humidity_forcing,sw_radiation_forcing ,precipitation_forcing,radiation_lw_forcing , & + temperature_soil_bot ,forcing_height ,snow_ice_frac_old ,zsoil , & + snowfall ,snow_water_equiv_old ,snow_albedo_old , & + cm_noahmp ,ch_noahmp ,snow_levels ,snow_water_equiv , & + soil_moisture_vol ,interface_depth ,snow_depth ,snow_level_ice , & + snow_level_liquid ,temperature_ground ,temperature_snow_soil,soil_liquid_vol , & + snow_age ,spec_humidity_surface,sw_absorbed_total ,sw_reflected_total , & + lw_absorbed_total ,sensible_heat_total ,latent_heat_ground ,ground_heat_total , & + temperature_radiative,evaporation_soil ,runoff_surface ,runoff_baseflow , & + sw_absorbed_ground ,albedo_total ,snowmelt_out ,snowmelt_shallow , & + snowmelt_shallow_1 ,snowmelt_shallow_2 ,temperature_bare_2m ,spec_humidity_bare_2m, & + emissivity_total ,precip_frozen_frac ,ch_bare_ground_2m ,snow_sublimation , & +#ifdef CCPP + albedo_direct ,albedo_diffuse ,errmsg ,errflg ) +#else + albedo_direct ,albedo_diffuse ) +#endif + +#ifdef CCPP + if (errflg /= 0) return +#endif + +! +! set some non-glacier fields over the glacier +! + + snow_cover_fraction = 1.0 + temperature_leaf = undefined + canopy_ice = undefined + canopy_liquid = undefined + vapor_pres_canopy_air = undefined + temperature_canopy_air = undefined + canopy_wet_fraction = undefined + lake_water = undefined + depth_water_table = undefined + aquifer_water = undefined + saturated_water = undefined + leaf_carbon = undefined + root_carbon = undefined + stem_carbon = undefined + wood_carbon = undefined + soil_carbon_stable = undefined + soil_carbon_fast = undefined + leaf_area_index = undefined + stem_area_index = undefined + soil_moisture_wtd = 0.0 + recharge = 0.0 + deep_recharge = 0.0 + eq_soil_water_vol = soil_moisture_vol + transpiration_heat = undefined + latent_heat_canopy = undefined + z0_total = 0.002 + latent_heat_total = latent_heat_ground + t2mmp(i) = temperature_bare_2m + q2mp(i) = spec_humidity_bare_2m + + else ! not glacier + + ice_flag = 0 + + call noahmp_sflx (parameters , & + i_location ,j_location ,latitude , & + year_length ,julian_day ,cosine_zenith , & + timestep ,spatial_scale ,atmosphere_thickness , & + soil_levels ,soil_interface_depth ,max_snow_levels , & + vegetation_frac ,max_vegetation_frac ,vegetation_category , & + ice_flag ,surface_type ,crop_type , & + eq_soil_water_vol ,temperature_forcing ,air_pressure_forcing , & + air_pressure_surface ,uwind_forcing ,vwind_forcing , & + spec_humidity_forcing ,cloud_water_forcing ,sw_radiation_forcing , & + radiation_lw_forcing ,precip_convective , & + precip_non_convective ,precip_sh_convective ,precip_snow , & + precip_graupel ,precip_hail ,temperature_soil_bot , & + co2_air ,o2_air ,foliage_nitrogen , & + snow_ice_frac_old , & + forcing_height ,snow_albedo_old ,snow_water_equiv_old , & + temperature_snow_soil ,soil_liquid_vol ,soil_moisture_vol , & + temperature_canopy_air,vapor_pres_canopy_air ,canopy_wet_fraction , & + canopy_liquid ,canopy_ice ,temperature_leaf , & + temperature_ground ,spec_humidity_surface ,snowfall , & + rainfall ,snow_levels ,interface_depth , & + snow_depth ,snow_water_equiv ,snow_level_ice , & + snow_level_liquid ,depth_water_table ,aquifer_water , & + saturated_water , & + lake_water ,leaf_carbon ,root_carbon , & + stem_carbon ,wood_carbon ,soil_carbon_stable , & + soil_carbon_fast ,leaf_area_index ,stem_area_index , & + cm_noahmp ,ch_noahmp ,snow_age , & + grain_carbon ,growing_deg_days ,plant_growth_stage , & + soil_moisture_wtd ,deep_recharge ,recharge , & + z0_total ,sw_absorbed_total ,sw_reflected_total , & + lw_absorbed_total ,sensible_heat_total ,ground_heat_total , & + latent_heat_canopy ,latent_heat_ground ,transpiration_heat , & + evaporation_canopy ,transpiration ,evaporation_soil , & + temperature_radiative ,temperature_bare_grd ,temperature_veg_grd , & + temperature_veg_2m ,temperature_bare_2m ,spec_humidity_veg_2m , & + spec_humidity_bare_2m ,runoff_surface ,runoff_baseflow , & + par_absorbed ,photosynthesis ,sw_absorbed_veg , & + sw_absorbed_ground ,snow_cover_fraction ,net_eco_exchange , & + global_prim_prod ,net_prim_prod ,vegetation_fraction , & + albedo_total ,snowmelt_out ,snowmelt_shallow , & + snowmelt_shallow_1 ,snowmelt_shallow_2 ,rs_sunlit , & + rs_shaded ,albedo_direct ,albedo_diffuse , & + albedo_direct_snow ,albedo_diffuse_snow ,canopy_gap_fraction , & + incanopy_gap_fraction ,ch_vegetated ,ch_bare_ground , & + emissivity_total ,sensible_heat_grd_veg ,sensible_heat_leaf , & + sensible_heat_grd_bar ,latent_heat_grd_veg ,latent_heat_grd_bare , & + ground_heat_veg ,ground_heat_bare ,lw_absorbed_grd_veg , & + lw_absorbed_leaf ,lw_absorbed_grd_bare ,latent_heat_trans , & + latent_heat_leaf ,ch_leaf ,ch_below_canopy , & + ch_vegetated_2m ,ch_bare_ground_2m ,precip_frozen_frac , & + precip_adv_heat_veg ,precip_adv_heat_grd_v ,precip_adv_heat_grd_b , & + precip_adv_heat_total ,snow_sublimation ,lai_sunlit , & +#ifdef CCPP + lai_shaded ,leaf_air_resistance , & + errmsg ,errflg ) +#else + lai_shaded ,leaf_air_resistance ) +#endif + +#ifdef CCPP + if (errflg /= 0) return +#endif + + latent_heat_total = latent_heat_canopy + latent_heat_ground + transpiration_heat + + t2mmp(i) = temperature_veg_2m * vegetation_fraction + & + temperature_bare_2m * (1-vegetation_fraction) + q2mp(i) = spec_humidity_veg_2m * vegetation_fraction + & + spec_humidity_bare_2m * (1-vegetation_fraction) + + endif ! glacial split ends + +! +! --- noah-mp inout and out variables +! + + tsnoxy (i,:) = temperature_snow_soil(-2: 0) + stc (i,:) = temperature_snow_soil( 1:km) + hflx (i) = sensible_heat_total !note unit change below + evap (i) = latent_heat_total !note unit change below + evbs (i) = latent_heat_ground + evcw (i) = latent_heat_canopy + trans (i) = transpiration_heat + gflux (i) = -1.0*ground_heat_total ! opposite sign to be consistent with noah + snohf (i) = snowmelt_out * con_hfus ! only snow that exits pack + sbsno (i) = snow_sublimation + + cmxy (i) = cm_noahmp + chxy (i) = ch_noahmp + zorl (i) = z0_total * 100.0 ! convert to cm + + smc (i,:) = soil_moisture_vol + slc (i,:) = soil_liquid_vol + snowxy (i) = float(snow_levels) + weasd (i) = snow_water_equiv + snicexy (i,:) = snow_level_ice + snliqxy (i,:) = snow_level_liquid + snwdph (i) = snow_depth * 1000.0 ! convert from mm to m + canopy (i) = canopy_ice + canopy_liquid + canliqxy (i) = canopy_liquid + canicexy (i) = canopy_ice + zwtxy (i) = depth_water_table + waxy (i) = aquifer_water + wtxy (i) = saturated_water + qsnowxy (i) = snowfall + drain (i) = runoff_baseflow + runoff (i) = runoff_surface + + lfmassxy (i) = leaf_carbon + rtmassxy (i) = root_carbon + stmassxy (i) = stem_carbon + woodxy (i) = wood_carbon + stblcpxy (i) = soil_carbon_stable + fastcpxy (i) = soil_carbon_fast + xlaixy (i) = leaf_area_index + xsaixy (i) = stem_area_index + + snowc (i) = snow_cover_fraction + sncovr1 (i) = snow_cover_fraction + qsurf (i) = q1(i) + evap(i) / (con_hvap / con_cp * density * ch(i) * wind(i)) + tskin (i) = temperature_radiative + tsurf (i) = temperature_radiative + tvxy (i) = temperature_leaf + tgxy (i) = temperature_ground + tahxy (i) = temperature_canopy_air + eahxy (i) = vapor_pres_canopy_air + emiss (i) = emissivity_total + + if(albedo_total > 0.0) then + sfalb(i) = albedo_total + albdvis(i) = albedo_direct(1) + albdnir(i) = albedo_direct(2) + albivis(i) = albedo_diffuse(1) + albinir(i) = albedo_diffuse(2) + end if + + zsnsoxy (i,:) = interface_depth + + wslakexy (i) = lake_water ! not active + fwetxy (i) = canopy_wet_fraction + taussxy (i) = snow_age + alboldxy (i) = snow_albedo_old + sneqvoxy (i) = snow_water_equiv_old + + smcwtdxy (i) = soil_moisture_wtd ! only need for run=5 + deeprechxy(i) = deep_recharge ! only need for run=5 + rechxy (i) = recharge ! only need for run=5 + smoiseq (i,:) = eq_soil_water_vol ! only need for run=5; listed as in + + stm (i) = (0.1*soil_moisture_vol(1) + & + 0.3*soil_moisture_vol(2) + & + 0.6*soil_moisture_vol(3) + & ! clean up and use depths above + 1.0*soil_moisture_vol(4))*1000.0 ! unit conversion from m to kg m-2 + + wet1 (i) = soil_moisture_vol(1) / smcmax_table(soil_category(1)) + smcwlt2(i) = smcdry_table(soil_category(1)) !!!change to wilt? + smcref2(i) = smcref_table(soil_category(1)) + +! +! --- change units for output +! + hflx(i) = hflx(i) / density / con_cp + evap(i) = evap(i) / density / con_hvap + +! +! --- calculate potential evaporation using noah code +! + potential_temperature = temperature_forcing * prslki(i) + virtual_temperature = temperature_forcing * (1.0 + 0.61*spec_humidity_forcing) + penman_radiation = sw_absorbed_total + radiation_lw_forcing + dqsdt = spec_humidity_sat * a23m4/(temperature_forcing-a4)**2 + + precip_freeze_frac_in = srflag(i) + is_snowing = .false. + is_freeze_rain = .false. + if (precipitation_forcing > 0.0) then + if (precip_freeze_frac_in > 0.0) then ! rain/snow flag, one condition is enough? + is_snowing = .true. + else + if (temperature_forcing <= 275.15) is_freeze_rain = .true. + end if + end if + + call penman (temperature_forcing, air_pressure_forcing , ch_noahmp , & + virtual_temperature, potential_temperature, precipitation_forcing, & + penman_radiation , ground_heat_total , spec_humidity_forcing, & + spec_humidity_sat , potential_evaporation, is_snowing , & + is_freeze_rain , precip_freeze_frac_in, dqsdt , & + emissivity_total , snow_cover_fraction ) + + ep(i) = potential_evaporation + + end if ! flag_iter(i) .and. dry(i) + + end do ! im loop + +! +! --- restore land-related prognostic fields for guess run TARGET FOR REMOVAL +! + + do i = 1, im + if (dry(i) .and. flag_guess(i)) then + weasd(i) = weasd_old(i) + snwdph(i) = snwdph_old(i) + tskin(i) = tskin_old(i) + canopy(i) = canopy_old(i) + tprcp(i) = tprcp_old(i) + srflag(i) = srflag_old(i) + snowxy(i) = snow_old(i) + tvxy(i) = tv_old(i) + tgxy(i) = tg_old(i) + canicexy(i) = canice_old(i) + canliqxy(i) = canliq_old(i) + eahxy(i) = eah_old(i) + tahxy(i) = tah_old(i) + fwetxy(i) = fwet_old(i) + sneqvoxy(i) = sneqvo_old(i) + alboldxy(i) = albold_old(i) + qsnowxy(i) = qsnow_old(i) + wslakexy(i) = wslake_old(i) + zwtxy(i) = zwt_old(i) + waxy(i) = wa_old(i) + wtxy(i) = wt_old(i) + lfmassxy(i) = lfmass_old(i) + rtmassxy(i) = rtmass_old(i) + stmassxy(i) = stmass_old(i) + woodxy(i) = wood_old(i) + stblcpxy(i) = stblcp_old(i) + fastcpxy(i) = fastcp_old(i) + xlaixy(i) = xlai_old(i) + xsaixy(i) = xsai_old(i) + taussxy(i) = tauss_old(i) + smcwtdxy(i) = smcwtd_old(i) + rechxy(i) = rech_old(i) + deeprechxy(i) = deeprech_old(i) + + do k = 1, km + smc(i,k) = smc_old(i,k) + stc(i,k) = stc_old(i,k) + slc(i,k) = slc_old(i,k) + smoiseq(i,k) = smoiseq_old(i,k) + end do + + do k = -2,0 + tsnoxy(i,k) = tsno_old(i,k) + snicexy(i,k) = snice_old(i,k) + snliqxy(i,k) = snliq_old(i,k) + end do + + do k = -2, km + zsnsoxy(i,k) = zsnso_old(i,k) + end do + + else + tskin(i) = tsurf(i) + + end if + end do + + return + + end subroutine noahmpdrv_run +!> @} +!----------------------------------- + +!> \ingroup NoahMP_LSM +!! \brief This subroutine fills in a derived data type of type noahmp_parameters with data +!! from the module \ref noahmp_tables. + subroutine transfer_mp_parameters (vegtype,soiltype,slopetype, & + soilcolor,croptype,parameters) + + use noahmp_tables + use module_sf_noahmplsm + + implicit none + + integer, intent(in) :: vegtype + integer, intent(in) :: soiltype(4) + integer, intent(in) :: slopetype + integer, intent(in) :: soilcolor + integer, intent(in) :: croptype + + type (noahmp_parameters), intent(out) :: parameters + + real :: refdk + real :: refkdt + real :: frzk + real :: frzfact + integer :: isoil + + parameters%iswater = iswater_table + parameters%isbarren = isbarren_table + parameters%isice = isice_table + parameters%iscrop = iscrop_table + parameters%eblforest = eblforest_table + +!-----------------------------------------------------------------------& + parameters%urban_flag = .false. + if( vegtype == isurban_table .or. vegtype == 31 & + & .or.vegtype == 32 .or. vegtype == 33) then + parameters%urban_flag = .true. + endif + +!------------------------------------------------------------------------------------------! +! transfer veg parameters +!------------------------------------------------------------------------------------------! + + parameters%ch2op = ch2op_table(vegtype) !maximum intercepted h2o per unit lai+sai (mm) + parameters%dleaf = dleaf_table(vegtype) !characteristic leaf dimension (m) + parameters%z0mvt = z0mvt_table(vegtype) !momentum roughness length (m) + parameters%hvt = hvt_table(vegtype) !top of canopy (m) + parameters%hvb = hvb_table(vegtype) !bottom of canopy (m) + parameters%den = den_table(vegtype) !tree density (no. of trunks per m2) + parameters%rc = rc_table(vegtype) !tree crown radius (m) + parameters%mfsno = mfsno_table(vegtype) !snowmelt m parameter () + parameters%scffac = scffac_table(vegtype) !snow cover factor + parameters%saim = saim_table(vegtype,:) !monthly stem area index, one-sided + parameters%laim = laim_table(vegtype,:) !monthly leaf area index, one-sided + parameters%sla = sla_table(vegtype) !single-side leaf area per kg [m2/kg] + parameters%dilefc = dilefc_table(vegtype) !coeficient for leaf stress death [1/s] + parameters%dilefw = dilefw_table(vegtype) !coeficient for leaf stress death [1/s] + parameters%fragr = fragr_table(vegtype) !fraction of growth respiration !original was 0.3 + parameters%ltovrc = ltovrc_table(vegtype) !leaf turnover [1/s] + + parameters%c3psn = c3psn_table(vegtype) !photosynthetic pathway: 0. = c4, 1. = c3 + parameters%kc25 = kc25_table(vegtype) !co2 michaelis-menten constant at 25c (pa) + parameters%akc = akc_table(vegtype) !q10 for kc25 + parameters%ko25 = ko25_table(vegtype) !o2 michaelis-menten constant at 25c (pa) + parameters%ako = ako_table(vegtype) !q10 for ko25 + parameters%vcmx25 = vcmx25_table(vegtype) !maximum rate of carboxylation at 25c (umol co2/m**2/s) + parameters%avcmx = avcmx_table(vegtype) !q10 for vcmx25 + parameters%bp = bp_table(vegtype) !minimum leaf conductance (umol/m**2/s) + parameters%mp = mp_table(vegtype) !slope of conductance-to-photosynthesis relationship + parameters%qe25 = qe25_table(vegtype) !quantum efficiency at 25c (umol co2 / umol photon) + parameters%aqe = aqe_table(vegtype) !q10 for qe25 + parameters%rmf25 = rmf25_table(vegtype) !leaf maintenance respiration at 25c (umol co2/m**2/s) + parameters%rms25 = rms25_table(vegtype) !stem maintenance respiration at 25c (umol co2/kg bio/s) + parameters%rmr25 = rmr25_table(vegtype) !root maintenance respiration at 25c (umol co2/kg bio/s) + parameters%arm = arm_table(vegtype) !q10 for maintenance respiration + parameters%folnmx = folnmx_table(vegtype) !foliage nitrogen concentration when f(n)=1 (%) + parameters%tmin = tmin_table(vegtype) !minimum temperature for photosynthesis (k) + + parameters%xl = xl_table(vegtype) !leaf/stem orientation index + parameters%rhol = rhol_table(vegtype,:) !leaf reflectance: 1=vis, 2=nir + parameters%rhos = rhos_table(vegtype,:) !stem reflectance: 1=vis, 2=nir + parameters%taul = taul_table(vegtype,:) !leaf transmittance: 1=vis, 2=nir + parameters%taus = taus_table(vegtype,:) !stem transmittance: 1=vis, 2=nir + + parameters%mrp = mrp_table(vegtype) !microbial respiration parameter (umol co2 /kg c/ s) + parameters%cwpvt = cwpvt_table(vegtype) !empirical canopy wind parameter + + parameters%wrrat = wrrat_table(vegtype) !wood to non-wood ratio + parameters%wdpool = wdpool_table(vegtype) !wood pool (switch 1 or 0) depending on woody or not [-] + parameters%tdlef = tdlef_table(vegtype) !characteristic t for leaf freezing [k] + + parameters%nroot = nroot_table(vegtype) !number of soil layers with root present + parameters%rgl = rgl_table(vegtype) !parameter used in radiation stress function + parameters%rsmin = rs_table(vegtype) !minimum stomatal resistance [s m-1] + parameters%hs = hs_table(vegtype) !parameter used in vapor pressure deficit function + parameters%topt = topt_table(vegtype) !optimum transpiration air temperature [k] + parameters%rsmax = rsmax_table(vegtype) !maximal stomatal resistance [s m-1] + +!------------------------------------------------------------------------------------------! +! transfer rad parameters +!------------------------------------------------------------------------------------------! + + parameters%albsat = albsat_table(soilcolor,:) + parameters%albdry = albdry_table(soilcolor,:) + parameters%albice = albice_table + parameters%alblak = alblak_table + parameters%omegas = omegas_table + parameters%betads = betads_table + parameters%betais = betais_table + parameters%eg = eg_table + +!------------------------------------------------------------------------------------------! +! Transfer crop parameters +!------------------------------------------------------------------------------------------! + + if(croptype > 0) then + parameters%pltday = pltday_table(croptype) ! planting date + parameters%hsday = hsday_table(croptype) ! harvest date + parameters%plantpop = plantpop_table(croptype) ! plant density [per ha] - used? + parameters%irri = irri_table(croptype) ! irrigation strategy 0= non-irrigation 1=irrigation (no water-stress) + parameters%gddtbase = gddtbase_table(croptype) ! base temperature for gdd accumulation [c] + parameters%gddtcut = gddtcut_table(croptype) ! upper temperature for gdd accumulation [c] + parameters%gdds1 = gdds1_table(croptype) ! gdd from seeding to emergence + parameters%gdds2 = gdds2_table(croptype) ! gdd from seeding to initial vegetative + parameters%gdds3 = gdds3_table(croptype) ! gdd from seeding to post vegetative + parameters%gdds4 = gdds4_table(croptype) ! gdd from seeding to intial reproductive + parameters%gdds5 = gdds5_table(croptype) ! gdd from seeding to pysical maturity + parameters%c3c4 = c3c4_table(croptype) ! photosynthetic pathway: 1. = c3 2. = c4 + parameters%aref = aref_table(croptype) ! reference maximum co2 assimulation rate + parameters%psnrf = psnrf_table(croptype) ! co2 assimulation reduction factor(0-1) (e.g.pests, weeds) + parameters%i2par = i2par_table(croptype) ! fraction of incoming solar radiation to photosynthetically active radiation + parameters%tassim0 = tassim0_table(croptype) ! minimum temperature for co2 assimulation [c] + parameters%tassim1 = tassim1_table(croptype) ! co2 assimulation linearly increasing until temperature reaches t1 [c] + parameters%tassim2 = tassim2_table(croptype) ! co2 assmilation rate remain at aref until temperature reaches t2 [c] + parameters%k = k_table(croptype) ! light extinction coefficient + parameters%epsi = epsi_table(croptype) ! initial light use efficiency + parameters%q10mr = q10mr_table(croptype) ! q10 for maintainance respiration + parameters%foln_mx = foln_mx_table(croptype) ! foliage nitrogen concentration when f(n)=1 (%) + parameters%lefreez = lefreez_table(croptype) ! characteristic t for leaf freezing [k] + parameters%dile_fc = dile_fc_table(croptype,:) ! coeficient for temperature leaf stress death [1/s] + parameters%dile_fw = dile_fw_table(croptype,:) ! coeficient for water leaf stress death [1/s] + parameters%fra_gr = fra_gr_table(croptype) ! fraction of growth respiration + parameters%lf_ovrc = lf_ovrc_table(croptype,:) ! fraction of leaf turnover [1/s] + parameters%st_ovrc = st_ovrc_table(croptype,:) ! fraction of stem turnover [1/s] + parameters%rt_ovrc = rt_ovrc_table(croptype,:) ! fraction of root tunrover [1/s] + parameters%lfmr25 = lfmr25_table(croptype) ! leaf maintenance respiration at 25c [umol co2/m**2 /s] + parameters%stmr25 = stmr25_table(croptype) ! stem maintenance respiration at 25c [umol co2/kg bio/s] + parameters%rtmr25 = rtmr25_table(croptype) ! root maintenance respiration at 25c [umol co2/kg bio/s] + parameters%grainmr25 = grainmr25_table(croptype) ! grain maintenance respiration at 25c [umol co2/kg bio/s] + parameters%lfpt = lfpt_table(croptype,:) ! fraction of carbohydrate flux to leaf + parameters%stpt = stpt_table(croptype,:) ! fraction of carbohydrate flux to stem + parameters%rtpt = rtpt_table(croptype,:) ! fraction of carbohydrate flux to root + parameters%grainpt = grainpt_table(croptype,:) ! fraction of carbohydrate flux to grain + parameters%bio2lai = bio2lai_table(croptype) ! leaf are per living leaf biomass [m^2/kg] + end if + +!------------------------------------------------------------------------------------------! +! transfer global parameters +!------------------------------------------------------------------------------------------! + + parameters%co2 = co2_table + parameters%o2 = o2_table + parameters%timean = timean_table + parameters%fsatmx = fsatmx_table + parameters%z0sno = z0sno_table + parameters%ssi = ssi_table + parameters%snow_ret_fac = snow_ret_fac_table + parameters%swemx = swemx_table + parameters%tau0 = tau0_table + parameters%grain_growth = grain_growth_table + parameters%extra_growth = extra_growth_table + parameters%dirt_soot = dirt_soot_table + parameters%bats_cosz = bats_cosz_table + parameters%bats_vis_new = bats_vis_new_table + parameters%bats_nir_new = bats_nir_new_table + parameters%bats_vis_age = bats_vis_age_table + parameters%bats_nir_age = bats_nir_age_table + parameters%bats_vis_dir = bats_vis_dir_table + parameters%bats_nir_dir = bats_nir_dir_table + parameters%rsurf_snow = rsurf_snow_table + parameters%rsurf_exp = rsurf_exp_table + parameters%snow_emis = snow_emis_table + +! ---------------------------------------------------------------------- +! transfer soil parameters +! ---------------------------------------------------------------------- + + do isoil = 1, size(soiltype) + parameters%bexp(isoil) = bexp_table (soiltype(isoil)) + parameters%dksat(isoil) = dksat_table (soiltype(isoil)) + parameters%dwsat(isoil) = dwsat_table (soiltype(isoil)) + parameters%psisat(isoil) = psisat_table (soiltype(isoil)) + parameters%quartz(isoil) = quartz_table (soiltype(isoil)) + parameters%smcdry(isoil) = smcdry_table (soiltype(isoil)) + parameters%smcmax(isoil) = smcmax_table (soiltype(isoil)) + parameters%smcref(isoil) = smcref_table (soiltype(isoil)) + parameters%smcwlt(isoil) = smcwlt_table (soiltype(isoil)) + end do + + parameters%f1 = f1_table(soiltype(1)) + parameters%refdk = refdk_table + parameters%refkdt = refkdt_table + +! ---------------------------------------------------------------------- +! transfer genparm parameters +! ---------------------------------------------------------------------- + parameters%csoil = csoil_table + parameters%zbot = zbot_table + parameters%czil = czil_table + + frzk = frzk_table + parameters%kdt = parameters%refkdt * parameters%dksat(1) / parameters%refdk + parameters%slope = slope_table(slopetype) + + if(parameters%urban_flag)then ! hardcoding some urban parameters for soil + parameters%smcmax = 0.45 + parameters%smcref = 0.42 + parameters%smcwlt = 0.40 + parameters%smcdry = 0.40 + parameters%csoil = 3.e6 + endif + + ! adjust frzk parameter to actual soil type: frzk * frzfact + +!-----------------------------------------------------------------------& + if(soiltype(1) /= 14) then + frzfact = (parameters%smcmax(1) / parameters%smcref(1)) * (0.412 / 0.468) + parameters%frzx = frzk * frzfact + end if + + end subroutine transfer_mp_parameters + +!> \ingroup NoahMP_LSM +!! \brief This subroutine uses a pedotransfer method to calculate soil properties. +SUBROUTINE PEDOTRANSFER_SR2006(nsoil,sand,clay,orgm,parameters) + + use module_sf_noahmplsm + use noahmp_tables + + implicit none + + integer, intent(in ) :: nsoil ! number of soil layers + real, dimension( 1:nsoil ), intent(inout) :: sand + real, dimension( 1:nsoil ), intent(inout) :: clay + real, dimension( 1:nsoil ), intent(inout) :: orgm + + real, dimension( 1:nsoil ) :: theta_1500t + real, dimension( 1:nsoil ) :: theta_1500 + real, dimension( 1:nsoil ) :: theta_33t + real, dimension( 1:nsoil ) :: theta_33 + real, dimension( 1:nsoil ) :: theta_s33t + real, dimension( 1:nsoil ) :: theta_s33 + real, dimension( 1:nsoil ) :: psi_et + real, dimension( 1:nsoil ) :: psi_e + + type(noahmp_parameters), intent(inout) :: parameters + integer :: k + + do k = 1,4 + if(sand(k) <= 0 .or. clay(k) <= 0) then + sand(k) = 0.41 + clay(k) = 0.18 + end if + if(orgm(k) <= 0 ) orgm(k) = 0.0 + end do + + theta_1500t = sr2006_theta_1500t_a*sand & + + sr2006_theta_1500t_b*clay & + + sr2006_theta_1500t_c*orgm & + + sr2006_theta_1500t_d*sand*orgm & + + sr2006_theta_1500t_e*clay*orgm & + + sr2006_theta_1500t_f*sand*clay & + + sr2006_theta_1500t_g + + theta_1500 = theta_1500t & + + sr2006_theta_1500_a*theta_1500t & + + sr2006_theta_1500_b + + theta_33t = sr2006_theta_33t_a*sand & + + sr2006_theta_33t_b*clay & + + sr2006_theta_33t_c*orgm & + + sr2006_theta_33t_d*sand*orgm & + + sr2006_theta_33t_e*clay*orgm & + + sr2006_theta_33t_f*sand*clay & + + sr2006_theta_33t_g + + theta_33 = theta_33t & + + sr2006_theta_33_a*theta_33t*theta_33t & + + sr2006_theta_33_b*theta_33t & + + sr2006_theta_33_c + + theta_s33t = sr2006_theta_s33t_a*sand & + + sr2006_theta_s33t_b*clay & + + sr2006_theta_s33t_c*orgm & + + sr2006_theta_s33t_d*sand*orgm & + + sr2006_theta_s33t_e*clay*orgm & + + sr2006_theta_s33t_f*sand*clay & + + sr2006_theta_s33t_g + + theta_s33 = theta_s33t & + + sr2006_theta_s33_a*theta_s33t & + + sr2006_theta_s33_b + + psi_et = sr2006_psi_et_a*sand & + + sr2006_psi_et_b*clay & + + sr2006_psi_et_c*theta_s33 & + + sr2006_psi_et_d*sand*theta_s33 & + + sr2006_psi_et_e*clay*theta_s33 & + + sr2006_psi_et_f*sand*clay & + + sr2006_psi_et_g + + psi_e = psi_et & + + sr2006_psi_e_a*psi_et*psi_et & + + sr2006_psi_e_b*psi_et & + + sr2006_psi_e_c + + parameters%smcwlt = theta_1500 + parameters%smcref = theta_33 + parameters%smcmax = theta_33 & + + theta_s33 & + + sr2006_smcmax_a*sand & + + sr2006_smcmax_b + + parameters%bexp = 3.816712826 / (log(theta_33) - log(theta_1500) ) + parameters%psisat = psi_e + parameters%dksat = 1930.0 * (parameters%smcmax - theta_33) ** (3.0 - 1.0/parameters%bexp) + parameters%quartz = sand + +! Units conversion + + parameters%psisat = max(0.1,parameters%psisat) ! arbitrarily impose a limit of 0.1kpa + parameters%psisat = 0.101997 * parameters%psisat ! convert kpa to m + parameters%dksat = parameters%dksat / 3600000.0 ! convert mm/h to m/s + parameters%dwsat = parameters%dksat * parameters%psisat *parameters%bexp / parameters%smcmax ! units should be m*m/s + parameters%smcdry = parameters%smcwlt + +! Introducing somewhat arbitrary limits (based on SOILPARM) to prevent bad things + + parameters%smcmax = max(0.32 ,min(parameters%smcmax, 0.50 )) + parameters%smcref = max(0.17 ,min(parameters%smcref,parameters%smcmax )) + parameters%smcwlt = max(0.01 ,min(parameters%smcwlt,parameters%smcref )) + parameters%smcdry = max(0.01 ,min(parameters%smcdry,parameters%smcref )) + parameters%bexp = max(2.50 ,min(parameters%bexp, 12.0 )) + parameters%psisat = max(0.03 ,min(parameters%psisat, 1.00 )) + parameters%dksat = max(5.e-7,min(parameters%dksat, 1.e-5)) + parameters%dwsat = max(1.e-6,min(parameters%dwsat, 3.e-5)) + parameters%quartz = max(0.05 ,min(parameters%quartz, 0.95 )) + + END SUBROUTINE PEDOTRANSFER_SR2006 + +!-----------------------------------------------------------------------& + +!> \ingroup NoahMP_LSM +!! brief Calculate potential evaporation for the current point. Various +!! partial sums/products are also calculated and passed back to the +!! calling routine for later use. + subroutine penman (sfctmp,sfcprs,ch,t2v,th2,prcp,fdown,ssoil, & + & q2,q2sat,etp,snowng,frzgra,ffrozp, & + & dqsdt2,emissi_in,sncovr) + +! etp is calcuated right after ssoil + +! ---------------------------------------------------------------------- +! subroutine penman +! ---------------------------------------------------------------------- + implicit none + logical, intent(in) :: snowng, frzgra + real, intent(in) :: ch, dqsdt2,fdown,prcp,ffrozp, & + & q2, q2sat,ssoil, sfcprs, sfctmp, & + & t2v, th2,emissi_in,sncovr + real, intent(out) :: etp + real :: epsca,flx2,rch,rr,t24 + real :: a, delta, fnet,rad,rho,emissi,elcp1,lvs + + real, parameter :: elcp = 2.4888e+3, lsubc = 2.501000e+6,cp = 1004.6 + real, parameter :: lsubs = 2.83e+6, rd = 287.05, cph2o = 4.1855e+3 + real, parameter :: cpice = 2.106e+3, lsubf = 3.335e5 + real, parameter :: sigma = 5.6704e-8 + +! ---------------------------------------------------------------------- +! executable code begins here: +! ---------------------------------------------------------------------- +! ---------------------------------------------------------------------- +! prepare partial quantities for penman equation. +! ---------------------------------------------------------------------- + emissi=emissi_in +! elcp1 = (1.0-sncovr)*elcp + sncovr*elcp*lsubs/lsubc + lvs = (1.0-sncovr)*lsubc + sncovr*lsubs + + flx2 = 0.0 + delta = elcp * dqsdt2 +! delta = elcp1 * dqsdt2 + t24 = sfctmp * sfctmp * sfctmp * sfctmp + rr = t24 * 6.48e-8 / (sfcprs * ch) + 1.0 +! rr = emissi*t24 * 6.48e-8 / (sfcprs * ch) + 1.0 + rho = sfcprs / (rd * t2v) + +! ---------------------------------------------------------------------- +! adjust the partial sums / products with the latent heat +! effects caused by falling precipitation. +! ---------------------------------------------------------------------- + rch = rho * cp * ch + if (.not. snowng) then + if (prcp > 0.0) rr = rr + cph2o * prcp / rch + else +! ---- ... fractional snowfall/rainfall + rr = rr + (cpice*ffrozp+cph2o*(1.-ffrozp)) & + & *prcp/rch + end if + +! ---------------------------------------------------------------------- +! include the latent heat effects of frzng rain converting to ice on +! impact in the calculation of flx2 and fnet. +! ---------------------------------------------------------------------- +! fnet = fdown - sigma * t24- ssoil + fnet = fdown - emissi*sigma * t24- ssoil + if (frzgra) then + flx2 = - lsubf * prcp + fnet = fnet - flx2 +! ---------------------------------------------------------------------- +! finish penman equation calculations. +! ---------------------------------------------------------------------- + end if + rad = fnet / rch + th2- sfctmp + a = elcp * (q2sat - q2) +! a = elcp1 * (q2sat - q2) + epsca = (a * rr + rad * delta) / (delta + rr) + etp = epsca * rch / lsubc +! etp = epsca * rch / lvs + +! ---------------------------------------------------------------------- + end subroutine penman + + end module noahmpdrv diff --git a/physics/sfc_noahmp_drv.f b/physics/sfc_noahmp_drv.f deleted file mode 100644 index 963810734..000000000 --- a/physics/sfc_noahmp_drv.f +++ /dev/null @@ -1,1248 +0,0 @@ -!> \file sfc_noahmp_drv.f -!! This file contains the NoahMP land surface scheme driver. - -!>\defgroup NoahMP_LSM NoahMP LSM Model -!! \brief This is the NoahMP LSM driver module, with the functionality of -!! preparing variables to run the NoahMP LSM subroutine noahmp_sflx(), calling NoahMP LSM and post-processing -!! variables for return to the parent model suite including unit conversion, as well -!! as diagnotics calculation. - -!> This module contains the CCPP-compliant NoahMP land surface model driver. - module noahmpdrv - - implicit none - - private - - public :: noahmpdrv_init, noahmpdrv_run, noahmpdrv_finalize - - contains - -!> \ingroup NoahMP_LSM -!! \brief This subroutine is called during the CCPP initialization phase and calls set_soilveg() to -!! initialize soil and vegetation parameters for the chosen soil and vegetation data sources. -!! \section arg_table_noahmpdrv_init Argument Table -!! \htmlinclude noahmpdrv_init.html -!! - subroutine noahmpdrv_init(me, isot, ivegsrc, nlunit, errmsg, & - & errflg) - - use set_soilveg_mod, only: set_soilveg - - implicit none - - integer, intent(in) :: me, isot, ivegsrc, nlunit - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - if (ivegsrc /= 1) then - errmsg = 'The NOAHMP LSM expects that the ivegsrc physics '// - & 'namelist parameter is 1. Exiting...' - errflg = 1 - return - end if - if (isot /= 1) then - errmsg = 'The NOAHMP LSM expects that the isot physics '// - & 'namelist parameter is 1. Exiting...' - errflg = 1 - return - end if - - !--- initialize soil vegetation - call set_soilveg(me, isot, ivegsrc, nlunit) - - end subroutine noahmpdrv_init - - subroutine noahmpdrv_finalize - end subroutine noahmpdrv_finalize - -!> \ingroup NoahMP_LSM -!! \brief This subroutine is the main CCPP entry point for the NoahMP LSM. -!! \section arg_table_noahmpdrv_run Argument Table -!! \htmlinclude noahmpdrv_run.html -!! -!! \section general_noahmpdrv NoahMP Driver General Algorithm -!! @{ -!! - Initialize CCPP error handling variables. -!! - Set a flag to only continue with each grid cell if the fraction of land is non-zero. -!! - This driver may be called as part of an iterative loop. If called as the first "guess" run, -!! save land-related prognostic fields to restore. -!! - Initialize output variables to zero and prepare variables for input into the NoahMP LSM. -!! - Call transfer_mp_parameters() to fill a derived datatype for input into the NoahMP LSM. -!! - Call noahmp_options() to set module-level scheme options for the NoahMP LSM. -!! - If the vegetation type is ice for the grid cell, call noahmp_options_glacier() to set -!! module-level scheme options for NoahMP Glacier and call noahmp_glacier(). -!! - For other vegetation types, call noahmp_sflx(), the entry point of the NoahMP LSM. -!! - Set output variables from the output of noahmp_glacier() and/or noahmp_sflx(). -!! - Call penman() to calculate potential evaporation. -!! - Calculate the surface specific humidity and convert surface sensible and latent heat fluxes in W m-2 from their kinematic values. -!! - If a "guess" run, restore the land-related prognostic fields. -! ! -!----------------------------------- - subroutine noahmpdrv_run & -!................................... -! --- inputs: - & ( im, km, itime, ps, u1, v1, t1, q1, soiltyp, vegtype, & - & sigmaf, sfcemis, dlwflx, dswsfc, snet, delt, tg3, cm, ch, & - & prsl1, prslki, zf, dry, wind, slopetyp, & - & shdmin, shdmax, snoalb, sfalb, flag_iter, flag_guess, & - & idveg, iopt_crs, iopt_btr, iopt_run, iopt_sfc, iopt_frz, & - & iopt_inf, iopt_rad, iopt_alb, iopt_snf, iopt_tbot, & - & iopt_stc, xlatin, xcoszin, iyrlen, julian, & - & rainn_mp, rainc_mp, snow_mp, graupel_mp, ice_mp, & - & con_hvap, con_cp, con_jcal, rhoh2o, con_eps, con_epsm1, & - & con_fvirt, con_rd, con_hfus, & - -! --- in/outs: - & weasd, snwdph, tskin, tprcp, srflag, smc, stc, slc, & - & canopy, trans, tsurf, zorl, & - -! --- Noah MP specific - - & snowxy, tvxy, tgxy, canicexy, canliqxy, eahxy, tahxy, cmxy,& - & chxy, fwetxy, sneqvoxy, alboldxy, qsnowxy, wslakexy, zwtxy,& - & waxy, wtxy, tsnoxy, zsnsoxy, snicexy, snliqxy, lfmassxy, & - & rtmassxy, stmassxy, woodxy, stblcpxy, fastcpxy, xlaixy, & - & xsaixy, taussxy, smoiseq, smcwtdxy, deeprechxy, rechxy, & - -! --- outputs: - & sncovr1, qsurf, gflux, drain, evap, hflx, ep, runoff, & - & cmm, chh, evbs, evcw, sbsno, snowc, stm, snohf, & - & smcwlt2, smcref2, wet1, t2mmp, q2mp, errmsg, errflg) -! -! - use machine , only : kind_phys -! use date_def, only : idate - use funcphys, only : fpvs - - use module_sf_noahmplsm - use module_sf_noahmp_glacier - use noahmp_tables, only : isice_table, co2_table, o2_table, & - & isurban_table,smcref_table,smcdry_table, & - & smcmax_table,co2_table,o2_table, & - & saim_table,laim_table - - implicit none - - real(kind=kind_phys), parameter :: a2 = 17.2693882 - real(kind=kind_phys), parameter :: a3 = 273.16 - real(kind=kind_phys), parameter :: a4 = 35.86 - real(kind=kind_phys), parameter :: a23m4 = a2*(a3-a4) - - real, parameter :: undefined = -1.e36 - - real :: dz8w = undefined - real :: dx = undefined - real :: qc = undefined - real :: foln = 1.0 ! foliage - integer :: nsoil = 4 ! hardwired to Noah - integer :: nsnow = 3 ! max. snow layers - integer :: ist = 1 ! soil type, 1 soil; 2 lake; 14 is water - integer :: isc = 4 ! middle day soil color: soil 1-9 lightest - - real(kind=kind_phys), save :: zsoil(4),sldpth(4) - data zsoil / -0.1, -0.4, -1.0, -2.0 / - data sldpth /0.1, 0.3, 0.6, 1.0 / -! data dzs /0.1, 0.3, 0.6, 1.0 / - -! -! --- input: -! - - integer, intent(in) :: im, km, itime - - integer, dimension(im), intent(in) :: soiltyp, vegtype, slopetyp - - real (kind=kind_phys), dimension(im), intent(in) :: ps, u1, v1, & - & t1, q1, sigmaf, sfcemis, dlwflx, dswsfc, snet, tg3, cm, & - & ch, prsl1, prslki, wind, shdmin, shdmax, & - & snoalb, sfalb, zf, & - & rainn_mp,rainc_mp,snow_mp,graupel_mp,ice_mp - - logical, dimension(im), intent(in) :: dry - - real (kind=kind_phys),dimension(im),intent(in) :: xlatin,xcoszin - - integer, intent(in) :: idveg, iopt_crs,iopt_btr,iopt_run, & - & iopt_sfc,iopt_frz,iopt_inf,iopt_rad, & - & iopt_alb,iopt_snf,iopt_tbot,iopt_stc - - real (kind=kind_phys), intent(in) :: julian - integer, intent(in) :: iyrlen - - - real (kind=kind_phys), intent(in) :: delt - logical, dimension(im), intent(in) :: flag_iter, flag_guess - - real (kind=kind_phys), intent(in) :: con_hvap, con_cp, con_jcal, & - & rhoh2o, con_eps, con_epsm1, con_fvirt, & - & con_rd, con_hfus - -! --- in/out: - real (kind=kind_phys), dimension(im), intent(inout) :: weasd, & - & snwdph, tskin, tprcp, srflag, canopy, trans, tsurf, zorl - - real (kind=kind_phys), dimension(im,km), intent(inout) :: & - & smc, stc, slc - - real (kind=kind_phys), dimension(im), intent(inout) :: snowxy, & - & tvxy,tgxy,canicexy,canliqxy,eahxy,tahxy, & - & cmxy,chxy,fwetxy,sneqvoxy,alboldxy,qsnowxy, & - & wslakexy,zwtxy,waxy,wtxy,lfmassxy,rtmassxy, & - & stmassxy,woodxy,stblcpxy,fastcpxy,xlaixy, & - & xsaixy,taussxy,smcwtdxy,deeprechxy,rechxy - - real (kind=kind_phys),dimension(im,-2:0),intent(inout) :: tsnoxy - real (kind=kind_phys),dimension(im,-2:0),intent(inout) :: snicexy - real (kind=kind_phys),dimension(im,-2:0),intent(inout) :: snliqxy - real (kind=kind_phys),dimension(im,1:4), intent(inout) :: smoiseq - real (kind=kind_phys),dimension(im,-2:4),intent(inout) :: zsnsoxy - - integer, dimension(im) :: jsnowxy - real (kind=kind_phys),dimension(im) :: snodep - real (kind=kind_phys),dimension(im,-2:4) :: tsnsoxy - -! --- output: - - real (kind=kind_phys), dimension(im), intent(out) :: sncovr1, & - & qsurf, gflux, drain, evap, hflx, ep, runoff, cmm, chh, & - & evbs, evcw, sbsno, snowc, stm, snohf, smcwlt2, smcref2, wet1 - real (kind=kind_phys), dimension(:), intent(out) :: t2mmp, q2mp - -! error messages - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - -! --- locals: - real (kind=kind_phys), dimension(im) :: rch, rho, & - & q0, qs1, theta1, tv1, weasd_old, snwdph_old, & - & tprcp_old, srflag_old, tskin_old, canopy_old - - real (kind=kind_phys), dimension(km) :: et,stsoil,smsoil, slsoil - - real (kind=kind_phys),dimension(im,km) :: smc_old,stc_old,slc_old - - real (kind=kind_phys), dimension(im) :: snow_old, tv_old,tg_old, & - & canice_old,canliq_old,eah_old,tah_old,fwet_old,sneqvo_old, & - & albold_old,qsnow_old,wslake_old,zwt_old,wa_old,wt_old, & - & lfmass_old,rtmass_old,stmass_old,wood_old,stblcp_old, & - & fastcp_old,xlai_old,xsai_old,tauss_old,smcwtd_old, & - & deeprech_old,rech_old - - real(kind=kind_phys),dimension(im,1:4) :: smoiseq_old - real(kind=kind_phys),dimension(im,-2:0) :: tsno_old - real(kind=kind_phys),dimension(im,-2:0) :: snice_old - real(kind=kind_phys),dimension(im,-2:0) :: snliq_old - real(kind=kind_phys),dimension(im,-2:4) :: zsnso_old - real(kind=kind_phys),dimension(im,-2:4) :: tsnso_old - - - real (kind=kind_phys) :: alb, albedo, beta, chx, cmx, cmc, & - & dew, drip, dqsdt2, ec, edir, ett, eta, esnow, etp, & - & flx1, flx2, flx3, ffrozp, lwdn, pc, prcp, ptu, q2, & - & q2sat, solnet, rc, rcs, rct, rcq, rcsoil, rsmin, & - & runoff1, runoff2, runoff3, sfcspd, sfcprs, sfctmp, & - & sfcems, sheat, shdfac, shdmin1d, shdmax1d, smcwlt, & - & smcdry, smcref, smcmax, sneqv, snoalb1d, snowh, & - & snomlt, sncovr, soilw, soilm, ssoil, tsea, th2, & - & xlai, zlvl, swdn, tem, psfc,fdown,t2v,tbot - - real (kind=kind_phys) :: pconv,pnonc,pshcv,psnow,pgrpl,phail - real (kind=kind_phys) :: lat,cosz,uu,vv,swe - integer :: isnowx - - real (kind=kind_phys) :: tvx,tgx,canicex,canliqx,eahx, & - & tahx,fwetx,sneqvox,alboldx,qsnowx,wslakex,zwtx, & - & wax,wtx,lfmassx, rtmassx,stmassx, woodx,stblcpx, & - & fastcpx,xlaix,xsaix,taussx,smcwtdx,deeprechx,rechx, & - & qsfc1d - - real (kind=kind_phys), dimension(-2:0) :: tsnox, snicex, snliqx - real (kind=kind_phys), dimension(-2:0) :: ficeold - real (kind=kind_phys), dimension( km ) :: smoiseqx - real (kind=kind_phys), dimension(-2:4) :: zsnsox - real (kind=kind_phys), dimension(-2:4) :: tsnsox - - real (kind=kind_phys) :: z0wrf,fsa,fsr,fira,fsh,fcev,fgev, & - & fctr,ecan,etran,trad,tgb,tgv,t2mv, & - & t2mb,q2v,q2b,runsrf,runsub,apar, & - & psn,sav,sag,fsno,nee,gpp,npp,fveg, & - & qsnbot,ponding,ponding1,ponding2, & - & rssun,rssha,bgap,wgap,chv,chb,emissi, & - & shg,shc,shb,evg,evb,ghv,ghb,irg,irc, & - & irb,tr,evc,chleaf,chuc,chv2,chb2, & - & fpice,pahv,pahg,pahb,pah,co2pp,o2pp,ch2b - - integer :: i, k, ice, stype, vtype ,slope,nroot,couple - logical :: flag(im) - logical :: snowng,frzgra - - ! --- local derived constants: - - real(kind=kind_phys) :: cpinv, hvapi, convrad, elocp - - type(noahmp_parameters) :: parameters - -! -!===> ... begin here -! - cpinv = 1.0/con_cp - hvapi = 1.0/con_hvap - convrad = con_jcal*1.e4/60.0 - elocp = con_hvap/con_cp - -! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - -! --- ... set flag for land points - - do i = 1, im - flag(i) = dry(i) - enddo - -! --- ... save land-related prognostic fields for guess run - - do i = 1, im - if (flag(i) .and. flag_guess(i)) then - weasd_old(i) = weasd(i) - snwdph_old(i) = snwdph(i) - tskin_old(i) = tskin(i) - canopy_old(i) = canopy(i) - tprcp_old(i) = tprcp(i) - srflag_old(i) = srflag(i) -! -! - snow_old(i) = snowxy(i) - tv_old(i) = tvxy(i) - tg_old(i) = tgxy(i) - canice_old(i) = canicexy(i) - canliq_old(i) = canliqxy(i) - eah_old(i) = eahxy(i) - tah_old(i) = tahxy(i) - fwet_old(i) = fwetxy(i) - sneqvo_old(i) = sneqvoxy(i) - albold_old(i) = alboldxy(i) - qsnow_old(i) = qsnowxy(i) - wslake_old(i) = wslakexy(i) - zwt_old(i) = zwtxy(i) - wa_old(i) = waxy(i) - wt_old(i) = wtxy(i) - lfmass_old(i) = lfmassxy(i) - rtmass_old(i) = rtmassxy(i) - stmass_old(i) = stmassxy(i) - wood_old(i) = woodxy(i) - stblcp_old(i) = stblcpxy(i) - fastcp_old(i) = fastcpxy(i) - xlai_old(i) = xlaixy(i) - xsai_old(i) = xsaixy(i) - tauss_old(i) = taussxy(i) - smcwtd_old(i) = smcwtdxy(i) - rech_old(i) = rechxy(i) - - deeprech_old(i) = deeprechxy(i) -! - do k = 1, km - smc_old(i,k) = smc(i,k) - stc_old(i,k) = stc(i,k) - slc_old(i,k) = slc(i,k) - enddo - -! - do k = 1, km - smoiseq_old(i,k) = smoiseq(i,k) - enddo - - do k = -2,0 - tsno_old(i,k) = tsnoxy(i,k) - snice_old(i,k) = snicexy(i,k) - snliq_old(i,k) = snliqxy(i,k) - enddo - - do k = -2,4 - zsnso_old (i,k) = zsnsoxy(i,k) - enddo - - endif - enddo - -! -! call to init MP options -! -! &_________________________________________________________________ & - -! --- ... initialization block - - do i = 1, im - if (flag_iter(i) .and. flag(i)) then - ep(i) = 0.0 - evap (i) = 0.0 - hflx (i) = 0.0 - gflux(i) = 0.0 - drain(i) = 0.0 - canopy(i) = max(canopy(i), 0.0) - - evbs (i) = 0.0 - evcw (i) = 0.0 - trans(i) = 0.0 - sbsno(i) = 0.0 - snowc(i) = 0.0 - snohf(i) = 0.0 - endif - enddo - -! --- ... initialize variables - - do i = 1, im - if (flag_iter(i) .and. flag(i)) then - q0(i) = max(q1(i), 1.e-8) !* q1=specific humidity at level 1 (kg/kg) - theta1(i) = t1(i) * prslki(i) !* adiabatic temp at level 1 (k) - - tv1(i) = t1(i) * (1.0 + con_fvirt*q0(i)) - rho(i) = prsl1(i) / (con_rd * tv1(i)) - qs1(i) = fpvs( t1(i) ) !* qs1=sat. humidity at level 1 (kg/kg) - qs1(i) = con_eps*qs1(i) / (prsl1(i) + con_epsm1*qs1(i)) - qs1(i) = max(qs1(i), 1.e-8) - q0 (i) = min(qs1(i), q0(i)) - - if (vegtype(i) == isice_table ) then - if (weasd(i) < 0.1) then - weasd(i) = 0.1 - endif - endif - - endif - enddo - -! --- ... noah: prepare variables to run noah lsm -! 1. configuration information (c): -! ------------------------------ -! couple - couple-uncouple flag (=1: coupled, =0: uncoupled) -! ffrozp - fraction for snow-rain (1.=snow, 0.=rain, 0-1 mixed)) -! ice - sea-ice flag (=1: sea-ice, =0: land) -! dt - timestep (sec) (dt should not exceed 3600 secs) = delt -! zlvl - height (m) above ground of atmospheric forcing variables -! nsoil - number of soil layers (at least 2) -! sldpth - the thickness of each soil layer (m) - - do i = 1, im - - if (flag_iter(i) .and. flag(i)) then - - - couple = 1 - - ice = 0 - nsoil = km - snowng = .false. - frzgra = .false. - - -! if (srflag(i) == 1.0) then ! snow phase -! ffrozp = 1.0 -! elseif (srflag(i) == 0.0) then ! rain phase -! ffrozp = 0.0 -! endif -! use srflag directly to allow fractional rain/snow - ffrozp = srflag(i) - - zlvl = zf(i) - -! 2. forcing data (f): -! ----------------- -! lwdn - lw dw radiation flux (w/m2) -! solnet - net sw radiation flux (dn-up) (w/m2) -! sfcprs - pressure at height zlvl above ground (pascals) -! prcp - precip rate (kg m-2 s-1) -! sfctmp - air temperature (k) at height zlvl above ground -! th2 - air potential temperature (k) at height zlvl above ground -! q2 - mixing ratio at height zlvl above ground (kg kg-1) - - lat = xlatin(i) ! in radian - cosz = xcoszin(i) - - lwdn = dlwflx(i) !..downward lw flux at sfc in w/m2 - swdn = dswsfc(i) !..downward sw flux at sfc in w/m2 - solnet = snet(i) !..net sw rad flx (dn-up) at sfc in w/m2 - sfcems = sfcemis(i) - - sfctmp = t1(i) - sfcprs = prsl1(i) - psfc = ps(i) - prcp = rhoh2o * tprcp(i) / delt - - if (prcp > 0.0) then - if (ffrozp > 0.0) then ! rain/snow flag, one condition is enough? - snowng = .true. - qsnowxy(i) = ffrozp * prcp/10.0 !still use rho water? - else - if (sfctmp <= 275.15) frzgra = .true. - endif - endif - - th2 = theta1(i) - q2 = q0(i) - -! 3. other forcing (input) data (i): -! ------------------------------ -! sfcspd - wind speed (m s-1) at height zlvl above ground -! q2sat - sat mixing ratio at height zlvl above ground (kg kg-1) -! dqsdt2 - slope of sat specific humidity curve at t=sfctmp (kg kg-1 k-1) - - uu = u1(i) - vv = v1(i) - - sfcspd = wind(i) - q2sat = qs1(i) - dqsdt2 = q2sat * a23m4/(sfctmp-a4)**2 - -! 4. canopy/soil characteristics (s): -! -------------------------------- -! vegtyp - vegetation type (integer index) -> vtype -! soiltyp - soil type (integer index) -> stype -! slopetyp- class of sfc slope (integer index) -> slope -! shdfac - areal fractional coverage of green vegetation (0.0-1.0) -! shdmin - minimum areal fractional coverage of green vegetation -> shdmin1d -! ptu - photo thermal unit (plant phenology for annuals/crops) -! alb - backround snow-free surface albedo (fraction) -! snoalb - upper bound on maximum albedo over deep snow -> snoalb1d -! tbot - bottom soil temperature (local yearly-mean sfc air temp) - - vtype = vegtype(i) - stype = soiltyp(i) - slope = slopetyp(i) - shdfac= sigmaf(i) - - shdmin1d = shdmin(i) - shdmax1d = shdmax(i) - snoalb1d = snoalb(i) - - alb = sfalb(i) - - tbot = tg3(i) - ptu = 0.0 - - - cmc = canopy(i)/1000. ! convert from mm to m - tsea = tsurf(i) ! clu_q2m_iter - - snowh = snwdph(i) * 0.001 ! convert from mm to m - sneqv = weasd(i) * 0.001 ! convert from mm to m - - - -! 5. history (state) variables (h): -! ------------------------------ -! cmc - canopy moisture content (m) -! t1 - ground/canopy/snowpack) effective skin temperature (k) -> tsea -! stc(nsoil) - soil temp (k) -> stsoil -! smc(nsoil) - total soil moisture content (volumetric fraction) -> smsoil -! sh2o(nsoil)- unfrozen soil moisture content (volumetric fraction) -> slsoil -! snowh - actual snow depth (m) -! sneqv - liquid water-equivalent snow depth (m) -! albedo - surface albedo including snow effect (unitless fraction) -! ch - surface exchange coefficient for heat and moisture (m s-1) -> chx -! cm - surface exchange coefficient for momentum (m s-1) -> cmx - - isnowx = nint(snowxy(i)) - tvx = tvxy(i) - tgx = tgxy(i) - canliqx = canliqxy(i) !in mm - canicex = canicexy(i) - - eahxy(i) = (ps(i)*q2)/(0.622+q2) ! use q0 to reinit; - eahx = eahxy(i) - tahx = tahxy(i) - - co2pp = co2_table * sfcprs - o2pp = o2_table * sfcprs - fwetx = fwetxy(i) - - sneqvox = sneqvoxy(i) - alboldx = alboldxy(i) - - qsnowx = qsnowxy(i) - wslakex = wslakexy(i) - - zwtx = zwtxy(i) - wax = waxy(i) - wtx = waxy(i) - - do k = -2,0 - tsnsoxy(i,k) = tsnoxy(i,k) - enddo - - do k = 1,4 - tsnsoxy(i,k) = stc(i,k) - enddo - - do k = -2,0 - snicex(k) = snicexy(i,k) ! in k/m3; mm - snliqx(k) = snliqxy(i,k) ! in k/m3; mm - tsnox (k) = tsnoxy(i,k) - - ficeold(k) = 0.0 ! derived - - if (snicex(k) > 0.0 ) then - ficeold(k) = snicex(k) /(snicex(k)+snliqx(k)) - - endif - enddo - - do k = -2, km - zsnsox(k) = zsnsoxy(i,k) - tsnsox(k) = tsnsoxy(i,k) - enddo - - lfmassx = lfmassxy(i) - rtmassx = rtmassxy(i) - stmassx = stmassxy(i) - - woodx = woodxy(i) - stblcpx = stblcpxy(i) - fastcpx = fastcpxy(i) - - xsaix = xsaixy(i) - xlaix = xlaixy(i) - - taussx = taussxy(i) - - qsfc1d = undefined ! derive later, it is an in/out? - swe = weasd(i) - - do k = 1, km - smoiseqx(k) = smoiseq(i,k) - enddo - - smcwtdx = smcwtdxy(i) - rechx = rechxy(i) - deeprechx = deeprechxy(i) -!-- -! the optional details for precip -!-- - -! pconv = 0. ! convective - may introduce later -! pnonc = (1 - ffrozp) * prcp ! large scale total in mm/s; -! pshcv = 0. -! psnow = ffrozp * prcp /10.0 ! snow = qsnowx? -! pgrpl = 0. -! phail = 0. - pnonc = rainn_mp(i) - pconv = rainc_mp(i) - pshcv = 0. - psnow = snow_mp(i) - pgrpl = graupel_mp(i) - phail = ice_mp(i) -! -!-- old -! - do k = 1, km -! stsoil(k) = stc(i,k) - smsoil(k) = smc(i,k) - slsoil(k) = slc(i,k) - enddo - - snowh = snwdph(i) * 0.001 ! convert from mm to m - - if (swe /= 0.0 .and. snowh == 0.0) then - snowh = 10.0 * swe /1000.0 - endif - - chx = chxy(i) ! maybe chxy - cmx = cmxy(i) - - chh(i) = ch(i) * wind(i) * rho(i) - cmm(i) = cm(i) * wind(i) - - - - call transfer_mp_parameters(vtype,stype,slope,isc,parameters) - - call noahmp_options(idveg ,iopt_crs,iopt_btr,iopt_run,iopt_sfc, & - & iopt_frz,iopt_inf,iopt_rad,iopt_alb,iopt_snf,iopt_tbot,iopt_stc) - - if ( vtype == isice_table ) then - - ice = -1 - tbot = min(tbot,263.15) - - call noahmp_options_glacier & - & (idveg ,iopt_crs ,iopt_btr, iopt_run ,iopt_sfc ,iopt_frz, & - & iopt_inf ,iopt_rad ,iopt_alb ,iopt_snf ,iopt_tbot, iopt_stc ) - - call noahmp_glacier ( & - & i ,1 ,cosz ,nsnow ,nsoil ,delt , & ! in : time/space/model-related - & sfctmp ,sfcprs ,uu ,vv ,q2 ,swdn , & ! in : forcing - & prcp ,lwdn ,tbot ,zlvl ,ficeold ,zsoil , & ! in : forcing - & qsnowx ,sneqvox ,alboldx ,cmx ,chx ,isnowx, & ! in/out :sneqvox + alboldx -LST - & swe ,smsoil ,zsnsox ,snowh ,snicex ,snliqx , & ! in/out : sneqvx + snowhx are avgd - & tgx ,tsnsox ,slsoil ,taussx ,qsfc1d , & ! in/out : - & fsa ,fsr ,fira ,fsh ,fgev ,ssoil , & ! out : - & trad ,edir ,runsrf ,runsub ,sag ,albedo , & ! out : albedo is surface albedo - & qsnbot ,ponding ,ponding1,ponding2,t2mb ,q2b , & ! out : -#ifdef CCPP - & emissi ,fpice ,ch2b ,esnow, errmsg, errflg ) -#else - & emissi ,fpice ,ch2b ,esnow ) -#endif - -#ifdef CCPP - if (errflg /= 0) return -#endif -! -! in/out and outs -! - - fsno = 1.0 - - tvx = undefined - canicex = undefined - canliqx = undefined - eahx = undefined - tahx = undefined - - fwetx = undefined - wslakex = undefined - zwtx = undefined - wax = undefined - wtx = undefined - - lfmassx = undefined - rtmassx = undefined - stmassx = undefined - woodx = undefined - stblcpx = undefined - fastcpx = undefined - xlaix = undefined - xsaix = undefined - - smcwtdx = 0.0 - rechx = 0.0 - deeprechx = 0.0 - - do k = 1,4 - smoiseqx(k) = smsoil(k) - enddo - - fctr = undefined - fcev = undefined - - z0wrf = 0.002 - - eta = fgev - t2mmp(i) = t2mb - q2mp(i) = q2b -! -! Non-glacial case -! - else - ice = 0 - -! write(*,*)'tsnsox(1)=',tsnsox,'tgx=',tgx - call noahmp_sflx (parameters ,& - & i , 1 , lat , iyrlen , julian , cosz ,& ! in : time/space-related - & delt , dx , dz8w , nsoil , zsoil , nsnow ,& ! in : model configuration - & shdfac , shdmax1d, vtype , ice , ist ,& ! in : vegetation/soil - & smoiseqx ,& ! in - & sfctmp , sfcprs , psfc , uu , vv , q2 ,& ! in : forcing - & qc , swdn , lwdn ,& ! in : forcing - & pconv , pnonc , pshcv , psnow , pgrpl , phail ,& ! in : forcing - & tbot , co2pp , o2pp , foln , ficeold , zlvl ,& ! in : forcing - & alboldx , sneqvox ,& ! in/out : - & tsnsox , slsoil , smsoil , tahx , eahx , fwetx ,& ! in/out : - & canliqx , canicex , tvx , tgx , qsfc1d , qsnowx ,& ! in/out : - & isnowx , zsnsox , snowh , swe , snicex , snliqx ,& ! in/out : - & zwtx , wax , wtx , wslakex , lfmassx , rtmassx,& ! in/out : - & stmassx , woodx , stblcpx , fastcpx , xlaix ,xsaix ,& ! in/out : - & cmx , chx , taussx ,& ! in/out : - & smcwtdx ,deeprechx, rechx ,& ! in/out : - & z0wrf ,& ! out - & fsa , fsr , fira , fsh , ssoil , fcev ,& ! out : - & fgev , fctr , ecan , etran , edir , trad ,& ! out : - & tgb , tgv , t2mv , t2mb , q2v , q2b ,& ! out : - & runsrf , runsub , apar , psn , sav , sag ,& ! out : - & fsno , nee , gpp , npp , fveg , albedo ,& ! out : - & qsnbot , ponding , ponding1, ponding2, rssun , rssha ,& ! out : - & bgap , wgap , chv , chb , emissi ,& ! out : - & shg , shc , shb , evg , evb , ghv ,&! out : - & ghb , irg , irc , irb , tr , evc ,& ! out : - & chleaf , chuc , chv2 , chb2 , fpice , pahv ,& ! out -#ifdef CCPP - & pahg , pahb , pah , esnow, errmsg, errflg ) -#else - & pahg , pahb , pah , esnow ) -#endif - -#ifdef CCPP - if (errflg /= 0) return -#endif - - eta = fcev + fgev + fctr ! the flux w/m2 - - t2mmp(i) = t2mv*fveg+t2mb*(1-fveg) - q2mp(i) = q2v*fveg+q2b*(1-fveg) - - endif ! glacial split ends - -! -! mp in/out -! - snowxy (i) = float(isnowx) - tvxy (i) = tvx - tgxy (i) = tgx - canliqxy (i) = canliqx - canicexy (i) = canicex - eahxy (i) = eahx - tahxy (i) = tahx - - cmxy (i) = cmx - chxy (i) = chx - - fwetxy (i) = fwetx - sneqvoxy (i) = sneqvox - alboldxy (i) = alboldx - qsnowxy (i) = qsnowx - - wslakexy (i) = wslakex - zwtxy (i) = zwtx - waxy (i) = wax - wtxy (i) = wtx - - do k = -2,0 - tsnoxy (i,k) = tsnsox(k) - snicexy (i,k) = snicex (k) - snliqxy (i,k) = snliqx (k) - enddo - - do k = -2,4 - zsnsoxy (i,k) = zsnsox(k) - enddo - - lfmassxy (i) = lfmassx - rtmassxy (i) = rtmassx - stmassxy (i) = stmassx - woodxy (i) = woodx - stblcpxy (i) = stblcpx - fastcpxy (i) = fastcpx - - xlaixy (i) = xlaix - xsaixy (i) = xsaix - - taussxy (i) = taussx - - rechxy (i) = rechx - deeprechxy(i) = deeprechx - smcwtdxy(i) = smcwtdx - smoiseq(i,1:4) = smoiseqx(1:4) - -! -! generic in/outs -! - do k = 1, km - stc(i,k) = tsnsox(k) - smc(i,k) = smsoil(k) - slc(i,k) = slsoil(k) - enddo - - canopy(i) = canicex + canliqx - weasd(i) = swe - snwdph(i) = snowh * 1000.0 - -! write(*,*) 'swe,snowh,can' -! write (*,*) swe,snowh*1000.0,canopy(i) -! - smcmax = smcmax_table(stype) - smcref = smcref_table(stype) - smcwlt = smcdry_table(stype) -! -! outs -! - wet1(i) = smsoil(1) / smcmax - smcwlt2(i) = smcwlt - smcref2(i) = smcref - - runoff(i) = runsrf - drain(i) = runsub - - zorl(i) = z0wrf * 100.0 - - sncovr1(i) = fsno - snowc (i) = fsno - - sbsno(i) = esnow - gflux(i) = -1.0*ssoil - hflx(i) = fsh - evbs(i) = fgev - evcw(i) = fcev - trans(i) = fctr - evap(i) = eta - -! write(*,*) 'vtype, stype are',vtype,stype -! write(*,*) 'fsh,gflx,eta',fsh,ssoil,eta -! write(*,*) 'esnow,runsrf,runsub',esnow,runsrf,runsub -! write(*,*) 'evbs,evcw,trans',fgev,fcev,fctr -! write(*,*) 'snowc',fsno - - tsurf(i) = trad - - stm(i) = (0.1*smsoil(1)+0.3*smsoil(2)+0.6*smsoil(3)+ & - & 1.0*smsoil(4))*1000.0 ! unit conversion from m to kg m-2 -! - snohf (i) = qsnbot * con_hfus ! only part of it but is diagnostic -! write(*,*) 'snohf',snohf(i) - - fdown = fsa + lwdn - t2v = sfctmp * (1.0 + 0.61*q2) -! ssoil = -1.0 *ssoil - - call penman (sfctmp,sfcprs,chx,t2v,th2,prcp,fdown,ssoil, & - & q2,q2sat,etp,snowng,frzgra,ffrozp,dqsdt2,emissi,fsno) - - ep(i) = etp - - endif ! end if_flag_iter_and_flag_block - enddo ! end do_i_loop - -! --- ... compute qsurf (specific humidity at sfc) - - do i = 1, im - if (flag_iter(i) .and. flag(i)) then - rch(i) = rho(i) * con_cp * ch(i) * wind(i) - qsurf(i) = q1(i) + evap(i) / (elocp * rch(i)) - endif - enddo - - do i = 1, im - if (flag_iter(i) .and. flag(i)) then - tem = 1.0 / rho(i) - hflx(i) = hflx(i) * tem * cpinv - evap(i) = evap(i) * tem * hvapi - endif - enddo - -! --- ... restore land-related prognostic fields for guess run - - do i = 1, im - if (flag(i)) then - if (flag_guess(i)) then - weasd(i) = weasd_old(i) - snwdph(i) = snwdph_old(i) - tskin(i) = tskin_old(i) - canopy(i) = canopy_old(i) - tprcp(i) = tprcp_old(i) - srflag(i) = srflag_old(i) - - - snowxy(i) = snow_old(i) - tvxy(i) = tv_old(i) - tgxy(i) = tg_old(i) - - canicexy(i) = canice_old(i) - canliqxy(i) = canliq_old(i) - eahxy(i) = eah_old(i) - tahxy(i) = tah_old(i) - fwetxy(i) = fwet_old(i) - sneqvoxy(i) = sneqvo_old(i) - alboldxy(i) = albold_old(i) - qsnowxy(i) = qsnow_old(i) - wslakexy(i) = wslake_old(i) - zwtxy(i) = zwt_old(i) - waxy(i) = wa_old(i) - wtxy(i) = wt_old(i) - lfmassxy(i) = lfmass_old(i) - rtmassxy(i) = rtmass_old(i) - stmassxy(i) = stmass_old(i) - woodxy(i) = wood_old(i) - stblcpxy(i) = stblcp_old(i) - fastcpxy(i) = fastcp_old(i) - xlaixy(i) = xlai_old(i) - xsaixy(i) = xsai_old(i) - taussxy(i) = tauss_old(i) - smcwtdxy(i) = smcwtd_old(i) - deeprechxy(i) = deeprech_old(i) - rechxy(i) = rech_old(i) - - do k = 1, km - smc(i,k) = smc_old(i,k) - stc(i,k) = stc_old(i,k) - slc(i,k) = slc_old(i,k) - enddo -! - do k = 1, km - smoiseq(i,k) = smoiseq_old(i,k) - enddo - - do k = -2,0 - tsnoxy(i,k) = tsno_old(i,k) - snicexy(i,k) = snice_old(i,k) - snliqxy(i,k) = snliq_old(i,k) - enddo - - do k = -2,4 - zsnsoxy(i,k) = zsnso_old(i,k) - enddo - else - tskin(i) = tsurf(i) - endif - endif - enddo -! - return -!................................... - end subroutine noahmpdrv_run -!> @} -!----------------------------------- - -!> \ingroup NoahMP_LSM -!! \brief This subroutine fills in a derived data type of type noahmp_parameters with data -!! from the module \ref noahmp_tables. - subroutine transfer_mp_parameters (vegtype,soiltype,slopetype, & - & soilcolor,parameters) - - use noahmp_tables - use module_sf_noahmplsm - - implicit none - - integer, intent(in) :: vegtype - integer, intent(in) :: soiltype - integer, intent(in) :: slopetype - integer, intent(in) :: soilcolor - - type (noahmp_parameters), intent(out) :: parameters - - real :: refdk - real :: refkdt - real :: frzk - real :: frzfact - - parameters%iswater = iswater_table - parameters%isbarren = isbarren_table - parameters%isice = isice_table - parameters%eblforest = eblforest_table - -!-----------------------------------------------------------------------& - parameters%urban_flag = .false. - if( vegtype == isurban_table .or. vegtype == 31 & - & .or.vegtype == 32 .or. vegtype == 33) then - parameters%urban_flag = .true. - endif - -!------------------------------------------------------------------------------------------! -! transfer veg parameters -!------------------------------------------------------------------------------------------! - - parameters%ch2op = ch2op_table(vegtype) !maximum intercepted h2o per unit lai+sai (mm) - parameters%dleaf = dleaf_table(vegtype) !characteristic leaf dimension (m) - parameters%z0mvt = z0mvt_table(vegtype) !momentum roughness length (m) - parameters%hvt = hvt_table(vegtype) !top of canopy (m) - parameters%hvb = hvb_table(vegtype) !bottom of canopy (m) - parameters%den = den_table(vegtype) !tree density (no. of trunks per m2) - parameters%rc = rc_table(vegtype) !tree crown radius (m) - parameters%mfsno = mfsno_table(vegtype) !snowmelt m parameter () - parameters%saim = saim_table(vegtype,:) !monthly stem area index, one-sided - parameters%laim = laim_table(vegtype,:) !monthly leaf area index, one-sided - parameters%sla = sla_table(vegtype) !single-side leaf area per kg [m2/kg] - parameters%dilefc = dilefc_table(vegtype) !coeficient for leaf stress death [1/s] - parameters%dilefw = dilefw_table(vegtype) !coeficient for leaf stress death [1/s] - parameters%fragr = fragr_table(vegtype) !fraction of growth respiration !original was 0.3 - parameters%ltovrc = ltovrc_table(vegtype) !leaf turnover [1/s] - - parameters%c3psn = c3psn_table(vegtype) !photosynthetic pathway: 0. = c4, 1. = c3 - parameters%kc25 = kc25_table(vegtype) !co2 michaelis-menten constant at 25c (pa) - parameters%akc = akc_table(vegtype) !q10 for kc25 - parameters%ko25 = ko25_table(vegtype) !o2 michaelis-menten constant at 25c (pa) - parameters%ako = ako_table(vegtype) !q10 for ko25 - parameters%vcmx25 = vcmx25_table(vegtype) !maximum rate of carboxylation at 25c (umol co2/m**2/s) - parameters%avcmx = avcmx_table(vegtype) !q10 for vcmx25 - parameters%bp = bp_table(vegtype) !minimum leaf conductance (umol/m**2/s) - parameters%mp = mp_table(vegtype) !slope of conductance-to-photosynthesis relationship - parameters%qe25 = qe25_table(vegtype) !quantum efficiency at 25c (umol co2 / umol photon) - parameters%aqe = aqe_table(vegtype) !q10 for qe25 - parameters%rmf25 = rmf25_table(vegtype) !leaf maintenance respiration at 25c (umol co2/m**2/s) - parameters%rms25 = rms25_table(vegtype) !stem maintenance respiration at 25c (umol co2/kg bio/s) - parameters%rmr25 = rmr25_table(vegtype) !root maintenance respiration at 25c (umol co2/kg bio/s) - parameters%arm = arm_table(vegtype) !q10 for maintenance respiration - parameters%folnmx = folnmx_table(vegtype) !foliage nitrogen concentration when f(n)=1 (%) - parameters%tmin = tmin_table(vegtype) !minimum temperature for photosynthesis (k) - - parameters%xl = xl_table(vegtype) !leaf/stem orientation index - parameters%rhol = rhol_table(vegtype,:) !leaf reflectance: 1=vis, 2=nir - parameters%rhos = rhos_table(vegtype,:) !stem reflectance: 1=vis, 2=nir - parameters%taul = taul_table(vegtype,:) !leaf transmittance: 1=vis, 2=nir - parameters%taus = taus_table(vegtype,:) !stem transmittance: 1=vis, 2=nir - - parameters%mrp = mrp_table(vegtype) !microbial respiration parameter (umol co2 /kg c/ s) - parameters%cwpvt = cwpvt_table(vegtype) !empirical canopy wind parameter - - parameters%wrrat = wrrat_table(vegtype) !wood to non-wood ratio - parameters%wdpool = wdpool_table(vegtype) !wood pool (switch 1 or 0) depending on woody or not [-] - parameters%tdlef = tdlef_table(vegtype) !characteristic t for leaf freezing [k] - - parameters%nroot = nroot_table(vegtype) !number of soil layers with root present - parameters%rgl = rgl_table(vegtype) !parameter used in radiation stress function - parameters%rsmin = rs_table(vegtype) !minimum stomatal resistance [s m-1] - parameters%hs = hs_table(vegtype) !parameter used in vapor pressure deficit function - parameters%topt = topt_table(vegtype) !optimum transpiration air temperature [k] - parameters%rsmax = rsmax_table(vegtype) !maximal stomatal resistance [s m-1] - -!------------------------------------------------------------------------------------------! -! transfer rad parameters -!------------------------------------------------------------------------------------------! - - parameters%albsat = albsat_table(soilcolor,:) - parameters%albdry = albdry_table(soilcolor,:) - parameters%albice = albice_table - parameters%alblak = alblak_table - parameters%omegas = omegas_table - parameters%betads = betads_table - parameters%betais = betais_table - parameters%eg = eg_table - -!------------------------------------------------------------------------------------------! -! transfer global parameters -!------------------------------------------------------------------------------------------! - - parameters%co2 = co2_table - parameters%o2 = o2_table - parameters%timean = timean_table - parameters%fsatmx = fsatmx_table - parameters%z0sno = z0sno_table - parameters%ssi = ssi_table - parameters%swemx = swemx_table - -! ---------------------------------------------------------------------- -! transfer soil parameters -! ---------------------------------------------------------------------- - - parameters%bexp = bexp_table (soiltype) - parameters%dksat = dksat_table (soiltype) - parameters%dwsat = dwsat_table (soiltype) - parameters%f1 = f1_table (soiltype) - parameters%psisat = psisat_table (soiltype) - parameters%quartz = quartz_table (soiltype) - parameters%smcdry = smcdry_table (soiltype) - parameters%smcmax = smcmax_table (soiltype) - parameters%smcref = smcref_table (soiltype) - parameters%smcwlt = smcwlt_table (soiltype) - -! ---------------------------------------------------------------------- -! transfer genparm parameters -! ---------------------------------------------------------------------- - parameters%csoil = csoil_table - parameters%zbot = zbot_table - parameters%czil = czil_table - - frzk = frzk_table - refdk = refdk_table - refkdt = refkdt_table - parameters%kdt = refkdt * parameters%dksat / refdk - parameters%slope = slope_table(slopetype) - - if(parameters%urban_flag)then ! hardcoding some urban parameters for soil - parameters%smcmax = 0.45 - parameters%smcref = 0.42 - parameters%smcwlt = 0.40 - parameters%smcdry = 0.40 - parameters%csoil = 3.e6 - endif - - ! adjust frzk parameter to actual soil type: frzk * frzfact - -!-----------------------------------------------------------------------& - if(soiltype /= 14) then - frzfact = (parameters%smcmax / parameters%smcref) & - & * (0.412 / 0.468) - parameters%frzx = frzk * frzfact - end if - - end subroutine transfer_mp_parameters - -!-----------------------------------------------------------------------& - -!> \ingroup NoahMP_LSM -!! brief Calculate potential evaporation for the current point. Various -!! partial sums/products are also calculated and passed back to the -!! calling routine for later use. - subroutine penman (sfctmp,sfcprs,ch,t2v,th2,prcp,fdown,ssoil, & - & q2,q2sat,etp,snowng,frzgra,ffrozp, & - & dqsdt2,emissi_in,sncovr) - -! etp is calcuated right after ssoil - -! ---------------------------------------------------------------------- -! subroutine penman -! ---------------------------------------------------------------------- - implicit none - logical, intent(in) :: snowng, frzgra - real, intent(in) :: ch, dqsdt2,fdown,prcp,ffrozp, & - & q2, q2sat,ssoil, sfcprs, sfctmp, & - & t2v, th2,emissi_in,sncovr - real, intent(out) :: etp - real :: epsca,flx2,rch,rr,t24 - real :: a, delta, fnet,rad,rho,emissi,elcp1,lvs - - real, parameter :: elcp = 2.4888e+3, lsubc = 2.501000e+6,cp = 1004.6 - real, parameter :: lsubs = 2.83e+6, rd = 287.05, cph2o = 4.1855e+3 - real, parameter :: cpice = 2.106e+3, lsubf = 3.335e5 - real, parameter :: sigma = 5.6704e-8 - -! ---------------------------------------------------------------------- -! executable code begins here: -! ---------------------------------------------------------------------- -! ---------------------------------------------------------------------- -! prepare partial quantities for penman equation. -! ---------------------------------------------------------------------- - emissi=emissi_in -! elcp1 = (1.0-sncovr)*elcp + sncovr*elcp*lsubs/lsubc - lvs = (1.0-sncovr)*lsubc + sncovr*lsubs - - flx2 = 0.0 - delta = elcp * dqsdt2 -! delta = elcp1 * dqsdt2 - t24 = sfctmp * sfctmp * sfctmp * sfctmp - rr = t24 * 6.48e-8 / (sfcprs * ch) + 1.0 -! rr = emissi*t24 * 6.48e-8 / (sfcprs * ch) + 1.0 - rho = sfcprs / (rd * t2v) - -! ---------------------------------------------------------------------- -! adjust the partial sums / products with the latent heat -! effects caused by falling precipitation. -! ---------------------------------------------------------------------- - rch = rho * cp * ch - if (.not. snowng) then - if (prcp > 0.0) rr = rr + cph2o * prcp / rch - else -! ---- ... fractional snowfall/rainfall - rr = rr + (cpice*ffrozp+cph2o*(1.-ffrozp)) & - & *prcp/rch - end if - -! ---------------------------------------------------------------------- -! include the latent heat effects of frzng rain converting to ice on -! impact in the calculation of flx2 and fnet. -! ---------------------------------------------------------------------- -! fnet = fdown - sigma * t24- ssoil - fnet = fdown - emissi*sigma * t24- ssoil - if (frzgra) then - flx2 = - lsubf * prcp - fnet = fnet - flx2 -! ---------------------------------------------------------------------- -! finish penman equation calculations. -! ---------------------------------------------------------------------- - end if - rad = fnet / rch + th2- sfctmp - a = elcp * (q2sat - q2) -! a = elcp1 * (q2sat - q2) - epsca = (a * rr + rad * delta) / (delta + rr) - etp = epsca * rch / lsubc -! etp = epsca * rch / lvs - -! ---------------------------------------------------------------------- - end subroutine penman - - end module noahmpdrv diff --git a/physics/sfc_noahmp_drv.meta b/physics/sfc_noahmp_drv.meta index ecfd3e09f..cdd2294ce 100644 --- a/physics/sfc_noahmp_drv.meta +++ b/physics/sfc_noahmp_drv.meta @@ -7,6 +7,22 @@ [ccpp-arg-table] name = noahmpdrv_init type = scheme +[lsm] + standard_name = control_for_land_surface_scheme + long_name = flag for land surface model + units = flag + dimensions = () + type = integer + intent = in + optional = F +[lsm_noahmp] + standard_name = identifier_for_noahmp_land_surface_scheme + long_name = flag for NOAH MP land surface model + units = flag + dimensions = () + type = integer + intent = in + optional = F [me] standard_name = mpi_rank long_name = current MPI-rank @@ -16,7 +32,7 @@ intent = in optional = F [isot] - standard_name = soil_type_dataset_choice + standard_name = control_for_soil_type_dataset long_name = soil type dataset choice units = index dimensions = () @@ -24,7 +40,7 @@ intent = in optional = F [ivegsrc] - standard_name = vegetation_type_dataset_choice + standard_name = control_for_vegetation_dataset long_name = land use dataset choice units = index dimensions = () @@ -32,13 +48,29 @@ intent = in optional = F [nlunit] - standard_name = iounit_namelist + standard_name = iounit_of_namelist long_name = fortran unit number for file opens units = none dimensions = () type = integer intent = in optional = F +[pores] + standard_name = maximum_soil_moisture_content_for_land_surface_model + long_name = maximum soil moisture for a given soil type for land surface model + units = m + dimensions = (30) + type = real + intent = out + kind = kind_phys +[resid] + standard_name = minimum_soil_moisture_content_for_land_surface_model + long_name = minimum soil moisture for a given soil type for land surface model + units = m + dimensions = (30) + type = real + intent = out + kind = kind_phys [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP @@ -70,15 +102,23 @@ intent = in optional = F [km] - standard_name = soil_vertical_dimension + standard_name = vertical_dimension_of_soil long_name = soil vertical layer dimension units = count dimensions = () type = integer intent = in optional = F +[lsnowl] + standard_name = lower_bound_of_vertical_dimension_of_surface_snow + long_name = lower bound of of snow-related arrays for land surface model + units = count + dimensions = () + type = integer + intent = in + optional = F [itime] - standard_name = index_of_time_step + standard_name = index_of_timestep long_name = current forecast iteration units = index dimensions = () @@ -95,7 +135,7 @@ intent = in optional = F [u1] - standard_name = x_wind_at_lowest_model_layer + standard_name = x_wind_at_surface_adjacent_layer long_name = zonal wind at lowest model layer units = m s-1 dimensions = (horizontal_loop_extent) @@ -104,7 +144,7 @@ intent = in optional = F [v1] - standard_name = y_wind_at_lowest_model_layer + standard_name = y_wind_at_surface_adjacent_layer long_name = meridional wind at lowest model layer units = m s-1 dimensions = (horizontal_loop_extent) @@ -113,7 +153,7 @@ intent= in optional = F [t1] - standard_name = air_temperature_at_lowest_model_layer + standard_name = air_temperature_at_surface_adjacent_layer long_name = mean temperature at lowest model layer units = K dimensions = (horizontal_loop_extent) @@ -122,7 +162,7 @@ intent= in optional = F [q1] - standard_name = water_vapor_specific_humidity_at_lowest_model_layer + standard_name = specific_humidity_at_surface_adjacent_layer long_name = water vapor specific humidity at lowest model layer units = kg kg-1 dimensions = (horizontal_loop_extent) @@ -155,18 +195,9 @@ kind = kind_phys intent= in optional = F -[sfcemis] - standard_name = surface_longwave_emissivity_over_land_interstitial - long_name = surface lw emissivity in fraction over land (temporary use as interstitial) - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F [dlwflx] - standard_name = surface_downwelling_longwave_flux_absorbed_by_ground_over_land - long_name = total sky surface downward longwave flux absorbed by the ground over land + standard_name = surface_downwelling_longwave_flux + long_name = surface downwelling longwave flux at current time units = W m-2 dimensions = (horizontal_loop_extent) type = real @@ -192,7 +223,7 @@ intent = in optional = F [delt] - standard_name = time_step_for_dynamics + standard_name = timestep_for_dynamics long_name = dynamics timestep units = s dimensions = () @@ -228,7 +259,7 @@ intent = in optional = F [prsl1] - standard_name = air_pressure_at_lowest_model_layer + standard_name = air_pressure_at_surface_adjacent_layer long_name = mean pressure at lowest model layer units = Pa dimensions = (horizontal_loop_extent) @@ -280,7 +311,7 @@ intent = in optional = F [shdmin] - standard_name = minimum_vegetation_area_fraction + standard_name = min_vegetation_area_fraction long_name = min fractional coverage of green vegetation units = frac dimensions = (horizontal_loop_extent) @@ -289,7 +320,7 @@ intent = in optional = F [shdmax] - standard_name = maximum_vegetation_area_fraction + standard_name = max_vegetation_area_fraction long_name = max fractional coverage of green vegetation units = frac dimensions = (horizontal_loop_extent) @@ -298,7 +329,7 @@ intent = in optional = F [snoalb] - standard_name = upper_bound_on_max_albedo_over_deep_snow + standard_name = upper_bound_of_max_albedo_assuming_deep_snow long_name = maximum snow albedo units = frac dimensions = (horizontal_loop_extent) @@ -307,13 +338,13 @@ intent = in optional = F [sfalb] - standard_name = surface_diffused_shortwave_albedo + standard_name = surface_albedo_for_diffused_shortwave_on_radiation_timestep long_name = mean surface diffused sw albedo units = frac dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = in + intent = inout optional = F [flag_iter] standard_name = flag_for_iteration @@ -332,7 +363,7 @@ intent = in optional = F [idveg] - standard_name = flag_for_dynamic_vegetation_option + standard_name = control_for_land_surface_scheme_dynamic_vegetation long_name = choice for dynamic vegetation option (see noahmp module for definition) units = index dimensions = () @@ -340,7 +371,7 @@ intent = in optional = F [iopt_crs] - standard_name = flag_for_canopy_stomatal_resistance_option + standard_name = control_for_land_surface_scheme_canopy_stomatal_resistance long_name = choice for canopy stomatal resistance option (see noahmp module for definition) units = index dimensions = () @@ -348,7 +379,7 @@ intent = in optional = F [iopt_btr] - standard_name = flag_for_soil_moisture_factor_stomatal_resistance_option + standard_name = control_for_land_surface_scheme_soil_moisture_factor_stomatal_resistance long_name = choice for soil moisture factor for canopy stomatal resistance option (see noahmp module for definition) units = index dimensions = () @@ -356,7 +387,7 @@ intent = in optional = F [iopt_run] - standard_name = flag_for_runoff_and_groundwater_option + standard_name = control_for_land_surface_scheme_runoff_and_groundwater long_name = choice for runoff and groundwater option (see noahmp module for definition) units = index dimensions = () @@ -364,7 +395,7 @@ intent = in optional = F [iopt_sfc] - standard_name = flag_for_surface_layer_drag_coefficient_option + standard_name = control_for_land_surface_scheme_surface_layer_drag_coefficient long_name = choice for surface layer drag coefficient option (see noahmp module for definition) units = index dimensions = () @@ -372,7 +403,7 @@ intent = in optional = F [iopt_frz] - standard_name = flag_for_supercooled_liquid_water_option + standard_name = control_for_land_surface_scheme_supercooled_liquid_water long_name = choice for supercooled liquid water option (see noahmp module for definition) units = index dimensions = () @@ -380,7 +411,7 @@ intent = in optional = F [iopt_inf] - standard_name = flag_for_frozen_soil_permeability_option + standard_name = control_for_land_surface_scheme_frozen_soil_permeability long_name = choice for frozen soil permeability option (see noahmp module for definition) units = index dimensions = () @@ -388,7 +419,7 @@ intent = in optional = F [iopt_rad] - standard_name = flag_for_radiation_transfer_option + standard_name = control_for_land_surface_scheme_radiative_transfer long_name = choice for radiation transfer option (see noahmp module for definition) units = index dimensions = () @@ -396,7 +427,7 @@ intent = in optional = F [iopt_alb] - standard_name = flag_for_ground_snow_surface_albedo_option + standard_name = control_for_land_surface_scheme_surface_snow_albedo long_name = choice for ground snow surface albedo option (see noahmp module for definition) units = index dimensions = () @@ -404,7 +435,7 @@ intent = in optional = F [iopt_snf] - standard_name = flag_for_precipitation_partition_option + standard_name = control_for_land_surface_scheme_precipitation_type_partition long_name = choice for precipitation partition option (see noahmp module for definition) units = index dimensions = () @@ -412,7 +443,7 @@ intent = in optional = F [iopt_tbot] - standard_name = flag_for_lower_boundary_soil_temperature_option + standard_name = control_for_land_surface_scheme_lower_boundary_soil_temperature long_name = choice for lower boundary soil temperature option (see noahmp module for definition) units = index dimensions = () @@ -420,7 +451,7 @@ intent = in optional = F [iopt_stc] - standard_name = flag_for_soil_and_snow_temperature_time_stepping_option + standard_name = control_for_land_surface_scheme_soil_and_snow_temperature_time_integration long_name = choice for soil and snow temperature time stepping option (see noahmp module for definition) units = index dimensions = () @@ -446,7 +477,7 @@ intent = in optional = F [iyrlen] - standard_name = number_of_days_in_year + standard_name = number_of_days_in_current_year long_name = number of days in a year units = days dimensions = () @@ -454,7 +485,7 @@ intent = in optional = F [julian] - standard_name = julian_day + standard_name = forecast_julian_day long_name = julian day units = days dimensions = () @@ -463,7 +494,7 @@ intent = in optional = F [rainn_mp] - standard_name = explicit_rainfall_rate_from_previous_timestep + standard_name = explicit_precipitation_rate_on_previous_timestep long_name = explicit rainfall rate previous timestep units = mm s-1 dimensions = (horizontal_loop_extent) @@ -472,7 +503,7 @@ intent = in optional = F [rainc_mp] - standard_name = convective_precipitation_rate_from_previous_timestep + standard_name = convective_precipitation_rate_on_previous_timestep long_name = convective precipitation rate from previous timestep units = mm s-1 dimensions = (horizontal_loop_extent) @@ -481,7 +512,7 @@ intent = in optional = F [snow_mp] - standard_name = snow_precipitation_rate_from_previous_timestep + standard_name = snowfall_rate_on_previous_timestep long_name = snow precipitation rate from previous timestep units = mm s-1 dimensions = (horizontal_loop_extent) @@ -490,7 +521,7 @@ intent = in optional = F [graupel_mp] - standard_name = graupel_precipitation_rate_from_previous_timestep + standard_name = graupel_precipitation_rate_on_previous_timestep long_name = graupel precipitation rate from previous timestep units = mm s-1 dimensions = (horizontal_loop_extent) @@ -499,7 +530,7 @@ intent = in optional = F [ice_mp] - standard_name = ice_precipitation_rate_from_previous_timestep + standard_name = ice_precipitation_rate_on_previous_timestep long_name = ice precipitation rate from previous timestep units = mm s-1 dimensions = (horizontal_loop_extent) @@ -535,7 +566,7 @@ intent = in optional = F [rhoh2o] - standard_name = liquid_water_density + standard_name = fresh_liquid_water_density_at_0c long_name = density of liquid water units = kg m-3 dimensions = () @@ -571,7 +602,7 @@ intent = in optional = F [con_rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -625,7 +656,7 @@ intent = inout optional = F [srflag] - standard_name = flag_for_precipitation_type + standard_name = precipitation_type long_name = snow/rain flag for precipitation units = flag dimensions = (horizontal_loop_extent) @@ -634,10 +665,10 @@ intent = inout optional = F [smc] - standard_name = volume_fraction_of_soil_moisture + standard_name = volume_fraction_of_condensed_water_in_soil long_name = total soil moisture units = frac - dimensions = (horizontal_loop_extent,soil_vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension_of_soil) type = real kind = kind_phys intent = inout @@ -646,16 +677,16 @@ standard_name = soil_temperature long_name = soil temperature units = K - dimensions = (horizontal_loop_extent,soil_vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension_of_soil) type = real kind = kind_phys intent = inout optional = F [slc] - standard_name = volume_fraction_of_unfrozen_soil_moisture + standard_name = volume_fraction_of_unfrozen_water_in_soil long_name = liquid soil moisture units = frac - dimensions = (horizontal_loop_extent,soil_vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension_of_soil) type = real kind = kind_phys intent = inout @@ -688,7 +719,7 @@ intent = inout optional = F [zorl] - standard_name = surface_roughness_length_over_land_interstitial + standard_name = surface_roughness_length_over_land long_name = surface roughness length over land (temporary use as interstitial) units = cm dimensions = (horizontal_loop_extent) @@ -706,7 +737,7 @@ intent = inout optional = F [tvxy] - standard_name = vegetation_temperature + standard_name = canopy_temperature long_name = vegetation temperature units = K dimensions = (horizontal_loop_extent) @@ -715,7 +746,7 @@ intent = inout optional = F [tgxy] - standard_name = ground_temperature_for_noahmp + standard_name = ground_temperature long_name = ground temperature for noahmp units = K dimensions = (horizontal_loop_extent) @@ -742,7 +773,7 @@ intent = inout optional = F [eahxy] - standard_name = canopy_air_vapor_pressure + standard_name = air_vapor_pressure_in_canopy long_name = canopy air vapor pressure units = Pa dimensions = (horizontal_loop_extent) @@ -751,7 +782,7 @@ intent = inout optional = F [tahxy] - standard_name = canopy_air_temperature + standard_name = air_temperature_in_canopy long_name = canopy air temperature units = K dimensions = (horizontal_loop_extent) @@ -778,7 +809,7 @@ intent = inout optional = F [fwetxy] - standard_name = area_fraction_of_wet_canopy + standard_name = wet_canopy_area_fraction long_name = area fraction of canopy that is wetted/snowed units = none dimensions = (horizontal_loop_extent) @@ -787,7 +818,7 @@ intent = inout optional = F [sneqvoxy] - standard_name = snow_mass_at_previous_time_step + standard_name = lwe_thickness_of_snowfall_amount_on_previous_timestep long_name = snow mass at previous time step units = mm dimensions = (horizontal_loop_extent) @@ -796,7 +827,7 @@ intent = inout optional = F [alboldxy] - standard_name = snow_albedo_at_previous_time_step + standard_name = surface_albedo_assuming_deep_snow_on_previous_timestep long_name = snow albedo at previous time step units = frac dimensions = (horizontal_loop_extent) @@ -805,7 +836,7 @@ intent = inout optional = F [qsnowxy] - standard_name = snow_precipitation_rate_at_surface + standard_name = lwe_snowfall_rate long_name = snow precipitation rate at surface units = mm s-1 dimensions = (horizontal_loop_extent) @@ -814,7 +845,7 @@ intent = inout optional = F [wslakexy] - standard_name = lake_water_storage + standard_name = water_storage_in_lake long_name = lake water storage units = mm dimensions = (horizontal_loop_extent) @@ -850,43 +881,43 @@ intent = inout optional = F [tsnoxy] - standard_name = snow_temperature - long_name = snow_temperature + standard_name = temperature_in_surface_snow + long_name = temperature_in_surface_snow units = K - dimensions = (horizontal_loop_extent, -2:0) + dimensions = (horizontal_loop_extent,lower_bound_of_vertical_dimension_of_surface_snow:upper_bound_of_vertical_dimension_of_surface_snow) type = real kind = kind_phys intent = inout optional = F [zsnsoxy] - standard_name = layer_bottom_depth_from_snow_surface + standard_name = depth_from_snow_surface_at_bottom_interface long_name = depth from the top of the snow surface at the bottom of the layer units = m - dimensions = (horizontal_loop_extent, -2:4) + dimensions = (horizontal_loop_extent,lower_bound_of_vertical_dimension_of_surface_snow:vertical_dimension_of_soil_internal_to_land_surface_scheme) type = real kind = kind_phys intent = inout optional = F [snicexy] - standard_name = snow_layer_ice - long_name = snow_layer_ice + standard_name = lwe_thickness_of_ice_in_surface_snow + long_name = lwe_thickness_of_ice_in_surface_snow units = mm - dimensions = (horizontal_loop_extent, -2:0) + dimensions = (horizontal_loop_extent,lower_bound_of_vertical_dimension_of_surface_snow:upper_bound_of_vertical_dimension_of_surface_snow) type = real kind = kind_phys intent = inout optional = F [snliqxy] - standard_name = snow_layer_liquid_water + standard_name = lwe_thickness_of_liquid_water_in_surface_snow long_name = snow layer liquid water units = mm - dimensions = (horizontal_loop_extent, -2:0) + dimensions = (horizontal_loop_extent,lower_bound_of_vertical_dimension_of_surface_snow:upper_bound_of_vertical_dimension_of_surface_snow) type = real kind = kind_phys intent = inout optional = F [lfmassxy] - standard_name = leaf_mass + standard_name = leaf_mass_content long_name = leaf mass units = g m-2 dimensions = (horizontal_loop_extent) @@ -895,7 +926,7 @@ intent = inout optional = F [rtmassxy] - standard_name = fine_root_mass + standard_name = fine_root_mass_content long_name = fine root mass units = g m-2 dimensions = (horizontal_loop_extent) @@ -904,7 +935,7 @@ intent = inout optional = F [stmassxy] - standard_name = stem_mass + standard_name = stem_mass_content long_name = stem mass units = g m-2 dimensions = (horizontal_loop_extent) @@ -913,7 +944,7 @@ intent = inout optional = F [woodxy] - standard_name = wood_mass + standard_name = wood_mass_content long_name = wood mass including woody roots units = g m-2 dimensions = (horizontal_loop_extent) @@ -958,7 +989,7 @@ intent = inout optional = F [taussxy] - standard_name = nondimensional_snow_age + standard_name = dimensionless_age_of_surface_snow long_name = non-dimensional snow age units = none dimensions = (horizontal_loop_extent) @@ -967,16 +998,16 @@ intent = inout optional = F [smoiseq] - standard_name = equilibrium_soil_water_content + standard_name = volumetric_equilibrium_soil_moisture long_name = equilibrium soil water content units = m3 m-3 - dimensions = (horizontal_loop_extent,soil_vertical_dimension_for_land_surface_model) + dimensions = (horizontal_loop_extent,vertical_dimension_of_soil_internal_to_land_surface_scheme) type = real kind = kind_phys intent = inout optional = F [smcwtdxy] - standard_name = soil_water_content_between_soil_bottom_and_water_table + standard_name = volumetric_soil_moisture_between_soil_bottom_and_water_table long_name = soil water content between the bottom of the soil and the water table units = m3 m-3 dimensions = (horizontal_loop_extent) @@ -985,7 +1016,7 @@ intent = inout optional = F [deeprechxy] - standard_name = water_table_recharge_when_deep + standard_name = water_table_recharge_assuming_deep long_name = recharge to or from the water table when deep units = m dimensions = (horizontal_loop_extent) @@ -994,7 +1025,7 @@ intent = inout optional = F [rechxy] - standard_name = water_table_recharge_when_shallow + standard_name = water_table_recharge_assuming_shallow long_name = recharge to or from the water table when shallow units = m dimensions = (horizontal_loop_extent) @@ -1002,6 +1033,51 @@ kind = kind_phys intent = inout optional = F +[albdvis] + standard_name = surface_albedo_direct_visible_over_land + long_name = direct surface albedo visible band over land + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = out + optional = F +[albdnir] + standard_name = surface_albedo_direct_NIR_over_land + long_name = direct surface albedo NIR band over land + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = out + optional = F +[albivis] + standard_name = surface_albedo_diffuse_visible_over_land + long_name = diffuse surface albedo visible band over land + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = out + optional = F +[albinir] + standard_name = surface_albedo_diffuse_NIR_over_land + long_name = diffuse surface albedo NIR band over land + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = out + optional = F +[emiss] + standard_name = surface_longwave_emissivity_over_land + long_name = surface lw emissivity in fraction over land + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = out + optional = F [sncovr1] standard_name = surface_snow_area_fraction_over_land long_name = surface snow area fraction diff --git a/physics/sfc_nst.f b/physics/sfc_nst.f index 9e6a1c0cc..9258b5256 100644 --- a/physics/sfc_nst.f +++ b/physics/sfc_nst.f @@ -27,12 +27,13 @@ end subroutine sfc_nst_finalize !> @{ subroutine sfc_nst_run & & ( im, hvap, cp, hfus, jcal, eps, epsm1, rvrdm1, rd, rhw0, & ! --- inputs: - & pi, sbc, ps, u1, v1, t1, q1, tref, cm, ch, & - & prsl1, prslki, prsik1, prslk1, wet, xlon, sinlat, & - & stress, & + & pi, tgice, sbc, ps, u1, v1, t1, q1, tref, cm, ch, & + & lseaspray, fm, fm10, & + & prsl1, prslki, prsik1, prslk1, wet, use_flake, xlon, & + & sinlat, stress, & & sfcemis, dlwflx, sfcnsw, rain, timestep, kdt, solhr,xcosz, & & wind, flag_iter, flag_guess, nstf_name1, nstf_name4, & - & nstf_name5, lprnt, ipr, & + & nstf_name5, lprnt, ipr, thsfc_loc, & & tskin, tsurf, xt, xs, xu, xv, xz, zm, xtts, xzts, dt_cool, & ! --- input/output: & z_c, c_0, c_d, w_0, w_d, d_conv, ifd, qrain, & & qsurf, gflux, cmm, chh, evap, hflx, ep, errmsg, errflg & ! --- outputs: @@ -47,10 +48,11 @@ subroutine sfc_nst_run & ! call sfc_nst ! ! inputs: ! ! ( im, ps, u1, v1, t1, q1, tref, cm, ch, ! -! prsl1, prslki, wet, xlon, sinlat, stress, ! +! lseaspray, fm, fm10, ! +! prsl1, prslki, wet, use_flake, xlon, sinlat, stress, ! ! sfcemis, dlwflx, sfcnsw, rain, timestep, kdt,solhr,xcosz, ! ! wind, flag_iter, flag_guess, nstf_name1, nstf_name4, ! -! nstf_name5, lprnt, ipr, ! +! nstf_name5, lprnt, ipr, thsfc_loc, ! ! input/outputs: ! ! tskin, tsurf, xt, xs, xu, xv, xz, zm, xtts, xzts, dt_cool, ! ! z_c, c_0, c_d, w_0, w_d, d_conv, ifd, qrain, ! @@ -89,11 +91,16 @@ subroutine sfc_nst_run & ! tref - real, reference/foundation temperature ( k ) im ! ! cm - real, surface exchange coeff for momentum (m/s) im ! ! ch - real, surface exchange coeff heat & moisture(m/s) im ! +! lseaspray- logical, .t. for parameterization for sea spray 1 ! +! fm - real, a stability profile function for momentum im ! +! fm10 - real, a stability profile function for momentum im ! +! at 10m ! ! prsl1 - real, surface layer mean pressure (pa) im ! ! prslki - real, im ! ! prsik1 - real, im ! ! prslk1 - real, im ! ! wet - logical, =T if any ocn/lake water (F otherwise) im ! +! use_flake- logical, =T if flake model is used for lake im ! ! icy - logical, =T if any ice im ! ! xlon - real, longitude (radians) im ! ! sinlat - real, sin of latitude im ! @@ -122,6 +129,7 @@ subroutine sfc_nst_run & ! nstf_name5 : zsea2 in mm 1 ! ! lprnt - logical, control flag for check print out 1 ! ! ipr - integer, grid index for check print out 1 ! +! thsfc_loc- logical, flag for reference pressure in theta 1 ! ! ! ! input/outputs: ! li added for oceanic components @@ -186,26 +194,31 @@ subroutine sfc_nst_run & integer, intent(in) :: im, kdt, ipr, nstf_name1, nstf_name4, & & nstf_name5 real (kind=kind_phys), intent(in) :: hvap, cp, hfus, jcal, eps, & - & epsm1, rvrdm1, rd, rhw0, sbc, pi - real (kind=kind_phys), dimension(im), intent(in) :: ps, u1, v1, & - & t1, q1, tref, cm, ch, prsl1, prslki, prsik1, prslk1, & - & xlon,xcosz, & + & epsm1, rvrdm1, rd, rhw0, sbc, pi, tgice + real (kind=kind_phys), dimension(:), intent(in) :: ps, u1, v1, & + & t1, q1, tref, cm, ch, fm, fm10, & + & prsl1, prslki, prsik1, prslk1, xlon, xcosz, & & sinlat, stress, sfcemis, dlwflx, sfcnsw, rain, wind real (kind=kind_phys), intent(in) :: timestep real (kind=kind_phys), intent(in) :: solhr - logical, dimension(im), intent(in) :: flag_iter, flag_guess, wet +! For sea spray effect + logical, intent(in) :: lseaspray +! + logical, dimension(:), intent(in) :: flag_iter, flag_guess, wet, & + & use_flake ! &, icy logical, intent(in) :: lprnt + logical, intent(in) :: thsfc_loc ! --- input/outputs: ! control variables of dtl system (5+2) and sl (2) and coefficients for d(tz)/d(ts) calculation - real (kind=kind_phys), dimension(im), intent(inout) :: tskin, & + real (kind=kind_phys), dimension(:), intent(inout) :: tskin, & & tsurf, xt, xs, xu, xv, xz, zm, xtts, xzts, dt_cool, & & z_c, c_0, c_d, w_0, w_d, d_conv, ifd, qrain ! --- outputs: - real (kind=kind_phys), dimension(im), intent(inout) :: & + real (kind=kind_phys), dimension(:), intent(inout) :: & & qsurf, gflux, cmm, chh, evap, hflx, ep character(len=*), intent(out) :: errmsg @@ -240,15 +253,30 @@ subroutine sfc_nst_run & real(kind=kind_phys) fw,q_warm real(kind=kind_phys) t12,alon,tsea,sstc,dta,dtz real(kind=kind_phys) zsea1,zsea2,soltim + logical do_nst ! external functions called: iw3jdn integer :: iw3jdn +! +! parameters for sea spray effect +! + real (kind=kind_phys) :: f10m, u10m, v10m, ws10, ru10, qss1, + & bb1, hflxs, evaps, ptem +! +! real (kind=kind_phys), parameter :: alps=0.5, bets=0.5, gams=0.1, +! real (kind=kind_phys), parameter :: alps=0.5, bets=0.5, gams=0.0, +! real (kind=kind_phys), parameter :: alps=1.0, bets=1.0, gams=0.2, + real (kind=kind_phys), parameter :: alps=0.75,bets=0.75,gams=0.15, + & ws10cr=30., conlf=7.2e-9, consf=6.4e-8 +! !====================================================================================================== cc ! Initialize CCPP error handling variables errmsg = '' errflg = 0 + if (nstf_name1 == 0) return ! No NSST model used + cpinv = one/cp hvapi = one/hvap elocp = hvap/cp @@ -257,16 +285,19 @@ subroutine sfc_nst_run & ! ! flag for open water and where the iteration is on ! + do_nst = .false. do i = 1, im ! flag(i) = wet(i) .and. .not.icy(i) .and. flag_iter(i) - flag(i) = wet(i) .and. flag_iter(i) + flag(i) = wet(i) .and. flag_iter(i) .and. .not. use_flake(i) + do_nst = do_nst .or. flag(i) enddo + if (.not. do_nst) return ! ! save nst-related prognostic fields for guess run ! do i=1, im ! if(wet(i) .and. .not.icy(i) .and. flag_guess(i)) then - if(wet(i) .and. flag_guess(i)) then + if(wet(i) .and. flag_guess(i) .and. .not. use_flake(i)) then xt_old(i) = xt(i) xs_old(i) = xs(i) xu_old(i) = xu(i) @@ -295,11 +326,13 @@ subroutine sfc_nst_run & wndmag(i) = sqrt(u1(i)*u1(i) + v1(i)*v1(i)) q0(i) = max(q1(i), 1.0e-8_kp) -#ifdef GSD_SURFACE_FLUXES_BUGFIX - theta1(i) = t1(i) / prslk1(i) ! potential temperature at the middle of lowest model layer -#else - theta1(i) = t1(i) * prslki(i) -#endif + + if(thsfc_loc) then ! Use local potential temperature + theta1(i) = t1(i) * prslki(i) + else ! Use potential temperature referenced to 1000 hPa + theta1(i) = t1(i) / prslk1(i) ! potential temperature at the middle of lowest model layer + endif + tv1(i) = t1(i) * (one + rvrdm1*q0(i)) rho_a(i) = prsl1(i) / (rd*tv1(i)) qss(i) = fpvs(tsurf(i)) ! pa @@ -320,11 +353,12 @@ subroutine sfc_nst_run & ! at previous time step evap(i) = elocp * rch(i) * (qss(i) - q0(i)) qsurf(i) = qss(i) -#ifdef GSD_SURFACE_FLUXES_BUGFIX - hflx(i) = rch(i) * (tsurf(i)/prsik1(i) - theta1(i)) -#else - hflx(i) = rch(i) * (tsurf(i) - theta1(i)) -#endif + + if(thsfc_loc) then ! Use local potential temperature + hflx(i) = rch(i) * (tsurf(i) - theta1(i)) + else ! Use potential temperature referenced to 1000 hPa + hflx(i) = rch(i) * (tsurf(i)/prsik1(i) - theta1(i)) + endif ! if (lprnt .and. i == ipr) print *,' tskin=',tskin(i),' theta1=', ! & theta1(i),' hflx=',hflx(i),' t1=',t1(i),'prslki=',prslki(i) @@ -553,7 +587,7 @@ subroutine sfc_nst_run & !> - Call get_dtzm_point() to computes \a dtz and \a tsurf. call get_dtzm_point(xt(i),xz(i),dt_cool(i),z_c(i), & zsea1,zsea2,dtz) - tsurf(i) = max(271.2_kp, tref(i) + dtz ) + tsurf(i) = max(tgice, tref(i) + dtz ) ! if (lprnt .and. i == ipr) print *,' tsurf=',tsurf(i),' tref=', ! &tref(i),' xz=',xz(i),' dt_cool=',dt_cool(i) @@ -582,7 +616,7 @@ subroutine sfc_nst_run & ! restore nst-related prognostic fields for guess run do i=1, im ! if (wet(i) .and. .not.icy(i)) then - if (wet(i)) then + if (wet(i) .and. .not. use_flake(i)) then if (flag_guess(i)) then ! when it is guess of xt(i) = xt_old(i) xs(i) = xs_old(i) @@ -619,15 +653,43 @@ subroutine sfc_nst_run & qss(i) = eps*qss(i) / (ps(i) + epsm1*qss(i)) qsurf(i) = qss(i) evap(i) = elocp*rch(i) * (qss(i) - q0(i)) -#ifdef GSD_SURFACE_FLUXES_BUGFIX - hflx(i) = rch(i) * (tskin(i)/prsik1(i) - theta1(i)) -#else - hflx(i) = rch(i) * (tskin(i) - theta1(i)) -#endif + + if(thsfc_loc) then ! Use local potential temperature + hflx(i) = rch(i) * (tskin(i) - theta1(i)) + else ! Use potential temperature referenced to 1000 hPa + hflx(i) = rch(i) * (tskin(i)/prsik1(i) - theta1(i)) + endif + endif enddo endif ! if ( nstf_name1 > 1 ) then - +! +! include sea spray effects +! + do i=1,im + if(lseaspray .and. flag(i)) then + f10m = fm10(i) / fm(i) + u10m = f10m * u1(i) + v10m = f10m * v1(i) + ws10 = sqrt(u10m*u10m + v10m*v10m) + ws10 = max(ws10,1.) + ws10 = min(ws10,ws10cr) + tem = .015 * ws10 * ws10 + ru10 = 1. - .087 * log(10./tem) + qss1 = fpvs(t1(i)) + qss1 = eps * qss1 / (prsl1(i) + epsm1 * qss1) + tem = rd * cp * t1(i) * t1(i) + tem = 1. + eps * hvap * hvap * qss1 / tem + bb1 = 1. / tem + evaps = conlf * (ws10**5.4) * ru10 * bb1 + evaps = evaps * rho_a(i) * hvap * (qss1 - q0(i)) + evap(i) = evap(i) + alps * evaps + hflxs = consf * (ws10**3.4) * ru10 + hflxs = hflxs * rho_a(i) * cp * (tskin(i) - t1(i)) + ptem = alps - gams + hflx(i) = hflx(i) + bets * hflxs - ptem * evaps + endif + enddo ! do i=1,im if ( flag(i) ) then @@ -668,8 +730,9 @@ end subroutine sfc_nst_pre_finalize !> \section NSST_general_pre_algorithm General Algorithm !! @{ subroutine sfc_nst_pre_run - & (im, wet, tsfc_wat, tsurf_wat, tseal, xt, xz, dt_cool, - & z_c, tref, cplflx, oceanfrac, nthreads, errmsg, errflg) + & (im, wet, tgice, tsfco, tsurf_wat, + & tseal, xt, xz, dt_cool, z_c, tref, cplflx, + & oceanfrac, nthreads, errmsg, errflg) use machine , only : kind_phys use module_nst_water_prop, only: get_dtzm_2d @@ -680,13 +743,14 @@ subroutine sfc_nst_pre_run ! --- inputs: integer, intent(in) :: im, nthreads - logical, dimension(im), intent(in) :: wet - real (kind=kind_phys), dimension(im), intent(in) :: - & tsfc_wat, xt, xz, dt_cool, z_c, oceanfrac + logical, dimension(:), intent(in) :: wet + real (kind=kind_phys), intent(in) :: tgice + real (kind=kind_phys), dimension(:), intent(in) :: + & tsfco, xt, xz, dt_cool, z_c, oceanfrac logical, intent(in) :: cplflx ! --- input/outputs: - real (kind=kind_phys), dimension(im), intent(inout) :: + real (kind=kind_phys), dimension(:), intent(inout) :: & tsurf_wat, tseal, tref ! --- outputs: @@ -700,35 +764,35 @@ subroutine sfc_nst_pre_run & half = 0.5_kp, & omz1 = 2.0_kp real(kind=kind_phys) :: tem1, tem2, dnsst - real(kind=kind_phys), dimension(im) :: dtzm + real(kind=kind_phys), dimension(im) :: dtzm, z_c_0 ! Initialize CCPP error handling variables errmsg = '' errflg = 0 do i=1,im - if (wet(i)) then + if (wet(i) .and. oceanfrac(i) > 0.0) then ! tem = (oro(i)-oro_uf(i)) * rlapse ! DH* 20190927 simplyfing this code because tem is zero !tem = zero - !tseal(i) = tsfc_wat(i) + tem - tseal(i) = tsfc_wat(i) + !tseal(i) = tsfco(i) + tem + tseal(i) = tsfco(i) !tsurf_wat(i) = tsurf_wat(i) + tem ! *DH endif enddo - ! ! update tsfc & tref with T1 from OGCM & NSST Profile if coupled ! if (cplflx) then + z_c_0 = zero call get_dtzm_2d (xt, xz, dt_cool, & - & z_c, wet, zero, omz1, im, 1, nthreads, dtzm) + & z_c_0, wet, zero, omz1, im, 1, nthreads, dtzm) do i=1,im - if (wet(i) .and. oceanfrac(i) > zero) then -! dnsst = tsfc_wat(i) - tref(i) ! retrive/get difference of Ts and Tf - tref(i) = tsfc_wat(i) - dtzm(i) ! update Tf with T1 and NSST T-Profile -! tsfc_wat(i) = max(271.2,tref(i) + dnsst) ! get Ts updated due to Tf update + if (wet(i) .and. oceanfrac(i) > zero ) then +! dnsst = tsfc_wat(i) - tref(i) ! retrive/get difference of Ts and Tf + tref(i) = max(tgice, tsfco(i) - dtzm(i)) ! update Tf with T1 and NSST T-Profile +! tsfc_wat(i) = max(271.2,tref(i) + dnsst) ! get Ts updated due to Tf update ! tseal(i) = tsfc_wat(i) if (abs(xz(i)) > zero) then tem2 = one / xz(i) @@ -773,7 +837,8 @@ end subroutine sfc_nst_post_finalize ! \section NSST_detailed_post_algorithm Detailed Algorithm ! @{ subroutine sfc_nst_post_run & - & ( im, rlapse, tgice, wet, icy, oro, oro_uf, nstf_name1, & + & ( im, kdt, rlapse, tgice, wet, use_flake, icy, oro, oro_uf, & + & nstf_name1, & & nstf_name4, nstf_name5, xt, xz, dt_cool, z_c, tref, xlon, & & tsurf_wat, tsfc_wat, nthreads, dtzm, errmsg, errflg & & ) @@ -786,21 +851,20 @@ subroutine sfc_nst_post_run & integer, parameter :: kp = kind_phys ! --- inputs: - integer, intent(in) :: im, nthreads - logical, dimension(im), intent(in) :: wet, icy + integer, intent(in) :: im, kdt, nthreads + logical, dimension(:), intent(in) :: wet, icy, use_flake real (kind=kind_phys), intent(in) :: rlapse, tgice - real (kind=kind_phys), dimension(im), intent(in) :: oro, oro_uf + real (kind=kind_phys), dimension(:), intent(in) :: oro, oro_uf integer, intent(in) :: nstf_name1, nstf_name4, nstf_name5 - real (kind=kind_phys), dimension(im), intent(in) :: xt, xz, & + real (kind=kind_phys), dimension(:), intent(in) :: xt, xz, & & dt_cool, z_c, tref, xlon ! --- input/outputs: - real (kind=kind_phys), dimension(im), intent(inout) :: tsurf_wat, & + real (kind=kind_phys), dimension(:), intent(inout) :: tsurf_wat, & & tsfc_wat ! --- outputs: - real (kind=kind_phys), dimension(size(xlon,1)), intent(out) :: & - & dtzm + real (kind=kind_phys), dimension(:), intent(out) :: dtzm character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -833,7 +897,7 @@ subroutine sfc_nst_post_run & do i = 1, im ! if (wet(i) .and. .not.icy(i)) then ! if (wet(i) .and. (frac_grid .or. .not. icy(i))) then - if (wet(i)) then + if (wet(i) .and. .not. use_flake(i)) then tsfc_wat(i) = max(tgice, tref(i) + dtzm(i)) ! tsfc_wat(i) = max(271.2, tref(i) + dtzm(i)) - & ! (oro(i)-oro_uf(i))*rlapse diff --git a/physics/sfc_nst.meta b/physics/sfc_nst.meta index 2c32ca106..4df2e2b82 100644 --- a/physics/sfc_nst.meta +++ b/physics/sfc_nst.meta @@ -79,7 +79,7 @@ intent = in optional = F [rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -96,19 +96,28 @@ kind = kind_phys intent = in optional = F -[sbc] - standard_name = stefan_boltzmann_constant - long_name = Stefan-Boltzmann constant - units = W m-2 K-4 +[pi] + standard_name = pi + long_name = ratio of a circle's circumference to its diameter + units = none dimensions = () type = real kind = kind_phys intent = in optional = F -[pi] - standard_name = pi - long_name = ratio of a circle's circumference to its diameter - units = none +[tgice] + standard_name = freezing_point_temperature_of_seawater + long_name = freezing point temperature of seawater + units = K + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[sbc] + standard_name = stefan_boltzmann_constant + long_name = Stefan-Boltzmann constant + units = W m-2 K-4 dimensions = () type = real kind = kind_phys @@ -124,7 +133,7 @@ intent = in optional = F [u1] - standard_name = x_wind_at_lowest_model_layer + standard_name = x_wind_at_surface_adjacent_layer long_name = x component of surface layer wind units = m s-1 dimensions = (horizontal_loop_extent) @@ -133,7 +142,7 @@ intent = in optional = F [v1] - standard_name = y_wind_at_lowest_model_layer + standard_name = y_wind_at_surface_adjacent_layer long_name = y component of surface layer wind units = m s-1 dimensions = (horizontal_loop_extent) @@ -142,7 +151,7 @@ intent = in optional = F [t1] - standard_name = air_temperature_at_lowest_model_layer + standard_name = air_temperature_at_surface_adjacent_layer long_name = surface layer mean temperature units = K dimensions = (horizontal_loop_extent) @@ -151,7 +160,7 @@ intent = in optional = F [q1] - standard_name = water_vapor_specific_humidity_at_lowest_model_layer + standard_name = specific_humidity_at_surface_adjacent_layer long_name = surface layer mean specific humidity units = kg kg-1 dimensions = (horizontal_loop_extent) @@ -160,7 +169,7 @@ intent = in optional = F [tref] - standard_name = sea_surface_reference_temperature + standard_name = reference_sea_surface_temperature long_name = reference/foundation temperature units = K dimensions = (horizontal_loop_extent) @@ -169,8 +178,8 @@ intent = in optional = F [cm] - standard_name = surface_drag_coefficient_for_momentum_in_air_over_ocean - long_name = surface exchange coeff for momentum over ocean + standard_name = surface_drag_coefficient_for_momentum_in_air_over_water + long_name = surface exchange coeff for momentum over water units = none dimensions = (horizontal_loop_extent) type = real @@ -178,8 +187,34 @@ intent = in optional = F [ch] - standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ocean - long_name = surface exchange coeff heat & moisture over ocean + standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_water + long_name = surface exchange coeff heat surface exchange coeff heat & moisture over ocean moisture over water + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[lseaspray] + standard_name = flag_for_sea_spray + long_name = flag for sea spray parameterization + units = flag + dimensions = () + type = logical + intent = in + optional = F +[fm] + standard_name = Monin_Obukhov_similarity_function_for_momentum_over_water + long_name = Monin-Obukhov similarity function for momentum over water + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[fm10] + standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_water + long_name = Monin-Obukhov similarity parameter for momentum at 10m over water units = none dimensions = (horizontal_loop_extent) type = real @@ -187,7 +222,7 @@ intent = in optional = F [prsl1] - standard_name = air_pressure_at_lowest_model_layer + standard_name = air_pressure_at_surface_adjacent_layer long_name = surface layer mean pressure units = Pa dimensions = (horizontal_loop_extent) @@ -205,7 +240,7 @@ intent = in optional = F [prsik1] - standard_name = dimensionless_exner_function_at_lowest_model_interface + standard_name = surface_dimensionless_exner_function long_name = dimensionless Exner function at the ground surface units = none dimensions = (horizontal_loop_extent) @@ -214,7 +249,7 @@ intent = in optional = F [prslk1] - standard_name = dimensionless_exner_function_at_lowest_model_layer + standard_name = dimensionless_exner_function_at_surface_adjacent_layer long_name = dimensionless Exner function at the lowest model layer units = none dimensions = (horizontal_loop_extent) @@ -230,6 +265,14 @@ type = logical intent = in optional = F +[use_flake] + standard_name = flag_for_using_flake + long_name = flag indicating lake points using flake model + units = flag + dimensions = (horizontal_loop_extent) + type = logical + intent = in + optional = F [xlon] standard_name = longitude long_name = longitude @@ -249,8 +292,8 @@ intent = in optional = F [stress] - standard_name = surface_wind_stress_over_ocean - long_name = surface wind stress over ocean + standard_name = surface_wind_stress_over_water + long_name = surface wind stress over water units = m2 s-2 dimensions = (horizontal_loop_extent) type = real @@ -258,8 +301,8 @@ intent = in optional = F [sfcemis] - standard_name = surface_longwave_emissivity_over_ocean_interstitial - long_name = surface lw emissivity in fraction over ocean (temporary use as interstitial) + standard_name = surface_longwave_emissivity_over_water_interstitial + long_name = surface lw emissivity in fraction over water (temporary use as interstitial) units = frac dimensions = (horizontal_loop_extent) type = real @@ -267,8 +310,8 @@ intent = in optional = F [dlwflx] - standard_name = surface_downwelling_longwave_flux_absorbed_by_ground_over_ocean - long_name = total sky surface downward longwave flux absorbed by the ground over ocean + standard_name = surface_downwelling_longwave_flux_absorbed_by_ground_over_water + long_name = total sky surface downward longwave flux absorbed by the ground over water units = W m-2 dimensions = (horizontal_loop_extent) type = real @@ -285,8 +328,8 @@ intent = in optional = F [rain] - standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_ocean - long_name = total precipitation amount in each time step over ocean + standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_water + long_name = total precipitation amount in each time step over water units = m dimensions = (horizontal_loop_extent) type = real @@ -294,7 +337,7 @@ intent = in optional = F [timestep] - standard_name = time_step_for_dynamics + standard_name = timestep_for_dynamics long_name = timestep interval units = s dimensions = () @@ -303,7 +346,7 @@ intent = in optional = F [kdt] - standard_name = index_of_time_step + standard_name = index_of_timestep long_name = current time step index units = index dimensions = () @@ -311,7 +354,7 @@ intent = in optional = F [solhr] - standard_name = forecast_hour_of_the_day + standard_name = forecast_utc_hour long_name = time in hours after 00z at the current timestep units = h dimensions = () @@ -354,7 +397,7 @@ intent = in optional = F [nstf_name1] - standard_name = flag_for_nsstm_run + standard_name = control_for_nsstm long_name = NSSTM flag: off/uncoupled/coupled=0/1/2 units = flag dimensions = () @@ -362,7 +405,7 @@ intent = in optional = F [nstf_name4] - standard_name = vertical_temperature_average_range_lower_bound + standard_name = lower_bound_for_depth_of_sea_temperature_for_nsstm long_name = zsea1 units = mm dimensions = () @@ -370,7 +413,7 @@ intent = in optional = F [nstf_name5] - standard_name = vertical_temperature_average_range_upper_bound + standard_name = upper_bound_for_depth_of_sea_temperature_for_nsstm long_name = zsea2 units = mm dimensions = () @@ -393,6 +436,14 @@ type = integer intent = in optional = F +[thsfc_loc] + standard_name = flag_for_reference_pressure_theta + long_name = flag for reference pressure in theta calculation + units = flag + dimensions = () + type = logical + intent = in + optional = F [tskin] standard_name = surface_skin_temperature_for_nsst long_name = ocean surface skin temperature @@ -403,8 +454,8 @@ intent = inout optional = F [tsurf] - standard_name = surface_skin_temperature_after_iteration_over_ocean - long_name = surface skin temperature after iteration over ocean + standard_name = surface_skin_temperature_after_iteration_over_water + long_name = surface skin temperature after iteration over water units = K dimensions = (horizontal_loop_extent) type = real @@ -412,7 +463,7 @@ intent = inout optional = F [xt] - standard_name = diurnal_thermocline_layer_heat_content + standard_name = heat_content_in_diurnal_thermocline long_name = heat content in diurnal thermocline layer units = K m dimensions = (horizontal_loop_extent) @@ -421,7 +472,7 @@ intent = inout optional = F [xs] - standard_name = sea_water_salinity + standard_name = sea_water_salinity_in_diurnal_thermocline long_name = salinity content in diurnal thermocline layer units = ppt m dimensions = (horizontal_loop_extent) @@ -430,7 +481,7 @@ intent = inout optional = F [xu] - standard_name = diurnal_thermocline_layer_x_current + standard_name = x_current_in_diurnal_thermocline long_name = u-current content in diurnal thermocline layer units = m2 s-1 dimensions = (horizontal_loop_extent) @@ -439,7 +490,7 @@ intent = inout optional = F [xv] - standard_name = diurnal_thermocline_layer_y_current + standard_name = y_current_in_diurnal_thermocline long_name = v-current content in diurnal thermocline layer units = m2 s-1 dimensions = (horizontal_loop_extent) @@ -466,7 +517,7 @@ intent = inout optional = F [xtts] - standard_name = sensitivity_of_dtl_heat_content_to_surface_temperature + standard_name = derivative_of_heat_content_in_diurnal_thermocline_wrt_surface_skin_temperature long_name = d(xt)/d(ts) units = m dimensions = (horizontal_loop_extent) @@ -475,7 +526,7 @@ intent = inout optional = F [xzts] - standard_name = sensitivity_of_dtl_thickness_to_surface_temperature + standard_name = derivative_of_diurnal_thermocline_layer_thickness_wrt_surface_skin_temperature long_name = d(xz)/d(ts) units = m K-1 dimensions = (horizontal_loop_extent) @@ -484,7 +535,7 @@ intent = inout optional = F [dt_cool] - standard_name = sub_layer_cooling_amount + standard_name = molecular_sublayer_temperature_correction_in_sea_water long_name = sub-layer cooling amount units = K dimensions = (horizontal_loop_extent) @@ -493,7 +544,7 @@ intent = inout optional = F [z_c] - standard_name = sub_layer_cooling_thickness + standard_name = molecular_sublayer_thickness_in_sea_water long_name = sub-layer cooling thickness units = m dimensions = (horizontal_loop_extent) @@ -538,7 +589,7 @@ intent = inout optional = F [d_conv] - standard_name = free_convection_layer_thickness + standard_name = free_convection_layer_thickness_in_sea_water long_name = thickness of free convection layer units = m dimensions = (horizontal_loop_extent) @@ -547,7 +598,7 @@ intent = inout optional = F [ifd] - standard_name = index_of_dtlm_start + standard_name = control_for_diurnal_thermocline_calculation long_name = index to start dtlm run or not units = index dimensions = (horizontal_loop_extent) @@ -556,7 +607,7 @@ intent = inout optional = F [qrain] - standard_name = sensible_heat_flux_due_to_rainfall + standard_name = surface_sensible_heat_due_to_rainfall long_name = sensible heat flux due to rainfall units = W dimensions = (horizontal_loop_extent) @@ -565,8 +616,8 @@ intent = inout optional = F [qsurf] - standard_name = surface_specific_humidity_over_ocean - long_name = surface air saturation specific humidity over ocean + standard_name = surface_specific_humidity_over_water + long_name = surface air saturation specific humidity over water units = kg kg-1 dimensions = (horizontal_loop_extent) type = real @@ -574,8 +625,8 @@ intent = inout optional = F [gflux] - standard_name = upward_heat_flux_in_soil_over_ocean - long_name = soil heat flux over ocean + standard_name = upward_heat_flux_in_soil_over_water + long_name = soil heat flux over water units = W m-2 dimensions = (horizontal_loop_extent) type = real @@ -583,8 +634,8 @@ intent = inout optional = F [cmm] - standard_name = surface_drag_wind_speed_for_momentum_in_air_over_ocean - long_name = momentum exchange coefficient over ocean + standard_name = surface_drag_wind_speed_for_momentum_in_air_over_water + long_name = momentum exchange coefficient over water units = m s-1 dimensions = (horizontal_loop_extent) type = real @@ -592,8 +643,8 @@ intent = inout optional = F [chh] - standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_ocean - long_name = thermal exchange coefficient over ocean + standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_water + long_name = thermal exchange coefficient over water units = kg m-2 s-1 dimensions = (horizontal_loop_extent) type = real @@ -601,8 +652,8 @@ intent = inout optional = F [evap] - standard_name = kinematic_surface_upward_latent_heat_flux_over_ocean - long_name = kinematic surface upward latent heat flux over ocean + standard_name = kinematic_surface_upward_latent_heat_flux_over_water + long_name = kinematic surface upward latent heat flux over water units = kg kg-1 m s-1 dimensions = (horizontal_loop_extent) type = real @@ -610,8 +661,8 @@ intent = inout optional = F [hflx] - standard_name = kinematic_surface_upward_sensible_heat_flux_over_ocean - long_name = kinematic surface upward sensible heat flux over ocean + standard_name = kinematic_surface_upward_sensible_heat_flux_over_water + long_name = kinematic surface upward sensible heat flux over water units = K m s-1 dimensions = (horizontal_loop_extent) type = real @@ -619,8 +670,8 @@ intent = inout optional = F [ep] - standard_name = surface_upward_potential_latent_heat_flux_over_ocean - long_name = surface upward potential latent heat flux over ocean + standard_name = surface_upward_potential_latent_heat_flux_over_water + long_name = surface upward potential latent heat flux over water units = W m-2 dimensions = (horizontal_loop_extent) type = real @@ -671,9 +722,18 @@ type = logical intent = in optional = F -[tsfc_wat] - standard_name = surface_skin_temperature_over_ocean_interstitial - long_name = surface skin temperature over ocean (temporary use as interstitial) +[tgice] + standard_name = freezing_point_temperature_of_seawater + long_name = freezing point temperature of seawater + units = K + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[tsfco] + standard_name = sea_surface_temperature + long_name = sea surface temperature units = K dimensions = (horizontal_loop_extent) type = real @@ -681,8 +741,8 @@ intent = in optional = F [tsurf_wat] - standard_name = surface_skin_temperature_after_iteration_over_ocean - long_name = surface skin temperature after iteration over ocean + standard_name = surface_skin_temperature_after_iteration_over_water + long_name = surface skin temperature after iteration over water units = K dimensions = (horizontal_loop_extent) type = real @@ -699,7 +759,7 @@ intent = inout optional = F [xt] - standard_name = diurnal_thermocline_layer_heat_content + standard_name = heat_content_in_diurnal_thermocline long_name = heat content in diurnal thermocline layer units = K m dimensions = (horizontal_loop_extent) @@ -717,7 +777,7 @@ intent = in optional = F [dt_cool] - standard_name = sub_layer_cooling_amount + standard_name = molecular_sublayer_temperature_correction_in_sea_water long_name = sub-layer cooling amount units = K dimensions = (horizontal_loop_extent) @@ -726,7 +786,7 @@ intent = in optional = F [z_c] - standard_name = sub_layer_cooling_thickness + standard_name = molecular_sublayer_thickness_in_sea_water long_name = sub-layer cooling thickness units = m dimensions = (horizontal_loop_extent) @@ -735,7 +795,7 @@ intent = in optional = F [tref] - standard_name = sea_surface_reference_temperature + standard_name = reference_sea_surface_temperature long_name = reference/foundation temperature units = K dimensions = (horizontal_loop_extent) @@ -744,7 +804,7 @@ intent = inout optional = F [cplflx] - standard_name = flag_for_flux_coupling + standard_name = flag_for_surface_flux_coupling long_name = flag controlling cplflx collection (default off) units = flag dimensions = () @@ -761,7 +821,7 @@ intent = in optional = F [nthreads] - standard_name = omp_threads + standard_name = number_of_openmp_threads long_name = number of OpenMP threads available for physics schemes units = count dimensions = () @@ -804,6 +864,14 @@ type = integer intent = in optional = F +[kdt] + standard_name = index_of_timestep + long_name = current time step index + units = index + dimensions = () + type = integer + intent = in + optional = F [rlapse] standard_name = air_temperature_lapse_rate_constant long_name = environmental air temperature lapse rate constant @@ -830,6 +898,14 @@ type = logical intent = in optional = F +[use_flake] + standard_name = flag_for_using_flake + long_name = flag indicating lake points using flake model + units = flag + dimensions = (horizontal_loop_extent) + type = logical + intent = in + optional = F [icy] standard_name = flag_nonzero_sea_ice_surface_fraction long_name = flag indicating presence of some sea ice surface area fraction @@ -839,8 +915,8 @@ intent = in optional = F [oro] - standard_name = orography - long_name = orography + standard_name = height_above_mean_sea_level + long_name = height_above_mean_sea_level units = m dimensions = (horizontal_loop_extent) type = real @@ -848,8 +924,8 @@ intent = in optional = F [oro_uf] - standard_name = orography_unfiltered - long_name = unfiltered orography + standard_name = unfiltered_height_above_mean_sea_level + long_name = unfiltered height_above_mean_sea_level units = m dimensions = (horizontal_loop_extent) type = real @@ -857,7 +933,7 @@ intent = in optional = F [nstf_name1] - standard_name = flag_for_nsstm_run + standard_name = control_for_nsstm long_name = NSSTM flag: off/uncoupled/coupled=0/1/2 units = flag dimensions = () @@ -865,7 +941,7 @@ intent = in optional = F [nstf_name4] - standard_name = vertical_temperature_average_range_lower_bound + standard_name = lower_bound_for_depth_of_sea_temperature_for_nsstm long_name = zsea1 units = mm dimensions = () @@ -873,7 +949,7 @@ intent = in optional = F [nstf_name5] - standard_name = vertical_temperature_average_range_upper_bound + standard_name = upper_bound_for_depth_of_sea_temperature_for_nsstm long_name = zsea2 units = mm dimensions = () @@ -881,7 +957,7 @@ intent = in optional = F [xt] - standard_name = diurnal_thermocline_layer_heat_content + standard_name = heat_content_in_diurnal_thermocline long_name = heat content in diurnal thermocline layer units = K m dimensions = (horizontal_loop_extent) @@ -899,7 +975,7 @@ intent = in optional = F [dt_cool] - standard_name = sub_layer_cooling_amount + standard_name = molecular_sublayer_temperature_correction_in_sea_water long_name = sub-layer cooling amount units = K dimensions = (horizontal_loop_extent) @@ -908,7 +984,7 @@ intent = in optional = F [z_c] - standard_name = sub_layer_cooling_thickness + standard_name = molecular_sublayer_thickness_in_sea_water long_name = sub-layer cooling thickness units = m dimensions = (horizontal_loop_extent) @@ -917,7 +993,7 @@ intent = in optional = F [tref] - standard_name = sea_surface_reference_temperature + standard_name = reference_sea_surface_temperature long_name = reference/foundation temperature units = K dimensions = (horizontal_loop_extent) @@ -935,8 +1011,8 @@ intent = in optional = F [tsurf_wat] - standard_name = surface_skin_temperature_after_iteration_over_ocean - long_name = surface skin temperature after iteration over ocean + standard_name = surface_skin_temperature_after_iteration_over_water + long_name = surface skin temperature after iteration over water units = K dimensions = (horizontal_loop_extent) type = real @@ -944,8 +1020,8 @@ intent = inout optional = F [tsfc_wat] - standard_name = surface_skin_temperature_over_ocean_interstitial - long_name = surface skin temperature over ocean (temporary use as interstitial) + standard_name = surface_skin_temperature_over_water_interstitial + long_name = surface skin temperature over water (temporary use as interstitial) units = K dimensions = (horizontal_loop_extent) type = real @@ -953,7 +1029,7 @@ intent = inout optional = F [nthreads] - standard_name = omp_threads + standard_name = number_of_openmp_threads long_name = number of OpenMP threads available for physics schemes units = count dimensions = () diff --git a/physics/sfc_ocean.F b/physics/sfc_ocean.F index 8da60bb01..79a9eb295 100644 --- a/physics/sfc_ocean.F +++ b/physics/sfc_ocean.F @@ -26,8 +26,9 @@ end subroutine sfc_ocean_finalize subroutine sfc_ocean_run & !................................... ! --- inputs: - & ( im, rd, eps, epsm1, rvrdm1, ps, t1, q1, & - & tskin, cm, ch, prsl1, prslki, wet, lake, wind, &, ! --- inputs + & ( im, hvap, cp, rd, eps, epsm1, rvrdm1, ps, u1, v1, t1, q1, & + & tskin, cm, ch, lseaspray, fm, fm10, & + & prsl1, prslki, wet, use_flake, wind, &, ! --- inputs & flag_iter, & & qsurf, cmm, chh, gflux, evap, hflx, ep, & ! --- outputs & errmsg, errflg & @@ -40,9 +41,8 @@ subroutine sfc_ocean_run & ! ! ! call sfc_ocean ! ! inputs: ! -! ( im, ps, t1, q1, tskin, cm, ch, ! -!! ( im, ps, u1, v1, t1, q1, tskin, cm, ch, ! -! prsl1, prslki, wet, lake, wind, flag_iter, ! +! ( im, ps, u1, v1, t1, q1, tskin, cm, ch, lseaspray, fm, fm10, ! +! prsl1, prslki, wet, use_flake, wind, flag_iter, ! ! outputs: ! ! qsurf, cmm, chh, gflux, evap, hflx, ep ) ! ! ! @@ -65,11 +65,16 @@ subroutine sfc_ocean_run & ! inputs: size ! ! im - integer, horizontal dimension 1 ! ! ps - real, surface pressure im ! +! u1, v1 - real, u/v component of surface layer wind (m/s) im ! ! t1 - real, surface layer mean temperature ( k ) im ! ! q1 - real, surface layer mean specific humidity im ! ! tskin - real, ground surface skin temperature ( k ) im ! ! cm - real, surface exchange coeff for momentum (m/s) im ! ! ch - real, surface exchange coeff heat & moisture(m/s) im ! +! lseaspray- logical, .t. for parameterization for sea spray 1 ! +! fm - real, a stability profile function for momentum im ! +! fm10 - real, a stability profile function for momentum im ! +! at 10m ! ! prsl1 - real, surface layer mean pressure im ! ! prslki - real, im ! ! wet - logical, =T if any ocean/lak, =F otherwise im ! @@ -93,19 +98,23 @@ subroutine sfc_ocean_run & implicit none ! --- constant parameters: - real (kind=kind_phys), parameter :: one = 1.0_kind_phys, zero = 0.0_kind_phys & - &, qmin = 1.0e-8_kind_phys + real (kind=kind_phys), parameter :: one = 1.0_kind_phys, & + & zero = 0.0_kind_phys, qmin = 1.0e-8_kind_phys ! --- inputs: integer, intent(in) :: im - real (kind=kind_phys), intent(in) :: rd, eps, epsm1, rvrdm1 + real (kind=kind_phys), intent(in) :: hvap, cp, rd, & + & eps, epsm1, rvrdm1 - real (kind=kind_phys), dimension(im), intent(in) :: ps, & - & t1, q1, tskin, cm, ch, prsl1, prslki, wind + real (kind=kind_phys), dimension(:), intent(in) :: ps, u1, v1, & + & t1, q1, tskin, cm, ch, fm, fm10, prsl1, prslki, wind - logical, dimension(im), intent(in) :: flag_iter, wet, lake +! For sea spray effect + logical, intent(in) :: lseaspray +! + logical, dimension(:), intent(in) :: flag_iter, wet, use_flake ! --- outputs: - real (kind=kind_phys), dimension(im), intent(inout) :: qsurf, & + real (kind=kind_phys), dimension(:), intent(inout) :: qsurf, & & cmm, chh, gflux, evap, hflx, ep character(len=*), intent(out) :: errmsg @@ -113,48 +122,105 @@ subroutine sfc_ocean_run & ! --- locals: - real (kind=kind_phys) :: q0, qss, rch, rho, tem + real (kind=kind_phys) :: qss, rch, tem, + & elocp, cpinv, hvapi + real (kind=kind_phys), dimension(im) :: rho, q0 integer :: i + logical :: flag(im) +! +! parameters for sea spray effect +! + real (kind=kind_phys) :: f10m, u10m, v10m, ws10, ru10, qss1, + & bb1, hflxs, evaps, ptem +! +! real (kind=kind_phys), parameter :: alps=0.5, bets=0.5, gams=0.1, +! real (kind=kind_phys), parameter :: alps=0.5, bets=0.5, gams=0.0, +! real (kind=kind_phys), parameter :: alps=1.0, bets=1.0, gams=0.2, + real (kind=kind_phys), parameter :: alps=0.75,bets=0.75,gams=0.15, + & ws10cr=30., conlf=7.2e-9, consf=6.4e-8 +! +!====================================================================================================== !===> ... begin here ! ! -- ... initialize CCPP error handling variables errmsg = '' errflg = 0 + + cpinv = one/cp + hvapi = one/hvap + elocp = hvap/cp ! ! --- ... flag for open water do i = 1, im - + flag(i) = (wet(i) .and. flag_iter(i) .and. .not. use_flake(i)) ! --- ... initialize variables. all units are supposedly m.k.s. unless specified ! ps is in pascals, wind is wind speed, ! rho is density, qss is sat. hum. at surface - if (wet(i) .and. flag_iter(i) .and. .not. lake(i)) then - q0 = max( q1(i), qmin ) - rho = prsl1(i) / (rd*t1(i)*(one + rvrdm1*q0)) + if ( flag(i) ) then + q0(i) = max( q1(i), qmin ) + rho(i) = prsl1(i) / (rd*t1(i)*(one + rvrdm1*q0(i))) qss = fpvs( tskin(i) ) qss = eps*qss / (ps(i) + epsm1*qss) ! --- ... rcp = rho cp ch v + rch = rho(i) * cp * ch(i) * wind(i) tem = ch(i) * wind(i) cmm(i) = cm(i) * wind(i) - chh(i) = rho * tem + chh(i) = rho(i) * tem ! --- ... sensible and latent heat flux over open water - hflx(i) = tem * (tskin(i) - t1(i) * prslki(i)) + hflx(i) = rch * (tskin(i) - t1(i) * prslki(i)) - evap(i) = tem * (qss - q0) + evap(i) = elocp * rch * (qss - q0(i)) - ep(i) = evap(i) qsurf(i) = qss gflux(i) = zero endif enddo ! +! include sea spray effects +! + do i=1,im + if(lseaspray .and. flag(i)) then + f10m = fm10(i) / fm(i) + u10m = f10m * u1(i) + v10m = f10m * v1(i) + ws10 = sqrt(u10m*u10m + v10m*v10m) + ws10 = max(ws10,1.) + ws10 = min(ws10,ws10cr) + tem = .015 * ws10 * ws10 + ru10 = 1. - .087 * log(10./tem) + qss1 = fpvs(t1(i)) + qss1 = eps * qss1 / (prsl1(i) + epsm1 * qss1) + tem = rd * cp * t1(i) * t1(i) + tem = 1. + eps * hvap * hvap * qss1 / tem + bb1 = 1. / tem + evaps = conlf * (ws10**5.4) * ru10 * bb1 + evaps = evaps * rho(i) * hvap * (qss1 - q0(i)) + evap(i) = evap(i) + alps * evaps + hflxs = consf * (ws10**3.4) * ru10 + hflxs = hflxs * rho(i) * cp * (tskin(i) - t1(i)) + ptem = alps - gams + hflx(i) = hflx(i) + bets * hflxs - ptem * evaps + endif + enddo +! + do i = 1, im + if ( flag(i) ) then + tem = 1.0 / rho(i) + hflx(i) = hflx(i) * tem * cpinv + evap(i) = evap(i) * tem * hvapi + ep(i) = evap(i) + endif + enddo +! + return !................................... end subroutine sfc_ocean_run diff --git a/physics/sfc_ocean.meta b/physics/sfc_ocean.meta index afdea6c3f..b9aea6cc1 100644 --- a/physics/sfc_ocean.meta +++ b/physics/sfc_ocean.meta @@ -15,8 +15,26 @@ type = integer intent = in optional = F +[hvap] + standard_name = latent_heat_of_vaporization_of_water_at_0C + long_name = latent heat of evaporation/sublimation + units = J kg-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[cp] + standard_name = specific_heat_of_dry_air_at_constant_pressure + long_name = specific heat of dry air at constant pressure + units = J kg-1 K-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F [rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -60,8 +78,26 @@ kind = kind_phys intent = in optional = F +[u1] + standard_name = x_wind_at_surface_adjacent_layer + long_name = x component of surface layer wind + units = m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[v1] + standard_name = y_wind_at_surface_adjacent_layer + long_name = y component of surface layer wind + units = m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F [t1] - standard_name = air_temperature_at_lowest_model_layer + standard_name = air_temperature_at_surface_adjacent_layer long_name = surface layer mean temperature units = K dimensions = (horizontal_loop_extent) @@ -70,7 +106,7 @@ intent = in optional = F [q1] - standard_name = water_vapor_specific_humidity_at_lowest_model_layer + standard_name = specific_humidity_at_surface_adjacent_layer long_name = surface layer mean specific humidity units = kg kg-1 dimensions = (horizontal_loop_extent) @@ -79,8 +115,8 @@ intent = in optional = F [tskin] - standard_name = surface_skin_temperature_over_ocean_interstitial - long_name = surface skin temperature over ocean (temporary use as interstitial) + standard_name = surface_skin_temperature_over_water_interstitial + long_name = surface skin temperature over water (temporary use as interstitial) units = K dimensions = (horizontal_loop_extent) type = real @@ -88,8 +124,8 @@ intent = in optional = F [cm] - standard_name = surface_drag_coefficient_for_momentum_in_air_over_ocean - long_name = surface exchange coeff for momentum over ocean + standard_name = surface_drag_coefficient_for_momentum_in_air_over_water + long_name = surface exchange coeff for momentum over water units = none dimensions = (horizontal_loop_extent) type = real @@ -97,8 +133,34 @@ intent = in optional = F [ch] - standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ocean - long_name = surface exchange coeff heat & moisture over ocean + standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_water + long_name = surface exchange coeff heat surface exchange coeff heat & moisture over ocean moisture over water + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[lseaspray] + standard_name = flag_for_sea_spray + long_name = flag for sea spray parameterization + units = flag + dimensions = () + type = logical + intent = in + optional = F +[fm] + standard_name = Monin_Obukhov_similarity_function_for_momentum_over_water + long_name = Monin-Obukhov similarity function for momentum over water + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[fm10] + standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_water + long_name = Monin-Obukhov similarity parameter for momentum at 10m over water units = none dimensions = (horizontal_loop_extent) type = real @@ -106,7 +168,7 @@ intent = in optional = F [prsl1] - standard_name = air_pressure_at_lowest_model_layer + standard_name = air_pressure_at_surface_adjacent_layer long_name = surface layer mean pressure units = Pa dimensions = (horizontal_loop_extent) @@ -131,9 +193,9 @@ type = logical intent = in optional = F -[lake] - standard_name = flag_nonzero_lake_surface_fraction - long_name = flag indicating presence of some lake surface area fraction +[use_flake] + standard_name = flag_for_using_flake + long_name = flag indicating lake points using flake model units = flag dimensions = (horizontal_loop_extent) type = logical @@ -157,8 +219,8 @@ intent = in optional = F [qsurf] - standard_name = surface_specific_humidity_over_ocean - long_name = surface air saturation specific humidity over ocean + standard_name = surface_specific_humidity_over_water + long_name = surface air saturation specific humidity over water units = kg kg-1 dimensions = (horizontal_loop_extent) type = real @@ -166,8 +228,8 @@ intent = inout optional = F [cmm] - standard_name = surface_drag_wind_speed_for_momentum_in_air_over_ocean - long_name = momentum exchange coefficient over ocean + standard_name = surface_drag_wind_speed_for_momentum_in_air_over_water + long_name = momentum exchange coefficient over water units = m s-1 dimensions = (horizontal_loop_extent) type = real @@ -175,8 +237,8 @@ intent = inout optional = F [chh] - standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_ocean - long_name = thermal exchange coefficient over ocean + standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_water + long_name = thermal exchange coefficient over water units = kg m-2 s-1 dimensions = (horizontal_loop_extent) type = real @@ -184,8 +246,8 @@ intent = inout optional = F [gflux] - standard_name = upward_heat_flux_in_soil_over_ocean - long_name = soil heat flux over ocean + standard_name = upward_heat_flux_in_soil_over_water + long_name = soil heat flux over water units = W m-2 dimensions = (horizontal_loop_extent) type = real @@ -193,8 +255,8 @@ intent = inout optional = F [evap] - standard_name = kinematic_surface_upward_latent_heat_flux_over_ocean - long_name = kinematic surface upward latent heat flux over ocean + standard_name = kinematic_surface_upward_latent_heat_flux_over_water + long_name = kinematic surface upward latent heat flux over water units = kg kg-1 m s-1 dimensions = (horizontal_loop_extent) type = real @@ -202,8 +264,8 @@ intent = inout optional = F [hflx] - standard_name = kinematic_surface_upward_sensible_heat_flux_over_ocean - long_name = kinematic surface upward sensible heat flux over ocean + standard_name = kinematic_surface_upward_sensible_heat_flux_over_water + long_name = kinematic surface upward sensible heat flux over water units = K m s-1 dimensions = (horizontal_loop_extent) type = real @@ -211,8 +273,8 @@ intent = inout optional = F [ep] - standard_name = surface_upward_potential_latent_heat_flux_over_ocean - long_name = surface upward potential latent heat flux over ocean + standard_name = surface_upward_potential_latent_heat_flux_over_water + long_name = surface upward potential latent heat flux over water units = W m-2 dimensions = (horizontal_loop_extent) type = real diff --git a/physics/sfc_sice.f b/physics/sfc_sice.f index ab67f849e..176a3e8de 100644 --- a/physics/sfc_sice.f +++ b/physics/sfc_sice.f @@ -14,9 +14,6 @@ end subroutine sfc_sice_finalize !>\defgroup gfs_sice_main GFS Three-layer Thermodynomics Sea-Ice Scheme Module !! \brief This is three-layer thermodynomics sea-ice model based on Winton (2000) \cite winton_2000. -!! \section arg_table_sfc_sice_run Argument Table -!! \htmlinclude sfc_sice_run.html -!! !> \section general_sice_run GFS Sea Ice Driver General Algorithm !!The model has four prognostic variables: the snow layer thickness \f$h_s\f$, the ice layer thickness !! \f$h_i\f$, the upper and lower ice layer temperatures located at the midpoints of the layers @@ -38,17 +35,20 @@ end subroutine sfc_sice_finalize !! the water line to ice, and 3) to equalize the thickness of the two !! ice layers. !> \section detailed_sice_run GFS Sea Ice Driver Detailed Algorithm +!! +!! \section arg_table_sfc_sice_run Argument Table +!! \htmlinclude sfc_sice_run.html +!! !> @{ subroutine sfc_sice_run & & ( im, kice, sbc, hvap, tgice, cp, eps, epsm1, rvrdm1, grav, & ! --- inputs: & t0c, rd, ps, t1, q1, delt, & & sfcemis, dlwflx, sfcnsw, sfcdsw, srflag, & & cm, ch, prsl1, prslki, prsik1, prslk1, wind, & - & flag_iter, lprnt, ipr, & + & flag_iter, use_flake, lprnt, ipr, thsfc_loc, & & hice, fice, tice, weasd, tskin, tprcp, tiice, ep, & ! --- input/outputs: - & snwdph, qsurf, snowmt, gflux, cmm, chh, evap, hflx, & ! - & frac_grid, icy, islmsk_cice, & - & min_lakeice, min_seaice, oceanfrac, & + & snwdph, qsurf, snowmt, gflux, cmm, chh, evap, hflx, & + & islmsk, & & errmsg, errflg & ) @@ -70,22 +70,22 @@ subroutine sfc_sice_run & ! ! ! subprogram called: ice3lay. ! ! ! -!> program history log: -!!- 2005 -- xingren wu created from original progtm and added -!! two-layer ice model -!!- 200x -- sarah lu added flag_iter -!!- oct 2006 -- h. wei added cmm and chh to output +!> program history log: +!!- 2005 -- xingren wu created from original progtm and added +!! two-layer ice model +!!- 200x -- sarah lu added flag_iter +!!- oct 2006 -- h. wei added cmm and chh to output !!- 2007 -- x. wu modified for mom4 coupling (i.e. cpldice) !! (not used anymore) -!!- 2007 -- s. moorthi micellaneous changes -!!- may 2009 -- y.-t. hou modified to include surface emissivity -!! effect on lw radiation. replaced the confusing +!!- 2007 -- s. moorthi micellaneous changes +!!- may 2009 -- y.-t. hou modified to include surface emissivity +!! effect on lw radiation. replaced the confusing !! slrad with sfc net sw sfcnsw (dn-up). reformatted -!! the code and add program documentation block. -!!- sep 2009 -- s. moorthi removed rcl, changed pressure units and -!! further optimized -!!- jan 2015 -- x. wu change "cimin = 0.15" for both -!! uncoupled and coupled case +!! the code and add program documentation block. +!!- sep 2009 -- s. moorthi removed rcl, changed pressure units and +!! further optimized +!!- jan 2015 -- x. wu change "cimin = 0.15" for both +!! uncoupled and coupled case ! ! ! ! ! ==================== defination of variables ==================== ! @@ -110,6 +110,8 @@ subroutine sfc_sice_run & ! islimsk - integer, sea/land/ice mask (=0/1/2) im ! ! wind - real, im ! ! flag_iter- logical, im ! +! use_flake- logical, true for lakes when when lkm > 0 im ! +! thsfc_loc- logical, reference pressure for potential temp im ! ! ! ! input/outputs: ! ! hice - real, sea-ice thickness im ! @@ -133,7 +135,7 @@ subroutine sfc_sice_run & ! ! ! ===================================================================== ! ! - use machine, only : kind_phys + use machine, only : kind_phys use funcphys, only : fpvs ! implicit none @@ -152,30 +154,28 @@ subroutine sfc_sice_run & ! --- inputs: integer, intent(in) :: im, kice, ipr logical, intent(in) :: lprnt - logical, intent(in) :: frac_grid + logical, intent(in) :: thsfc_loc real (kind=kind_phys), intent(in) :: sbc, hvap, tgice, cp, eps, & & epsm1, grav, rvrdm1, t0c, rd - real (kind=kind_phys), dimension(im), intent(in) :: ps, & + real (kind=kind_phys), dimension(:), intent(in) :: ps, & & t1, q1, sfcemis, dlwflx, sfcnsw, sfcdsw, srflag, cm, ch, & - & prsl1, prslki, prsik1, prslk1, wind, oceanfrac + & prsl1, prslki, prsik1, prslk1, wind -! integer, dimension(im), intent(in) :: islimsk - integer, dimension(im), intent(in) :: islmsk_cice - real (kind=kind_phys), intent(in) :: delt, min_seaice, & - & min_lakeice + integer, dimension(:), intent(in) :: islmsk + real (kind=kind_phys), intent(in) :: delt - logical, dimension(im), intent(in) :: flag_iter, icy + logical, dimension(im), intent(in) :: flag_iter, use_flake ! --- input/outputs: - real (kind=kind_phys), dimension(im), intent(inout) :: hice, & + real (kind=kind_phys), dimension(:), intent(inout) :: hice, & & fice, tice, weasd, tskin, tprcp, ep - real (kind=kind_phys), dimension(im,kice), intent(inout) :: tiice + real (kind=kind_phys), dimension(:,:), intent(inout) :: tiice ! --- outputs: - real (kind=kind_phys), dimension(im), intent(inout) :: snwdph, & + real (kind=kind_phys), dimension(:), intent(inout) :: snwdph, & & qsurf, snowmt, gflux, cmm, chh, evap, hflx character(len=*), intent(out) :: errmsg @@ -190,10 +190,11 @@ subroutine sfc_sice_run & real (kind=kind_phys) :: t12, t14, tem, stsice(im,kice) &, hflxi, hflxw, q0, qs1, qssi, qssw - real (kind=kind_phys) :: cpinv, hvapi, elocp, snetw, cimin + real (kind=kind_phys) :: cpinv, hvapi, elocp, snetw +! real (kind=kind_phys) :: cpinv, hvapi, elocp, snetw, cimin + logical do_sice integer :: i, k - integer, dimension(im) :: islmsk_local logical :: flag(im) ! @@ -206,35 +207,20 @@ subroutine sfc_sice_run & ! Initialize CCPP error handling variables errmsg = '' errflg = 0 - - - islmsk_local = islmsk_cice - if (frac_grid) then - do i=1,im - if (icy(i) .and. islmsk_local(i) < 2) then - if (oceanfrac(i) > zero) then - tem = min_seaice - else - tem = min_lakeice - endif - if (fice(i) > tem) then - islmsk_local(i) = 2 - tice(i) =min( tice(i), tgice) - endif - endif - enddo - endif - ! !> - Set flag for sea-ice. + do_sice = .false. do i = 1, im - flag(i) = (islmsk_local(i) == 2) .and. flag_iter(i) - if (flag_iter(i) .and. islmsk_local(i) < 2) then - hice(i) = zero - fice(i) = zero - endif + flag(i) = islmsk(i) == 2 .and. flag_iter(i) & + & .and. .not. use_flake(i) + do_sice = do_sice .or. flag(i) +! if (flag_iter(i) .and. islmsk(i) < 2) then +! hice(i) = zero +! fice(i) = zero +! endif enddo + if (.not. do_sice) return do i = 1, im if (flag(i)) then @@ -263,36 +249,30 @@ subroutine sfc_sice_run & do i = 1, im if (flag(i)) then - if (oceanfrac(i) > zero) then - cimin = min_seaice - else - cimin = min_lakeice - endif -! psurf(i) = 1000.0 * ps(i) -! ps1(i) = 1000.0 * prsl1(i) ! dlwflx has been given a negative sign for downward longwave ! sfcnsw is the net shortwave flux (direction: dn-up) q0 = max(q1(i), qmin) -! tsurf(i) = tskin(i) -#ifdef GSD_SURFACE_FLUXES_BUGFIX - theta1(i) = t1(i) / prslk1(i) ! potential temperature in middle of lowest atm. layer -#else - theta1(i) = t1(i) * prslki(i) -#endif - rho(i) = prsl1(i) / (rd*t1(i)*(one+rvrdm1*q0)) - qs1 = fpvs(t1(i)) - qs1 = max(eps*qs1 / (prsl1(i) + epsm1*qs1), qmin) - q0 = min(qs1, q0) - - if (fice(i) < cimin) then - print *,'warning: ice fraction is low:', fice(i) - fice(i) = cimin - tice(i) = tgice - tskin(i)= tgice - print *,'fix ice fraction: reset it to:', fice(i) + + if (thsfc_loc) then ! Use local potential temperature + theta1(i) = t1(i) * prslki(i) + else ! Use potential temperature referenced to 1000 hPa + theta1(i) = t1(i) / prslk1(i) ! potential temperature in middle of lowest atm. layer endif + + rho(i) = prsl1(i) / (rd*t1(i)*(one+rvrdm1*q0)) + qs1 = fpvs(t1(i)) + qs1 = max(eps*qs1 / (prsl1(i) + epsm1*qs1), qmin) + q0 = min(qs1, q0) + +! if (fice(i) < cimin) then +! print *,'warning: ice fraction is low:', fice(i) +! fice(i) = cimin +! tice(i) = tgice +! tskin(i)= tgice +! print *,'fix ice fraction: reset it to:', fice(i) +! endif ffw(i) = one - fice(i) qssi = fpvs(tice(i)) @@ -333,13 +313,14 @@ subroutine sfc_sice_run & !> - Calculate net non-solar and upir heat flux @ ice surface \a hfi. -#ifdef GSD_SURFACE_FLUXES_BUGFIX - hfi(i) = -dlwflx(i) + sfcemis(i)*sbc*t14 + evapi(i) & - & + rch(i)*(tice(i)/prsik1(i) - theta1(i)) -#else - hfi(i) = -dlwflx(i) + sfcemis(i)*sbc*t14 + evapi(i) & - & + rch(i)*(tice(i) - theta1(i)) -#endif + if(thsfc_loc) then ! Use local potential temperature + hfi(i) = -dlwflx(i) + sfcemis(i)*sbc*t14 + evapi(i) & + & + rch(i)*(tice(i) - theta1(i)) + else ! Use potential temperature referenced to 1000 hPa + hfi(i) = -dlwflx(i) + sfcemis(i)*sbc*t14 + evapi(i) & + & + rch(i)*(tice(i)/prsik1(i) - theta1(i)) + endif + !> - Calculate heat flux derivative at surface \a hfd. hfd(i) = 4.0_kind_phys*sfcemis(i)*sbc*tice(i)*t12 & & + (one + elocp*eps*hvap*qs1/(rd*t12)) * rch(i) @@ -362,9 +343,9 @@ subroutine sfc_sice_run & snowd(i) = min( snowd(i), hsmax ) if (snowd(i) > (2.0_kind_phys*hice(i))) then - print *, 'warning: too much snow :',snowd(i) +! print *, 'warning: too much snow :',snowd(i) snowd(i) = hice(i) + hice(i) - print *,'fix: decrease snow depth to:',snowd(i) +! print *,'fix: decrease snow depth to:',snowd(i) endif endif enddo @@ -372,7 +353,7 @@ subroutine sfc_sice_run & !> - Call the three-layer thermodynamics sea ice model ice3lay(). call ice3lay ! --- inputs: ! - & ( im, kice, fice, flag, hfi, hfd, sneti, focn, delt, ! + & ( im, kice, fice, flag, hfi, hfd, sneti, focn, delt, ! & lprnt, ipr, ! --- outputs: ! & snowd, hice, stsice, tice, snof, snowmt, gflux ) ! @@ -381,14 +362,12 @@ subroutine sfc_sice_run & if (flag(i)) then if (tice(i) < timin) then print *,'warning: snow/ice temperature is too low:',tice(i) - &,' i=',i tice(i) = timin print *,'fix snow/ice temperature: reset it to:',tice(i) endif if (stsice(i,1) < timin) then print *,'warning: layer 1 ice temp is too low:',stsice(i,1) - &,' i=',i stsice(i,1) = timin print *,'fix layer 1 ice temp: reset it to:',stsice(i,1) endif @@ -399,7 +378,6 @@ subroutine sfc_sice_run & print *,'fix layer 2 ice temp: reset it to:',stsice(i,2) endif - tskin(i) = tice(i)*fice(i) + tgice*ffw(i) endif enddo @@ -415,15 +393,17 @@ subroutine sfc_sice_run & if (flag(i)) then ! --- ... calculate sensible heat flux (& evap over sea ice) -#ifdef GSD_SURFACE_FLUXES_BUGFIX - hflxi = rch(i) * (tice(i)/prsik1(i) - theta1(i)) - hflxw = rch(i) * (tgice / prsik1(i) - theta1(i)) -#else - hflxi = rch(i) * (tice(i) - theta1(i)) - hflxw = rch(i) * (tgice - theta1(i)) -#endif + if(thsfc_loc) then ! Use local potential temperature + hflxi = rch(i) * (tice(i) - theta1(i)) + hflxw = rch(i) * (tgice - theta1(i)) + else ! Use potential temperature referenced to 1000 hPa + hflxi = rch(i) * (tice(i)/prsik1(i) - theta1(i)) + hflxw = rch(i) * (tgice / prsik1(i) - theta1(i)) + endif + hflx(i) = fice(i)*hflxi + ffw(i)*hflxw evap(i) = fice(i)*evapi(i) + ffw(i)*evapw(i) + tskin(i) = fice(i)*tice(i) + ffw(i)*tgice ! ! --- ... the rest of the output @@ -689,8 +669,8 @@ subroutine ice3lay snowd (i) = snowd(i) - snowmt(i) else snowmt(i) = snowd(i) - h1 = h1 - (tmelt - snowd(i)*dsli) & - & / (di * (ci - li/stsice(i,1)) * (tfi - stsice(i,1))) + h1 = max(zero, h1 - (tmelt - snowd(i)*dsli) & + & / (di * (ci - li/stsice(i,1)) * (tfi - stsice(i,1)))) snowd(i) = zero endif @@ -705,6 +685,7 @@ subroutine ice3lay else h2 = h2 - bmelt / (dili + dici*(tfi - stsice(i,2))) endif + h2 = max(h2, zero) !> - If ice remains, even up 2 layers, else, pass negative energy back in snow. !! Calculate the new upper layer temperature (see \a eq.(38)). diff --git a/physics/sfc_sice.meta b/physics/sfc_sice.meta index 4ce931bac..44109be66 100644 --- a/physics/sfc_sice.meta +++ b/physics/sfc_sice.meta @@ -16,7 +16,7 @@ intent = in optional = F [kice] - standard_name = ice_vertical_dimension + standard_name = vertical_dimension_of_sea_ice long_name = vertical loop extent for ice levels, start at 1 units = count dimensions = () @@ -105,7 +105,7 @@ intent = in optional = F [rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -123,7 +123,7 @@ intent = in optional = F [t1] - standard_name = air_temperature_at_lowest_model_layer + standard_name = air_temperature_at_surface_adjacent_layer long_name = surface layer mean temperature units = K dimensions = (horizontal_loop_extent) @@ -132,7 +132,7 @@ intent = in optional = F [q1] - standard_name = water_vapor_specific_humidity_at_lowest_model_layer + standard_name = specific_humidity_at_surface_adjacent_layer long_name = surface layer mean specific humidity units = kg kg-1 dimensions = (horizontal_loop_extent) @@ -141,7 +141,7 @@ intent = in optional = F [delt] - standard_name = time_step_for_dynamics + standard_name = timestep_for_dynamics long_name = time step units = s dimensions = () @@ -186,7 +186,7 @@ intent = in optional = F [srflag] - standard_name = flag_for_precipitation_type + standard_name = precipitation_type long_name = snow/rain flag for precipitation units = flag dimensions = (horizontal_loop_extent) @@ -213,7 +213,7 @@ intent = in optional = F [prsl1] - standard_name = air_pressure_at_lowest_model_layer + standard_name = air_pressure_at_surface_adjacent_layer long_name = surface layer mean pressure units = Pa dimensions = (horizontal_loop_extent) @@ -231,7 +231,7 @@ intent = in optional = F [prsik1] - standard_name = dimensionless_exner_function_at_lowest_model_interface + standard_name = surface_dimensionless_exner_function long_name = dimensionless Exner function at the ground surface units = none dimensions = (horizontal_loop_extent) @@ -240,7 +240,7 @@ intent = in optional = F [prslk1] - standard_name = dimensionless_exner_function_at_lowest_model_layer + standard_name = dimensionless_exner_function_at_surface_adjacent_layer long_name = dimensionless Exner function at the lowest model layer units = none dimensions = (horizontal_loop_extent) @@ -265,6 +265,14 @@ type = logical intent = in optional = F +[use_flake] + standard_name = flag_for_using_flake + long_name = flag indicating lake points using flake model + units = flag + dimensions = (horizontal_loop_extent) + type = logical + intent = in + optional = F [lprnt] standard_name = flag_print long_name = switch for printing sample column to stdout @@ -281,6 +289,14 @@ type = integer intent = in optional = F +[thsfc_loc] + standard_name = flag_for_reference_pressure_theta + long_name = flag for reference pressure in theta calculation + units = flag + dimensions = () + type = logical + intent = in + optional = F [hice] standard_name = sea_ice_thickness long_name = sea-ice thickness @@ -291,7 +307,7 @@ intent = inout optional = F [fice] - standard_name = sea_ice_concentration + standard_name = sea_ice_area_fraction_of_sea_area_fraction long_name = sea-ice concentration [0,1] units = frac dimensions = (horizontal_loop_extent) @@ -336,10 +352,10 @@ intent = inout optional = F [tiice] - standard_name = internal_ice_temperature + standard_name = temperature_in_ice_layer long_name = sea ice internal temperature units = K - dimensions = (horizontal_loop_extent,ice_vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension_of_sea_ice) type = real kind = kind_phys intent = inout @@ -425,23 +441,7 @@ kind = kind_phys intent = inout optional = F -[frac_grid] - standard_name = flag_for_fractional_grid - long_name = flag for fractional grid - units = flag - dimensions = () - type = logical - intent = in - optional = F -[icy] - standard_name = flag_nonzero_sea_ice_surface_fraction - long_name = flag indicating presence of some sea ice surface area fraction - units = flag - dimensions = (horizontal_loop_extent) - type = logical - intent = in - optional = F -[islmsk_cice] +[islmsk] standard_name = sea_land_ice_mask_cice long_name = sea/land/ice mask cice (=0/1/2) units = flag @@ -449,33 +449,6 @@ type = integer intent = in optional = F -[min_lakeice] - standard_name = lake_ice_minimum - long_name = minimum lake ice value - units = frac - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[min_seaice] - standard_name = sea_ice_minimum - long_name = minimum sea ice value - units = frac - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[oceanfrac] - standard_name = sea_area_fraction - long_name = fraction of horizontal grid area occupied by ocean - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/sfcsub.F b/physics/sfcsub.F index 1a1a8eefa..002103e10 100644 --- a/physics/sfcsub.F +++ b/physics/sfcsub.F @@ -3,11 +3,12 @@ !>\defgroup mod_sfcsub GFS sfcsub Module -!!\ingroup LSMs +!!\ingroup mod_GFS_phys_time_vary !> @{ !! This module contains grib code for each parameter-used in subroutines sfccycle() !! and setrmsk(). module sfccyc_module + use machine , only : kind_io8,kind_io4 implicit none save ! @@ -19,12 +20,12 @@ module sfccyc_module &, kpdvmn,kpdvmx,kpdslp,kpdabs &, kpdsnd, kpdabs_0, kpdabs_1, kpdalb(4) parameter(kpdtsf=11, kpdwet=86, kpdsno=65, kpdzor=83, -! 1 kpdalb=84, kpdais=91, kpdtg3=11, kpdplr=224, - 1 kpdais=91, kpdtg3=11, kpdplr=224, - 2 kpdgla=238, kpdmxi=91, kpdscv=238, kpdsmc=144, - 3 kpdoro=8, kpdmsk=81, kpdstc=11, kpdacn=91, kpdveg=87, +! & kpdalb=84, kpdais=91, kpdtg3=11, kpdplr=224, + & kpdais=91, kpdtg3=11, kpdplr=224, + & kpdgla=238, kpdmxi=91, kpdscv=238, kpdsmc=144, + & kpdoro=8, kpdmsk=81, kpdstc=11, kpdacn=91, kpdveg=87, !cbosu max snow albedo uses a grib id number of 159, not 255. - & kpdvmn=255, kpdvmx=255,kpdslp=236, kpdabs_0=255, + & kpdvmn=255, kpdvmx=255,kpdslp=236, kpdabs_0=255, & kpdvet=225, kpdsot=224,kpdabs_1=159, & kpdsnd=66 ) ! @@ -32,6 +33,7 @@ module sfccyc_module integer, parameter :: kpdalb_1(4)=(/189,190,191,192/) integer, parameter :: kpdalf(2)=(/214,217/) ! + real (kind=kind_io8), parameter :: ten=10.0, one=1.0, zero=0.0 integer, parameter :: xdata=5000, ydata=2500, mdata=xdata*ydata integer :: veg_type_landice integer :: soil_type_landice @@ -52,11 +54,11 @@ end function message end module sfccyc_module !>\ingroup mod_GFS_phys_time_vary -!! This subroutine reads or interpolates surface climatology data in analysis +!! This subroutine reads or interpolates surface climatology data in analysis !! and forecast mode. !!\param lugb the unit number used in this subprogram !!\param len number of points on which sfccyc operates -!!\param lsoil number of soil layers +!!\param lsoil number of soil layers !!\param sig1t sigma level 1 temperature for dead start. it should be on gaussian !! grid. If not dead start, no need for dimension but set to zero as !! in the example below. @@ -71,18 +73,18 @@ end module sfccyc_module !!\param nst_anl !! - subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & - &, iy,im,id,ih,fh & - &, rla, rlo, slmask,orog,orog_uf,use_ufo,nst_anl & - &, sihfcs,sicfcs,sitfcs & - &, swdfcs,slcfcs & - &, vmnfcs,vmxfcs,slpfcs,absfcs & - &, tsffcs,snofcs,zorfcs,albfcs,tg3fcs & - &, cnpfcs,smcfcs,stcfcs,slifcs,aisfcs & - &, vegfcs,vetfcs,sotfcs,alffcs & - &, cvfcs,cvbfcs,cvtfcs,me,nthrds,nlunit & - &, sz_nml,input_nml_file & - &, lake, min_lakeice, min_seaice & + subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & + &, iy,im,id,ih,fh,rla,rlo & + &, slmskl,slmskw,orog,orog_uf,use_ufo,nst_anl & + &, sihfcs,sicfcs,sitfcs & + &, swdfcs,slcfcs & + &, vmnfcs,vmxfcs,slpfcs,absfcs & + &, tsffcs,snofcs,zorfcs,albfcs,tg3fcs & + &, cnpfcs,smcfcs,stcfcs,slifcs,aisfcs & + &, vegfcs,vetfcs,sotfcs,alffcs & + &, cvfcs,cvbfcs,cvtfcs,me,nthrds,nlunit & + &, sz_nml,input_nml_file & + &, min_ice & &, ialb,isot,ivegsrc,tile_num_ch,i_index,j_index) ! use machine , only : kind_io8,kind_io4 @@ -92,8 +94,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & integer, intent(in) :: i_index(len), j_index(len), & & me, nthrds logical, intent(in) :: use_ufo, nst_anl - logical, intent(in) :: lake(len) - real (kind=kind_io8), intent(in) :: min_lakeice, min_seaice + real (kind=kind_io8), intent(in) :: min_ice(len) real (kind=kind_io8) sllnd,slsea,aicice,aicsea,tgice,rlapse, & & orolmx,orolmn,oroomx,oroomn,orosmx, & @@ -316,7 +317,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & parameter(plrlmx=1000.,plrlmn=0.0,plromx=1000.0,plromn=0.0, & plrsmx=1000.,plrsmn=0.0,plrimx=1000.,plrimn=0.0, & plrjmx=1000.,plrjmn=0.0) -!clu [-1l/+1l] relax tsfsmx +!clu [-1l/+1l] relax tsfsmx parameter(tsflmx=353.,tsflmn=173.0,tsfomx=313.0,tsfomn=271.2, & tsfsmx=305.0,tsfsmn=173.0,tsfimx=271.2,tsfimn=173.0, & tsfjmx=273.16,tsfjmn=173.0) @@ -342,19 +343,19 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & & vegjmx=0.0,vegjmn=0.0) parameter(vmnlmx=1.0,vmnlmn=0.0,vmnomx=0.0,vmnomn=0.0, & vmnsmx=1.0,vmnsmn=0.0,vmnimx=0.0,vmnimn=0.0, - & vmnjmx=0.0,vmnjmn=0.0) + & vmnjmx=0.0,vmnjmn=0.0) parameter(vmxlmx=1.0,vmxlmn=0.0,vmxomx=0.0,vmxomn=0.0, & vmxsmx=1.0,vmxsmn=0.0,vmximx=0.0,vmximn=0.0, - & vmxjmx=0.0,vmxjmn=0.0) + & vmxjmx=0.0,vmxjmn=0.0) parameter(slplmx=9.0,slplmn=1.0,slpomx=0.0,slpomn=0.0, & slpsmx=9.0,slpsmn=1.0,slpimx=0.,slpimn=0., - & slpjmx=0.,slpjmn=0.) + & slpjmx=0.,slpjmn=0.) ! note: the range values for bare land and snow covered land ! (alblmx, alblmn, albsmx, albsmn) are set below ! based on whether the old or new radiation is selected parameter(absomx=0.0,absomn=0.0, & absimx=0.0,absimn=0.0, - & absjmx=0.0,absjmn=0.0) + & absjmx=0.0,absjmn=0.0) ! vegetation type parameter(vetlmx=20.,vetlmn=1.0,vetomx=0.0,vetomn=0.0, & vetsmx=20.,vetsmn=1.0,vetimx=0.,vetimn=0., @@ -399,7 +400,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! ! parameter(snwmin=25.,snwmax=100.) parameter(snwmin=5.0,snwmax=100.) - real (kind=kind_io8), parameter :: ten=10.0, one=1.0 +! real (kind=kind_io8), parameter :: ten=10.0, one=1.0, zero=0.0 ! ! coefficients of blending forecast and interpolated clim ! (or analyzed) fields over sea or land(l) (not for clouds) @@ -451,9 +452,9 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! ! mask orography and variance on gaussian grid ! - real (kind=kind_io8) slmask(len),orog(len), orog_uf(len) & - &, orogd(len) - real (kind=kind_io8) rla(len), rlo(len) + real (kind=kind_io8) slmskl(len), slmskw(len) + real (kind=kind_io8) orog(len), orog_uf(len), orogd(len) + real (kind=kind_io8) rla(len), rlo(len) ! ! permanent/extremes ! @@ -467,7 +468,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & character*500 fntsfc,fnwetc,fnsnoc,fnzorc,fnalbc,fnaisc & &, fnplrc,fntg3c,fnscvc,fnsmcc,fnstcc,fnacnc & &, fnvegc,fnvetc,fnsotc & - &, fnvmnc,fnvmxc,fnslpc,fnabsc, fnalbc2 + &, fnvmnc,fnvmxc,fnslpc,fnabsc, fnalbc2 real (kind=kind_io8) tsfclm(len), wetclm(len), snoclm(len) & &, zorclm(len), albclm(len,4), aisclm(len) & &, tg3clm(len), acnclm(len), cnpclm(len) & @@ -483,7 +484,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & character*500 fntsfa,fnweta,fnsnoa,fnzora,fnalba,fnaisa & &, fnplra,fntg3a,fnscva,fnsmca,fnstca,fnacna & &, fnvega,fnveta,fnsota & - &, fnvmna,fnvmxa,fnslpa,fnabsa + &, fnvmna,fnvmxa,fnslpa,fnabsa ! real (kind=kind_io8) tsfanl(len), wetanl(len), snoanl(len) & &, zoranl(len), albanl(len,4), aisanl(len) & @@ -514,7 +515,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! in this program). ! real (kind=kind_io8) f10m (len) - real (kind=kind_io8) fsmcl(25),fsmcs(25),fstcl(25),fstcs(25) + real (kind=kind_io8) fsmcl(25), fsmcs(25), fstcl(25), fstcs(25) real (kind=kind_io8) fcsmcl(25),fcsmcs(25),fcstcl(25),fcstcs(25) !clu [+1l] add swratio (soil moisture liquid-to-total ratio) @@ -532,6 +533,13 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & integer kpd7, kpd9 ! logical icefl1(len), icefl2(len) +! + real (kind=kind_io8), allocatable, dimension(:) :: & + & tsffcsd, snofcsd, tg3fcsd, zorfcsd, slifcsd, aisfcsd, & + & cnpfcsd, vegfcsd, vetfcsd, sotfcsd, sihfcsd, sicfcsd, & + & vmnfcsd, vmxfcsd, slpfcsd, absfcsd + real (kind=kind_io8), allocatable, dimension(:,:) :: & + & smcfcsd, stcfcsd, albfcsd ! ! input and output surface fields (bges) file names ! @@ -777,19 +785,19 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & num_threads = nthrds ! lprnt = .false. - iprnt = 1 ! do i=1,len ! if (ifp .eq. 0 .and. rla(i) .gt. 80.0) print *,' rla=',rla(i) ! *,' rlo=',rlo(i) -! tem1 = abs(rla(i) - 48.75) -! tem2 = abs(rlo(i) - (-68.50)) -! if(tem1 .lt. 0.25 .and. tem2 .lt. 0.50) then +! tem1 = abs(rla(i) - 60.11) +! tem2 = abs(rlo(i) - 5.38) +! if(tem1 < 0.10 .and. tem2 < 0.10) then ! lprnt = .true. ! iprnt = i ! print *,' lprnt=',lprnt,' iprnt=',iprnt ! print *,' rla(i)=',rla(i),' rlo(i)=',rlo(i) ! endif ! enddo + if (ialb == 1) then kpdabs = kpdabs_1 kpdalb = kpdalb_1 @@ -801,6 +809,17 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & abssmx = 1.0 abssmn = .01 abslmn = .01 + elseif (ialb ==2) then + kpdabs = kpdabs_1 + kpdalb = kpdalb_1 + alblmx = .99 + albsmx = .99 + alblmn = .01 + albsmn = .01 + abslmx = 1.0 + abssmx = 1.0 + abssmn = .01 + abslmn = .01 else kpdabs = kpdabs_0 kpdalb = kpdalb_0 @@ -844,14 +863,14 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & endif if (ivegsrc == 2) then ! sib - veg_type_landice=13 + veg_type_landice = 13 else - veg_type_landice=15 + veg_type_landice = 15 endif if (isot == 0) then - soil_type_landice=9 + soil_type_landice = 9 else - soil_type_landice=16 + soil_type_landice = 16 endif ! deltf = deltsfc / 24.0 @@ -876,6 +895,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & enddo ! calbl = 0. !... albedo over land + if (ialb == 2) falbl=99999. if (falbl >= 99999.) calbl = 1. if (falbl > 0. .and. falbl < 99999) calbl = exp(-deltf/falbl) ! @@ -1040,8 +1060,8 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! kpd9 = -1 kpd7 = -1 - call fixrdc(lugb,fnglac,kpdgla,kpd7,kpd9,slmask, - & glacir,len,iret + call fixrdc(lugb,fnglac,kpdgla,kpd7,kpd9,slmskl + &, glacir,len,iret &, imsk, jmsk, slmskh, gausm, blnmsk, bltmsk &, rla, rlo, me) ! znnt=1. @@ -1050,8 +1070,8 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! read maximum ice extent ! kpd7 = -1 - call fixrdc(lugb,fnmxic,kpdmxi,kpd7,kpd9,slmask, - & amxice,len,iret + call fixrdc(lugb,fnmxic,kpdmxi,kpd7,kpd9,slmskl + &, amxice,len,iret &, imsk, jmsk, slmskh, gausm, blnmsk, bltmsk &, rla, rlo, me) ! znnt=1. @@ -1073,6 +1093,8 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & icefl1(i) = .true. enddo ! if(lprnt) print *,' tsffcsin=',tsffcs(iprnt) +! if(lprnt) print *,' slifcsin=',slifcs(iprnt) +! if(lprnt) print *,'slmskl=',slmskl(iprnt),' slmskw=',slmskw(iprnt) ! ! read climatology fields ! @@ -1084,7 +1106,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! percrit=critp1 ! - call clima(lugb,iy,im,id,ih,fh,len,lsoil,slmask, + call clima(lugb,iy,im,id,ih,fh,len,lsoil,slmskl,slmskw, & fntsfc,fnwetc,fnsnoc,fnzorc,fnalbc,fnaisc, & fntg3c,fnscvc,fnsmcc,fnstcc,fnacnc,fnvegc, & fnvetc,fnsotc, @@ -1101,6 +1123,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & & deltsfc, lanom &, imsk, jmsk, slmskh, rla, rlo, gausm, blnmsk, bltmsk,me &, lprnt,iprnt,fnalbc2,ialb,tile_num_ch,i_index,j_index) + ! if(lprnt) print *,'tsfclm=',tsfclm(iprnt),' tsfcl2=',tsfcl2(iprnt) ! ! scale surface roughness and albedo to model required units @@ -1123,11 +1146,11 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! ! set albedo over ocean to albomx ! - call albocn(albclm,slmask,albomx,len) + call albocn(albclm,slmskl,albomx,len) ! ! make sure vegetation type and soil type are non zero over land ! - call landtyp(vetclm,sotclm,slpclm,slmask,len) + call landtyp(vetclm,sotclm,slpclm,slmskl,len) ! !cwu [-1l/+1l] !* ice concentration or ice mask (only ice mask used in the model now) @@ -1138,7 +1161,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & do i=1,len sihclm(i) = 3.0*aisclm(i) sicclm(i) = aisclm(i) - if(nint(slmask(i)) == 0 .and. nint(glacir(i)) == 1 & + if(nint(slmskl(i)) == 0 .and. nint(glacir(i)) == 1 & & .and. sicclm(i) /= 1.0) then sicclm(i) = sicimx sihfcs(i) = glacir_hice @@ -1147,21 +1170,21 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & crit=aislim !* crit=0.5 ! call rof01(aisclm,len,'ge',crit) - call rof01_len(aisclm, len, 'ge', lake, min_lakeice, min_seaice) + call rof01_len(aisclm, len, 'ge', min_ice) elseif(fnacnc(1:8) /= ' ') then !cwu [+4l] update sihclm, sicclm do i=1,len sihclm(i) = 3.0*acnclm(i) sicclm(i) = acnclm(i) - if(nint(slmask(i)) == 0 .and. nint(glacir(i)) == 1 & + if(nint(slmskw(i)) == 0 .and. nint(glacir(i)) == 1 & & .and. sicclm(i).ne.1.) then sicclm(i) = sicimx sihfcs(i) = glacir_hice endif enddo ! call rof01(acnclm,len,'ge',aislim) - call rof01_len(acnclm, len, 'ge', lake, min_lakeice, min_seaice) + call rof01_len(acnclm, len, 'ge', min_ice) do i=1,len aisclm(i) = acnclm(i) enddo @@ -1169,15 +1192,15 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! ! quality control of sea ice mask ! - call qcsice(aisclm,glacir,amxice,aicice,aicsea,sllnd,slmask, + call qcsice(aisclm,glacir,amxice,aicice,aicsea,sllnd,slmskw, & rla,rlo,len,me) ! ! set ocean/land/sea-ice mask ! - call setlsi(slmask,aisclm,len,aicice,sliclm) + call setlsi(slmskw,aisclm,len,aicice,sliclm) ! if(lprnt) print *,' aisclm=',aisclm(iprnt),' sliclm=' -! *,sliclm(iprnt),' slmask=',slmask(iprnt) +! &,sliclm(iprnt),' slmskw=',slmskw(iprnt) ! ! write(6,*) 'sliclm' ! znnt=1. @@ -1185,7 +1208,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! ! quality control of snow ! - call qcsnow(snoclm,slmask,aisclm,glacir,len,snosmx,landice,me) + call qcsnow(snoclm,slmskl,aisclm,glacir,len,snosmx,landice,me) ! call setzro(snoclm,epssno,len) ! @@ -1376,13 +1399,13 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & & cnpanl,smcanl,stcanl,slianl,scvanl,veganl, & vetanl,sotanl,alfanl, & sihanl,sicanl, - & vmnanl,vmxanl,slpanl,absanl, + & vmnanl,vmxanl,slpanl,absanl, & tsfclm,tsfcl2,wetclm,snoclm,zorclm,albclm,aisclm, & tg3clm,cvclm ,cvbclm,cvtclm, & cnpclm,smcclm,stcclm,sliclm,scvclm,vegclm, & vetclm,sotclm,alfclm, & sihclm,sicclm, - & vmnclm,vmxclm,slpclm,absclm, + & vmnclm,vmxclm,slpclm,absclm, & len,lsoil) ! ! reverse scaling to match with grib analysis input @@ -1406,7 +1429,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! ! read analysis fields ! - call analy(lugb,iy,im,id,ih,fh,len,lsoil,slmask, + call analy(lugb,iy,im,id,ih,fh,len,lsoil,slmskl,slmskw, & fntsfa,fnweta,fnsnoa,fnzora,fnalba,fnaisa, & fntg3a,fnscva,fnsmca,fnstca,fnacna,fnvega, & fnveta,fnsota, @@ -1415,17 +1438,18 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & & tg3anl,cvanl ,cvbanl,cvtanl, & smcanl,stcanl,slianl,scvanl,acnanl,veganl, & vetanl,sotanl,alfanl,tsfan0, - & vmnanl,vmxanl,slpanl,absanl, + & vmnanl,vmxanl,slpanl,absanl, & kpdtsf,kpdwet,kpdsno,kpdsnd,kpdzor,kpdalb,kpdais, & kpdtg3,kpdscv,kpdacn,kpdsmc,kpdstc,kpdveg, & kpdvet,kpdsot,kpdalf, - & kpdvmn,kpdvmx,kpdslp,kpdabs, + & kpdvmn,kpdvmx,kpdslp,kpdabs, & irttsf,irtwet,irtsno,irtzor,irtalb,irtais, & irttg3,irtscv,irtacn,irtsmc,irtstc,irtveg, & irtvet,irtsot,irtalf - &, irtvmn,irtvmx,irtslp,irtabs, + &, irtvmn,irtvmx,irtslp,irtabs, & imsk, jmsk, slmskh, rla, rlo, gausm, blnmsk, bltmsk &, me, lanom) + ! if(lprnt) print *,' tsfanl=',tsfanl(iprnt) ! ! scale zor and alb to match forecast model units @@ -1457,7 +1481,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! if (use_ufo .and. .not. nst_anl) then ztsfc = 0.0 - call tsfcor(tsfanl,orog_uf,slmask,ztsfc,len,rlapse) + call tsfcor(tsfanl,orog_uf,slmskw,ztsfc,len,rlapse) endif ! ! ice concentration or ice mask (only ice mask used in the model now) @@ -1467,7 +1491,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & do i=1,len sihanl(i) = 3.0*aisanl(i) sicanl(i) = aisanl(i) - if(nint(slmask(i)) == 0 .and. nint(glacir(i)) == 1 & + if(nint(slmskw(i)) == 0 .and. nint(glacir(i)) == 1 & & .and. sicanl(i) /= 1.) then sicanl(i) = sicimx sihfcs(i) = glacir_hice @@ -1476,13 +1500,13 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! crit=aislim !* crit=0.5 ! call rof01(aisanl,len,'ge',crit) - call rof01_len(aisanl, len, 'ge', lake, min_lakeice, min_seaice) + call rof01_len(aisanl, len, 'ge', min_ice) elseif(fnacna(1:8) /= ' ') then !cwu [+17l] update sihanl, sicanl do i=1,len sihanl(i) = 3.0*acnanl(i) sicanl(i) = acnanl(i) - if(nint(slmask(i)) == 0 .and. nint(glacir(i)) == 1 & + if(nint(slmskw(i)) == 0 .and. nint(glacir(i)) == 1 & & .and. sicanl(i) /= 1.) then sicanl(i) = sicimx sihfcs(i) = glacir_hice @@ -1490,20 +1514,20 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & enddo ! crit=aislim do i=1,len - if (lake(i)) then - crit = min_lakeice - else - crit = min_seaice - endif + crit = min_ice(i) if (nint(slianl(i)) == 0 .and. sicanl(i) >= crit) then - slianl(i) = 2. + slianl(i) = 2.0_kind_io8 ! print *,'cycle - new ice form: fice=',sicanl(i) elseif (nint(slianl(i)) >= 2 .and. sicanl(i) < crit) then slianl(i) = 0. ! print *,'cycle - ice free: fice=',sicanl(i) - elseif (nint(slianl(i)) == 1 .and. sicanl(i) > crit) then -! print *,'cycle - land covered by sea-ice: fice=',sicanl(i) - sicanl(i) = 0. + elseif (nint(slianl(i)) == 1 .and. sicanl(i) >= crit) then + if (nint(slmskw(i)) == 0) then ! can happen only for fractional grid + slianl(i) = 2.0_kind_io8 + else +! print *,'cycle - land covered by sea-ice: fice=',sicanl(i) + sicanl(i) = 0.0_kind_io8 + endif endif enddo ! znnt=10. @@ -1515,22 +1539,23 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! enddo ! if(lprnt) print *,' acnanl=',acnanl(iprnt) ! call rof01(acnanl,len,'ge',aislim) - call rof01_len(acnanl, len, 'ge', lake, min_lakeice, min_seaice) + call rof01_len(acnanl, len, 'ge', min_ice) do i=1,len aisanl(i) = acnanl(i) enddo endif -! if(lprnt) print *,' aisanl1=',aisanl(iprnt),' glacir=' -! &,glacir(iprnt),' slmask=',slmask(iprnt) +! if(lprnt) print *,' aisanl1=',aisanl(iprnt),' glacir=' & +! &,glacir(iprnt),' slmskwl=',slmskw(iprnt),slmskl(iprnt) ! - call qcsice(aisanl,glacir,amxice,aicice,aicsea,sllnd,slmask, + call qcsice(aisanl,glacir,amxice,aicice,aicsea,sllnd,slmskw, & rla,rlo,len,me) ! ! set ocean/land/sea-ice mask ! - call setlsi(slmask,aisanl,len,aicice,slianl) -! if(lprnt) print *,' aisanl=',aisanl(iprnt),' slianl=' -! *,slianl(iprnt),' slmask=',slmask(iprnt) + call setlsi(slmskw,aisanl,len,aicice,slianl) + +! if(lprnt) print *,' aisanl=',aisanl(iprnt),' slianl=' & +! &,slianl(iprnt),' slmskwl=',slmskw(iprnt),slmskl(iprnt) ! ! do k=1,lsoil @@ -1557,14 +1582,14 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! ! set albedo over ocean to albomx ! - call albocn(albanl,slmask,albomx,len) + call albocn(albanl,slmskl,albomx,len) ! ! quality control of snow and sea-ice ! process snow depth or snow cover ! if (fnsnoa(1:8) /= ' ') then call setzro(snoanl,epssno,len) - call qcsnow(snoanl,slmask,aisanl,glacir,len,ten,landice,me) + call qcsnow(snoanl,slmskl,aisanl,glacir,len,ten,landice,me) if (.not.landice) then call snodpth2(glacir,snosmx,snoanl, len, me) endif @@ -1582,14 +1607,14 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & else crit = 0.5 call rof01(scvanl,len,'ge',crit) - call qcsnow(scvanl,slmask,aisanl,glacir,len,one,landice,me) + call qcsnow(scvanl,slmskl,aisanl,glacir,len,one,landice,me) call qcmxmn('sncva ',scvanl,slianl,scvanl,icefl1, & scvlmx,scvlmn,scvomx,scvomn,scvimx,scvimn, & scvjmx,scvjmn,scvsmx,scvsmn,epsscv, & rla,rlo,len,kqcm,percrit,lgchek,me) call snodpth(scvanl,slianl,tsfanl,snoclm, & glacir,snwmax,snwmin,landice,len,snoanl,me) - call qcsnow(scvanl,slmask,aisanl,glacir,len,snosmx,landice,me) + call qcsnow(scvanl,slmskl,aisanl,glacir,len,snosmx,landice,me) call snosfc(snoanl,tsfanl,tsfsmx,len,me) call qcmxmn('snowa ',snoanl,slianl,snoanl,icefl1, & snolmx,snolmn,snoomx,snoomn,snoimx,snoimn, @@ -1758,7 +1783,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & !cwu [+1l] add ()anl for sih, sic & sihanl,sicanl, !clu [+1l] add ()anl for vmn, vmx, slp, abs - & vmnanl,vmxanl,slpanl,absanl, + & vmnanl,vmxanl,slpanl,absanl, & len,lsoil) if (sig1t(1) /= 0.) then call usesgt(sig1t,slianl,tg3anl,len,lsoil,tsffcs,stcfcs, @@ -1795,13 +1820,13 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! if ( index(fntg3c, "tileX.nc") == 0) then ! global file ztsfc = 1.0 - call tsfcor(tg3fcs,orogd,slmask,ztsfc,len,-rlapse) + call tsfcor(tg3fcs,orogd,slmskl,ztsfc,len,-rlapse) endif ztsfc = 0. - call tsfcor(tsffcs,orogd,slmask,ztsfc,len,-rlapse) + call tsfcor(tsffcs,orogd,slmskw,ztsfc,len,-rlapse) else ztsfc = 0. - call tsfcor(tsffcs,orog,slmask,ztsfc,len,-rlapse) + call tsfcor(tsffcs,orog,slmskw,ztsfc,len,-rlapse) endif !clu [+12l] -------------------------------------------------------------- @@ -1821,7 +1846,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! if (lqcbgs .and. irtacn == 0) then call qcsli(slianl,slifcs,len,me) - call albocn(albfcs,slmask,albomx,len) + call albocn(albfcs,slmskl,albomx,len) do i=1,len icefl2(i) = sicfcs(i) .gt. 0.99999 enddo @@ -1964,6 +1989,15 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! if(lprnt) print *,'tsfclm=',tsfclm(iprnt),' tsfcl2=',tsfcl2(iprnt) ! *,' tsffcs=',tsffcs(iprnt),' slianl=',slianl(iprnt) + do i=1,len + if (sicanl(i) >= min_ice(i)) then + slianl(i) = 2.0_kind_io8 + else + slianl(i) = zero + sicanl(i) = zero + endif + enddo + if (fh-deltsfc > -0.001 ) then do i=1,len if(slianl(i) == 0.0) then @@ -1992,15 +2026,18 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! ! merge analysis and forecast. note tg3, ais are not merged ! +! if(lprnt) print *,' stcfcsbefmer=',stcfcs(iprnt,:) +! if(lprnt) print *,' stcanlbefmer=',stcanl(iprnt,:) + call merge(len,lsoil,iy,im,id,ih,fh,deltsfc, - & sihfcs,sicfcs, - & vmnfcs,vmxfcs,slpfcs,absfcs, + & slmskl,slmskw,sihfcs,sicfcs, + & vmnfcs,vmxfcs,slpfcs,absfcs, & tsffcs,wetfcs,snofcs,zorfcs,albfcs,aisfcs, & cvfcs ,cvbfcs,cvtfcs, & cnpfcs,smcfcs,stcfcs,slifcs,vegfcs, & vetfcs,sotfcs,alffcs, - & sihanl,sicanl, - & vmnanl,vmxanl,slpanl,absanl, + & sihanl,sicanl, + & vmnanl,vmxanl,slpanl,absanl, & tsfanl,tsfan2,wetanl,snoanl,zoranl,albanl,aisanl, & cvanl ,cvbanl,cvtanl, & cnpanl,smcanl,stcanl,slianl,veganl, @@ -2013,20 +2050,22 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & & cvmnl,cvmns,cvmxl,cvmxs,cslpl,cslps,cabsl,cabss, & irttsf,irtwet,irtsno,irtzor,irtalb,irtais, & irttg3,irtscv,irtacn,irtsmc,irtstc,irtveg, - & irtvmn,irtvmx,irtslp,irtabs, + & irtvmn,irtvmx,irtslp,irtabs, & irtvet,irtsot,irtalf,landice,me) call setzro(snoanl,epssno,len) ! if(lprnt) print *,' tanlm=',tsfanl(iprnt),' tfcsm=',tsffcs(iprnt) ! if(lprnt) print *,' sliam=',slianl(iprnt),' slifm=',slifcs(iprnt) +! if(lprnt) print *,' stcfcsmer=',stcfcs(iprnt,:) +! if(lprnt) print *,' stcanlmer=',stcanl(iprnt,:) ! ! new ice/melted ice ! call newice(slianl,slifcs,tsfanl,tsffcs,len,lsoil, !cwu [+1l] add sihnew, aislim, sihanl & sicanl - & sihnew,aislim,sihanl,sicanl, + & sihnew,aislim,sihanl,sicanl, & albanl,snoanl,zoranl,smcanl,stcanl, & albomx,snoomx,zoromx,smcomx,smcimx, !cwu [-1l/+1l] change albimx to albimn - note albimx & albimn have been modified @@ -2036,7 +2075,8 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! if(lprnt) print *,'tsfanl=',tsfanl(iprnt),' tsffcs=',tsffcs(iprnt) ! if(lprnt) print *,' slian=',slianl(iprnt),' slifn=',slifcs(iprnt) -! +! if(lprnt) print *,' stcan=',stcanl(iprnt,:) + ! set tsfc to tsnow over snow ! call snosfc(snoanl,tsfanl,tsfsmx,len,me) @@ -2146,13 +2186,13 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! if ( index(fntg3c, "tileX.nc") == 0) then ! global file ztsfc = 1. - call tsfcor(tg3anl,orogd,slmask,ztsfc,len,rlapse) + call tsfcor(tg3anl,orogd,slmskl,ztsfc,len,rlapse) endif ztsfc = 0. - call tsfcor(tsfanl,orogd,slmask,ztsfc,len,rlapse) + call tsfcor(tsfanl,orogd,slmskw,ztsfc,len,rlapse) else ztsfc = 0. - call tsfcor(tsfanl,orog,slmask,ztsfc,len,rlapse) + call tsfcor(tsfanl,orog,slmskw,ztsfc,len,rlapse) endif ! if(lprnt) print *,' tsfaf=',tsfanl(iprnt) ! @@ -2202,37 +2242,45 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & endif ! if (mondif) then + allocate (tsffcsd(len), snofcsd(len), tg3fcsd(len), & + & zorfcsd(len), slifcsd(len), aisfcsd(len), & + & cnpfcsd(len), vegfcsd(len), vetfcsd(len), & + & sotfcsd(len), sihfcsd(len), sicfcsd(len), & + & vmnfcsd(len), vmxfcsd(len), slpfcsd(len), & + & absfcsd(len)) + allocate (smcfcsd(len,lsoil), stcfcsd(len,lsoil), & + & albfcsd(len,4)) do i=1,len - tsffcs(i) = tsfanl(i) - tsffcs(i) - snofcs(i) = snoanl(i) - snofcs(i) - tg3fcs(i) = tg3anl(i) - tg3fcs(i) - zorfcs(i) = zoranl(i) - zorfcs(i) + tsffcsd(i) = tsfanl(i) - tsffcs(i) + snofcsd(i) = snoanl(i) - snofcs(i) + tg3fcsd(i) = tg3anl(i) - tg3fcs(i) + zorfcsd(i) = zoranl(i) - zorfcs(i) ! plrfcs(i) = plranl(i) - plrfcs(i) ! albfcs(i) = albanl(i) - albfcs(i) - slifcs(i) = slianl(i) - slifcs(i) - aisfcs(i) = aisanl(i) - aisfcs(i) - cnpfcs(i) = cnpanl(i) - cnpfcs(i) - vegfcs(i) = veganl(i) - vegfcs(i) - vetfcs(i) = vetanl(i) - vetfcs(i) - sotfcs(i) = sotanl(i) - sotfcs(i) + slifcsd(i) = slianl(i) - slifcs(i) + aisfcsd(i) = aisanl(i) - aisfcs(i) + cnpfcsd(i) = cnpanl(i) - cnpfcs(i) + vegfcsd(i) = veganl(i) - vegfcs(i) + vetfcsd(i) = vetanl(i) - vetfcs(i) + sotfcsd(i) = sotanl(i) - sotfcs(i) !clu [+2l] add sih, sic - sihfcs(i) = sihanl(i) - sihfcs(i) - sicfcs(i) = sicanl(i) - sicfcs(i) + sihfcsd(i) = sihanl(i) - sihfcs(i) + sicfcsd(i) = sicanl(i) - sicfcs(i) !clu [+4l] add vmn, vmx, slp, abs - vmnfcs(i) = vmnanl(i) - vmnfcs(i) - vmxfcs(i) = vmxanl(i) - vmxfcs(i) - slpfcs(i) = slpanl(i) - slpfcs(i) - absfcs(i) = absanl(i) - absfcs(i) + vmnfcsd(i) = vmnanl(i) - vmnfcs(i) + vmxfcsd(i) = vmxanl(i) - vmxfcs(i) + slpfcsd(i) = slpanl(i) - slpfcs(i) + absfcsd(i) = absanl(i) - absfcs(i) enddo do j = 1,lsoil do i = 1,len - smcfcs(i,j) = smcanl(i,j) - smcfcs(i,j) - stcfcs(i,j) = stcanl(i,j) - stcfcs(i,j) + smcfcsd(i,j) = smcanl(i,j) - smcfcs(i,j) + stcfcsd(i,j) = stcanl(i,j) - stcfcs(i,j) enddo enddo do j = 1,4 do i = 1,len - albfcs(i,j) = albanl(i,j) - albfcs(i,j) + albfcsd(i,j) = albanl(i,j) - albfcs(i,j) enddo enddo ! @@ -2243,40 +2291,45 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & print *,'monitor of difference' print *,' (includes angulation correction)' print *,' ' - call monitr('tsfdif',tsffcs,slianl,snoanl,len) - call monitr('albdif',albfcs,slianl,snoanl,len) - call monitr('albdif1',albfcs,slianl,snoanl,len) - call monitr('albdif2',albfcs(1,2),slianl,snoanl,len) - call monitr('albdif3',albfcs(1,3),slianl,snoanl,len) - call monitr('albdif4',albfcs(1,4),slianl,snoanl,len) - call monitr('aisdif',aisfcs,slianl,snoanl,len) - call monitr('snodif',snofcs,slianl,snoanl,len) + call monitr('tsfdif', tsffcsd,slianl,snoanl,len) + call monitr('albdif', albfcsd,slianl,snoanl,len) + call monitr('albdif1',albfcsd,slianl,snoanl,len) + call monitr('albdif2',albfcsd(1,2),slianl,snoanl,len) + call monitr('albdif3',albfcsd(1,3),slianl,snoanl,len) + call monitr('albdif4',albfcsd(1,4),slianl,snoanl,len) + call monitr('aisdif', aisfcsd,slianl,snoanl,len) + call monitr('snodif', snofcsd,slianl,snoanl,len) do k=1,lsoil - call monitr(message('smcanl',k),smcfcs(1,k),slianl,snoanl,len) - call monitr(message('stcanl',k),stcfcs(1,k),slianl,snoanl,len) + call monitr(message('smcanl',k),smcfcsd(1,k),slianl,snoanl,len) + call monitr(message('stcanl',k),stcfcsd(1,k),slianl,snoanl,len) enddo - call monitr('tg3dif',tg3fcs,slianl,snoanl,len) - call monitr('zordif',zorfcs,slianl,snoanl,len) + call monitr('tg3dif',tg3fcsd,slianl,snoanl,len) + call monitr('zordif',zorfcsd,slianl,snoanl,len) ! if (gaus) then call monitr('cvadif',cvfcs ,slianl,snoanl,len) call monitr('cvbdif',cvbfcs,slianl,snoanl,len) call monitr('cvtdif',cvtfcs,slianl,snoanl,len) ! endif - call monitr('slidif',slifcs,slianl,snoanl,len) + call monitr('slidif',slifcsd,slianl,snoanl,len) ! call monitr('plrdif',plrfcs,slianl,snoanl,len) - call monitr('cnpdif',cnpfcs,slianl,snoanl,len) - call monitr('vegdif',vegfcs,slianl,snoanl,len) - call monitr('vetdif',vetfcs,slianl,snoanl,len) - call monitr('sotdif',sotfcs,slianl,snoanl,len) + call monitr('cnpdif',cnpfcsd,slianl,snoanl,len) + call monitr('vegdif',vegfcsd,slianl,snoanl,len) + call monitr('vetdif',vetfcsd,slianl,snoanl,len) + call monitr('sotdif',sotfcsd,slianl,snoanl,len) !cwu [+2l] add sih, sic - call monitr('sihdif',sihfcs,slianl,snoanl,len) - call monitr('sicdif',sicfcs,slianl,snoanl,len) + call monitr('sihdif',sihfcsd,slianl,snoanl,len) + call monitr('sicdif',sicfcsd,slianl,snoanl,len) !clu [+4l] add vmn, vmx, slp, abs - call monitr('vmndif',vmnfcs,slianl,snoanl,len) - call monitr('vmxdif',vmxfcs,slianl,snoanl,len) - call monitr('slpdif',slpfcs,slianl,snoanl,len) - call monitr('absdif',absfcs,slianl,snoanl,len) + call monitr('vmndif',vmnfcsd,slianl,snoanl,len) + call monitr('vmxdif',vmxfcsd,slianl,snoanl,len) + call monitr('slpdif',slpfcsd,slianl,snoanl,len) + call monitr('absdif',absfcsd,slianl,snoanl,len) endif + deallocate (tsffcsd, snofcsd, tg3fcsd, zorfcsd, slifcsd, & + & aisfcsd, cnpfcsd, vegfcsd, vetfcsd, sotfcsd, & + & sihfcsd, sicfcsd, vmnfcsd, vmxfcsd, slpfcsd, & + & absfcsd) + deallocate (smcfcsd, stcfcsd, albfcsd) endif ! ! @@ -2312,6 +2365,8 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & endif enddo enddo +! if(lprnt) print *,' stcfcs=',stcfcs(iprnt,:),'slifcs=', & +! & slifcs(iprnt) do j = 1,4 do i = 1,len albfcs(i,j) = albanl(i,j) @@ -2326,27 +2381,29 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & !cwu [+20l] update sihfcs, sicfcs. remove sea ice over non-ice points ! crit = aislim do i=1,len - sihfcs(i) = sihanl(i) - sitfcs(i) = tsffcs(i) - if (lake(i)) then - crit = min_lakeice - else - crit = min_seaice - endif - if (slifcs(i) >= 1.99_kind_io8) then - if (sicfcs(i) > crit) then - tem1 = 1.0_kind_io8 / sicfcs(i) - tsffcs(i) = (sicanl(i)*tsffcs(i) - & + (sicfcs(i)-sicanl(i))*tgice) * tem1 - sitfcs(i) = (tsffcs(i)-tgice*(1.0-sicfcs(i))) * tem1 - sicfcs(i) = sicanl(i) + if (slmskw(i) == zero) then + crit = min_ice(i) + if (sicanl(i) >= crit) then + sihfcs(i) = sihanl(i) + sitfcs(i) = tsffcs(i) + if (sicfcs(i) >= crit) then + tem1 = 1.0_kind_io8 / sicfcs(i) + tsffcs(i) = (sicanl(i)*tsffcs(i) + & + (sicfcs(i)-sicanl(i))*tgice) * tem1 + sitfcs(i) = (tsffcs(i)-tgice*(1.0-sicfcs(i))) * tem1 + sicfcs(i) = sicanl(i) + else + tsffcs(i) = tgice + sitfcs(i) = tgice + sicfcs(i) = sicanl(i) + sihfcs(i) = sihnew + endif else tsffcs(i) = tsfanl(i) -! tsffcs(i) = tgice -! sihfcs(i) = sihnew - sihfcs(i) = 0.0_kind_io8 - sicfcs(i) = 0.0_kind_io8 - slifcs(i) = 0.0_kind_io8 + sihfcs(i) = zero + sicfcs(i) = zero + slifcs(i) = zero + sitfcs(i) = tsffcs(i) endif endif if (slifcs(i) > 1.5_kind_io8 .and. sicfcs(i) < crit) then @@ -2361,11 +2418,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! sicfcs(i) = 0.0_kind_io8 ! sitfcs(i) = tsffcs(i) ! else -! if (lake(i)) then -! crit = min_lakeice -! else -! crit = min_seaice -! endif +! crit = min_ice(i) ! if (sicfcs(i) < crit) then ! print *,'warning: check, slifcs and sicfcs', & ! & slifcs(i),sicfcs(i) @@ -2452,9 +2505,16 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & tsffcs(i) = min(tsffcs(i),273.15) endif enddo - end if + endif + do i=1,len + if (nint(slmskl(i)) == 1 .and. nint(slmskw(i)) == 0) then + slifcs(i) = slmskl(i) ! resetting slmsk to land value where land/wate/ice coexist + endif + enddo ! ! if(lprnt) print *,' tsffcsf=',tsffcs(iprnt) +! if(lprnt) print *,' stcfcsend=',stcfcs(iprnt,:) +! if(lprnt) print *,' slifcsend=',slifcs(iprnt) return end subroutine sfccycle @@ -2672,8 +2732,8 @@ subroutine fixrdg(lugb,idim,jdim,fngrib, & close(lugb) call baopenr(lugb,fngrib,iret) if (iret .ne. 0) then - write(6,*) ' error in opening file ',trim(fngrib) - print *,'error in opening file ',trim(fngrib) + write(6,*) ' FATAL ERROR: in opening file ',trim(fngrib) + print *,'FATAL ERROR: in opening file ',trim(fngrib) call abort endif if (me .eq. 0) write(6,*) ' file ',trim(fngrib), @@ -2700,8 +2760,8 @@ subroutine fixrdg(lugb,idim,jdim,fngrib, & kpds0(4)=-1 kpds0(18)=-1 if(iret.ne.0) then - write(6,*) ' error in getgbh. iret: ', iret - if (iret == 99) write(6,*) ' field not found.' + write(6,*) ' FATAL ERROR: in getgbh. iret: ', iret + if (iret == 99) write(6,*) ' Field not found.' call abort endif ! @@ -2719,13 +2779,13 @@ subroutine fixrdg(lugb,idim,jdim,fngrib, & data8 = real(data4, kind=kind_io8) deallocate(data4) else - write(0,*)' Invalid w3kindreal --- aborting' + write(0,*)' FATAL ERROR: Invalid w3kindreal' call abort endif ! if(jret == 0) then if(ndata.eq.0) then - write(6,*) ' error in getgb' + write(6,*) ' FATAL ERROR: in getgb' write(6,*) ' kpds=',kpds write(6,*) ' kgds=',kgds call abort @@ -2741,7 +2801,7 @@ subroutine fixrdg(lugb,idim,jdim,fngrib, & else if (me ==. 0) write(6,*) 'idim,jdim=',idim,jdim &, ' gaus=',gaus,' blno=',blno,' blto=',blto - write(6,*) ' error in getgb : jret=',jret + write(6,*) ' FATAL ERROR in getgb : jret=',jret write(6,*) ' kpds(13)=',kpds(13),' kpds(15)=',kpds(15) call abort endif @@ -2816,18 +2876,18 @@ subroutine getarea(kgds,dlat,dlon,rslat,rnlat,wlon,elon,ijordr,me) return ! elseif(kgds(1).eq.1) then ! mercator projection - write(6,*) 'mercator grid' - write(6,*) 'cannot process' + write(6,*) 'FATAL ERROR: cannot process' + write(6,*) 'mercator grid.' call abort ! elseif(kgds(1).eq.2) then ! gnomonic projection - write(6,*) 'gnomonic grid' - write(6,*) 'error!! gnomonic projection not coded' + write(6,*) 'FATAL ERROR: cannot process' + write(6,*) 'gnomonic grid.' call abort ! elseif(kgds(1).eq.3) then ! lambert conformal - write(6,*) 'lambert conformal' - write(6,*) 'cannot process' + write(6,*) 'FATAL ERROR: cannot process' + write(6,*) 'lambert conformal grid.' call abort elseif(kgds(1).eq.4) then ! gaussian grid ! @@ -2869,33 +2929,33 @@ subroutine getarea(kgds,dlat,dlon,rslat,rnlat,wlon,elon,ijordr,me) return ! elseif(kgds(1).eq.5) then ! polar strereographic - write(6,*) 'polar stereographic grid' - write(6,*) 'cannot process' + write(6,*) 'FATAL ERROR: cannot process' + write(6,*) 'polar stereographic grid.' call abort return ! elseif(kgds(1).eq.13) then ! oblique lambert conformal - write(6,*) 'oblique lambert conformal grid' - write(6,*) 'cannot process' + write(6,*) 'FATAL ERROR: cannot process' + write(6,*) 'oblique lambert conformal grid.' call abort ! elseif(kgds(1).eq.50) then ! spherical coefficient - write(6,*) 'spherical coefficient' - write(6,*) 'cannot process' + write(6,*) 'FATAL ERROR: cannot process' + write(6,*) 'spherical coefficient grid.' call abort return ! elseif(kgds(1).eq.90) then ! space view perspective ! (orthographic grid) - write(6,*) 'space view perspective grid' - write(6,*) 'cannot process' + write(6,*) 'FATAL ERROR: cannot process' + write(6,*) 'space view perspective grid.' call abort return ! else ! unknown projection. abort. - write(6,*) 'error!! unknown map projection' + write(6,*) 'FATAL ERROR: Unknown map projection.' write(6,*) 'kgds(1)=',kgds(1) - print *,'error!! unknown map projection' + print *,'FATAL ERROR: Unknown map projection.' print *,'kgds(1)=',kgds(1) call abort endif @@ -3303,8 +3363,10 @@ subroutine la2ga(regin,imxin,jmxin,rinlon,rinlat,rlon,rlat,inttyp,& !cggg routine assign a default. if (num_threads == 1) then - print*,'no matching mask found ',i,i1,j1,ix,jx - print*,'set to default value.' + print*,'no matching mask found ',i,i1,j1,ix,jx & + &, ' slmask=',slmask(i),' me=',me & + &, ' outlon=',outlon(i),' outlat=',outlat(i) + &, 'set to default value.' endif gauout(i) = 0.0 @@ -3416,9 +3478,11 @@ subroutine la2ga(regin,imxin,jmxin,rinlon,rinlat,rlon,rlat,inttyp,& i2 = iindx2(i) if(wrk(i) .eq. 0.0) then if(.not.lmask) then - if (num_threads == 1) - & write(6,*) ' la2ga called with lmask=.true. but bad', - & ' rslmsk or slmask given' + if (num_threads == 1) then + write(6,*) ' FATAL ERROR: la2ga called' + write(6,*) ' with lmask=true. But bad rslmsk' + write(6,*) ' or slmask given.' + endif call abort endif ifill(it) = ifill(it) + 1 @@ -3466,7 +3530,8 @@ subroutine la2ga(regin,imxin,jmxin,rinlon,rinlat,rlon,rlat,inttyp,& enddo ! if (num_threads == 1) then - write(6,*) ' error!!! no filling value found in la2ga' + write(6,*) ' FATAL ERROR: no filling value' + write(6,*) ' found in routine la2ga.' ! write(6,*) ' i ix jx slmask(i) rslmsk ', ! & i,ix,jx,slmask(i),rslmsk(ix,jx) endif @@ -3566,7 +3631,7 @@ subroutine filanl(tsfanl,tsfan2,wetanl,snoanl,zoranl,albanl, & & slianl(len),scvanl(len),veganl(len), & & vetanl(len),sotanl(len),alfanl(len,2) & &, sihanl(len),sicanl(len) & - &, vmnanl(len),vmxanl(len),slpanl(len),absanl(len) + &, vmnanl(len),vmxanl(len),slpanl(len),absanl(len) real (kind=kind_io8) tsfclm(len),tsfcl2(len),wetclm(len), & & snoclm(len), & & zorclm(len),albclm(len,4),aisclm(len), & @@ -3602,7 +3667,7 @@ subroutine filanl(tsfanl,tsfan2,wetanl,snoanl,zoranl,albanl, & sicanl(i) = sicclm(i) ! sea ice concentration !clu [+4l] add vmn, vmx, slp, abs vmnanl(i) = vmnclm(i) ! min vegetation cover - vmxanl(i) = vmxclm(i) ! max vegetation cover + vmxanl(i) = vmxclm(i) ! max vegetation cover slpanl(i) = slpclm(i) ! slope type absanl(i) = absclm(i) ! max snow albedo enddo @@ -3628,8 +3693,8 @@ subroutine filanl(tsfanl,tsfan2,wetanl,snoanl,zoranl,albanl, & end !>\ingroup mod_sfcsub - subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, & - & slmask,fntsfa,fnweta,fnsnoa,fnzora,fnalba,fnaisa,& + subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil,slmskl,slmskw, & + & fntsfa,fnweta,fnsnoa,fnzora,fnalba,fnaisa, & & fntg3a,fnscva,fnsmca,fnstca,fnacna,fnvega, & & fnveta,fnsota, & & fnvmna,fnvmxa,fnslpa,fnabsa, & !clu [+1l] add fn()a for vmn, vmx, slp, abs @@ -3659,7 +3724,7 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, & &, kpdvmn,kpdvmx,kpdslp,kpdabs,irtvmn,irtvmx,irtslp,irtabs real (kind=kind_io8) blto,blno,fh ! - real (kind=kind_io8) slmask(len) + real (kind=kind_io8) slmskl(len), slmskw(len) real (kind=kind_io8) slmskh(imsk,jmsk) real (kind=kind_io8) outlat(len), outlon(len) integer kpdalb(4), kpdalf(2) @@ -3689,13 +3754,13 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, & ! irttsf = 1 if(fntsfa(1:8).ne.' ') then - call fixrda(lugb,fntsfa,kpdtsf,slmask, + call fixrda(lugb,fntsfa,kpdtsf,slmskw, & iy,im,id,ih,fh,tsfanl,len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) irttsf = iret if(iret == 1) then - write(6,*) 't surface analysis read error' + write(6,*) 'FATAL ERROR: t surface analysis read error.' call abort elseif(iret == -1) then if (me == 0) then @@ -3716,16 +3781,18 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, & ! tsf0 ! if(fntsfa(1:8).ne.' ' .and. lanom) then - call fixrda(lugb,fntsfa,kpdtsf,slmask, + call fixrda(lugb,fntsfa,kpdtsf,slmskw, & iy,im,id,ih,0.,tsfan0,len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) if(iret == 1) then - write(6,*) 't surface at ft=0 analysis read error' + write(6,*) 'FATAL ERROR: t surface at ft=0 analysis' + write(6,*) 'read error.' call abort elseif(iret == -1) then if (me == 0) then - write(6,*) 'could not find t surface analysis at ft=0' + write(6,*) 'FATAL ERROR: Could not find t surface' + write(6,*) 'analysis at ft=0.' endif call abort else @@ -3742,13 +3809,13 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, & irtalb = 0 if(fnalba(1:8).ne.' ') then do kk = 1, 4 - call fixrda(lugb,fnalba,kpdalb(kk),slmask, + call fixrda(lugb,fnalba,kpdalb(kk),slmskl, & iy,im,id,ih,fh,albanl(1,kk),len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) irtalb = iret if(iret == 1) then - write(6,*) 'albedo analysis read error' + write(6,*) 'FATAL ERROR: albedo analysis read error.' call abort elseif(iret == -1) then if (me == 0) then @@ -3773,13 +3840,13 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, & irtalf = 0 if(fnalba(1:8).ne.' ') then do kk = 1, 2 - call fixrda(lugb,fnalba,kpdalf(kk),slmask, + call fixrda(lugb,fnalba,kpdalf(kk),slmskl, & iy,im,id,ih,fh,alfanl(1,kk),len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) irtalf = iret if(iret == 1) then - write(6,*) 'albedo analysis read error' + write(6,*) 'FATAL ERROR: albedo analysis read error.' call abort elseif(iret == -1) then if (me == 0) then @@ -3804,13 +3871,13 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, & irtwet=0 irtsmc=0 if(fnweta(1:8).ne.' ') then - call fixrda(lugb,fnweta,kpdwet,slmask, + call fixrda(lugb,fnweta,kpdwet,slmskl, & iy,im,id,ih,fh,wetanl,len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) irtwet=iret if(iret.eq.1) then - write(6,*) 'bucket wetness analysis read error' + write(6,*) 'FATAL ERROR: bucket wetness analysis read error.' call abort elseif(iret.eq.-1) then if (me .eq. 0) then @@ -3822,17 +3889,18 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, & if (me .eq. 0) print *,'bucket wetness analysis provided.' endif elseif(fnsmca(1:8).ne.' ') then - call fixrda(lugb,fnsmca,kpdsmc,slmask, + call fixrda(lugb,fnsmca,kpdsmc,slmskl, & iy,im,id,ih,fh,smcanl(1,1),len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) - call fixrda(lugb,fnsmca,kpdsmc,slmask, + call fixrda(lugb,fnsmca,kpdsmc,slmskl, & iy,im,id,ih,fh,smcanl(1,2),len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) irtsmc=iret if(iret.eq.1) then - write(6,*) 'layer soil wetness analysis read error' + write(6,*) 'FATAL ERROR: layer soil wetness analysis' + write(6,*) 'read error.' call abort elseif(iret.eq.-1) then if (me .eq. 0) then @@ -3867,8 +3935,8 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, & !cggg the grib parameter id number. call baopenr(lugb,fnsnoa,iret) if (iret .ne. 0) then - write(6,*) ' error in opening file ',trim(fnsnoa) - print *,'error in opening file ',trim(fnsnoa) + write(6,*) 'FATAL ERROR: in opening file ',trim(fnsnoa) + print *,'FATAL ERROR: in opening file ',trim(fnsnoa) call abort endif lugi=0 @@ -3880,19 +3948,20 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, & & lskip,kpds,kgds,iret) close(lugb) if (iret .ne. 0) then - write(6,*) ' error reading header of file: ',trim(fnsnoa) - print *,'error reading header of file: ',trim(fnsnoa) + write(6,*) ' FATAL ERROR: reading header' + write(6,*) ' of file: ',trim(fnsnoa) + print *,'FATAL ERROR: reading header of file: ',trim(fnsnoa) call abort endif if (kgds(1) == 4) then ! gaussian data is depth - call fixrda(lugb,fnsnoa,kpdsnd,slmask, + call fixrda(lugb,fnsnoa,kpdsnd,slmskl, & iy,im,id,ih,fh,snoanl,len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) - snoanl=snoanl*100. ! convert from meters to liq. eq. - ! depth in mm using 10:1 ratio + snoanl = snoanl*100. ! convert from meters to liq. eq. + ! depth in mm using 10:1 ratio else ! lat/lon data is liq equv. depth - call fixrda(lugb,fnsnoa,kpdsno,slmask, + call fixrda(lugb,fnsnoa,kpdsno,slmskl, & iy,im,id,ih,fh,snoanl,len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) @@ -3900,7 +3969,7 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, & !cggg snow mods end irtscv=iret if(iret.eq.1) then - write(6,*) 'snow depth analysis read error' + write(6,*) 'FATAL ERROR: snow depth analysis read error.' call abort elseif(iret.eq.-1) then if (me .eq. 0) then @@ -3914,15 +3983,15 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, & irtsno=0 elseif(fnscva(1:8).ne.' ') then do i=1,len - snoanl(i)=0. + snoanl(i) = 0. enddo - call fixrda(lugb,fnscva,kpdscv,slmask, + call fixrda(lugb,fnscva,kpdscv,slmskl, & iy,im,id,ih,fh,scvanl,len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) irtsno=iret if(iret.eq.1) then - write(6,*) 'snow cover analysis read error' + write(6,*) 'FATAL ERROR: snow cover analysis read error.' call abort elseif(iret.eq.-1) then if (me .eq. 0) then @@ -3945,13 +4014,14 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, & irtacn=0 irtais=0 if(fnacna(1:8).ne.' ') then - call fixrda(lugb,fnacna,kpdacn,slmask, + call fixrda(lugb,fnacna,kpdacn,slmskw, & iy,im,id,ih,fh,acnanl,len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) irtacn=iret if(iret.eq.1) then - write(6,*) 'ice concentration analysis read error' + write(6,*) 'FATAL ERROR: ice concentration' + write(6,*) 'analysis read error.' call abort elseif(iret.eq.-1) then if (me .eq. 0) then @@ -3964,13 +4034,13 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, & if (me .eq. 0) print *,'ice concentration analysis provided.' endif elseif(fnaisa(1:8).ne.' ') then - call fixrda(lugb,fnaisa,kpdais,slmask, + call fixrda(lugb,fnaisa,kpdais,slmskw, & iy,im,id,ih,fh,aisanl,len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) irtais=iret if(iret.eq.1) then - write(6,*) 'ice mask analysis read error' + write(6,*) 'FATAL ERROR: ice mask analysis read error.' call abort elseif(iret.eq.-1) then if (me .eq. 0) then @@ -3992,13 +4062,13 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, & ! irtzor=0 if(fnzora(1:8).ne.' ') then - call fixrda(lugb,fnzora,kpdzor,slmask, + call fixrda(lugb,fnzora,kpdzor,slmskl, & iy,im,id,ih,fh,zoranl,len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) irtzor=iret if(iret.eq.1) then - write(6,*) 'roughness analysis read error' + write(6,*) 'FATAL ERROR: roughness analysis read error.' call abort elseif(iret.eq.-1) then if (me .eq. 0) then @@ -4021,13 +4091,13 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, & irttg3=0 irtstc=0 if(fntg3a(1:8).ne.' ') then - call fixrda(lugb,fntg3a,kpdtg3,slmask, + call fixrda(lugb,fntg3a,kpdtg3,slmskl, & iy,im,id,ih,fh,tg3anl,len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) irttg3=iret if(iret.eq.1) then - write(6,*) 'deep soil tmp analysis read error' + write(6,*) 'FATAL ERROR: deep soil tmp analysis read error.' call abort elseif(iret.eq.-1) then if (me .eq. 0) then @@ -4040,17 +4110,17 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, & if (me .eq. 0) print *,'deep soil tmp analysis provided.' endif elseif(fnstca(1:8).ne.' ') then - call fixrda(lugb,fnstca,kpdstc,slmask, + call fixrda(lugb,fnstca,kpdstc,slmskl, & iy,im,id,ih,fh,stcanl(1,1),len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) - call fixrda(lugb,fnstca,kpdstc,slmask, + call fixrda(lugb,fnstca,kpdstc,slmskl, & iy,im,id,ih,fh,stcanl(1,2),len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) irtstc=iret if(iret.eq.1) then - write(6,*) 'layer soil tmp analysis read error' + write(6,*) 'FATAL ERROR: layer soil tmp analysis read error.' call abort elseif(iret.eq.-1) then if (me .eq. 0) then @@ -4073,13 +4143,14 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, & ! irtveg=0 if(fnvega(1:8).ne.' ') then - call fixrda(lugb,fnvega,kpdveg,slmask, + call fixrda(lugb,fnvega,kpdveg,slmskl, & iy,im,id,ih,fh,veganl,len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) irtveg=iret if(iret.eq.1) then - write(6,*) 'vegetation cover analysis read error' + write(6,*) 'FATAL ERROR: vegetation cover analysis' + write(6,*) 'read error.' call abort elseif(iret.eq.-1) then if (me .eq. 0) then @@ -4102,13 +4173,14 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, & ! irtvet=0 if(fnveta(1:8).ne.' ') then - call fixrda(lugb,fnveta,kpdvet,slmask, + call fixrda(lugb,fnveta,kpdvet,slmskl, & iy,im,id,ih,fh,vetanl,len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) irtvet=iret if(iret.eq.1) then - write(6,*) 'vegetation type analysis read error' + write(6,*) 'FATAL ERROR: vegetation type analysis' + write(6,*) 'read error.' call abort elseif(iret.eq.-1) then if (me .eq. 0) then @@ -4131,13 +4203,13 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, & ! irtsot=0 if(fnsota(1:8).ne.' ') then - call fixrda(lugb,fnsota,kpdsot,slmask, + call fixrda(lugb,fnsota,kpdsot,slmskl, & iy,im,id,ih,fh,sotanl,len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) irtsot=iret if(iret.eq.1) then - write(6,*) 'soil type analysis read error' + write(6,*) 'FATAL ERROR: soil type analysis read error.' call abort elseif(iret.eq.-1) then if (me .eq. 0) then @@ -4162,13 +4234,13 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, & ! irtvmn=0 if(fnvmna(1:8).ne.' ') then - call fixrda(lugb,fnvmna,kpdvmn,slmask, + call fixrda(lugb,fnvmna,kpdvmn,slmskl, & iy,im,id,ih,fh,vmnanl,len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) irtvmn=iret if(iret.eq.1) then - write(6,*) 'shdmin analysis read error' + write(6,*) 'FATAL ERROR: shdmin analysis read error.' call abort elseif(iret.eq.-1) then if (me .eq. 0) then @@ -4192,13 +4264,13 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, & ! irtvmx=0 if(fnvmxa(1:8).ne.' ') then - call fixrda(lugb,fnvmxa,kpdvmx,slmask, + call fixrda(lugb,fnvmxa,kpdvmx,slmskl, & iy,im,id,ih,fh,vmxanl,len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) irtvmx=iret if(iret.eq.1) then - write(6,*) 'shdmax analysis read error' + write(6,*) 'FATAL ERROR: shdmax analysis read error.' call abort elseif(iret.eq.-1) then if (me .eq. 0) then @@ -4222,13 +4294,13 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, & ! irtslp=0 if(fnslpa(1:8).ne.' ') then - call fixrda(lugb,fnslpa,kpdslp,slmask, + call fixrda(lugb,fnslpa,kpdslp,slmskl, & iy,im,id,ih,fh,slpanl,len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) irtslp=iret if(iret.eq.1) then - write(6,*) 'slope type analysis read error' + write(6,*) 'FATAL ERROR: slope type analysis read error.' call abort elseif(iret.eq.-1) then if (me .eq. 0) then @@ -4252,13 +4324,13 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, & ! irtabs=0 if(fnabsa(1:8).ne.' ') then - call fixrda(lugb,fnabsa,kpdabs,slmask, + call fixrda(lugb,fnabsa,kpdabs,slmskl, & iy,im,id,ih,fh,absanl,len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) irtabs=iret if(iret.eq.1) then - write(6,*) 'snoalb analysis read error' + write(6,*) 'FATAL ERROR: snoalb analysis read error.' call abort elseif(iret.eq.-1) then if (me .eq. 0) then @@ -4309,7 +4381,7 @@ subroutine filfcs(tsffcs,wetfcs,snofcs,zorfcs,albfcs, & & slifcs(len),vegfcs(len), & & vetfcs(len),sotfcs(len),alffcs(len,2) & &, sihfcs(len),sicfcs(len) & - &, vmnfcs(len),vmxfcs(len),slpfcs(len),absfcs(len) + &, vmnfcs(len),vmxfcs(len),slpfcs(len),absfcs(len) real (kind=kind_io8) tsfanl(len),wetanl(len),snoanl(len), & & zoranl(len),albanl(len,4),aisanl(len), & & tg3anl(len), & @@ -4439,7 +4511,8 @@ subroutine rof01(aisfld, len, op, crit) endif enddo else - write(6,*) ' illegal operator in rof01. op=',op + write(6,*) ' FATAL ERROR: illegal operator' + write(6,*) ' in rof01. op=',op call abort endif ! @@ -4447,21 +4520,14 @@ subroutine rof01(aisfld, len, op, crit) end !>\ingroup mod_sfcsub - subroutine rof01_len(aisfld, len, op, lake, critl, crits) + subroutine rof01_len(aisfld, len, op, crit) use machine , only : kind_io8,kind_io4 implicit none integer i,len - logical :: lake(len) - real (kind=kind_io8) aisfld(len), critl, crits, crit(len) + real (kind=kind_io8), intent(in) :: crit(len) + real (kind=kind_io8) aisfld(len) character*2 op ! - do i=1,len - if (lake(i)) then - crit(i) = critl - else - crit(i) = crits - endif - enddo if(op == 'ge') then do i=1,len if(aisfld(i) >= crit(i)) then @@ -4495,7 +4561,8 @@ subroutine rof01_len(aisfld, len, op, lake, critl, crits) endif enddo else - write(6,*) ' illegal operator in rof01. op=',op + write(6,*) ' FATAL ERROR: illegal operator' + write(6,*) ' in rof01_len. op=',op call abort endif ! @@ -4578,7 +4645,7 @@ end subroutine snodpth !>\ingroup mod_sfcsub !! This subroutine merges analysis and forecast. subroutine merge(len,lsoil,iy,im,id,ih,fh,deltsfc, & - & sihfcs,sicfcs, & + & slmskl,slmskw,sihfcs,sicfcs, & & vmnfcs,vmxfcs,slpfcs,absfcs, & & tsffcs,wetfcs,snofcs,zorfcs,albfcs,aisfcs, & & cvfcs ,cvbfcs,cvtfcs, & @@ -4602,7 +4669,7 @@ subroutine merge(len,lsoil,iy,im,id,ih,fh,deltsfc, & & irtvet,irtsot,irtalf, landice, me) use machine , only : kind_io8,kind_io4 use sfccyc_module, only : veg_type_landice, soil_type_landice, & - & num_threads + & num_threads, zero, one implicit none integer k,i,im,id,iy,len,lsoil,ih,irtacn,irtsmc,irtscv,irtais, & & irttg3,irtstc,irtalf,me,irtsot,irtveg,irtvet, irtzor, & @@ -4627,6 +4694,7 @@ subroutine merge(len,lsoil,iy,im,id,ih,fh,deltsfc, & &, rslpl,rslps,rabsl,rabss,qvmnl,qvmns & &, qvmxl,qvmxs,qslpl,qslps,qabsl,qabss ! + real (kind=kind_io8) slmskl(len), slmskw(len) real (kind=kind_io8) tsffcs(len), wetfcs(len), snofcs(len), & & zorfcs(len), albfcs(len,4), aisfcs(len), & & cvfcs (len), cvbfcs(len), cvtfcs(len), & @@ -4811,8 +4879,8 @@ subroutine merge(len,lsoil,iy,im,id,ih,fh,deltsfc, & if (me == 0) then write(6,100) rtsfl,ralbl,raisl,rsnol,rsmcl,rzorl,rvegl 100 format('rtsfl,ralbl,raisl,rsnol,rsmcl,rzorl,rvegl=',10f7.3) - write(6,101) rtsfs,ralbs,raiss,rsnos,rsmcs,rzors,rvegs - 101 format('rtsfs,ralbs,raiss,rsnos,rsmcs,rzors,rvegs=',10f7.3) + write(6,101) rtsfs,ralbs,raiss,rsnos,rsmcs,rzors,rvegs,rsics + 101 format('rtsfs,ralbs,raiss,rsnos,rsmcs,rzors,rvegs,rsics=',11f7.3) ! print *,' ralfl=',ralfl,' ralfs=',ralfs,' rsotl=',rsotl ! *,' rsots=',rsots,' rvetl=',rvetl,' rvets=',rvets endif @@ -4890,7 +4958,7 @@ subroutine merge(len,lsoil,iy,im,id,ih,fh,deltsfc, & i1_t = (it-1)*len_thread_m+1 i2_t = min(i1_t+len_thread_m-1,len) do i=i1_t,i2_t - if(slianl(i).eq.0.) then + if(slianl(i) == zero) then vetanl(i) = vetfcs(i)*rvets + vetanl(i)*qvets sotanl(i) = sotfcs(i)*rsots + sotanl(i)*qsots else @@ -4908,7 +4976,8 @@ subroutine merge(len,lsoil,iy,im,id,ih,fh,deltsfc, & i2_t = min(i1_t+len_thread_m-1,len) ! do i=i1_t,i2_t - if(slianl(i).eq.0.) then + if(slianl(i) == zero) then +! if(slmskw(i) == zero) then !.... tsffc2 is the previous anomaly + today's climatology ! tsffc2 = (tsffcs(i)-tsfan2(i))+tsfanl(i) ! tsfanl(i) = tsffc2 *rtsfs+tsfanl(i)*qtsfs @@ -4926,7 +4995,8 @@ subroutine merge(len,lsoil,iy,im,id,ih,fh,deltsfc, & vmxanl(i) = vmxfcs(i)*rvmxs + vmxanl(i)*qvmxs slpanl(i) = slpfcs(i)*rslps + slpanl(i)*qslps absanl(i) = absfcs(i)*rabss + absanl(i)*qabss - else + endif + if(slmskl(i) == one .or. slianl(i) > zero) then tsfanl(i) = tsffcs(i)*rtsfl + tsfanl(i)*qtsfl ! albanl(i) = albfcs(i)*ralbl + albanl(i)*qalbl aisanl(i) = aisfcs(i)*raisl + aisanl(i)*qaisl @@ -5029,11 +5099,11 @@ end subroutine merge !>\ingroup mod_sfcsub subroutine newice(slianl,slifcs,tsfanl,tsffcs,len,lsoil, & - & sihnew,sicnew,sihanl,sicanl, & !cwu [+1l] add sihnew,sicnew,sihanl,sicanl - & albanl,snoanl,zoranl,smcanl,stcanl, & - & albsea,snosea,zorsea,smcsea,smcice, & - & tsfmin,tsfice,albice,zorice,tgice, & - & rla,rlo,me) + & sihnew,sicnew,sihanl,sicanl, & !cwu [+1l] add sihnew,sicnew,sihanl,sicanl + & albanl,snoanl,zoranl,smcanl,stcanl, & + & albsea,snosea,zorsea,smcsea,smcice, & + & tsfmin,tsfice,albice,zorice,tgice, & + & rla,rlo,me) ! use machine , only : kind_io8,kind_io4 implicit none @@ -5057,9 +5127,9 @@ subroutine newice(slianl,slifcs,tsfanl,tsffcs,len,lsoil, & kount1 = 0 kount2 = 0 do i=1,len - if(slifcs(i).ne.slianl(i)) then - if(slifcs(i).eq.1..or.slianl(i).eq.1.) then - print *,'inconsistency in slifcs or slianl' + if (nint(slifcs(i)) /= nint(slianl(i))) then + if (nint(slifcs(i)) == 1 .or. nint(slianl(i)) == 1) then + print *,'FATAL ERROR: inconsistency in slifcs or slianl.' print 910,rla(i),rlo(i),slifcs(i),slianl(i), & tsffcs(i),tsfanl(i) 910 format(2x,'at lat=',f5.1,' lon=',f5.1,' slifcs=',f4.1, @@ -5069,7 +5139,7 @@ subroutine newice(slianl,slifcs,tsfanl,tsffcs,len,lsoil, & ! ! interpolated climatology indicates melted sea ice ! - if(slianl(i).eq.0..and.slifcs(i).eq.2.) then + if (nint(slianl(i)) == 0 .and. nint(slifcs(i)) == 2) then tsfanl(i) = tsfmin albanl(i,1) = albsea albanl(i,2) = albsea @@ -5090,7 +5160,7 @@ subroutine newice(slianl,slifcs,tsfanl,tsffcs,len,lsoil, & ! ! interplated climatoloyg/analysis indicates new sea ice ! - if(slianl(i).eq.2..and.slifcs(i).eq.0.) then + if (nint(slianl(i)) == 2 .and. nint(slifcs(i)) == 0) then tsfanl(i) = tsfice albanl(i,1) = albice albanl(i,2) = albice @@ -5110,15 +5180,15 @@ subroutine newice(slianl,slifcs,tsfanl,tsffcs,len,lsoil, & endif enddo ! - if (me .eq. 0) then - if(kount1.gt.0) then - write(6,*) 'sea ice melted. tsf,alb,zor are filled', - & ' at ',kount1,' points' - endif - if(kount2.gt.0) then - write(6,*) 'sea ice formed. tsf,alb,zor are filled', - & ' at ',kount2,' points' - endif + if (me == 0) then + if (kount1 > 0) then + write(6,*) 'sea ice melted. tsf,alb,zor are filled', + & ' at ',kount1,' points' + endif + if(kount2 > 0) then + write(6,*) 'sea ice formed. tsf,alb,zor are filled', + & ' at ',kount2,' points' + endif endif ! return @@ -5191,7 +5261,8 @@ subroutine qcsice(ais,glacir,amxice,aicice,aicsea,sllnd,slmask, & kount1 = 0 do i=1,len if(ais(i).ne.aicice.and.ais(i).ne.aicsea) then - print *,'sea ice mask not ',aicice,' or ',aicsea + print *,'FATAL ERROR: sea ice' + print *,'mask not ',aicice,' or ',aicsea print *,'ais(i),aicice,aicsea,rla(i),rlo(i,=', & ais(i),aicice,aicsea,rla(i),rlo(i) call abort @@ -5859,7 +5930,7 @@ subroutine albocn(albclm,slmask,albomx,len) real (kind=kind_io8) albomx real (kind=kind_io8) albclm(len,4), slmask(len) do i=1,len - if(slmask(i).eq.0) then + if(slmask(i) == 0) then albclm(i,1) = albomx albclm(i,2) = albomx albclm(i,3) = albomx @@ -6097,6 +6168,8 @@ subroutine setrmsk(kpds5,slmask,igaul,jgaul,wlon,rnlat, & rltout(j) = rnlat + (j-1) * dlat enddo else ! grib file on some other grid + write(6,*) ' FATAL ERROR: Mask data on' + write(6,*) ' unsupported grid.' call abort endif dlon = 360.0 / imax @@ -6229,7 +6302,7 @@ subroutine setrmsk(kpds5,slmask,igaul,jgaul,wlon,rnlat, & do j = 1, jmax do i = 1, imax if (lbms(i,j)) then - rslmsk(i,j) = 1. + rslmsk(i,j) = 1. end if enddo enddo @@ -6244,7 +6317,7 @@ subroutine setrmsk(kpds5,slmask,igaul,jgaul,wlon,rnlat, & do j = 1, jmax do i = 1, imax if (lbms(i,j)) then - rslmsk(i,j) = 1. + rslmsk(i,j) = 1. end if enddo enddo @@ -6259,7 +6332,7 @@ subroutine setrmsk(kpds5,slmask,igaul,jgaul,wlon,rnlat, & do j = 1, jmax do i = 1, imax if (lbms(i,j)) then - rslmsk(i,j) = 1. + rslmsk(i,j) = 1. end if enddo enddo @@ -6274,7 +6347,7 @@ subroutine setrmsk(kpds5,slmask,igaul,jgaul,wlon,rnlat, & do j = 1, jmax do i = 1, imax if (lbms(i,j)) then - rslmsk(i,j) = 1. + rslmsk(i,j) = 1. end if enddo enddo @@ -6452,9 +6525,9 @@ subroutine setrmsk(kpds5,slmask,igaul,jgaul,wlon,rnlat, & ! veg type is zero over water, use this to get a bitmap. else do j = 1, jmax - do i = 1, imax - rslmsk(i,j) = data(i,j) - enddo + do i = 1, imax + rslmsk(i,j) = data(i,j) + enddo enddo crit=0.1 call rof01(rslmsk,ijmax,'gt',crit) @@ -6515,7 +6588,7 @@ subroutine setrmsk(kpds5,slmask,igaul,jgaul,wlon,rnlat, & do j = 1, jmax do i = 1, imax if (lbms(i,j)) then - rslmsk(i,j) = 1. + rslmsk(i,j) = 1. end if enddo enddo @@ -6850,8 +6923,8 @@ subroutine anomint(tsfan0,tsfclm,tsfcl0,tsfanl,len) end !>\ingroup mod_sfcsub - subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & - & slmask,fntsfc,fnwetc,fnsnoc,fnzorc,fnalbc,fnaisc,& + subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil,slmskl,slmskw, & + & fntsfc,fnwetc,fnsnoc,fnzorc,fnalbc,fnaisc, & & fntg3c,fnscvc,fnsmcc,fnstcc,fnacnc,fnvegc, & & fnvetc,fnsotc, & & fnvmnc,fnvmxc,fnslpc,fnabsc, & @@ -6901,7 +6974,7 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & real (kind=kind_io8) slmskh(imsk,jmsk) real (kind=kind_io8) outlat(len), outlon(len) ! - real (kind=kind_io8) slmask(len), tsfcl0(len) + real (kind=kind_io8) slmskl(len), slmskw(len), tsfcl0(len) real (kind=kind_io8), allocatable :: slmask_noice(:) ! logical lanom, gaus, first @@ -7057,7 +7130,7 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & go to 10 endif enddo - print *,'wrong rjday',rjday + print *,'FATAL ERROR: wrong rjday',rjday call abort 10 continue wei1m = (dayhf(mon2)-rjday)/(dayhf(mon2)-dayhf(mon1)) @@ -7073,7 +7146,7 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & do nn=1,2 mon = mon1 if (nn == 2) mon = mon2 - call fixrdc(lugb,fntsfc,kpdtsf,kpd7,mon,slmask, + call fixrdc(lugb,fntsfc,kpdtsf,kpd7,mon,slmskw, & tsf(1,nn),len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) @@ -7136,7 +7209,7 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & go to 20 endif enddo - print *,'wrong rjday',rjday + print *,'FATAL ERROR: wrong rjday',rjday call abort 20 continue wei1m = (dayhf(mon2)-rjday)/(dayhf(mon2)-dayhf(mon1)) @@ -7160,7 +7233,7 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & go to 30 endif enddo - print *,'wrong rjday',rjday + print *,'FATAL ERROR: wrong rjday',rjday call abort 30 continue wei1s = (dayhf(sea2)-rjday)/(dayhf(sea2)-dayhf(sea1)) @@ -7184,7 +7257,7 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & go to 31 endif enddo - print *,'wrong rjday',rjday + print *,'FATAL ERROR: wrong rjday',rjday call abort 31 continue wei1y = (dayhf(hyr2)-rjday)/(dayhf(hyr2)-dayhf(hyr1)) @@ -7212,10 +7285,10 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & cjfe kpd7=-1 - if (ialb == 1) then + if (ialb == 1 .or. ialb == 2) then !cbosu still need facsf and facwf. read them from the production file if ( index(fnalbc2, "tileX.nc") == 0) then ! grib file - call fixrdc(lugb,fnalbc2,kpdalf(1),kpd7,kpd9,slmask + call fixrdc(lugb,fnalbc2,kpdalf(1),kpd7,kpd9,slmskl &, alf,len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) @@ -7224,13 +7297,13 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & & kpdalf(1), alf(:,1), 1, len, me) endif else - call fixrdc(lugb,fnalbc,kpdalf(1),kpd7,kpd9,slmask + call fixrdc(lugb,fnalbc,kpdalf(1),kpd7,kpd9,slmskl &, alf,len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) endif do i = 1, len - if(slmask(i).eq.1.) then + if(slmskl(i) == 1.) then alf(i,2) = 100. - alf(i,1) endif enddo @@ -7240,7 +7313,7 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & if(fntg3c(1:8).ne.' ') then if ( index(fntg3c, "tileX.nc") == 0) then ! grib file kpd7=-1 - call fixrdc(lugb,fntg3c,kpdtg3,kpd7,kpd9,slmask, + call fixrdc(lugb,fntg3c,kpdtg3,kpd7,kpd9,slmskl, & tg3,len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) @@ -7258,7 +7331,7 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & if(fnvetc(1:8).ne.' ') then if ( index(fnvetc, "tileX.nc") == 0) then ! grib file kpd7=-1 - call fixrdc(lugb,fnvetc,kpdvet,kpd7,kpd9,slmask, + call fixrdc(lugb,fnvetc,kpdvet,kpd7,kpd9,slmskl, & vet,len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) @@ -7272,9 +7345,11 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & if (me .eq. 0) write(6,*) 'climatological vegetation', & ' type read in.' elseif(index(fnsmcc,'soilmgldas') /= 0) then ! new soil moisture climo - if (me .eq. 0) write(6,*) 'fatal error: must choose' - if (me .eq. 0) write(6,*) 'climatological veg type when' - if (me .eq. 0) write(6,*) 'using new gldas soil moisture.' + if (me .eq. 0) then + write(6,*) 'FATAL ERROR: must choose' + write(6,*) 'climatological veg type when' + write(6,*) 'using new gldas soil moisture.' + endif call abort endif ! @@ -7283,7 +7358,7 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & if(fnsotc(1:8).ne.' ') then if ( index(fnsotc, "tileX.nc") == 0) then ! grib file kpd7=-1 - call fixrdc(lugb,fnsotc,kpdsot,kpd7,kpd9,slmask, + call fixrdc(lugb,fnsotc,kpdsot,kpd7,kpd9,slmskl, & sot,len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) @@ -7300,7 +7375,7 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & if(fnvmnc(1:8).ne.' ') then if ( index(fnvmnc, "tileX.nc") == 0) then ! grib file kpd7=-1 - call fixrdc(lugb,fnvmnc,kpdvmn,kpd7,kpd9,slmask, + call fixrdc(lugb,fnvmnc,kpdvmn,kpd7,kpd9,slmskl, & vmn,len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) @@ -7317,7 +7392,7 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & if(fnvmxc(1:8).ne.' ') then if ( index(fnvmxc, "tileX.nc") == 0) then ! grib file kpd7=-1 - call fixrdc(lugb,fnvmxc,kpdvmx,kpd7,kpd9,slmask, + call fixrdc(lugb,fnvmxc,kpdvmx,kpd7,kpd9,slmskl, & vmx,len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) @@ -7333,7 +7408,7 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & if(fnslpc(1:8).ne.' ') then if ( index(fnslpc, "tileX.nc") == 0) then ! grib file kpd7=-1 - call fixrdc(lugb,fnslpc,kpdslp,kpd7,kpd9,slmask, + call fixrdc(lugb,fnslpc,kpdslp,kpd7,kpd9,slmskl, & slp,len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) @@ -7344,12 +7419,12 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & if (me .eq. 0) write(6,*) 'climatological slope read in.' endif ! -! max snow albeod +! max snow albedo ! if(fnabsc(1:8).ne.' ') then if ( index(fnabsc, "tileX.nc") == 0) then ! grib file kpd7=-1 - call fixrdc(lugb,fnabsc,kpdabs,kpd7,kpd9,slmask, + call fixrdc(lugb,fnabsc,kpdabs,kpd7,kpd9,slmskl, & absm,len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) @@ -7363,20 +7438,20 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & ! is1 = sea1/3 + 1 is2 = sea2/3 + 1 - if (is1 .eq. 5) is1 = 1 - if (is2 .eq. 5) is2 = 1 + if (is1 == 5) is1 = 1 + if (is2 == 5) is2 = 1 do nn=1,2 ! ! seasonal mean climatology - if(nn.eq.1) then - isx=is1 + if(nn == 1) then + isx = is1 else - isx=is2 + isx = is2 endif - if(isx.eq.1) kpd9 = 12 - if(isx.eq.2) kpd9 = 3 - if(isx.eq.3) kpd9 = 6 - if(isx.eq.4) kpd9 = 9 + if(isx == 1) kpd9 = 12 + if(isx == 2) kpd9 = 3 + if(isx == 3) kpd9 = 6 + if(isx == 4) kpd9 = 9 ! ! seasonal mean climatology ! @@ -7388,7 +7463,7 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & if (ialb == 0) then kpd7=-1 do k = 1, 4 - call fixrdc(lugb,fnalbc,kpdalb(k),kpd7,kpd9,slmask, + call fixrdc(lugb,fnalbc,kpdalb(k),kpd7,kpd9,slmskl, & alb(1,k,nn),len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) @@ -7401,11 +7476,11 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & if (nn .eq. 2) mon = mon2 !cbosu !cbosu new snowfree albedo database is monthly. - if (ialb == 1) then + if (ialb == 1 .or. ialb == 2) then if ( index(fnalbc, "tileX.nc") == 0) then ! grib file kpd7=-1 do k = 1, 4 - call fixrdc(lugb,fnalbc,kpdalb(k),kpd7,mon,slmask, + call fixrdc(lugb,fnalbc,kpdalb(k),kpd7,mon,slmskl, & alb(1,k,nn),len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) @@ -7423,7 +7498,7 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & ! tsf at the current time t ! kpd7=-1 - call fixrdc(lugb,fntsfc,kpdtsf,kpd7,mon,slmask, + call fixrdc(lugb,fntsfc,kpdtsf,kpd7,mon,slmskw, & tsf(1,nn),len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) @@ -7433,7 +7508,7 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & ! ! fh2 = fh - deltsfc ! if (fh2 .gt. 0.0) then -! call fixrd(lugb,fntsfc,kpdtsf,lclim,slmask, +! call fixrd(lugb,fntsfc,kpdtsf,lclim,slmskw, ! & iy,im,id,ih,fh2,tsfcl2,len,iret ! &, imsk, jmsk, slmskh, gaus,blno, blto ! &, outlat, outlon, me) @@ -7447,14 +7522,14 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & ! if(fnwetc(1:8).ne.' ') then kpd7=-1 - call fixrdc(lugb,fnwetc,kpdwet,kpd7,mon,slmask, + call fixrdc(lugb,fnwetc,kpdwet,kpd7,mon,slmskl, & wet(1,nn),len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) elseif(fnsmcc(1:8).ne.' ') then if (index(fnsmcc,'global_soilmcpc.1x1.grb') /= 0) then ! the old climo data kpd7=-1 - call fixrdc(lugb,fnsmcc,kpdsmc,kpd7,mon,slmask, + call fixrdc(lugb,fnsmcc,kpdsmc,kpd7,mon,slmskl, & smc(1,lsoil,nn),len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) @@ -7467,7 +7542,7 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & ! points. so for efficiency, don't have fixrdc try to ! find a value at landice points as defined by the vet type (vet). allocate(slmask_noice(len)) - slmask_noice=1.0 + slmask_noice = 1.0 do i = 1, len if (nint(vet(i)) < 1 .or. & nint(vet(i)) == landice_cat) then @@ -7487,7 +7562,8 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & deallocate(slmask_noice) endif else - write(6,*) 'climatological soil wetness file not given' + write(6,*) 'FATAL ERROR: climatological soil wetness' + write(6,*) 'file not given.' call abort endif ! @@ -7495,7 +7571,7 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & ! if(fnstcc(1:8).ne.' ') then kpd7=-1 - call fixrdc(lugb,fnstcc,kpdstc,kpd7,mon,slmask, + call fixrdc(lugb,fnstcc,kpdstc,kpd7,mon,slmskl, & stc(1,lsoil,nn),len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) @@ -7510,24 +7586,25 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & ! kpd7=-1 if(fnacnc(1:8).ne.' ') then - call fixrdc(lugb,fnacnc,kpdacn,kpd7,mon,slmask, + call fixrdc(lugb,fnacnc,kpdacn,kpd7,mon,slmskw, & acn(1,nn),len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) elseif(fnaisc(1:8).ne.' ') then - call fixrdc(lugb,fnaisc,kpdais,kpd7,mon,slmask, + call fixrdc(lugb,fnaisc,kpdais,kpd7,mon,slmskw, & ais(1,nn),len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) else - write(6,*) 'climatological ice cover file not given' + write(6,*) 'FATAL ERROR: climatological ice cover' + write(6,*) 'file not given.' call abort endif ! ! snow depth ! kpd7=-1 - call fixrdc(lugb,fnsnoc,kpdsno,kpd7,mon,slmask, + call fixrdc(lugb,fnsnoc,kpdsno,kpd7,mon,slmskl, & sno(1,nn),len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) @@ -7536,7 +7613,7 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & ! if(fnscvc(1:8).ne.' ') then kpd7=-1 - call fixrdc(lugb,fnscvc,kpdscv,kpd7,mon,slmask, + call fixrdc(lugb,fnscvc,kpdscv,kpd7,mon,slmskl, & scv(1,nn),len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) @@ -7555,7 +7632,7 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & endif else kpd7=-1 - call fixrdc(lugb,fnzorc,kpdzor,kpd7,mon,slmask, + call fixrdc(lugb,fnzorc,kpdzor,kpd7,mon,slmskl, & zor(1,nn),len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) @@ -7575,7 +7652,7 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & if(fnvegc(1:8).ne.' ') then if ( index(fnvegc, "tileX.nc") == 0) then ! grib file kpd7=-1 - call fixrdc(lugb,fnvegc,kpdveg,kpd7,mon,slmask, + call fixrdc(lugb,fnvegc,kpdveg,kpd7,mon,slmskl, & veg(1,nn),len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) @@ -7624,7 +7701,7 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & k1 = mod(k2,2) + 1 mon = mon1s kpd7=-1 - call fixrdc(lugb,fntsfc,kpdtsf,kpd7,mon,slmask, + call fixrdc(lugb,fntsfc,kpdtsf,kpd7,mon,slmskw, & tsf(1,k1),len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) @@ -7664,7 +7741,7 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & if (ialb == 0) then kpd7=-1 do k = 1, 4 - call fixrdc(lugb,fnalbc,kpdalb(k),kpd7,kpd9,slmask + call fixrdc(lugb,fnalbc,kpdalb(k),kpd7,kpd9,slmskl &, alb(1,k,m2),len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) @@ -7685,13 +7762,13 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & mon = mon2 nn = k2 !cbosu - if (ialb == 1) then + if (ialb == 1 .or. ialb == 2) then if (me == 0) print*,'bosu 2nd time in clima for month ', & mon, k1,k2 if ( index(fnalbc, "tileX.nc") == 0) then ! grib file kpd7 = -1 do k = 1, 4 - call fixrdc(lugb,fnalbc,kpdalb(k),kpd7,mon,slmask, + call fixrdc(lugb,fnalbc,kpdalb(k),kpd7,mon,slmskl, & alb(1,k,nn),len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) @@ -7707,7 +7784,7 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & ! tsf at the current time t ! kpd7 = -1 - call fixrdc(lugb,fntsfc,kpdtsf,kpd7,mon,slmask, + call fixrdc(lugb,fntsfc,kpdtsf,kpd7,mon,slmskw, & tsf(1,nn),len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) @@ -7716,14 +7793,14 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & ! if (fnwetc(1:8).ne.' ') then kpd7=-1 - call fixrdc(lugb,fnwetc,kpdwet,kpd7,mon,slmask, + call fixrdc(lugb,fnwetc,kpdwet,kpd7,mon,slmskl, & wet(1,nn),len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) elseif (fnsmcc(1:8).ne.' ') then if (index(fnsmcc,'global_soilmcpc.1x1.grb') /= 0) then ! the old climo data kpd7=-1 - call fixrdc(lugb,fnsmcc,kpdsmc,kpd7,mon,slmask, + call fixrdc(lugb,fnsmcc,kpdsmc,kpd7,mon,slmskl, & smc(1,lsoil,nn),len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) @@ -7756,7 +7833,8 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & deallocate(slmask_noice) endif else - write(6,*) 'climatological soil wetness file not given' + write(6,*) 'FATAL ERROR: climatological soil wetness' + write(6,*) 'file not given.' call abort endif ! @@ -7764,24 +7842,25 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & ! kpd7 = -1 if (fnacnc(1:8).ne.' ') then - call fixrdc(lugb,fnacnc,kpdacn,kpd7,mon,slmask, + call fixrdc(lugb,fnacnc,kpdacn,kpd7,mon,slmskw, & acn(1,nn),len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) elseif (fnaisc(1:8).ne.' ') then - call fixrdc(lugb,fnaisc,kpdais,kpd7,mon,slmask, + call fixrdc(lugb,fnaisc,kpdais,kpd7,mon,slmskw, & ais(1,nn),len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) else - write(6,*) 'climatological ice cover file not given' + write(6,*) 'FATAL ERROR: climatological ice cover' + write(6,*) 'file not given.' call abort endif ! ! snow depth ! kpd7=-1 - call fixrdc(lugb,fnsnoc,kpdsno,kpd7,mon,slmask, + call fixrdc(lugb,fnsnoc,kpdsno,kpd7,mon,slmskl, & sno(1,nn),len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) @@ -7790,7 +7869,7 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & ! if (fnscvc(1:8).ne.' ') then kpd7=-1 - call fixrdc(lugb,fnscvc,kpdscv,kpd7,mon,slmask, + call fixrdc(lugb,fnscvc,kpdscv,kpd7,mon,slmskl, & scv(1,nn),len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) @@ -7809,7 +7888,7 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & endif else kpd7=-1 - call fixrdc(lugb,fnzorc,kpdzor,kpd7,mon,slmask, + call fixrdc(lugb,fnzorc,kpdzor,kpd7,mon,slmskl, & zor(1,nn),len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) @@ -7820,7 +7899,7 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & if (fnvegc(1:8) .ne. ' ') then if ( index(fnvegc, "tileX.nc") == 0) then ! grib file kpd7=-1 - call fixrdc(lugb,fnvegc,kpdveg,kpd7,mon,slmask, + call fixrdc(lugb,fnvegc,kpdveg,kpd7,mon,slmskl, & veg(1,nn),len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) @@ -7841,7 +7920,10 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & ! set to point at the proper vegetation type file. if (fnzorc(1:3) == 'sib') then if (fnvetc(1:4) == ' ') then - if (me==0) write(6,*) "must choose sib veg type climo file" + if (me==0) then + write(6,*) "FATAL ERROR: must choose sib" + write(6,*) "vegetation type climo file." + endif call abort endif zorclm = 0.0 @@ -7853,7 +7935,10 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & enddo elseif(fnzorc(1:4) == 'igbp') then if (fnvetc(1:4) == ' ') then - if (me == 0) write(6,*) "must choose igbp veg type climo file" + if (me == 0) then + write(6,*) "FATAL ERROR: must choose igbp" + write(6,*) "vegetation type climo file." + endif call abort endif zorclm = 0.0 @@ -7995,7 +8080,7 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & if (me == 0) print*,'monthly albedo weights are ', & wei1m,' for k', k1, wei2m, ' for k', k2 - if (ialb == 1) then + if (ialb == 1 .or. ialb == 2) then do k=1,4 do i=1,len albclm(i,k) = wei1m * alb(i,k,k1) + wei2m * alb(i,k,k2) @@ -8095,8 +8180,8 @@ subroutine fixrdc_tile(filename_raw, tile_num_ch, & case(256:257) error=nf90_inq_varid(ncid, 'vegetation_greenness', id_var) case default - print*,'fatal error in fixrdc_tile of sfcsub.F.' - print*,'unknown variable.' + print*,'FATAL ERROR in fixrdc_tile of sfcsub.F.' + print*,'Unknown variable.' call abort end select if (error /= nf90_noerr) call netcdf_err(error) @@ -8169,7 +8254,7 @@ subroutine netcdf_err(error) character(len=256) :: errmsg errmsg = nf90_strerror(error) - print*,'fatal error in sfcsub.F: ', trim(errmsg) + print*,'FATAL ERROR in sfcsub.F: ', trim(errmsg) call abort end subroutine netcdf_err @@ -8227,8 +8312,8 @@ subroutine fixrdc(lugb,fngrib,kpds5,kpds7,mon,slmask, & close(lugb) call baopenr(lugb,fngrib,iret) if (iret .ne. 0) then - write(6,*) ' error in opening file ',trim(fngrib) - print *,'error in opening file ',trim(fngrib) + write(6,*) ' FATAL ERROR: in opening file ',trim(fngrib) + print *,'FATAL ERROR: in opening file ',trim(fngrib) call abort endif if (me .eq. 0) write(6,*) ' file ',trim(fngrib), @@ -8255,8 +8340,8 @@ subroutine fixrdc(lugb,fngrib,kpds5,kpds7,mon,slmask, & kpds0(4) = -1 kpds0(18) = -1 if(iret.ne.0) then - write(6,*) ' error in getgbh. iret: ', iret - if (iret==99) write(6,*) ' field not found.' + write(6,*) ' FATAL ERROR: in getgbh. iret: ', iret + if (iret==99) write(6,*) ' Field not found.' call abort endif ! @@ -8282,7 +8367,7 @@ subroutine fixrdc(lugb,fngrib,kpds5,kpds7,mon,slmask, & & (kpds(i),i=8,11) if(jret.eq.0) then if(ndata.eq.0) then - write(6,*) ' error in getgb' + write(6,*) ' FATAL ERROR: in getgb' write(6,*) ' kpds=',kpds write(6,*) ' kgds=',kgds call abort @@ -8299,7 +8384,7 @@ subroutine fixrdc(lugb,fngrib,kpds5,kpds7,mon,slmask, & enddo if (me .eq. 0) write(6,*) 'imax,jmax,ijmax=',imax,jmax,ijmax else - write(6,*) ' error in getgb - jret=', jret + write(6,*) ' FATAL ERROR: in getgb - jret=', jret call abort endif ! @@ -8329,8 +8414,8 @@ subroutine fixrdc(lugb,fngrib,kpds5,kpds7,mon,slmask, & inttyp = 0 if(kpds5.eq.225) inttyp = 1 if(kpds5.eq.230) inttyp = 1 - if(kpds5.eq.236) inttyp = 1 - if(kpds5.eq.224) inttyp = 1 + if(kpds5.eq.236) inttyp = 1 + if(kpds5.eq.224) inttyp = 1 if (me .eq. 0) then if(inttyp.eq.1) print *, ' nearest grid point used' &, ' kpds5=',kpds5, ' lmask = ',lmask @@ -8362,7 +8447,7 @@ subroutine fixrda(lugb,fngrib,kpds5,slmask, & integer nrepmx,nvalid,imo,iyr,idy,jret,ihr,nrept,lskip,lugi, & & lgrib,j,ndata,i,inttyp,jmax,imax,ijmax,ij,jday,len,iret, & & jmsk,imsk,ih,kpds5,lugb,iy,id,im,jh,jd,jdoy,jdow,jm,me, & - & monend,jy,iy4,kmami,iret2,jj,w3kindreal,w3kindint + & monend,jy,iy4,kmami,iret2,jj,w3kindreal,w3kindint real (kind=kind_io8) rnlat,rslat,wlon,elon,dlon,dlat,fh,blno, & & rjday,blto ! @@ -8458,8 +8543,8 @@ subroutine fixrda(lugb,fngrib,kpds5,slmask, & close(lugb) call baopenr(lugb,fngrib,iret) if (iret .ne. 0) then - write(6,*) ' error in opening file ',trim(fngrib) - print *,'error in opening file ',trim(fngrib) + write(6,*) ' FATAL ERROR: in opening file ',trim(fngrib) + print *,'FATAL ERROR in opening file ',trim(fngrib) call abort endif if (me .eq. 0) write(6,*) ' file ',trim(fngrib), @@ -8485,8 +8570,8 @@ subroutine fixrda(lugb,fngrib,kpds5,slmask, & kpds0(4)=-1 kpds0(18)=-1 if(iret.ne.0) then - write(6,*) ' error in getgbh. iret: ', iret - if(iret==99) write(6,*) ' field not found.' + write(6,*) ' FATAL ERROR: in getgbh. iret: ', iret + if(iret==99) write(6,*) ' Field not found.' call abort endif ! @@ -8529,7 +8614,7 @@ subroutine fixrda(lugb,fngrib,kpds5,slmask, & & (kpds(i),i=8,11) if(jret.eq.0) then if(ndata.eq.0) then - write(6,*) ' error in getgb' + write(6,*) ' FATAL ERROR: in getgb' write(6,*) ' kpds=',kpds write(6,*) ' kgds=',kgds call abort diff --git a/physics/shalcnv.meta b/physics/shalcnv.meta index 7986d28f8..2db08a9e1 100644 --- a/physics/shalcnv.meta +++ b/physics/shalcnv.meta @@ -16,7 +16,7 @@ intent = in optional = F [shal_cnv] - standard_name = flag_for_shallow_convection + standard_name = flag_for_simplified_arakawa_schubert_shallow_convection long_name = flag for calling shallow convection units = flag dimensions = () @@ -24,7 +24,7 @@ intent = in optional = F [imfshalcnv] - standard_name = flag_for_mass_flux_shallow_convection_scheme + standard_name = control_for_shallow_convection_scheme long_name = flag for mass-flux shallow convection scheme units = flag dimensions = () @@ -32,7 +32,7 @@ intent = in optional = F [imfshalcnv_sas] - standard_name = flag_for_sas_shallow_convection_scheme + standard_name = identifier_for_simplified_arakawa_schubert_shallow_convection long_name = flag for SAS shallow convection scheme units = flag dimensions = () @@ -116,7 +116,7 @@ intent = in optional = F [rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -169,7 +169,7 @@ intent = in optional = F [km] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () @@ -177,7 +177,7 @@ intent = in optional = F [jcap] - standard_name = number_of_spectral_wave_trancation_for_sas + standard_name = number_of_spectral_wave_truncation_for_simplified_arakawa_schubert_convection long_name = number of spectral wave trancation used only by sascnv and shalcnv units = count dimensions = () @@ -185,7 +185,7 @@ intent = in optional = F [delt] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics timestep units = s dimensions = () @@ -197,7 +197,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = air pressure difference between midlayers units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -206,7 +206,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -224,7 +224,7 @@ standard_name = geopotential long_name = geopotential at model layer centers units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -233,7 +233,7 @@ standard_name = cloud_condensed_water_mixing_ratio_convective_transport_tracer long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -242,43 +242,43 @@ standard_name = ice_water_mixing_ratio_convective_transport_tracer long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [q1] - standard_name = water_vapor_specific_humidity_updated_by_physics + standard_name = specific_humidity_of_new_state long_name = water vapor specific humidity updated by physics units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [t1] - standard_name = air_temperature_updated_by_physics + standard_name = air_temperature_of_new_state long_name = temperature updated by physics units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [u1] - standard_name = x_wind_updated_by_physics + standard_name = x_wind_of_new_state long_name = zonal wind updated by physics units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [v1] - standard_name = y_wind_updated_by_physics + standard_name = y_wind_of_new_state long_name = meridional wind updated by physics units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -325,17 +325,17 @@ intent = in optional = F [dot] - standard_name = omega + standard_name = lagrangian_tendency_of_air_pressure long_name = layer mean vertical velocity units = Pa s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [ncloud] - standard_name = number_of_hydrometeors - long_name = number of hydrometeors + standard_name = number_of_condensate_species + long_name = number of cloud condensate types units = count dimensions = () type = integer @@ -351,8 +351,8 @@ intent = in optional = F [heat] - standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness - long_name = kinematic surface upward sensible heat flux + standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness_and_vegetation + long_name = kinematic surface upward sensible heat flux reduced by surface roughness and vegetation units = K m s-1 dimensions = (horizontal_loop_extent) type = real @@ -360,7 +360,7 @@ intent = in optional = F [evap] - standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness + standard_name = surface_upward_specific_humidity_flux long_name = kinematic surface upward latent heat flux units = kg kg-1 m s-1 dimensions = (horizontal_loop_extent) @@ -372,7 +372,7 @@ standard_name = instantaneous_atmosphere_updraft_convective_mass_flux long_name = (updraft mass flux) * delt units = kg m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -381,7 +381,7 @@ standard_name = instantaneous_atmosphere_detrainment_convective_mass_flux long_name = (detrainment mass flux) * delt units = kg m-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -390,7 +390,7 @@ standard_name = convective_cloud_water_mixing_ratio long_name = moist convective cloud water mixing ratio units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -399,13 +399,13 @@ standard_name = convective_cloud_cover long_name = convective cloud cover units = frac - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [clam] - standard_name = entrainment_rate_coefficient_shallow_convection + standard_name = entrainment_rate_coefficient_for_shallow_convection long_name = entrainment rate coefficient for shallow convection units = none dimensions = () @@ -414,7 +414,7 @@ intent = in optional = F [c0] - standard_name = rain_conversion_parameter_shallow_convection + standard_name = rain_conversion_parameter_for_shallow_convection long_name = convective rain conversion parameter for shallow convection units = m-1 dimensions = () @@ -423,7 +423,7 @@ intent = in optional = F [c1] - standard_name = detrainment_conversion_parameter_shallow_convection + standard_name = detrainment_conversion_parameter_for_shallow_convection long_name = convective detrainment conversion parameter for shallow convection units = m-1 dimensions = () @@ -432,7 +432,7 @@ intent = in optional = F [pgcon] - standard_name = momentum_transport_reduction_factor_pgf_shallow_convection + standard_name = momentum_transport_reduction_factor_due_to_pressure_gradient_force_for_shallow_convection long_name = reduction factor in momentum transport due to shallow convection induced pressure gradient force units = frac dimensions = () diff --git a/physics/shinhongvdif.F90 b/physics/shinhongvdif.F90 index d35c74d47..74a47b54d 100644 --- a/physics/shinhongvdif.F90 +++ b/physics/shinhongvdif.F90 @@ -11,7 +11,22 @@ module shinhongvdif contains - subroutine shinhongvdif_init () + subroutine shinhongvdif_init (shinhong,errmsg,errflg) + + logical, intent(in) :: shinhong + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + ! Consistency checks + if (.not. shinhong) then + write(errmsg,fmt='(*(a))') 'Logic error: shinhong = .false.' + errflg = 1 + return + end if end subroutine shinhongvdif_init subroutine shinhongvdif_finalize () @@ -34,9 +49,10 @@ subroutine shinhongvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d,karman, & dusfc,dvsfc,dtsfc,dqsfc, & dt,kpbl1d, & u10,v10, & - dx,lssav,ldiag3d,qdiag3d, & - flag_for_pbl_generic_tend,ntoz,du3dt_PBL,dv3dt_PBL, & - dt3dt_PBL,dq3dt_PBL,do3dt_PBL,errmsg,errflg ) + dx,lssav,ldiag3d, & + flag_for_pbl_generic_tend,ntoz,ntqv,dtend,dtidx, & + index_of_process_pbl,index_of_temperature,index_of_x_wind, & + index_of_y_wind,errmsg,errflg ) use machine , only : kind_phys ! @@ -108,36 +124,33 @@ subroutine shinhongvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d,karman, & ! 1D in integer, intent(in ) :: im,km,ntrac,ndiff,ntcw,ntiw,ntoz real(kind=kind_phys), intent(in ) :: g,cp,rd,rv,ep1,ep2,xlv,dt - logical, intent(in ) :: lssav, ldiag3d, qdiag3d, & - flag_for_pbl_generic_tend + logical, intent(in ) :: lssav, ldiag3d, flag_for_pbl_generic_tend ! 3D in - real(kind=kind_phys), dimension(im, km) , & + real(kind=kind_phys), dimension(:,:) , & intent(in ) :: phil, & pi2d, & p2d, & ux, & vx, & tx - real(kind=kind_phys), dimension( im, km, ntrac ) , & + real(kind=kind_phys), dimension(:,:,:) , & intent(in ) :: qx - real(kind=kind_phys), dimension( im, km+1 ) , & + real(kind=kind_phys), dimension(:,:) , & intent(in ) :: p2di, & phii ! 3D in&out - real(kind=kind_phys), dimension(im, km) , & + real(kind=kind_phys), dimension(:,:) , & intent(inout) :: utnp, & vtnp, & ttnp - real(kind=kind_phys), dimension(im, km, ntrac ) , & + real(kind=kind_phys), dimension(:,:,:) , & intent(inout) :: qtnp - real(kind=kind_phys), dimension(im,km) , & - intent(inout) :: du3dt_PBL, dv3dt_PBL, dt3dt_PBL, dq3dt_PBL, do3dt_PBL ! 2D in - integer, dimension(im) , & + integer, dimension(:) , & intent(in ) :: landmask - real(kind=kind_phys), dimension(im) , & + real(kind=kind_phys), dimension(:) , & intent(in ) :: heat, & evap, & br, & @@ -151,16 +164,23 @@ subroutine shinhongvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d,karman, & v10, & dx ! 2D: out - integer, dimension(im) , & + integer, dimension(:) , & intent(out ) :: kpbl1d - real(kind=kind_phys), dimension(im) , & + real(kind=kind_phys), dimension(:) , & intent(out ) :: hpbl, & dusfc, & dvsfc, & dtsfc, & dqsfc + real(kind=kind_phys), intent(inout), optional :: dtend(:,:,:) + integer, intent(in) :: dtidx(:,:), index_of_process_pbl, ntqv, & + index_of_x_wind, index_of_y_wind, index_of_temperature + + ! Index within dtend third dimension for tendency of interest: + integer :: idtend + ! error messages character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -963,12 +983,10 @@ subroutine shinhongvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d,karman, & enddo enddo if(lssav .and. ldiag3d .and. .not. flag_for_pbl_generic_tend) then - do k = kte,kts,-1 - do i = its,ite - ttend = (f1(i,k)-thx(i,k)+300.)*rdt*pi2d(i,k) - dt3dt_PBL(i,k) = dt3dt_PBL(i,k) + ttend*dtstep - enddo - enddo + idtend = dtidx(index_of_temperature,index_of_process_pbl) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + dtstep*(f1-thx+300.)*rdt*pi2d + endif endif ! ! compute tridiagonal matrix elements for moisture, clouds, and gases @@ -1094,13 +1112,11 @@ subroutine shinhongvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d,karman, & tvflux_e(i,k) = tflux_e(i,k) + qflux_e(i,k)*ep1*thx(i,k) enddo enddo - if(lssav .and. ldiag3d .and. qdiag3d .and. .not. flag_for_pbl_generic_tend) then - do k = kte,kts,-1 - do i = its,ite - qtend = (f3(i,k,1)-qx(i,k,1))*rdt - dq3dt_PBL(i,k) = dq3dt_PBL(i,k) + qtend*dtstep - enddo - enddo + if(lssav .and. ldiag3d .and. .not. flag_for_pbl_generic_tend) then + idtend = dtidx(ntqv+100,index_of_process_pbl) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + dtstep*rdt*(f3(:,:,1)-qx(:,:,1)) + endif endif ! print*,"qtnp:",maxval(qtnp(:,:,1)),minval(qtnp(:,:,1)) ! @@ -1131,15 +1147,12 @@ subroutine shinhongvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d,karman, & enddo endif enddo - if(lssav .and. ldiag3d .and. ntoz>0 .and. qdiag3d .and. & + if(lssav .and. ldiag3d .and. ntoz>0 .and. & & .not. flag_for_pbl_generic_tend) then - ic = ntoz - do k = kte,kts,-1 - do i = its,ite - qtend = f3(i,k,ic)-qx(i,k,ic) - do3dt_PBL(i,k) = do3dt_PBL(i,k)+qtend - enddo - enddo + idtend=dtidx(ntoz+100,index_of_process_pbl) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + qtend*(f3(:,:,ntoz)-qx(:,:,ntoz)) + endif endif endif ! @@ -1233,14 +1246,14 @@ subroutine shinhongvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d,karman, & enddo enddo if(lssav .and. ldiag3d .and. .not. flag_for_pbl_generic_tend) then - do k = kte,kts,-1 - do i = its,ite - utend = (f1(i,k)-ux(i,k))*rdt - vtend = (f2(i,k)-vx(i,k))*rdt - du3dt_PBL(i,k) = du3dt_PBL(i,k) + utend*dtstep - dv3dt_PBL(i,k) = dv3dt_PBL(i,k) + vtend*dtstep - enddo - enddo + idtend=dtidx(index_of_x_wind,index_of_process_pbl) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + dtstep*rdt*(f1-ux) + endif + idtend=dtidx(index_of_y_wind,index_of_process_pbl) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + dtstep*rdt*(f2-vx) + endif endif ! do i = its,ite @@ -1326,7 +1339,7 @@ subroutine shinhongvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d,karman, & ! !---- find the mixing length ! - call mixlen(lmh,uxk,vxk,txk,thxk,qx(i,kts,1),qx(i,kts,ntcw) & + call mixlen(lmh,uxk,vxk,txk,thxk,qx(i,kts:kte,1),qx(i,kts:kte,ntcw) & ,q2xk,zqk,ust(i),corf,epshol(i) & ,s2,gh,rig,el & ,hpbl(i),kpbl(i),lmxl,ct(i) & @@ -1477,13 +1490,13 @@ subroutine tridin_ysu(cl,cm,cu,r2,au,f2,its,ite,kts,kte,nt) ! real(kind=kind_phys), dimension( its:ite, kts:kte ) , & intent(in ) :: cm - real(kind=kind_phys), dimension( its:ite, kts:kte,nt ) , & + real(kind=kind_phys), dimension( its:ite, kts:kte,nt) , & intent(in ) :: r2 ! real(kind=kind_phys), dimension( its:ite, kts:kte ) , & intent(inout) :: au, & cu - real(kind=kind_phys), dimension( its:ite, kts:kte,nt ) , & + real(kind=kind_phys), dimension( its:ite, kts:kte,nt) , & intent(inout) :: f2 ! real(kind=kind_phys) :: fk @@ -1624,7 +1637,7 @@ subroutine mixlen(lmh,u,v,t,the,q,cwm,q2,z,ustar,corf,epshol, & qol2st,qol2un,qdzl,rdz,sq,srel,szq,tem,thm,vkrmz,rlambda, & rlb,rln,f real(kind=kind_phys) :: ckp - real(kind=kind_phys), dimension( kts:kte ) :: q1, & + real(kind=kind_phys), dimension( kts:kte ) :: q1, & en2 real(kind=kind_phys), dimension( kts+1:kte ) :: dth, & elm, & @@ -1790,12 +1803,12 @@ subroutine prodq2(lmh,dtturbl,ustar,s2,ri,q2,el,z,akm,akh, & ! logical, intent(in ) :: pblflg ! - real(kind=kind_phys), dimension( kts:kte ) , & + real(kind=kind_phys), dimension( : ) , & intent(in ) :: uxk, & vxk, & thxk, & thvxk - real(kind=kind_phys), dimension( kts+1:kte ) , & + real(kind=kind_phys), dimension( : ) , & intent(in ) :: s2, & ri, & akm, & @@ -1806,10 +1819,10 @@ subroutine prodq2(lmh,dtturbl,ustar,s2,ri,q2,el,z,akm,akh, & vfxpbl, & qfxpbl ! - real(kind=kind_phys), dimension( kts:kte+1 ) , & + real(kind=kind_phys), dimension( : ) , & intent(in ) :: z ! - real(kind=kind_phys), dimension( kts:kte ) , & + real(kind=kind_phys), dimension( : ) , & intent(inout) :: q2 ! ! local vars @@ -1897,16 +1910,16 @@ subroutine vdifq(lmh,dtdif,q2,el,z, & ! logical, intent(in ) :: pblflg ! - real(kind=kind_phys), dimension( kts:kte ) , & + real(kind=kind_phys), dimension( : ) , & intent(in ) :: hgame, & ptke1 - real(kind=kind_phys), dimension( kts+1:kte ) , & + real(kind=kind_phys), dimension( : ) , & intent(in ) :: el, & akhk - real(kind=kind_phys), dimension( kts:kte+1 ) , & + real(kind=kind_phys), dimension( : ) , & intent(in ) :: z ! - real(kind=kind_phys), dimension( kts:kte ) , & + real(kind=kind_phys), dimension( : ) , & intent(inout) :: q2 ! ! local vars diff --git a/physics/shinhongvdif.meta b/physics/shinhongvdif.meta index 20e668cfb..920ddd7f1 100644 --- a/physics/shinhongvdif.meta +++ b/physics/shinhongvdif.meta @@ -3,6 +3,36 @@ type = scheme dependencies = machine.F +######################################################################## +[ccpp-arg-table] + name = shinhongvdif_init + type = scheme +[shinhong] + standard_name = flag_for_scale_aware_Shinhong_PBL + long_name = flag for scale-aware Shinhong PBL scheme + units = flag + dimensions = () + type = logical + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + ######################################################################## [ccpp-arg-table] name = shinhongvdif_run @@ -16,7 +46,7 @@ intent = in optional = F [km] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -27,7 +57,7 @@ standard_name = x_wind long_name = x component of layer wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -36,7 +66,7 @@ standard_name = y_wind long_name = y component of layer wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -45,7 +75,7 @@ standard_name = air_temperature long_name = layer mean air temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -54,7 +84,7 @@ standard_name = tracer_concentration long_name = model layer mean tracer concentration units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = in @@ -63,7 +93,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -72,16 +102,16 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in optional = F [pi2d] - standard_name = dimensionless_exner_function_at_model_layers + standard_name = dimensionless_exner_function long_name = Exner function at layers units = none - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -94,38 +124,38 @@ type = real intent = in optional = F -[vtnp] - standard_name = tendency_of_y_wind_due_to_model_physics - long_name = updated tendency of the y wind +[utnp] + standard_name = process_split_cumulative_tendency_of_x_wind + long_name = updated tendency of the x wind units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F -[utnp] - standard_name = tendency_of_x_wind_due_to_model_physics - long_name = updated tendency of the x wind +[vtnp] + standard_name = process_split_cumulative_tendency_of_y_wind + long_name = updated tendency of the y wind units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [ttnp] - standard_name = tendency_of_air_temperature_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_air_temperature long_name = updated tendency of the temperature units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [qtnp] - standard_name = tendency_of_tracers_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_tracers long_name = updated tendency of the tracers due to model physics units = kg kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = inout @@ -147,7 +177,7 @@ intent = in optional = F [ntcw] - standard_name = index_for_liquid_cloud_condensate + standard_name = index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array long_name = tracer index for cloud condensate (or liquid water) units = index dimensions = () @@ -155,7 +185,7 @@ intent = in optional = F [ntiw] - standard_name = index_for_ice_cloud_condensate + standard_name = index_of_cloud_ice_mixing_ratio_in_tracer_concentration_array long_name = tracer index for ice water units = index dimensions = () @@ -166,7 +196,7 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -175,7 +205,7 @@ standard_name = geopotential long_name = geopotential at model layer centers units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -243,8 +273,8 @@ intent = in optional = F [heat] - standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness - long_name = kinematic surface upward sensible heat flux + standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness_and_vegetation + long_name = kinematic surface upward sensible heat flux reduced by surface roughness and vegetation units = K m s-1 dimensions = (horizontal_loop_extent) type = real @@ -252,7 +282,7 @@ intent = in optional = F [evap] - standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness + standard_name = surface_upward_specific_humidity_flux long_name = kinematic surface upward latent heat flux units = kg kg-1 m s-1 dimensions = (horizontal_loop_extent) @@ -288,7 +318,7 @@ intent = in optional = F [rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -378,7 +408,7 @@ intent = out optional = F [dt] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = time step for physics units = s dimensions = () @@ -413,7 +443,7 @@ intent = in optional = F [dx] - standard_name = cell_size + standard_name = characteristic_grid_lengthscale long_name = size of the grid cell units = m dimensions = (horizontal_loop_extent) @@ -422,81 +452,91 @@ intent = in optional = F [lssav] - standard_name = flag_diagnostics + standard_name = flag_for_diagnostics long_name = logical flag for storing diagnostics units = flag dimensions = () type = logical intent = in [ldiag3d] - standard_name = flag_diagnostics_3D + standard_name = flag_for_diagnostics_3D long_name = flag for 3d diagnostic fields units = flag dimensions = () type = logical intent = in -[qdiag3d] - standard_name = flag_tracer_diagnostics_3D - long_name = flag for 3d tracer diagnostic fields - units = flag - dimensions = () - type = logical - intent = in [flag_for_pbl_generic_tend] - standard_name = flag_for_generic_planetary_boundary_layer_tendency + standard_name = flag_for_generic_tendency_due_to_planetary_boundary_layer long_name = true if GFS_PBL_generic should calculate tendencies units = flag dimensions = () type = logical intent = in [ntoz] - standard_name = index_for_ozone + standard_name = index_of_ozone_mixing_ratio_in_tracer_concentration_array long_name = tracer index for ozone mixing ratio units = index dimensions = () type = integer intent = in optional = F -[du3dt_PBL] - standard_name = cumulative_change_in_x_wind_due_to_PBL - long_name = cumulative change in x wind due to PBL - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[dv3dt_PBL] - standard_name = cumulative_change_in_y_wind_due_to_PBL - long_name = cumulative change in y wind due to PBL - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[dt3dt_PBL] - standard_name = cumulative_change_in_temperature_due_to_PBL - long_name = cumulative change in temperature due to PBL - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[dq3dt_PBL] - standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL - long_name = cumulative change in water vapor specific humidity due to PBL - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[do3dt_PBL] - standard_name = cumulative_change_in_ozone_mixing_ratio_due_to_PBL - long_name = cumulative change in ozone mixing ratio due to PBL - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) +[ntqv] + standard_name = index_of_specific_humidity_in_tracer_concentration_array + long_name = tracer index for water vapor (specific humidity) + units = index + dimensions = () + type = integer + intent = in + optional = F +[dtend] + standard_name = cumulative_change_of_state_variables + long_name = diagnostic tendencies for state variables + units = various + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_cumulative_change_processes) type = real kind = kind_phys intent = inout + optional = F +[dtidx] + standard_name = cumulative_change_of_state_variables_outer_index + long_name = index of state-variable and process in last dimension of diagnostic tendencies array AKA cumulative_change_index + units = index + dimensions = (number_of_tracers_plus_one_hundred,number_of_cumulative_change_processes) + type = integer + intent = in + optional = F +[index_of_process_pbl] + standard_name = index_of_subgrid_scale_vertical_mixing_process_in_cumulative_change_index + long_name = index of subgrid scale vertical mixing process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_temperature] + standard_name = index_of_temperature_in_cumulative_change_index + long_name = index of temperature in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_x_wind] + standard_name = index_of_x_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_y_wind] + standard_name = index_of_y_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/tracer_sanitizer.F90 b/physics/tracer_sanitizer.F90 deleted file mode 100644 index 668cf6edd..000000000 --- a/physics/tracer_sanitizer.F90 +++ /dev/null @@ -1,113 +0,0 @@ -module tracer_sanitizer - - use machine, only : kind_phys - - implicit none - - private - - public :: tracer_sanitizer_init, tracer_sanitizer_run, tracer_sanitizer_finalize - - real(kind=kind_phys), parameter :: zero = 0.0_kind_phys - real(kind=kind_phys), parameter :: qvmin = 1.0E-6_kind_phys - -contains - - subroutine tracer_sanitizer_init() - end subroutine tracer_sanitizer_init - -!> \section arg_table_tracer_sanitizer_run Argument Table -!! \htmlinclude tracer_sanitizer_run.html -!! - subroutine tracer_sanitizer_run(tracers, ntqv, ntcw, ntiw, ntrw, ntsw, ntgl, & - ntlnc, ntinc, ntrnc, ntsnc, ntgnc, errmsg, errflg) - - ! Interface variables - integer, intent(in ) :: ntqv, ntcw, ntiw, ntrw, ntsw, ntgl, & - ntlnc, ntinc, ntrnc, ntsnc, ntgnc - real(kind=kind_phys), intent(inout) :: tracers(:,:,:) - character(len=*), intent( out) :: errmsg - integer, intent( out) :: errflg - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - ! Water vapor specific humidity - if (ntqv>0) then - where (tracers(:,:,ntqv)0) then - where (tracers(:,:,ntcw)0) then - where (tracers(:,:,ntlnc)==zero) - tracers(:,:,ntlnc)=zero - end where - end if - end if - - ! Ice water - if (ntiw>0) then - where (tracers(:,:,ntiw)0) then - where (tracers(:,:,ntinc)==zero) - tracers(:,:,ntinc)=zero - end where - end if - end if - - ! Rain water - if (ntrw>0) then - where (tracers(:,:,ntrw)0) then - where (tracers(:,:,ntrnc)==zero) - tracers(:,:,ntrnc)=zero - end where - end if - end if - - ! Snow - if (ntsw>0) then - where (tracers(:,:,ntsw)0) then - where (tracers(:,:,ntsnc)==zero) - tracers(:,:,ntsnc)=zero - end where - end if - end if - - ! Graupel - if (ntgl>0) then - where (tracers(:,:,ntgl)0) then - where (tracers(:,:,ntgnc)==zero) - tracers(:,:,ntgnc)=zero - end where - end if - end if - - end subroutine tracer_sanitizer_run - - subroutine tracer_sanitizer_finalize() - end subroutine tracer_sanitizer_finalize - -end module tracer_sanitizer \ No newline at end of file diff --git a/physics/tracer_sanitizer.meta b/physics/tracer_sanitizer.meta deleted file mode 100644 index e41d5d03d..000000000 --- a/physics/tracer_sanitizer.meta +++ /dev/null @@ -1,124 +0,0 @@ -[ccpp-table-properties] - name = tracer_sanitizer - type = scheme - dependencies = machine.F - -######################################################################## - -[ccpp-arg-table] - name = tracer_sanitizer_run - type = scheme -[tracers] - standard_name = tracer_concentration_updated_by_physics - long_name = tracer concentration updated by physics - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) - type = real - kind = kind_phys - intent = inout - optional = F -[ntqv] - standard_name = index_for_water_vapor - long_name = tracer index for water vapor (specific humidity) - units = index - dimensions = () - type = integer - intent = in - optional = F -[ntcw] - standard_name = index_for_liquid_cloud_condensate - long_name = tracer index for cloud condensate (or liquid water) - units = index - dimensions = () - type = integer - intent = in - optional = F -[ntiw] - standard_name = index_for_ice_cloud_condensate - long_name = tracer index for ice water - units = index - dimensions = () - type = integer - intent = in - optional = F -[ntrw] - standard_name = index_for_rain_water - long_name = tracer index for rain water - units = index - dimensions = () - type = integer - intent = in - optional = F -[ntsw] - standard_name = index_for_snow_water - long_name = tracer index for snow water - units = index - dimensions = () - type = integer - intent = in - optional = F -[ntgl] - standard_name = index_for_graupel - long_name = tracer index for graupel - units = index - dimensions = () - type = integer - intent = in - optional = F -[ntlnc] - standard_name = index_for_liquid_cloud_number_concentration - long_name = tracer index for liquid number concentration - units = index - dimensions = () - type = integer - intent = in - optional = F -[ntinc] - standard_name = index_for_ice_cloud_number_concentration - long_name = tracer index for ice number concentration - units = index - dimensions = () - type = integer - intent = in - optional = F -[ntrnc] - standard_name = index_for_rain_number_concentration - long_name = tracer index for rain number concentration - units = index - dimensions = () - type = integer - intent = in - optional = F -[ntsnc] - standard_name = index_for_snow_number_concentration - long_name = tracer index for snow number concentration - units = index - dimensions = () - type = integer - intent = in - optional = F -[ntgnc] - standard_name = index_for_graupel_number_concentration - long_name = tracer index for graupel number concentration - units = index - dimensions = () - type = integer - intent = in - optional = F -[errmsg] - standard_name = ccpp_error_message - long_name = error message for error handling in CCPP - units = none - dimensions = () - type = character - kind = len=* - intent = out - optional = F -[errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag - dimensions = () - type = integer - intent = out - optional = F diff --git a/physics/ugwp_driver_v0.F b/physics/ugwp_driver_v0.F index c47079992..844acf722 100644 --- a/physics/ugwp_driver_v0.F +++ b/physics/ugwp_driver_v0.F @@ -1,266 +1,5 @@ -! - module sso_coorde -! -! specific to COORDE-2019 project OGW switches/sensitivity -! to diagnose SSO effects pgwd=1 (OGW is on) =0 (off) -! pgd4=4 (4 timse taub, control pgwd=1) -! - use machine, only: kind_phys - real(kind=kind_phys),parameter :: pgwd = 1.0_kind_phys - real(kind=kind_phys),parameter :: pgwd4 = 1.0_kind_phys - logical, parameter :: debugprint = .false. - end module sso_coorde -! -! -! Routine cires_ugwp_driver_v0 is replaced with cires_ugwp.F90/cires_ugwp_run in CCPP -#if 0 - subroutine cires_ugwp_driver_v0(me, master, - & im, levs, nmtvr, dtp, kdt, imx, do_ugwp, do_tofd, - & cdmbgwd, xlat, xlatd, sinlat, coslat, spgrid, - & ugrs, vgrs, tgrs, qgrs, prsi, prsl, prslk, - & phii, phil, del, hprime, oc, oa4, clx, theta, - & gamm, sigma, elvmax, sgh30, kpbl, - & dusfcg, dvsfcg, gw_dudt, gw_dvdt, gw_dtdt, gw_kdis, - & tau_tofd, tau_mtb, tau_ogw, tau_ngw, - & zmtb, zlwb, zogw, du3dt_mtb,du3dt_ogw, du3dt_tms,rdxzb, - & rain, ntke, tke, lprnt, ipr) -!----------------------------------------------------------- -! Part 1 "old-revised" gfs-gwdps_v0 or "old" gwdps (if do_ugwp=.false.) -! Part 2 non-stationary multi-wave GWs FV3GFS-v0 -! Part 3 Dissipative version of UGWP-tendency application -! (similar to WAM-2017) -!----------------------------------------------------------- - use machine, only : kind_phys - use physcons, only : con_cp, con_g, con_rd, con_rv, & - con_omega - - use ugwp_wmsdis_init, only : tamp_mpa, ilaunch - use sso_coorde, only : pgwd, pgwd4, debugprint - implicit none -!input - - integer, parameter :: kp = kind_phys - - integer, intent(in) :: me, master - integer, intent(in) :: im, levs, kdt, imx, nmtvr, ntke, ipr - - real(kind=kind_phys), intent(in) :: dtp, cdmbgwd(4) - logical :: do_ugwp, do_tofd, lprnt - integer, intent(in) :: kpbl(im) - real(kind=kind_phys), intent(in), dimension(im) :: xlat, xlatd - &, sgh30, sinlat, coslat, spgrid ! spgrid = tile-area - &, rain - - real(kind=kind_phys), intent(in), dimension(im,levs) :: - &, ugrs, vgrs, tgrs, qgrs, prsl, prslk, phil, del - real(kind=kind_phys), intent(in), dimension(im,levs+1) :: - & phii, prsi - -! real(kind=kind_phys), intent(in) :: oro_stat(im,nmtvr) - real(kind=kind_phys), intent(in), dimension(im) :: hprime, oc - &, theta, gamm, sigma, elvmax - real(kind=kind_phys), intent(in), dimension(im,4) :: oa4, clx - real(kind=kind_phys), intent(in) :: tke(im,levs) -!out - real(kind=kind_phys), dimension(im,levs) :: gw_dudt, gw_dvdt - &, gw_dTdt, gw_kdis - -!-----locals + diagnostics output - - real(kind=kind_phys), dimension(im,levs) :: Pdvdt, Pdudt - &, Pdtdt, Pkdis, ed_dudt, ed_dvdt, ed_dTdt - - real(kind=kind_phys), dimension(im) :: dusfcg, dvsfcg - - real(kind=kind_phys), dimension(im) :: rdxzb, zmtb, - & zlwb, zogw, tau_mtb, tau_ogw, tau_tofd, tau_ngw, turb_fac - real(kind=kind_phys), dimension(im,levs) :: du3dt_mtb, du3dt_ogw - &, du3dt_tms - real(kind=kind_phys), dimension(im) :: tem - -! locals - real(kind=kind_phys) :: rfac, tx1 - integer :: i, j, k, ix -! -! define hprime, oc, oa4, clx, theta, sigma, gamm, elvmax -! -! real(kind=kind_phys), dimension(im) :: hprime, -! & oc, theta, sigma, gamm, elvmax -! real(kind=kind_phys), dimension(im, 4) :: clx, oa4 -! -! switches that activate impact of OGWs and NGWs along with eddy diffusion -! - real(kind=kind_phys), parameter :: pogw=1.0_kp, pngw=1.0_kp - &, pked=1.0_kp, zero=0.0_kp - &, ompked=1.0_kp-pked -! -! switches for GW-effects: pogw=1 (OGWs) pngw=1 (NGWs) pked=1 (eddy mixing) -! - if (me == master .and. kdt < 2 .and. debugprint) then - print * - write(6,*) 'FV3GFS execute ugwp_driver_v0 ' -! write(6,*) 'FV3GFS execute ugwp_driver_v0 nmtvr=', nmtvr - write(6,*) ' COORDE EXPER pogw = ' , pogw - write(6,*) ' COORDE EXPER pgwd = ' , pgwd - write(6,*) ' COORDE EXPER pgwd4 = ', pgwd4 - print * - endif - - do i=1,im - zlwb(i) = zero - enddo -! -! 1) ORO stationary GWs -! ------------------ - - if (do_ugwp .and. nmtvr == 14) then ! calling revised old GFS gravity wave drag - CALL GWDPS_V0(IM, levs, imx, do_tofd, - & Pdvdt, Pdudt, Pdtdt, Pkdis, - & ugrs , vgrs, tgrs, qgrs,KPBL, prsi,del,prsl, - & prslk, phii, phil, DTP,KDT, - & sgh30, HPRIME, OC, OA4, CLX, THETA, - & SIGMA, GAMM, ELVMAX, - & DUSFCg, DVSFCg, xlatd, sinlat, coslat, spgrid, - & cdmbgwd(1:2), me, master, rdxzb, - & con_g, con_omega, - & zmtb, zogw, tau_mtb, tau_ogw, tau_tofd, - & du3dt_mtb, du3dt_ogw, du3dt_tms) -! - if (me == master .and. kdt < 2 .and. debugprint) then - print * - write(6,*) 'FV3GFS finished gwdps_v0 in ugwp_driver_v0 ' - print * - endif - else ! calling old GFS gravity wave drag as is - do k=1,levs - do i=1,im - pdvdt(i,k) = zero - pdudt(i,k) = zero - pdtdt(i,k) = zero - pkdis(i,k) = zero - enddo - enddo - if (cdmbgwd(1) > zero.or. cdmbgwd(2) > zero) then - call gwdps(im, im, im, levs, Pdvdt, Pdudt, Pdtdt & - &, ugrs, vgrs, tgrs, qgrs & - &, kpbl, prsi, del, prsl, prslk, phii, phil, dtp, kdt& - &, hprime, oc, oa4, clx, theta, sigma, gamm & - &, elvmax, dusfcg, dvsfcg & - &, con_g, con_cp, con_rd, con_rv, imx & - &, nmtvr, cdmbgwd(1:2), me, lprnt, ipr, rdxzb) - endif - - tau_mtb = zero ; tau_ogw = zero ; tau_tofd = zero - du3dt_mtb = zero ; du3dt_ogw = zero ; du3dt_tms= zero - endif -! - if (cdmbgwd(3) > zero) then -! 2) non-stationary GWs with GEOS-5/MERRA GW-forcing -! ---------------------------------------------- -!-------- -! GMAO GEOS-5/MERRA GW-forcing lat-dep -!-------- - call slat_geos5_tamp(im, tamp_mpa, xlatd, tau_ngw) - -! call slat_geos5(im, xlatd, tau_ngw) -! - if (abs(1.0_kp-cdmbgwd(3)) > 1.0e-6_kp) then - if (cdmbgwd(4) > zero) then - do i=1,im - turb_fac(i) = zero - tem(i) = zero - enddo - if (ntke > 0) then - do k=1,(levs+levs)/3 - do i=1,im - turb_fac(i) = turb_fac(i) + del(i,k) * tke(i,k) - tem(i) = tem(i) + del(i,k) - enddo - enddo - do i=1,im - turb_fac(i) = turb_fac(i) / tem(i) - enddo - endif - rfac = 86400000 / dtp - do i=1,im - tx1 = cdmbgwd(4)*min(10.0, max(turb_fac(i),rain(i)*rfac)) - tau_ngw(i) = tau_ngw(i) * max(0.1_kp, min(5.0_kp, tx1)) - enddo - endif - do i=1,im - tau_ngw(i) = tau_ngw(i) * cdmbgwd(3) - enddo - endif -! - call fv3_ugwp_solv2_v0(im, levs, dtp, - & tgrs, ugrs, vgrs, qgrs, prsl, prsi, - & phil, xlatd, sinlat, coslat, - & gw_dudt, gw_dvdt, gw_dTdt, gw_kdis, - & tau_ngw, me, master, kdt) - - if (me == master .and. kdt < 2 .and. debugprint) then - print * - write(6,*)'FV3GFS finished fv3_ugwp_v0 in ugwp_driver_v0 ' - write(6,*) ' non-stationary GWs with GMAO/MERRA GW-forcing ' - print * - endif - do k=1,levs - do i=1,im - gw_dtdt(i,k) = pngw*gw_dtdt(i,k) + pogw*Pdtdt(i,k) - gw_dudt(i,k) = pngw*gw_dudt(i,k) + pogw*Pdudt(i,k) - gw_dvdt(i,k) = pngw*gw_dvdt(i,k) + pogw*Pdvdt(i,k) - gw_kdis(i,k) = pngw*gw_kdis(i,k) + pogw*Pkdis(i,k) - enddo - enddo - else - do k=1,levs - do i=1,im - gw_dtdt(i,k) = Pdtdt(i,k) - gw_dudt(i,k) = Pdudt(i,k) - gw_dvdt(i,k) = Pdvdt(i,k) - gw_kdis(i,k) = Pkdis(i,k) - enddo - enddo - endif - - if (pogw == zero) then -! zmtb = 0.; zogw =0. - tau_mtb = zero ; tau_ogw = zero ; tau_tofd = zero - du3dt_mtb = zero ; du3dt_ogw = zero ; du3dt_tms= zero - endif - - return - -!============================================================================= -! make "ugwp eddy-diffusion" update for gw_dtdt/gw_dudt/gw_dvdt by solving -! vert diffusion equations & update "Statein%tgrs, Statein%ugrs, Statein%vgrs" -!============================================================================= -! -! 3) application of "eddy"-diffusion to "smooth" UGWP-related tendencies -!------------------------------------------------------------------------------ - do k=1,levs - do i=1,im - ed_dudt(i,k) = zero ; ed_dvdt(i,k) = zero ; ed_dtdt(i,k) = zero - enddo - enddo - - call edmix_ugwp_v0(im, levs, dtp, - & tgrs, ugrs, vgrs, qgrs, del, - & prsl, prsi, phil, prslk, - & gw_dudt, gw_dvdt, gw_dTdt, gw_kdis, - & ed_dudt, ed_dvdt, ed_dTdt, - & me, master, kdt ) - - do k=1,levs - do i=1,im - gw_dtdt(i,k) = gw_dtdt(i,k)*ompked + ed_dtdt(i,k)*pked - gw_dvdt(i,k) = gw_dvdt(i,k)*ompked + ed_dvdt(i,k)*pked - gw_dudt(i,k) = gw_dudt(i,k)*ompked + ed_dudt(i,k)*pked - enddo - enddo +!>\file ugwp_driver_v0.F - end subroutine cires_ugwp_driver_v0 -#endif ! !===================================================================== ! @@ -301,12 +40,12 @@ SUBROUTINE GWDPS_V0(IM, km, imx, do_tofd, !---------------------------------------- USE MACHINE , ONLY : kind_phys - use ugwp_common , only : rgrav, grav, cpd, rd, rv, rcpd, rcpd2 + use ugwp_common_v0,only : rgrav, grav, cpd, rd, rv, rcpd, rcpd2 &, pi, rad_to_deg, deg_to_rad, pi2 &, rdi, gor, grcp, gocp, fv, gr2 &, bnv2min, dw2min, velmin, arad - use ugwp_oro_init, only : rimin, ric, efmin, efmax + use ugwpv0_oro_init, only : rimin, ric, efmin, efmax &, hpmax, hpmin, sigfaci => sigfac &, dpmin, minwnd, hminmt, hncrit &, RLOLEV, GMAX, VELEPS, FACTOP @@ -315,11 +54,11 @@ SUBROUTINE GWDPS_V0(IM, km, imx, do_tofd, &, cdmb, cleff, fcrit_gfs, fcrit_mtb &, n_tofd, ze_tofd, ztop_tofd - use cires_ugwp_module, only : kxw, max_kdis, max_axyz - use sso_coorde, only : pgwd, pgwd4, debugprint + use cires_ugwpv0_module, only : kxw, max_kdis, max_axyz + !---------------------------------------- implicit none - integer, parameter :: kp = kind_phys + integer, parameter :: kp = kind_phys character(len=8) :: strsolver='PSS-1986' ! current operational solver or 'WAM-2017' integer, intent(in) :: im, km, imx, kdt integer, intent(in) :: me, master @@ -452,22 +191,9 @@ SUBROUTINE GWDPS_V0(IM, km, imx, do_tofd, ! sigmin = 2.*hpmin/dsmax !dxres ! Moorthi - this will not reproduce sigmin = 2.*hpmin/dxres !dxres -! if (kdt == 1) then -! print *, sgrmax, sgrmin , ' min-max sparea ' -! print *, 'sigmin-hpmin-dsmax', sigmin, hpmin, dsmax -! print *, 'dxres/dsmax ', dxres, dsmax -! print *, ' shilmin gammin ', shilmin, gammin -! endif - kxridge = float(IMX)/arad * cdmbgwd(2) - if (me == master .and. kdt == 1 .and. debugprint) then - print *, ' gwdps_v0 kxridge ', kxridge - print *, ' gwdps_v0 scale2 ', cdmbgwd(2) - print *, ' gwdps_v0 IMX ', imx - print *, ' gwdps_v0 GAM_MIN ', gammin - print *, ' gwdps_v0 SSO_MIN ', sso_min - endif + kxridge = float(IMX)/arad * cdmbgwd(2) do i=1,im idxzb(i) = 0 @@ -543,9 +269,7 @@ SUBROUTINE GWDPS_V0(IM, km, imx, do_tofd, endif enddo - IF (npt == 0 .and. debugprint) then -! print *, 'oro-npt = 0 elvmax ', maxval(elvmaxd), hminmt -! print *, 'oro-npt = 0 hprime ', maxval(hprime), hpmin + IF (npt == 0) then RETURN ! No gwd/mb calculation done endif @@ -918,16 +642,16 @@ SUBROUTINE GWDPS_V0(IM, km, imx, do_tofd, kxridge = 1.0 / sqrt(sparea(J)) XLINV(I) = XLINGFS !or max(kxridge, inv_b2eff) ! 6.28/Lx ..0.5*sigma(j)/heff = 1./Lridge taulin(i) = 0.5*ROLL(I)*XLINV(I)*BNV*ULOW(I)* - & heff*heff*pgwd4 + & heff*heff if ( FR > fcrit_gfs ) then TAUB(I) = XLINV(I) * ROLL(I) * ULOW(I) * ULOW(I) - & * ULOW(I) * GFOBNV * EFACT *pgwd4 ! nonlinear FLUX Tau0...XLINV(I) + & * ULOW(I) * GFOBNV * EFACT ! nonlinear FLUX Tau0...XLINV(I) ! else ! TAUB(I) = XLINV(I) * ROLL(I) * ULOW(I) * ULOW(I) - & * ULOW(I) * GFOBNV * EFACT *pgwd4 + & * ULOW(I) * GFOBNV * EFACT ! ! TAUB(I) = taulin(i) ! linear flux for FR <= fcrit_gfs ! @@ -1070,7 +794,6 @@ SUBROUTINE GWDPS_V0(IM, km, imx, do_tofd, call oro_wam_2017(im, km, npt, ipt, kref, kdt, me, master, & dtp, dxres, taub, u1, v1, t1, xn, yn, bnv2, ro, prsi,prsL, - & con_g, con_omega, & del, sigma, hprime, gamma, theta, & sinlat, xlatd, taup, taud, pkdis) @@ -1083,9 +806,8 @@ SUBROUTINE GWDPS_V0(IM, km, imx, do_tofd, ! --------------------------- IF( do_tofd ) then axtms(:,:) = 0.0 ; aytms(:,:) = 0.0 - if ( kdt == 1 .and. me == 0 .and. debugprint) then - print *, 'VAY do_tofd from surface to ', ztop_tofd - endif + + DO I = 1,npt J = ipt(i) zpbl =rgrav*phil( j, kpbl(j) ) @@ -1099,8 +821,8 @@ SUBROUTINE GWDPS_V0(IM, km, imx, do_tofd, vp1(k) = v1(j,k) enddo - call ugwp_tofd1d(km, sigflt, elvmaxd(j), zsurf, zpbl, - & up1, vp1, zpm, utofd1, vtofd1, epstofd1, krf_tofd1) + call ugwpv0_tofd1d(km, sigflt, elvmaxd(j), zsurf, zpbl, + & up1, vp1, zpm, utofd1, vtofd1, epstofd1, krf_tofd1) do k=1,km axtms(j,k) = utofd1(k) @@ -1151,8 +873,8 @@ SUBROUTINE GWDPS_V0(IM, km, imx, do_tofd, ! OGW-s above blocking height ! TAUD(I,K) = TAUD(I,K) * DTFAC(I) - DTAUX = TAUD(I,K) * XN(I) * pgwd - DTAUY = TAUD(I,K) * YN(I) * pgwd + DTAUX = TAUD(I,K) * XN(I) + DTAUY = TAUD(I,K) * YN(I) Pdvdt(j,k) = DTAUY +Pdvdt(j,k) Pdudt(j,k) = DTAUX +Pdudt(j,k) @@ -1185,97 +907,11 @@ SUBROUTINE GWDPS_V0(IM, km, imx, do_tofd, RETURN - -!============ debug ------------------------------------------------ - if (kdt <= 2 .and. me == 0 .and. debugprint) then - print *, 'vgw-oro done gwdps_v0 in ugwp-v0 step-proc ', kdt, me -! - print *, maxval(pdudt)*86400., minval(pdudt)*86400, 'vgw_axoro' - print *, maxval(pdvdt)*86400., minval(pdvdt)*86400, 'vgw_ayoro' -! print *, maxval(kdis), minval(kdis), 'vgw_kdispro m2/sec' - print *, maxval(pdTdt)*86400., minval(pdTdt)*86400,'vgw_epsoro' - print *, maxval(zmtb), ' z_mtb ', maxval(tau_mtb), ' tau_mtb ' - print *, maxval(zogw), ' z_ogw ', maxval(tau_ogw), ' tau_ogw ' -! print *, maxval(tau_tofd), ' tau_tofd ' -! print *, maxval(axtms)*86400., minval(axtms)*86400, 'vgw_axtms' -! print *,maxval(dudt_mtb)*86400.,minval(dudt_mtb)*86400,'vgw_axmtb' - if (maxval(abs(pdudt))*86400. > 100.) then - - print *, maxval(u1), minval(u1), ' u1 gwdps-v0 ' - print *, maxval(v1), minval(v1), ' v1 gwdps-v0 ' - print *, maxval(t1), minval(t1), ' t1 gwdps-v0 ' - print *, maxval(q1), minval(q1), ' q1 gwdps-v0 ' - print *, maxval(del), minval(del), ' del gwdps-v0 ' - print *, maxval(phil)*rgrav,minval(phil)*rgrav, 'zmet' - print *, maxval(phii)*rgrav,minval(phii)*rgrav, 'zmeti' - print *, maxval(prsi), minval(prsi), ' prsi ' - print *, maxval(prsL), minval(prsL), ' prsL ' - print *, maxval(RO), minval(RO), ' RO-dens ' - print *, maxval(bnv2(1:npt,:)), minval(bnv2(1:npt,:)),' BNV2 ' - print *, maxval(kpbl), minval(kpbl), ' kpbl ' - print *, maxval(sgh30), maxval(hprime), maxval(elvmax),'oro-d' - print * - do i =1, npt - j= ipt(i) - print *,zogw(J)/hprime(j), zmtb(j)/hprime(j), - & phil(j,1)/9.81, nint(hprime(j)/sigma(j)) -! -!.................................................................... -! -! zogw/hp=5.9 zblk/hp=10.7 zm=11.1m ridge/2=2,489m/9,000m -! from 5 to 20 km , we need to count for "ridges" > dx/4 ~ 15 km -! we must exclude blocking by small ridges -! VAY-kref < iblk zogw-lev 15 block-level: 39 -! -! velmin => 1.0, 0.01, 0.1 etc.....unification of wind limiters -! MAX(SQRT(U1(J,K)*U1(J,K) + V1(J,K)*V1(J,K)), minwnd) -! MAX(DW2,DW2MIN) * RDZ * RDZ -! ULOW(I) = MAX(SQRT(UBAR(I)*UBAR(I) + VBAR(I)*VBAR(I)), 1.0) -! TEM = MAX(VELCO(I,K)*VELCO(I,K), 0.1) -! TEMV = 1.0 / max(VELCO(I,K), 0.01) -! & * max(VELCO(I,K),0.01) -!.................................................................... - enddo - print * - stop - endif - endif - -! - RETURN -!--------------------------------------------------------------- -! review of OLD-GFS code 2017/18 most substantial changes -! a) kref > idxzb if idxzb > KPBL "OK" clipped-hill for OGW -! b) tofd -sgh30 "OK" -! -! c) FR < Frc linear theory for taub-specification -! -! d) solver of Palmer et al. (1987) => Linsat of McFarlane -! -!--------------------------------------------------------------- end subroutine gwdps_v0 !=============================================================================== -! use fv3gfs-v0 -! first beta version of ugwp for fv3gfs-128 -! cires/swpc - jan 2018 -! non-tested wam ugwp-solvers in fv3gfs: "lsatdis", "dspdis", "ado99dis" -! they reqiure extra-work to put them in with intializtion and namelists -! next will be lsatdis for both fv3wam & fv3gfs-128l implementations -! with (a) stochastic-deterministic propagation solvers for wave packets/spectra -! (b) gw-sources: oro/convection/dyn-instability (fronts/jets/pv-anomalies) -! (c) guidance from high-res runs for GW sources and res-aware tune-ups -!23456 -! -! call gwdrag_wam(1, im, ix, km, ksrc, dtp, -! & xlat, gw_dudt, gw_dvdt, taux, tauy) -! call fv3_ugwp_wms17(kid1, im, ix, km, ksrc_ifs, dtp, -! & adt,adu,adv,prsl,prsi,phil,xlat, gw_dudt, gw_dvdt, gw_dtdt, gw_ked, -! & taux,tauy,grav, amol_i, me, lstep_first ) -! -! !23456============================================================================== !>\ingroup cires_ugwp_run @@ -1297,21 +933,19 @@ subroutine fv3_ugwp_solv2_v0(klon, klev, dtime, ! use machine, only : kind_phys - use ugwp_common , only : rgrav, grav, cpd, rd, rv + use ugwp_common_v0 , only : rgrav, grav, cpd, rd, rv &, omega2, rcpd2, pi, pi2, fv &, rad_to_deg, deg_to_rad &, rdi, gor, grcp, gocp &, bnv2min, dw2min, velmin, gr2 ! - use ugwp_wmsdis_init, only : hpscale, rhp2, bv2min, gssec + use ugwpv0_wmsdis_init, only : hpscale, rhp2, bv2min, gssec &, v_kxw, v_kxw2, tamp_mpa, zfluxglob &, maxdudt, gw_eff, dked_min &, nslope, ilaunch, zmsi &, zci, zdci, zci4, zci3, zci2 &, zaz_fct, zcosang, zsinang - &, nwav, nazd, zcimin, zcimax - - use sso_coorde, only : debugprint + &, nwav, nazd, zcimin, zcimax ! implicit none !23456 @@ -1426,26 +1060,7 @@ subroutine fv3_ugwp_solv2_v0(klon, klev, dtime, phil(j,k) = philg(j,k) * rgrav enddo enddo -!----------------------------------------------------------- -! also other options to alter tropical values -! tamp = 100.e-3*1.e3 = 100 mpa -! vay-2017 zfluxglob=> lat-dep here from geos-5/merra-2 -!----------------------------------------------------------- -! call slat_geos5_tamp(klon, tamp_mpa, xlatd, tau_ngw) - -! phil = philg*rgrav - -! rcpd = 1.0/(grav/cpd) ! 1/[g/cp] -! grav2cpd = grav*grav/cpd ! g*(g/cp)= g^2/cp - - if (kdt ==1 .and. mpi_id == master .and. debugprint) then - print *, maxval(tm1), minval(tm1), 'vgw: temp-res ' - print *, 'ugwp-v0: zcimin=' , zcimin - print *, 'ugwp-v0: zcimax=' , zcimax - print * - endif -! !================================================= do iazi=1, nazd do jk=1,klev @@ -1589,7 +1204,7 @@ subroutine fv3_ugwp_solv2_v0(klon, klev, dtime, enddo enddo - endif ! for slopes + endif ! for slopes ! ! normalize momentum flux at the src-level ! ------------------------------ @@ -1866,257 +1481,7 @@ subroutine fv3_ugwp_solv2_v0(klon, klev, dtime, enddo ! !--------------------------------------------------------------------------- -! - if (kdt == 1 .and. mpi_id == master .and. debugprint) then - print *, 'vgw done ' -! - print *, maxval(pdudt)*86400, minval(pdudt)*86400, 'vgw ax' - print *, maxval(pdvdt)*86400, minval(pdvdt)*86400, 'vgw ay' - print *, maxval(dked)*1., minval(dked)*1, 'vgw keddy m2/sec' - print *, maxval(pdtdt)*86400, minval(pdtdt)*86400,'vgw eps' -! -! print *, ' ugwp -heating rates ' - endif - return end subroutine fv3_ugwp_solv2_v0 -!------------------------------------------------------------------------------- -! -! Part-3 of UGWP-V01 Dissipative (eddy) effects of UGWP it will be activated -! after tests of OGW (new revision) and NGW with MERRA-2 forcing. -! -!------------------------------------------------------------------------------- - subroutine edmix_ugwp_v0(im, levs, dtp, - & t1, u1, v1, q1, del, - & prsl, prsi, phil, prslk, - & pdudt, pdvdt, pdTdt, pkdis, - & ed_dudt, ed_dvdt, ed_dTdt, - & me, master, kdt ) -! - use machine, only : kind_phys - use ugwp_common , only : rgrav, grav, cpd, rd, rdi, fv -! &, pi, rad_to_deg, deg_to_rad, pi2 - &, bnv2min, velmin, arad - - implicit none - integer, intent(in) :: me, master, kdt - integer, intent(in) :: im, levs - real(kind=kind_phys), intent(in) :: dtp - real(kind=kind_phys), intent(in), dimension(im,levs) :: - & u1, v1, t1, q1, del, prsl, prslk, phil -! - real(kind=kind_phys), intent(in),dimension(im,levs+1):: prsi - real(kind=kind_phys),dimension(im,levs) :: pdudt, pdvdt, pdTdt - real(kind=kind_phys),dimension(im,levs) :: pkdis -! -! out -! - real(kind=kind_phys),dimension(im,levs) :: ed_dudt, ed_dvdt - real(kind=kind_phys),dimension(im,levs) :: ed_dTdt -! -! locals -! - integer :: i, j, k -!------------------------------------------------------------------------ -! solving 1D-vertical eddy diffusion to "smooth" -! GW-related tendencies: du/dt, dv/dt, d(PT)/dt -! we need to use sum of molecular + eddy terms including turb-part -! of PBL extended to the model top, because "phys-tend" dx/dt -! should be smoothed as "entire" fields therefore one should -! first estimate and collect "effective" diffusion and applied -! it to each part of tendency or "sum of tendencies + Xdyn" -! this "diffusive-way" is tested with UGWP-tendencies -! forced by various wave sources. X' =dx/dt *dt -! d(X + X')/dt = K*diff(X + X') => -! -! wave1 dX'/dt = Kw * diff(X')... eddy part "Kwave" on wave-part -! turb2 dX/dt = Kturb * diff(X) ... resolved scale mixing "Kturb" like PBL -! we may assume "zero-GW"-tendency at the top lid and "zero" flux -! or "vertical gradient" near the surface -! -! 1-st trial w/o PBL interactions: add dU, dV dT tendencies -! compute BV, SHR2, Ri => Kturb, Kturb + Kwave => Apply it to "X_Tend +X " -! ed_X = X_ed - X => final eddy tendencies -!--------------------------------------------------------------------------- -! rzs=30m dk = rzs*rzs*sqrt(shr2(i,k)) -! Ktemp = dk/(1+5.*ri)**2 Kmom = Pr*Ktemp -! - real(kind=kind_phys) :: Sw(levs), Sw1(levs), Fw(levs), Fw1(levs) - real(kind=kind_phys) :: Km(levs), Kpt(levs), Pt(levs), Ptmap(levs) - real(kind=kind_phys) :: rho(levs), rdp(levs), rdpm(levs-1) - real(kind=kind_phys),dimension(levs) :: ktur, vumol, up, vp, tp - real(kind=kind_phys),dimension(levs) :: bn2, shr2, ksum - real(kind=kind_phys) :: eps_shr, eps_bn2, eps_dis - real(kind=kind_phys) :: rdz , uz, vz, ptz -! ------------------------------------------------------------------------- -! Prw*Lsat2 =1, for GW-eddy diffusion Pr_wave = Kv/Kt -! Pr_wave ~1/Lsat2 = 1/Frcit2 = 2. => Lsat2 = 1./2 (Frc ~0.7) -! m*u'/N = u'/{c-U) = h'N/(c-U) = Lsat = Fcrit -! > PBL: 0.25 < prnum = 1.0 + 2.1*ri < 4 -! monin-edmf parameter(rlam=30.0,vk=0.4,vk2=vk*vk) rlamun=150.0 -! - real(kind=kind_phys), parameter :: iPr_pt = 0.5, dw2min = 1.e-4 - real(kind=kind_phys), parameter :: lturb = 30., sc2 = lturb*lturb - real(kind=kind_phys), parameter :: ulturb=150.,sc2u=ulturb* ulturb - real(kind=kind_phys), parameter :: ric =0.25 - real(kind=kind_phys), parameter :: rimin = -10., prmin = 0.25 - real(kind=kind_phys), parameter :: prmax = 4.0 - real(kind=kind_phys), parameter :: hps = 7000., h4 = 0.25/hps - real(kind=kind_phys), parameter :: kedmin = 0.01, kedmax = 250. - - - real(kind=kind_phys) :: rdtp, rineg, kamp, zmet, zgrow - real(kind=kind_phys) :: stab, stab_dt, dtstab, ritur - integer :: nstab - real(kind=kind_phys) :: w1, w2, w3 - rdtp = 1./dtp - nstab = 1 - stab_dt = 0.9999 - - do i =1, im - - rdp(1:levs) = grav/del(i, 1:levs) - - up(1:levs) = u1(i,1:levs) +pdudt(i,1:levs)*dtp - vp(1:levs) = v1(i,1:levs) +pdvdt(i,1:levs)*dtp - tp(1:levs) = t1(i,1:levs) +pdTdt(i,1:levs)*dtp - Ptmap(1:levs) = (1.+fv*q1(i,1:levs))/prslk(i,1:levs) - rho(1:levs) = rdi*prsl(i, 1:levs)/tp(1:levs) - Pt(1:levs) = tp(1:levs)*Ptmap(1:levs) - - do k=1, levs-1 - rdpm(k) = grav/(prsl(i,k)-prsl(i,k+1)) - rdz = .5*rdpm(k)*(rho(k)+rho(k+1)) - uz = up(k+1)-up(k) - vz = vp(k+1)-vp(k) - ptz =2.*(pt(k+1)-pt(k))/(pt(k+1)+pt(k)) - shr2(k) = rdz*rdz*(max(uz*uz+vz*vz, dw2min)) - bn2(k) = grav*rdz*ptz - zmet = phil(j,k)*rgrav - zgrow = exp(zmet*h4) - if ( bn2(k) < 0. ) then -! -! adjust PT-profile to bn2(k) = bnv2min -- neutral atmosphere -! adapt "pdtdt = (Ptadj-Ptdyn)/Ptmap" -! -! print *,' UGWP-V0 unstab PT(z) via gwdTdt ', bn2(k), k - - rineg = bn2(k)/shr2(k) - bn2(k) = max(bn2(k), bnv2min) - kamp = sqrt(shr2(k))*sc2u *zgrow - ktur(k) =kamp* (1+8.*(-rineg)/(1+1.746*sqrt(-rineg))) - endif - ritur = max(bn2(k)/shr2(k), rimin) - if (ritur > 0. ) then - kamp = sqrt(shr2(k))*sc2 *zgrow - w1 = 1./(1. + 5*ritur) - ktur(k)= kamp * w1 * w1 - endif - vumol(k) = 2.e-5 *exp(zmet/hps) - ksum(k) =ktur(k)+Pkdis(i,k)+vumol(k) - ksum(k) = max(ksum(k), kedmin) - ksum(k) = min(ksum(k), kedmax) - stab = 2.*ksum(k)*rdz*rdz*dtp - if ( stab >= 1.0 ) then - stab_dt = max(stab_dt, stab) - endif - enddo - nstab = max(1, nint(stab_dt)+1) - dtstab = dtp / float(nstab) - ksum(levs) = ksum(levs-1) - Fw(1:levs) = pdudt(i, 1:levs) - Fw1(1:levs) = pdvdt(i, 1:levs) - Km(1:levs) = ksum(1:levs) * rho(1:levs)* rho(1:levs) - - do j=1, nstab - call diff_1d_wtend(levs, dtstab, Fw, Fw1, Km, - & rdp, rdpm, Sw, Sw1) - Fw = Sw - Fw1 = Sw1 - enddo - - ed_dudt(i,:) = Sw - ed_dvdt(i,:) = Sw1 - - Pt(1:levs) = t1(i,1:levs)*Ptmap(1:levs) - Kpt = Km*iPr_pt - Fw(1:levs) = pdTdt(i, 1:levs)*Ptmap(1:levs) - do j=1, nstab - call diff_1d_ptend(levs, dtstab, Fw, Kpt, rdp, rdpm, Sw) - Fw = Sw - enddo - ed_dtdt(i,1:levs) = Sw(1:levs)/Ptmap(1:levs) - - enddo - - end subroutine edmix_ugwp_v0 - - subroutine diff_1d_wtend(levs, dt, F, F1, Km, rdp, rdpm, S, S1) - use machine, only: kind_phys - implicit none - integer :: levs - real(kind=kind_phys) :: dt - real(kind=kind_phys) :: S(levs), S1(levs), F(levs), F1(levs) - real(kind=kind_phys) :: Km(levs), rdp(levs), rdpm(levs-1) - integer :: i, k - real(kind=kind_phys) :: Kp1, ad, cd, bd -! real(kind=kind_phys) :: km1, Kp1, ad, cd, bd -! S(:) = 0.0 ; S1(:) = 0.0 -! -! explicit diffusion solver -! - k = 1 -! km1 = 0. ; ad =0. - ad =0. - kp1 = .5*(Km(k)+Km(k+1)) - cd = rdp(1)*rdpm(1)*kp1*dt - bd = 1. - cd - ad -! S(k) = cd*F(k+1) + ad *F(k-1) + bd *F(k) - S(K) = F(k) - S1(K) = F1(k) - do k=2, levs-1 - ad = cd - kp1 = .5*(Km(k)+Km(k+1)) - cd = rdp(k)*rdpm(k)*kp1*dt - bd = 1.-(ad +cd) - S(k) = cd*F(k+1) + ad *F(k-1) + bd *F(k) - S1(k) = cd*F1(k+1) + ad *F1(k-1) + bd *F1(k) - enddo - k = levs - S(k) = F(k) - S1(k) = F1(k) - end subroutine diff_1d_wtend - - subroutine diff_1d_ptend(levs, dt, F, Km, rdp, rdpm, S) - use machine, only: kind_phys - implicit none - integer :: levs - real(kind=kind_phys) :: dt - real(kind=kind_phys) :: S(levs), S1(levs), F(levs), F1(levs) - real(kind=kind_phys) :: Km(levs), rdp(levs), rdpm(levs-1) - integer :: i, k - real(kind=kind_phys) :: Kp1, ad, cd, bd -! real(kind=kind_phys) :: km1, Kp1, ad, cd, bd -! -! explicit "eddy" smoother for tendencies -! - - k = 1 -! km1 = 0. ; ad =0. - ad =0. - kp1 = .5*(Km(k)+Km(k+1)) - cd = rdp(1)*rdpm(1)*kp1*dt - bd = 1. -(cd +ad) -! S(k) = cd*F(k+1) + ad *F(k-1) + bd *F(k) - S(K) = F(k) - do k=2, levs-1 - ad = cd - kp1 = .5*(Km(k)+Km(k+1)) - cd = rdp(k)*rdpm(k)*kp1*dt - bd = 1.-(ad +cd) - S(k) = cd*F(k+1) + ad *F(k-1) + bd *F(k) - enddo - k = levs - S(k) = F(k) - end subroutine diff_1d_ptend + diff --git a/physics/ugwpv1_gsldrag.F90 b/physics/ugwpv1_gsldrag.F90 new file mode 100644 index 000000000..104fc8e3f --- /dev/null +++ b/physics/ugwpv1_gsldrag.F90 @@ -0,0 +1,736 @@ +!> \file ugwpv1_gsldrag.F90 +!! This introduces two gravity wave drag schemes ugwpv1/CIRES and GSL/drag_suite.F90 under "ugwpv1_gsldrag" suite: +!! 1) The "V1 CIRES UGWP" scheme as tested in the FV3GFSv16-127L atmosphere model and workflow, which includes: +!! a) the orograhic gravity wave drag, flow blocking scheme and TOFD (Beljaars et al, 2004). +!! b) the v1 CIRE ugwp non-stationary GW scheme, new revision that generate realistic climate of FV3GFS-127L +!! in the strato-mesosphere in the multi-year simulations (Annual cycles, SAO and QBO in th tropical dynamics). +!! 2) The GSL orographic drag suite (drag_suite.F90), as implmeneted in the RAP/HRRR, which includes: +!! a) large-scale gravity wave drag and low-level flow blocking -- active at horizontal scales +!! down to ~5km (Kim and Arakawa, 1995 \cite kim_and_arakawa_1995; Kim and Doyle, 2005 \cite kim_and_doyle_2005) +!! b) small-scale gravity wave drag scheme -- active typically in stable PBL at horizontal grid resolutions down to ~1km +!! (Steeneveld et al, 2008 \cite steeneveld_et_al_2008; Tsiringakis et al, 2017 \cite tsiringakis_et_al_2017) +!! c) turbulent orographic form drag -- active at horizontal grid ersolutions down to ~1km +!! (Beljaars et al, 2004 \cite beljaars_et_al_2004) +!! See Valery Yudin's presentation at 2020 UFS User's meeting (Jul 2020): +!! Gravity waves (GWs): Mesoscale GWs transport momentum, energy (heat) , and create eddy mixing in the whole atmosphere domain; Breaking and dissipating GWs deposit: (a) momentum; (b) heat (energy); and create (c) turbulent mixing of momentum, heat, and tracers +!! To properly incorporate GW effects (a-c) unresolved by DYCOREs we need GW physics +!! "Unified": a) all GW effects due to both dissipation/breaking; b) identical GW solvers for all GW sources; c) ability to replace solvers. +!! Unified Formalism: +!! 1. GW Sources: Stochastic and physics based mechanisms for GW-excitations in the lower atmosphere, calibrated by the high-res analyses/forecasts, and observations (3 types of GW sources: orography, convection, fronts/jets). +!! 2. GW Propagation: Unified solver for "propagation, dissipation and breaking" excited from all type of GW sources. +!! 3. GW Effects: Unified representation of GW impacts on the "resolved" flow for all sources (energy-balanced schemes for momentum, heat and mixing). +!! https://www.weather.gov/media/sti/nggps/Presentations%202017/02%20NGGPS_VYUDIN_2017_.pdf +!! +!! The ugwpv1_gsldrag scheme is activated by gwd_opt = 2 in the namelist. +!! The choice of schemes is activated at runtime by the following namelist options (boolean): +!! NA do_ugwp_v0 -- activates V0 CIRES UGWP scheme - both orographic and non-stationary GWD is not active (NA) +!! NA do_ugwp_v0_orog_only -- activates V0 CIRES UGWP scheme - orographic GWD only +!! do_gsl_drag_ls_bl -- activates RAP/HRRR (GSL) large-scale OGWD and blocking +!! do_gsl_drag_ss -- activates RAP/HRRR (GSL) small-scale OGWD +!! do_gsl_drag_tofd -- activates RAP/HRRR (GSL) turbulent orographic drag +!! do_ugwp_v1 -- activates V1 CIRES UGWP scheme - both orographic and non-stationary GWD +!! do_ugwp_v1_orog_only -- activates V1 CIRES UGWP scheme - orographic GWD only +!! do_ugwp_v1_w_gsldrag -- activates V1 CIRES UGWP scheme with orographic drag of GSL +!! Note that only one "large-scale" scheme can be activated at a time. +!! + +module ugwpv1_gsldrag + + use machine, only: kind_phys + + use cires_ugwpv1_triggers, only: slat_geos5_2020, slat_geos5_tamp_v1 + use cires_ugwpv1_module, only: cires_ugwpv1_init, ngwflux_update, calendar_ugwp + use cires_ugwpv1_module, only: knob_ugwp_version, cires_ugwp_dealloc, tamp_mpa + use cires_ugwpv1_solv2, only: cires_ugwpv1_ngw_solv2 + use cires_ugwpv1_oro, only: orogw_v1 + + use drag_suite, only: drag_suite_run + + implicit none + + private + + public ugwpv1_gsldrag_init, ugwpv1_gsldrag_run, ugwpv1_gsldrag_finalize + + logical :: is_initialized = .False. + +contains + +! ------------------------------------------------------------------------ +! CCPP entry points for CIRES Unified Gravity Wave Physics (UGWP) scheme v0 +! ------------------------------------------------------------------------ +!>@brief The subroutine initializes the unified UGWP +!> \section arg_table_ugwpv1_gsldrag_init Argument Table +!! \htmlinclude ugwpv1_gsldrag_init.html +!! +! ----------------------------------------------------------------------- +! + subroutine ugwpv1_gsldrag_init ( & + me, master, nlunit, input_nml_file, logunit, & + fn_nml2, jdat, lonr, latr, levs, ak, bk, dtp, & + con_pi, con_rerth, con_p0, & + con_g, con_omega, con_cp, con_rd, con_rv,con_fvirt, & + do_ugwp,do_ugwp_v0, do_ugwp_v0_orog_only, do_gsl_drag_ls_bl, & + do_gsl_drag_ss, do_gsl_drag_tofd, do_ugwp_v1, & + do_ugwp_v1_orog_only, do_ugwp_v1_w_gsldrag, errmsg, errflg) + + use ugwp_common + +!---- initialization of unified_ugwp + implicit none + + integer, intent (in) :: me + integer, intent (in) :: master + integer, intent (in) :: nlunit + character(len=*), intent (in) :: input_nml_file(:) + integer, intent (in) :: logunit + integer, intent (in) :: jdat(:) + integer, intent (in) :: lonr + integer, intent (in) :: levs + integer, intent (in) :: latr + real(kind=kind_phys), intent (in) :: ak(:), bk(:) + real(kind=kind_phys), intent (in) :: dtp + + real(kind=kind_phys), intent (in) :: con_p0, con_pi, con_rerth + real(kind=kind_phys), intent (in) :: con_g, con_cp, con_rd, con_rv, con_omega, con_fvirt + logical, intent (in) :: do_ugwp + + logical, intent (in) :: do_ugwp_v0, do_ugwp_v0_orog_only, & + do_gsl_drag_ls_bl, do_gsl_drag_ss, & + do_gsl_drag_tofd, do_ugwp_v1, & + do_ugwp_v1_orog_only,do_ugwp_v1_w_gsldrag + + character(len=*), intent (in) :: fn_nml2 + !character(len=*), parameter :: fn_nml='input.nml' + + integer :: ios + logical :: exists + real :: dxsg + integer :: k + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 +!============================================================================ +! +! gwd_opt => "1 and 2, 3, 22, 33' see previous GSL-commits +! related to GSL-oro drag suite +! for use of the new-GSL/old-GFS/EMC inputs for sub-grid orography +! see details inside /ufs-weather-model/FV3/io/FV3GFS_io.F90 +! FV3GFS_io.F90: if (Model%gwd_opt==3 .or. Model%gwd_opt==33 .or. & +! FV3GFS_io.F90: Model%gwd_opt==2 .or. Model%gwd_opt==22 ) then +! FV3GFS_io.F90: if ( (Model%gwd_opt==3 .or. Model%gwd_opt==33) .or. & +! FV3GFS_io.F90: ( (Model%gwd_opt==2 .or. Model%gwd_opt==22) .and. & +! +! gwd_opt=1 -current 14-element GFS-EMC subgrid-oro input +! gwd_opt=2 and 3 24-element -current 14-element GFS-EMC subgrid-oro input +! GSL uses the gwd_opt flag to control "extra" diagnostics (22 and 33) +! CCPP may use gwd_opt to determine 14 or 24 variables for the input +! but at present you work with "nmtvr" +! GFS_GWD_generic.F90: integer, intent(in) :: im, levs, nmtvr +!GFS_GWD_generic.F90: real(kind=kind_phys), intent(in) :: mntvar(im,nmtvr) +!GFS_GWD_generic.F90: if (nmtvr == 14) then ! gwd_opt=1 current operational - as of 2014 +!GFS_GWD_generic.F90: elseif (nmtvr == 10) then ???? +!GFS_GWD_generic.F90: elseif (nmtvr == 6) then ???? +!GFS_GWD_generic.F90: elseif (nmtvr == 24) then ! GSD_drag_suite and unified_ugwp gwd_opt=2,3 +! +! 1) gsldrag: do_gsl_drag_ls_bl, do_gsl_drag_ss, do_gsl_drag_tofd, do_ugwp_v1 +! 2) CIRES-v1: do_ugwp_v1, do_ugwp_v1_orog_only, do_tofd, ldiag_ugwp +!============================================================================== + ! Test to make sure that at most only one large-scale/blocking + ! orographic drag scheme is chosen + if ( (do_ugwp_v0.and.(do_ugwp_v0_orog_only.or.do_gsl_drag_ls_bl.or. & + do_ugwp_v1.or.do_ugwp_v1_orog_only)) .or. & + (do_ugwp_v0_orog_only.and.(do_gsl_drag_ls_bl.or.do_ugwp_v1.or. & + do_ugwp_v1_orog_only)) .or. & + (do_gsl_drag_ls_bl.and.do_ugwp_v1_orog_only) ) then + + write(errmsg,'(*(a))') "Logic error: Only one large-scale& + &/blocking scheme (do_ugwp_v0,do_ugwp_v0_orog_only,& + &do_gsl_drag_ls_bl,do_ugwp_v1 or & + &do_ugwp_v1_orog_only) can be chosen" + errflg = 1 + return + + end if +! + if ( do_ugwp_v0_orog_only .or. do_ugwp_v0) then + print *, ' ccpp do_ugwp_v0 active ', do_ugwp_v0 + print *, ' ccpp do_ugwp_v1_orog_only active ', do_ugwp_v0_orog_only + write(errmsg,'(*(a))') " the CIRES CCPP-suite does not & + support schemes " + errflg = 1 + return + endif +! + if (do_ugwp_v1_w_gsldrag .and. do_ugwp_v1_orog_only ) then + + print *, ' do_ugwp_v1_w_gsldrag ', do_ugwp_v1_w_gsldrag + print *, ' do_ugwp_v1_orog_only ', do_ugwp_v1_orog_only + print *, ' do_gsl_drag_ls_bl ',do_gsl_drag_ls_bl + write(errmsg,'(*(a))') " the CIRES CCPP-suite intend to & + support with but has Logic error" + errflg = 1 + return + endif +!========================== +! +! initialize ugwp_common +! con_pi, con_rerth, con_p0, con_g, con_omega, con_cp, con_rd, con_rv,con_fvirt +! +!========================== + + pi = con_pi + arad = con_rerth + p0s = con_p0 + grav = con_g + omega1= con_omega + cpd = con_cp + rd = con_rd + rv = con_rv + fv = con_fvirt + + grav2 = grav + grav; rgrav = 1.0/grav ; rgrav2 = rgrav*rgrav + rdi = 1.0 / rd ; rcpd = 1./cpd; rcpd2 = 0.5/cpd + gor = grav/rd + gr2 = grav*gor + grcp = grav*rcpd + gocp = grcp + rcpdl = cpd*rgrav + grav2cpd = grav*grcp + + pi2 = 2.*pi ; pih = .5*pi + rad_to_deg=180.0/pi + deg_to_rad=pi/180.0 + + bnv2min = (pi2/1800.)*(pi2/1800.) + bnv2max = (pi2/30.)*(pi2/30.) + dw2min = 1.0 + velmin = sqrt(dw2min) + minvel = 0.5 + + omega2 = 2.*omega1 + omega3 = 3.*omega1 + + hpscale = 7000. ; hpskm = hpscale*1.e-3 + rhp = 1./hpscale + rhp2 = 0.5*rhp; rh4 = 0.25*rhp + rhp4 = rhp2 * rhp2 + khp = rhp* rd/cpd + mkzmin = pi2/80.0e3 + mkz2min = mkzmin*mkzmin + mkzmax = pi2/500. + mkz2max = mkzmax*mkzmax + cdmin = 2.e-2/mkzmax + + rcpdt = rcpd/dtp + + if ( do_ugwp_v1 ) then + call cires_ugwpv1_init (me, master, nlunit, logunit, jdat, con_pi, & + con_rerth, fn_nml2, input_nml_file, lonr, latr, & + levs, ak, bk, con_p0, dtp, errmsg, errflg) + if (errflg/=0) return + end if + + if (me == master) then + print *, ' ccpp: ugwpv1_gsldrag_init ' + + print *, ' ccpp do_ugwp_v1 flag ', do_ugwp_v1 + print *, ' ccpp do_gsl_drag_ls_bl flag ', do_gsl_drag_ls_bl + print *, ' ccpp do_gsl_drag_ss flag ' , do_gsl_drag_ss + print *, ' ccpp do_gsl_drag_tofd flag ', do_gsl_drag_tofd + + print *, ' ccpp: ugwpv1_gsldrag_init ' + endif + + + + is_initialized = .true. + + + end subroutine ugwpv1_gsldrag_init + + +! ----------------------------------------------------------------------- +! finalize of ugwpv1_gsldrag (_finalize) +! ----------------------------------------------------------------------- + +!>@brief The subroutine finalizes the CIRES UGWP + +!> \section arg_table_ugwpv1_gsldrag_finalize Argument Table +!! \htmlinclude ugwpv1_gsldrag_finalize.html +!! + + subroutine ugwpv1_gsldrag_finalize(errmsg, errflg) + + implicit none +! + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + +! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (.not.is_initialized) return + + call cires_ugwp_dealloc + + is_initialized = .false. + + end subroutine ugwpv1_gsldrag_finalize + + +! ----------------------------------------------------------------------- +! originally from ugwp_driver_v0.f +! driver of cires_ugwp (_driver) +! ----------------------------------------------------------------------- +! driver is called after pbl & before chem-parameterizations +! ----------------------------------------------------------------------- +! order = dry-adj=>conv=mp-aero=>radiation -sfc/land- chem -> vertdiff-> [rf-gws]=> ion-re +! ----------------------------------------------------------------------- +!>@brief These subroutines and modules execute the CIRES UGWP Version 0 +!>\defgroup ugwpv1_gsldrag_run Unified Gravity Wave Physics General Algorithm +!> @{ +!! The physics of NGWs in the UGWP framework (Yudin et al. 2018 \cite yudin_et_al_2018) is represented by four GW-solvers, which is introduced in Lindzen (1981) \cite lindzen_1981, Hines (1997) \cite hines_1997, Alexander and Dunkerton (1999) \cite alexander_and_dunkerton_1999, and Scinocca (2003) \cite scinocca_2003. The major modification of these GW solvers is represented by the addition of the background dissipation of temperature and winds to the saturation criteria for wave breaking. This feature is important in the mesosphere and thermosphere for WAM applications and it considers appropriate scale-dependent dissipation of waves near the model top lid providing the momentum and energy conservation in the vertical column physics (Shaw and Shepherd 2009 \cite shaw_and_shepherd_2009). In the UGWP-v0, the modification of Scinocca (2003) \cite scinocca_2003 scheme for NGWs with non-hydrostatic and rotational effects for GW propagations and background dissipation is represented by the subroutine \ref fv3_ugwp_solv2_v0. In the next release of UGWP, additional GW-solvers will be implemented along with physics-based triggering of waves and stochastic approaches for selection of GW modes characterized by horizontal phase velocities, azimuthal directions and magnitude of the vertical momentum flux (VMF). +!! +!! In UGWP-v0, the specification for the VMF function is adopted from the GEOS-5 global atmosphere model of GMAO NASA/GSFC, as described in Molod et al. (2015) \cite molod_et_al_2015 and employed in the MERRRA-2 reanalysis (Gelaro et al., 2017 \cite gelaro_et_al_2017). The Fortran subroutine \ref slat_geos5_tamp describes the latitudinal shape of VMF-function as displayed in Figure 3 of Molod et al. (2015) \cite molod_et_al_2015. It shows that the enhanced values of VMF in the equatorial region gives opportunity to simulate the QBO-like oscillations in the equatorial zonal winds and lead to more realistic simulations of the equatorial dynamics in GEOS-5 operational and MERRA-2 reanalysis products. For the first vertically extended version of FV3GFS in the stratosphere and mesosphere, this simplified function of VMF allows us to tune the model climate and to evaluate multi-year simulations of FV3GFS with the MERRA-2 and ERA-5 reanalysis products, along with temperature, ozone, and water vapor observations of current satellite missions. After delivery of the UGWP-code, the EMC group developed and tested approach to modulate the zonal mean NGW forcing by 3D-distributions of the total precipitation as a proxy for the excitation of NGWs by convection and the vertically-integrated (surface - tropopause) Turbulent Kinetic Energy (TKE). The verification scores with updated NGW forcing, as reported elsewhere by EMC researchers, display noticeable improvements in the forecast scores produced by FV3GFS configuration extended into the mesosphere. +!! +!> \section arg_table_ugwpv1_gsldrag_run Argument Table +!! \htmlinclude ugwpv1_gsldrag_run.html +!! +!> \section gen_ugwpv1_gsldrag CIRES UGWP Scheme General Algorithm +!! @{ + subroutine ugwpv1_gsldrag_run(me, master, im, levs, ntrac, lonr, dtp, fhzero,kdt, & + ldiag3d, lssav, flag_for_gwd_generic_tend, do_gsl_drag_ls_bl, do_gsl_drag_ss, & + do_gsl_drag_tofd, do_ugwp_v1, do_ugwp_v1_orog_only, do_ugwp_v1_w_gsldrag, & + gwd_opt, do_tofd, ldiag_ugwp, cdmbgwd, jdat, & + nmtvr, hprime, oc, theta, sigma, gamma, elvmax, clx, oa4, & + varss,oc1ss,oa4ss,ol4ss, dx, xlat, xlat_d, sinlat, coslat, area, & + rain, br1, hpbl, kpbl, slmsk, & + ugrs, vgrs, tgrs, q1, prsi, prsl, prslk, phii, phil, del, tau_amf, & + dudt_ogw, dvdt_ogw, du_ogwcol, dv_ogwcol, & + dudt_obl, dvdt_obl, du_oblcol, dv_oblcol, & + dudt_oss, dvdt_oss, du_osscol, dv_osscol, & + dudt_ofd, dvdt_ofd, du_ofdcol, dv_ofdcol, & + dudt_ngw, dvdt_ngw, dtdt_ngw, kdis_ngw, dudt_gw, dvdt_gw, dtdt_gw, kdis_gw, & + tau_ogw, tau_ngw, tau_oss, & + zogw, zlwb, zobl, zngw, dusfcg, dvsfcg, dudt, dvdt, dtdt, rdxzb, & + dtend, dtidx, index_of_x_wind, index_of_y_wind, index_of_temperature, & + index_of_process_orographic_gwd, index_of_process_nonorographic_gwd, & + lprnt, ipr, errmsg, errflg) +! +!######################################################################## +! Attention New Arrays and Names must be ADDED inside +! +! a) /FV3/gfsphysics/GFS_layer/GFS_typedefs.meta +! b) /FV3/gfsphysics/GFS_layer/GFS_typedefs.F90 +! c) /FV3/gfsphysics/GFS_layer/GFS_diagnostics.F90 "diag-cs is not tested" +!######################################################################## + +! + + use ugwp_common, only : con_pi => pi, con_g => grav, con_rd => rd, & + con_rv => rv, con_cp => cpd, con_fv => fv, & + con_rerth => arad, con_omega => omega1, rgrav + + implicit none + +! Preference use (im,levs) rather than (:,:) to avoid memory-leaks +! that found in Nov-Dec 2020 +! order array-description control-logical +! other in-variables +! out-variables +! local-variables +! +! unified GSL and CIRES diagnostics inside CCPP and GFS_typedefs.F90/GFS_diagnostics.F90 +! +! +! interface variables + logical, intent(in) :: ldiag3d, lssav + logical, intent(in) :: flag_for_gwd_generic_tend + logical, intent(in) :: lprnt + + integer, intent(in) :: ipr + +! flags for choosing combination of GW drag schemes to run + + logical, intent (in) :: do_gsl_drag_ls_bl, do_gsl_drag_ss, do_gsl_drag_tofd + logical, intent (in) :: do_ugwp_v1, do_ugwp_v1_orog_only, do_tofd, ldiag_ugwp + logical, intent (in) :: do_ugwp_v1_w_gsldrag ! combination of ORO and NGW schemes + + integer, intent(in) :: me, master, im, levs, ntrac,lonr + real(kind=kind_phys), intent(in) :: dtp, fhzero + integer, intent(in) :: kdt, jdat(:) + +! SSO parameters and variables + integer, intent(in) :: gwd_opt !gwd_opt and nmtvr are "redundant" controls + integer, intent(in) :: nmtvr + real(kind=kind_phys), intent(in) :: cdmbgwd(:) ! for gsl_drag + + real(kind=kind_phys), intent(in), dimension(:) :: hprime, oc, theta, sigma, gamma + + real(kind=kind_phys), intent(in), dimension(:) :: elvmax + real(kind=kind_phys), intent(in), dimension(:,:) :: clx, oa4 + + real(kind=kind_phys), intent(in), dimension(:) :: varss,oc1ss,dx + real(kind=kind_phys), intent(in), dimension(:,:) :: oa4ss,ol4ss + +!===== +!ccpp-style passing constants, I prefer to take them out from the "call-subr" list +!===== +! real(kind=kind_phys), intent(in) :: con_g, con_omega, con_pi, con_cp, con_rd, & +! con_rv, con_rerth, con_fvirt +! grids + + real(kind=kind_phys), intent(in), dimension(:) :: xlat, xlat_d, sinlat, coslat, area + +! State vars + PBL/slmsk +rain + + real(kind=kind_phys), intent(in), dimension(:,:) :: del, ugrs, vgrs, tgrs, prsl, prslk, phil + real(kind=kind_phys), intent(in), dimension(:,:) :: prsi, phii + real(kind=kind_phys), intent(in), dimension(:,:) :: q1 + integer, intent(in), dimension(:) :: kpbl + + real(kind=kind_phys), intent(in), dimension(:) :: rain + real(kind=kind_phys), intent(in), dimension(:) :: br1, hpbl, slmsk +! +! moved to GFS_phys_time_vary +! real(kind=kind_phys), intent(in), dimension(:) :: ddy_j1tau, ddy_j2tau +! integer, intent(in), dimension(:) :: jindx1_tau, jindx2_tau + real(kind=kind_phys), intent(in), dimension(:) :: tau_amf + +!Output (optional): + + real(kind=kind_phys), intent(out), dimension(:) :: & + du_ogwcol, dv_ogwcol, du_oblcol, dv_oblcol, & + du_osscol, dv_osscol, du_ofdcol, dv_ofdcol +! +! we may add later but due to launch in the upper layes ~ mPa comparing to ORO Pa*(0.1) +! du_ngwcol, dv_ngwcol + + real(kind=kind_phys), intent(out), dimension(:) :: dusfcg, dvsfcg + real(kind=kind_phys), intent(out), dimension(:) :: tau_ogw, tau_ngw, tau_oss + + real(kind=kind_phys), intent(out) , dimension(:,:) :: & + dudt_ogw, dvdt_ogw, dudt_obl, dvdt_obl, & + dudt_oss, dvdt_oss, dudt_ofd, dvdt_ofd + + real(kind=kind_phys), intent(out) , dimension(:,:) :: dudt_ngw, dvdt_ngw, kdis_ngw + real(kind=kind_phys), intent(out) , dimension(:,:) :: dudt_gw, dvdt_gw, kdis_gw + + real(kind=kind_phys), intent(out) , dimension(:,:) :: dtdt_ngw, dtdt_gw + + real(kind=kind_phys), intent(out) , dimension(:) :: zogw, zlwb, zobl, zngw +! +! + real(kind=kind_phys), intent(inout), dimension(:,:) :: dudt, dvdt, dtdt + + real(kind=kind_phys), intent(inout) :: dtend(:,:,:) + integer, intent(in) :: dtidx(:,:), & + index_of_x_wind, index_of_y_wind, index_of_temperature, & + index_of_process_orographic_gwd, index_of_process_nonorographic_gwd + + real(kind=kind_phys), intent(out), dimension(:) :: rdxzb ! for stoch phys. mtb-level + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + +! local variables + integer :: i, k + real(kind=kind_phys), dimension(im) :: sgh30 + real(kind=kind_phys), dimension(im, levs) :: Pdvdt, Pdudt + real(kind=kind_phys), dimension(im, levs) :: Pdtdt, Pkdis +!------------ +! +! from ugwp_driver_v0.f -> cires_ugwp_initialize.F90 -> module ugwp_wmsdis_init +! now in the namelist of cires_ugwp "knob_ugwp_tauamp" controls tamp_mpa +! +! tamp_mpa =knob_ugwp_tauamp !amplitude for GEOS-5/MERRA-2 +!------------ +! real(kind=kind_phys), parameter :: tamp_mpa_v0=30.e-3 ! large flux to help "GFS-ensembles" in July 2019 + +! switches that activate impact of OGWs and NGWs + +! integer :: nmtvr_temp + + real(kind=kind_phys), dimension(im, levs) :: zmet ! geopotential height at model Layer centers + real(kind=kind_phys), dimension(im, levs+1) :: zmeti ! geopotential height at model layer interfaces + + +! ugwp_v1 local variables + + integer :: y4, month, day, ddd_ugwp, curdate, curday, idtend + +! ugwp_v1 temporary (local) diagnostic variables from cires_ugwp_solv2_v1 +! diagnostics for wind and temp rms to compare with space-borne data and metrics +! in the Middle atmosphere: 20-110 km ( not active in CCPP-style, oct 2020) +! real(kind=kind_phys) :: tauabs(im,levs), wrms(im,levs), trms(im,levs) + + + ! Initialize CCPP error handling variables + + errmsg = '' + errflg = 0 + +! 1) ORO stationary GWs +! ------------------ +! +! for all oro-suites can uze geo-meters having "hpbl" +! +! +! All GW-schemes operate with Zmet =phil*inv_g, passing Zmet/Zmeti can be more robust +! + rho*dz = =delp * inv_g can be also pre-comp for all "GW-schemes" +! + zmeti = phii* rgrav + zmet = phil* rgrav + +!=============================================================== +! ORO-diag + + if (do_ugwp_v1 .or. gwd_opt==33 .or. gwd_opt==22) then + dudt_ogw(:,:)= 0.; dvdt_ogw(:,:)=0.; dudt_obl(:,:)=0.; dvdt_obl(:,:)=0. + dudt_oss(:,:)= 0.; dvdt_oss(:,:)=0.; dudt_ofd(:,:)=0.; dvdt_ofd(:,:)=0. + du_ogwcol(:)=0. ; dv_ogwcol(:)=0. ; du_oblcol(:)=0. ; dv_oblcol(:)=0. + du_osscol(:)=0. ; dv_osscol(:)=0. ;du_ofdcol(:)=0. ; dv_ofdcol(:)=0. + else + dudt_ogw(:,:) = 0. + end if + + dusfcg (:) = 0. ; dvsfcg(:) =0. + +! + if (do_ugwp_v1) then + dudt_ngw(:,:)=0.; dvdt_ngw(:,:)=0.; dtdt_ngw(:,:)=0.; kdis_ngw(:,:)=0. + end if + +! ngw+ogw - diag + + dudt_gw(:,:)=0. ; dvdt_gw(:,:)=0. ; dtdt_gw(:,:)=0. ; kdis_gw(:,:)=0. +! source fluxes + + tau_ogw(:)=0. ; tau_ngw(:)=0. ; tau_oss(:)=0. + +! launch layers + + zlwb(:)= 0. ; zogw(:)=0. ; zobl(:)=0. ; zngw(:)=0. +!=============================================================== +! diag tendencies due to all-SSO schemes (ORO-physics) +! ogw + obl + oss + ofd ..... no explicit "lee wave trapping" +!=============================================================== + do k=1,levs + do i=1,im + Pdvdt(i,k) = 0.0 + Pdudt(i,k) = 0.0 + Pdtdt(i,k) = 0.0 + Pkdis(i,k) = 0.0 + enddo + enddo +! + ! Run the appropriate large-scale (large-scale GWD + blocking) scheme + ! Note: In case of GSL drag_suite, this includes ss and tofd + + if ( do_gsl_drag_ls_bl.or.do_gsl_drag_ss.or.do_gsl_drag_tofd) then +! +! to do: the zero diag and tendency values assigned inside "drag_suite_run" can be skipped : +! +! dudt_ogw, dvdt_ogw, dudt_obl, dvdt_obl,dudt_oss, dvdt_oss, dudt_ofd, dvdt_ofd +! du_ogwcol, dv_ogwcol, du_oblcol, dv_oblcol, du_osscol, dv_osscol, du_ofdcol dv_ofdcol +! dusfcg, dvsfcg +! +! + call drag_suite_run(im,levs, Pdvdt, Pdudt, Pdtdt, & + ugrs,vgrs,tgrs,q1, & + kpbl,prsi,del,prsl,prslk,phii,phil,dtp, & + kdt,hprime,oc,oa4,clx,varss,oc1ss,oa4ss, & + ol4ss,theta,sigma,gamma,elvmax, & + dudt_ogw, dvdt_ogw, dudt_obl, dvdt_obl, & + dudt_oss, dvdt_oss, dudt_ofd, dvdt_ofd, & + dusfcg, dvsfcg, & + du_ogwcol, dv_ogwcol, du_oblcol, dv_oblcol, & + du_osscol, dv_osscol, du_ofdcol, dv_ofdcol, & + slmsk,br1,hpbl, con_g,con_cp,con_rd,con_rv, & + con_fv, con_pi, lonr, & + cdmbgwd(1:2),me,master,lprnt,ipr,rdxzb,dx,gwd_opt, & + do_gsl_drag_ls_bl,do_gsl_drag_ss,do_gsl_drag_tofd, & + dtend, dtidx, index_of_process_orographic_gwd, & + index_of_temperature, index_of_x_wind, & + index_of_y_wind, ldiag3d, errmsg, errflg) +! +! dusfcg = du_ogwcol + du_oblcol + du_osscol + du_ofdcol +! +! if (kdt <= 2 .and. me == master) then +! print *, ' unified drag_suite_run ', kdt +! print *, ' GSL drag du/dt ', maxval(Pdudt)*86400, minval(Pdudt)*86400 +! print *, ' GSL drag dv/dt ', maxval(Pdvdt)*86400, minval(Pdvdt)*86400 +! +! zero print *, ' unified drag_GSL dT/dt ', maxval(Pdtdt)*86400, minval(Pdtdt)*86400 +! +! if (gwd_opt == 22 .or. gwd_opt == 33) then +! print *, ' unified drag_GSL dUBL/dt ', maxval(dudt_obl)*86400, minval(dudt_obl)*86400 +! print *, ' unified drag_GSL dVBL/dt ', maxval(dvdt_obl)*86400, minval(dvdt_obl)*86400 +! print *, ' unified drag_GSL dUOGW/dt ', maxval(dudt_ogw)*86400, minval(dudt_ogw)*86400 +! print *, ' unified drag_GSL dVOGW/dt ', maxval(dvdt_ogw)*86400, minval(dvdt_ogw)*86400 +! print *, ' unified drag_GSL dUOss/dt ', maxval(dudt_oss)*86400, minval(dudt_oss)*86400 +! print *, ' unified drag_GSL dVOSS/dt ', maxval(dvdt_oss)*86400, minval(dvdt_oss)*86400 +! print *, ' unified drag_GSL dUOfd/dt ', maxval(dudt_ofd)*86400, minval(dudt_ofd)*86400 +! print *, ' unified drag_GSL dVOfd/dt ', maxval(dvdt_ofd)*86400, minval(dvdt_ofd)*86400 +! endif +! endif + + else +! +! not gsldrag oro-scheme for example "do_ugwp_v1_orog_only" +! + + if ( do_ugwp_v1_orog_only ) then +! +! for TOFD we use now "varss" of GSL-drag /not sgh30=abs(oro-oro_f)/ +! only sum of integrated ORO+GW effects (dusfcg and dvsfcg) = sum(ogw + obl + oss*0 + ofd + ngw) +! +! OROGW_V1 introduce "orchestration" between OGW-effects and Mountain Blocking +! it starts to examines options for the Scale-Aware (SA)formulation of SSO-effects +! if ( me == master .and. kdt == 1) print *, ' bf orogw_v1 nmtvr=', nmtvr, ' do_tofd=', do_tofd + + if (gwd_opt ==1 )sgh30 = 0.15*hprime ! portion of the mesoscale SSO (~[oro_unfilt -oro_filt) + if (gwd_opt >1 ) sgh30 = varss ! as in gsldrag: see drag_suite_run + + call orogw_v1 (im, levs, lonr, me, master,dtp, kdt, do_tofd, & + xlat_d, sinlat, coslat, area, & + cdmbgwd(1:2), hprime, oc, oa4, clx, theta, & + sigma, gamma, elvmax, sgh30, kpbl, ugrs, & + vgrs, tgrs, q1, prsi,del,prsl,prslk, zmeti, zmet, & + Pdvdt, Pdudt, Pdtdt, Pkdis, DUSFCg, DVSFCg,rdxzb, & + zobl, zlwb, zogw, tau_ogw, dudt_ogw, dvdt_ogw, & + dudt_obl, dvdt_obl,dudt_ofd, dvdt_ofd, & + du_ogwcol, dv_ogwcol, du_oblcol, dv_oblcol, & + du_ofdcol, dv_ofdcol, errmsg,errflg ) +! +! orogw_v1: dusfcg = du_ogwcol + du_oblcol + du_ofdcol only 3 terms +! +! +! if (kdt <= 2 .and. me == master) then +! +! print *, ' unified_ugwp orogw_v1 ', kdt, me, nmtvr +! print *, ' unified_ugwp orogw_v1 du/dt ', maxval(Pdudt)*86400, minval(Pdudt)*86400 +! print *, ' unified_ugwp orogw_v1 dv/dt ', maxval(Pdvdt)*86400, minval(Pdvdt)*86400 +! print *, ' unified_ugwp orogw_v1 dT/dt ', maxval(Pdtdt)*86400, minval(Pdtdt)*86400 +! print *, ' unified_ugwp orogw_v1 dUBL/dt ', maxval(dudt_obl)*86400, minval(dudt_obl)*86400 +! print *, ' unified_ugwp orogw_v1 dVBL/dt ', maxval(dvdt_obl)*86400, minval(dvdt_obl)*86400 +! endif + + + end if +! +! for old-fashioned GFS-style diag-cs like dt3dt(:.:, 1:14) collections +! + if(ldiag3d .and. lssav .and. .not. flag_for_gwd_generic_tend) then + idtend = dtidx(index_of_x_wind,index_of_process_orographic_gwd) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + Pdudt*dtp + endif + idtend = dtidx(index_of_y_wind,index_of_process_orographic_gwd) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + Pdvdt*dtp + endif + idtend = dtidx(index_of_temperature,index_of_process_orographic_gwd) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + Pdtdt*dtp + endif + endif + ENDIF +! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! Begin non-stationary GW schemes +! ugwp_v1 +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + + if (do_ugwp_v1) then + +!================================================================== +! call slat_geos5_tamp_v1(im, tamp_mpa, xlat_d, tau_ngw) +! +! 2020 updates of MERRA/GEOS tau_ngw for the C96-QBO FV3GFS-127L runs +!================================================================== + + call slat_geos5_2020(im, tamp_mpa, xlat_d, tau_ngw) + + y4 = jdat(1); month = jdat(2); day = jdat(3) +! +! hour = jdat(5) +! fhour = float(hour)+float(jdat(6))/60. + float(jdat(7))/3600. +! fhour = (kdt-1)*dtp/3600. +! fhrday = fhour/24. - nint(fhour/24.) + + + call calendar_ugwp(y4, month, day, ddd_ugwp) + curdate = y4*1000 + ddd_ugwp +! + call ngwflux_update(me, master, im, levs, kdt, ddd_ugwp,curdate, & + tau_amf, xlat_d, sinlat,coslat, rain, tau_ngw) + + call cires_ugwpv1_ngw_solv2(me, master, im, levs, kdt, dtp, & + tau_ngw, tgrs, ugrs, vgrs, q1, prsl, prsi, & + zmet, zmeti,prslk, xlat_d, sinlat, coslat, & + dudt_ngw, dvdt_ngw, dtdt_ngw, kdis_ngw, zngw) +! +! => con_g, con_cp, con_rd, con_rv, con_omega, con_pi, con_fvirt +! +! if (me == master .and. kdt <= 2) then +! print * +! write(6,*)'FV3GFS finished fv3_ugwp_solv2_v1 ' +! write(6,*) ' non-stationary GWs with GMAO/MERRA GW-forcing ' +! print * +! +! print *, ' ugwp_v1 ', kdt +! print *, ' ugwp_v1 du/dt ', maxval(dudt_ngw)*86400, minval(dudt_ngw)*86400 +! print *, ' ugwp_v1 dv/dt ', maxval(dvdt_ngw)*86400, minval(dvdt_ngw)*86400 +! print *, ' ugwp_v1 dT/dt ', maxval(dtdt_ngw)*86400, minval(dtdt_ngw)*86400 +! endif + + + end if ! do_ugwp_v1 + + if(ldiag3d .and. lssav .and. .not. flag_for_gwd_generic_tend) then + idtend = dtidx(index_of_x_wind,index_of_process_nonorographic_gwd) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + dudt_ngw(i,k)*dtp + endif + idtend = dtidx(index_of_y_wind,index_of_process_nonorographic_gwd) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + dvdt_ngw(i,k)*dtp + endif + idtend = dtidx(index_of_temperature,index_of_process_nonorographic_gwd) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + dtdt_ngw(i,k)*dtp + endif + endif + +! +! get total sso-OGW + NGW +! + if (do_ugwp_v1) then + dudt_gw = Pdudt + dudt_ngw + dvdt_gw = Pdvdt + dvdt_ngw + dtdt_gw = Pdtdt + dtdt_ngw + kdis_gw = Pkdis + kdis_ngw + else + dudt_gw = Pdudt + dvdt_gw = Pdvdt + dtdt_gw = Pdtdt + kdis_gw = Pkdis + end if +! +! accumulate "tendencies" as in the GFS-ipd (pbl + ugwp + zero-RF) +! + dudt = dudt + dudt_gw + dvdt = dvdt + dvdt_gw + dtdt = dtdt + dtdt_gw + + end subroutine ugwpv1_gsldrag_run +!! @} +!>@} +end module ugwpv1_gsldrag diff --git a/physics/ugwpv1_gsldrag.meta b/physics/ugwpv1_gsldrag.meta new file mode 100644 index 000000000..8b48abc0b --- /dev/null +++ b/physics/ugwpv1_gsldrag.meta @@ -0,0 +1,1243 @@ +[ccpp-table-properties] + name = ugwpv1_gsldrag + type = scheme + dependencies = machine.F,drag_suite.F90 + dependencies = cires_ugwpv1_module.F90,cires_ugwpv1_triggers.F90,cires_ugwpv1_initialize.F90,cires_ugwpv1_solv2.F90 + dependencies = cires_ugwpv1_sporo.F90,cires_ugwpv1_oro.F90 +######################################################################## +[ccpp-arg-table] + name = ugwpv1_gsldrag_init + type = scheme +[me] + standard_name = mpi_rank + long_name = MPI rank of current process + units = index + dimensions = () + type = integer + intent = in + optional = F +[master] + standard_name = mpi_root + long_name = MPI rank of master process + units = index + dimensions = () + type = integer + intent = in + optional = F +[nlunit] + standard_name = iounit_of_namelist + long_name = fortran unit number for opening namelist file + units = none + dimensions = () + type = integer + intent = in + optional = F +[input_nml_file] + standard_name = filename_of_internal_namelist + long_name = character string to store full namelist contents + units = none + dimensions = (number_of_lines_in_internal_namelist) + type = character + kind = len=* + intent = in + optional = F +[logunit] + standard_name = iounit_of_log + long_name = fortran unit number for writing logfile + units = none + dimensions = () + type = integer + intent = in + optional = F +[fn_nml2] + standard_name = filename_of_namelist + long_name = namelist filename for ugwp + units = none + dimensions = () + type = character + kind = len=* + intent = in + optional = F +[jdat] + standard_name = date_and_time_of_forecast_in_united_states_order + long_name = current forecast date and time + units = none + dimensions = (8) + type = integer + intent = in + optional = F +[lonr] + standard_name = number_of_equatorial_longitude_points + long_name = number of global points in x-dir (i) along the equator + units = count + dimensions = () + type = integer + intent = in + optional = F +[latr] + standard_name = number_of_latitude_points + long_name = number of global points in y-dir (j) along the meridian + units = count + dimensions = () + type = integer + intent = in + optional = F +[levs] + standard_name = vertical_layer_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in + optional = F +[ak] + standard_name = sigma_pressure_hybrid_coordinate_a_coefficient + long_name = a parameter for sigma pressure level calculations + units = Pa + dimensions = (vertical_interface_dimension_for_radiation) + type = real + kind = kind_phys + intent = in + optional = F +[bk] + standard_name = sigma_pressure_hybrid_coordinate_b_coefficient + long_name = b parameter for sigma pressure level calculations + units = none + dimensions = (vertical_interface_dimension_for_radiation) + type = real + kind = kind_phys + intent = in + optional = F +[dtp] + standard_name = timestep_for_physics + long_name = physics timestep + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[con_pi] + standard_name = pi + long_name = ratio of a circle's circumference to its diameter + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[con_rerth] + standard_name = radius_of_earth + long_name = radius of earth + units = m + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[con_p0] + standard_name = standard_atmospheric_pressure + long_name = standard atmospheric pressure + units = Pa + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[con_g] + standard_name = gravitational_acceleration + long_name = gravitational acceleration + units = m s-2 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[con_omega] + standard_name = angular_velocity_of_earth + long_name = angular velocity of earth + units = s-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[con_cp] + standard_name = specific_heat_of_dry_air_at_constant_pressure + long_name = specific heat !of dry air at constant pressure + units = J kg-1 K-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[con_rd] + standard_name = gas_constant_of_dry_air + long_name = ideal gas constant for dry air + units = J kg-1 K-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[con_rv] + standard_name = gas_constant_water_vapor + long_name = ideal gas constant for water vapor + units = J kg-1 K-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[con_fvirt] + standard_name = ratio_of_vapor_to_dry_air_gas_constants_minus_one + long_name = rv/rd - 1 (rv = ideal gas constant for water vapor) + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[do_ugwp] + standard_name = flag_for_unified_gravity_wave_physics_gravity_wave_drag_scheme + long_name = flag to activate CIRES UGWP + units = flag + dimensions = () + type = logical + intent = in + optional = F +[do_ugwp_v0] + standard_name = flag_for_ugwp_version_0 + long_name = flag to activate ver 0 CIRES UGWP + units = flag + dimensions = () + type = logical + intent = in + optional = F +[do_ugwp_v0_orog_only] + standard_name = flag_for_ugwp_version_0_orographic_gwd + long_name = flag to activate ver 0 CIRES UGWP - orographic GWD only + units = flag + dimensions = () + type = logical + intent = in + optional = F +[do_gsl_drag_ls_bl] + standard_name = flag_for_gsl_drag_suite_large_scale_orographic_and_blocking_drag + long_name = flag to activate GSL drag suite - large-scale GWD and blocking + units = flag + dimensions = () + type = logical + intent = in + optional = F +[do_gsl_drag_ss] + standard_name = flag_for_gsl_drag_suite_small_scale_orographic_drag + long_name = flag to activate GSL drag suite - small-scale GWD + units = flag + dimensions = () + type = logical + intent = in + optional = F +[do_gsl_drag_tofd] + standard_name = flag_for_gsl_drag_suite_turbulent_orographic_form_drag + long_name = flag to activate GSL drag suite - turb orog form drag + units = flag + dimensions = () + type = logical + intent = in + optional = F +[do_ugwp_v1] + standard_name = flag_for_ugwp_version_1 + long_name = flag to activate ver 1 CIRES UGWP + units = flag + dimensions = () + type = logical + intent = in + optional = F +[do_ugwp_v1_orog_only] + standard_name = flag_for_ugwp_version_1_orographic_gwd + long_name = flag to activate ver 1 CIRES UGWP - orographic GWD only + units = flag + dimensions = () + type = logical + intent = in + optional = F +[do_ugwp_v1_w_gsldrag] + standard_name = flag_for_ugwp_version_1_nonorographic_gwd + long_name = flag to activate ver 1 CIRES UGWP - with OGWD of GSL + units = flag + dimensions = () + type = logical + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + +######################################################################## +[ccpp-arg-table] + name = ugwpv1_gsldrag_finalize + type = scheme +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + +######################################################################## +[ccpp-arg-table] + name = ugwpv1_gsldrag_run + type = scheme +[me] + standard_name = mpi_rank + long_name = MPI rank of current process + units = index + dimensions = () + type = integer + intent = in + optional = F +[master] + standard_name = mpi_root + long_name = MPI rank of master process + units = index + dimensions = () + type = integer + intent = in + optional = F +[im] + standard_name = horizontal_loop_extent + long_name = horizontal + units = count + dimensions = () + type = integer + intent = in + optional = F +[levs] + standard_name = vertical_layer_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in + optional = F +[ntrac] + standard_name = number_of_tracers + long_name = number of tracers + units = count + dimensions = () + type = integer + intent = in + optional = F +[lonr] + standard_name = number_of_equatorial_longitude_points + long_name = number of global points in x-dir (i) along the equator + units = count + dimensions = () + type = integer + intent = in + optional = F +[dtp] + standard_name = timestep_for_physics + long_name = physics timestep + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[fhzero] + standard_name = period_of_diagnostics_reset + long_name = hours between clearing of diagnostic buckets + units = h + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[kdt] + standard_name = index_of_timestep + long_name = current forecast iteration + units = index + dimensions = () + type = integer + intent = in + optional = F +[ldiag3d] + standard_name = flag_for_diagnostics_3D + long_name = flag for 3d diagnostic fields + units = flag + dimensions = () + type = logical + intent = in + optional = F +[lssav] + standard_name = flag_for_diagnostics + long_name = logical flag for storing diagnostics + units = flag + dimensions = () + type = logical + intent = in + optional = F +[flag_for_gwd_generic_tend] + standard_name = flag_for_generic_tendency_due_to_gravity_wave_drag + long_name = true if GFS_GWD_generic should calculate tendencies + units = flag + dimensions = () + type = logical + intent = in + optional = F +[do_gsl_drag_ls_bl] + standard_name = flag_for_gsl_drag_suite_large_scale_orographic_and_blocking_drag + long_name = flag to activate GSL drag suite - large-scale GWD and blocking + units = flag + dimensions = () + type = logical + intent = in + optional = F +[do_gsl_drag_ss] + standard_name = flag_for_gsl_drag_suite_small_scale_orographic_drag + long_name = flag to activate GSL drag suite - small-scale GWD + units = flag + dimensions = () + type = logical + intent = in + optional = F +[do_gsl_drag_tofd] + standard_name = flag_for_gsl_drag_suite_turbulent_orographic_form_drag + long_name = flag to activate GSL drag suite - turb orog form drag + units = flag + dimensions = () + type = logical + intent = in + optional = F +[do_ugwp_v1] + standard_name = flag_for_ugwp_version_1 + long_name = flag to activate ver 1 CIRES UGWP + units = flag + dimensions = () + type = logical + intent = in + optional = F +[do_ugwp_v1_orog_only] + standard_name = flag_for_ugwp_version_1_orographic_gwd + long_name = flag to activate ver 1 CIRES UGWP - orographic GWD only + units = flag + dimensions = () + type = logical + intent = in + optional = F +[do_ugwp_v1_w_gsldrag] + standard_name = flag_for_ugwp_version_1_nonorographic_gwd + long_name = flag to activate ver 1 CIRES UGWP - with OGWD of GSL + units = flag + dimensions = () + type = logical + intent = in + optional = F +[gwd_opt] + standard_name = control_for_drag_suite_gravity_wave_drag + long_name = flag to choose gwd scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[do_tofd] + standard_name = flag_for_turbulent_orographic_form_drag_in_unified_gravity_wave_physics_gravitiy_wave_drag_scheme + long_name = flag for turbulent orographic form drag + units = flag + dimensions = () + type = logical + intent = in + optional = F +[ldiag_ugwp] + standard_name = flag_for_unified_gravity_wave_physics_diagnostics + long_name = flag for CIRES UGWP Diagnostics + units = flag + dimensions = () + type = logical + intent = in + optional = F +[cdmbgwd] + standard_name = multiplicative_tunable_parameters_for_mountain_blocking_and_orographic_gravity_wave_drag + long_name = multiplication factors for cdmb and gwd + units = none + dimensions = (4) + type = real + kind = kind_phys + intent = in + optional = F +[jdat] + standard_name = date_and_time_of_forecast_in_united_states_order + long_name = current forecast date and time + units = none + dimensions = (8) + type = integer + intent = in + optional = F +[nmtvr] + standard_name = number_of_statistical_measures_of_subgrid_orography + long_name = number of topographic variables in GWD + units = count + dimensions = () + type = integer + intent = in + optional = F +[hprime] + standard_name = standard_deviation_of_subgrid_orography + long_name = standard deviation of subgrid height_above_mean_sea_level + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[oc] + standard_name = convexity_of_subgrid_orography + long_name = convexity of subgrid height_above_mean_sea_level + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[theta] + standard_name = angle_from_east_of_maximum_subgrid_orographic_variations + long_name = angle with_respect to east of maximum subgrid orographic variations + units = degree + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[sigma] + standard_name = slope_of_subgrid_orography + long_name = slope of subgrid height_above_mean_sea_level + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[gamma] + standard_name = anisotropy_of_subgrid_orography + long_name = anisotropy of subgrid height_above_mean_sea_level + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[elvmax] + standard_name = maximum_subgrid_orography + long_name = maximum of subgrid height_above_mean_sea_level + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[clx] + standard_name = fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height + long_name = horizontal fraction of grid box covered by subgrid height_above_mean_sea_level higher than critical height + units = frac + dimensions = (horizontal_loop_extent,4) + type = real + kind = kind_phys + intent = in + optional = F +[oa4] + standard_name = asymmetry_of_subgrid_orography + long_name = asymmetry of subgrid height_above_mean_sea_level + units = none + dimensions = (horizontal_loop_extent,4) + type = real + kind = kind_phys + intent = in + optional = F +[varss] + standard_name = standard_deviation_of_subgrid_orography_small_scale + long_name = standard deviation of subgrid height_above_mean_sea_level small scale + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[oc1ss] + standard_name = convexity_of_subgrid_orography_small_scale + long_name = convexity of subgrid height_above_mean_sea_level small scale + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[oa4ss] + standard_name = asymmetry_of_subgrid_orography_small_scale + long_name = asymmetry of subgrid height_above_mean_sea_level small scale + units = none + dimensions = (horizontal_loop_extent,4) + type = real + kind = kind_phys + intent = in + optional = F +[ol4ss] + standard_name = fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height_small_scale + long_name = horizontal fraction of grid box covered by sso higher than critical height small scale + units = frac + dimensions = (horizontal_loop_extent,4) + type = real + kind = kind_phys + intent = in + optional = F +[dx] + standard_name = characteristic_grid_lengthscale + long_name = size of the grid cell + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[xlat] + standard_name = latitude + long_name = grid latitude + units = radian + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[xlat_d] + standard_name = latitude_in_degree + long_name = latitude in degree north + units = degree_north + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[sinlat] + standard_name = sine_of_latitude + long_name = sine of the grid latitude + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[coslat] + standard_name = cosine_of_latitude + long_name = cosine of the grid latitude + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[area] + standard_name = cell_area + long_name = area of the grid cell + units = m2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[rain] + standard_name = lwe_thickness_of_precipitation_amount_on_dynamics_timestep + long_name = total rain at this time step + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[br1] + standard_name = bulk_richardson_number_at_lowest_model_level + long_name = bulk Richardson number at the surface + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[hpbl] + standard_name = atmosphere_boundary_layer_thickness + long_name = PBL thickness + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[kpbl] + standard_name = vertical_index_at_top_of_atmosphere_boundary_layer + long_name = vertical index at top atmospheric boundary layer + units = index + dimensions = (horizontal_loop_extent) + type = integer + intent = in + optional = F +[slmsk] + standard_name = area_type + long_name = landmask: sea/land/ice=0/1/2 + units = flag + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[ugrs] + standard_name = x_wind + long_name = zonal wind + units = m s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[vgrs] + standard_name = y_wind + long_name = meridional wind + units = m s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[tgrs] + standard_name = air_temperature + long_name = model layer mean temperature + units = K + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[q1] + standard_name = specific_humidity + long_name = mid-layer specific humidity of water vapor + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[prsi] + standard_name = air_pressure_at_interface + long_name = air pressure at model layer interfaces + units = Pa + dimensions = (horizontal_loop_extent,vertical_interface_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[prsl] + standard_name = air_pressure + long_name = mean layer pressure + units = Pa + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[prslk] + standard_name = dimensionless_exner_function + long_name = dimensionless Exner function at model layer centers + units = none + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[phii] + standard_name = geopotential_at_interface + long_name = geopotential at model layer interfaces + units = m2 s-2 + dimensions = (horizontal_loop_extent,vertical_interface_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[phil] + standard_name = geopotential + long_name = geopotential at model layer centers + units = m2 s-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[del] + standard_name = air_pressure_difference_between_midlayers + long_name = air pressure difference between midlayers + units = Pa + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[tau_amf] + standard_name = absolute_momentum_flux_due_to_nonorographic_gravity_wave_drag + long_name = ngw_absolute_momentum_flux + units = various + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[dudt_ogw] + standard_name = tendency_of_x_wind_due_to_mesoscale_orographic_gravity_wave_drag + long_name = x momentum tendency from meso scale ogw + units = m s-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dvdt_ogw] + standard_name = tendency_of_y_wind_due_to_mesoscale_orographic_gravity_wave_drag + long_name = y momentum tendency from meso scale ogw + units = m s-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[du_ogwcol] + standard_name = vertically_integrated_x_momentum_flux_due_to_mesoscale_orographic_gravity_wave_drag + long_name = integrated x momentum flux from meso scale ogw + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = out + optional = F +[dv_ogwcol] + standard_name = vertically_integrated_y_momentum_flux_due_to_mesoscale_orographic_gravity_wave_drag + long_name = integrated y momentum flux from meso scale ogw + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = out + optional = F +[dudt_obl] + standard_name = tendency_of_x_momentum_due_to_blocking_drag + long_name = x momentum tendency from blocking drag + units = m s-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dvdt_obl] + standard_name = tendency_of_y_momentum_due_to_blocking_drag + long_name = y momentum tendency from blocking drag + units = m s-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[du_oblcol] + standard_name = vertically_integrated_x_momentum_flux_due_to_blocking_drag + long_name = integrated x momentum flux from blocking drag + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = out + optional = F +[dv_oblcol] + standard_name = vertically_integrated_y_momentum_flux_due_to_blocking_drag + long_name = integrated y momentum flux from blocking drag + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = out + optional = F +[dudt_oss] + standard_name = tendency_of_x_momentum_due_to_small_scale_gravity_wave_drag + long_name = x momentum tendency from small scale gwd + units = m s-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dvdt_oss] + standard_name = tendency_of_y_momentum_due_to_small_scale_gravity_wave_drag + long_name = y momentum tendency from small scale gwd + units = m s-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[du_osscol] + standard_name = vertically_integrated_x_momentum_flux_due_to_small_scale_gravity_wave_drag + long_name = integrated x momentum flux from small scale gwd + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = out + optional = F +[dv_osscol] + standard_name = vertically_integrated_y_momentum_flux_due_to_small_scale_gravity_wave_drag + long_name = integrated y momentum flux from small scale gwd + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = out + optional = F +[dudt_ofd] + standard_name = tendency_of_x_momentum_due_to_form_drag + long_name = x momentum tendency from form drag + units = m s-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dvdt_ofd] + standard_name = tendency_of_y_momentum_due_to_form_drag + long_name = y momentum tendency from form drag + units = m s-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[du_ofdcol] + standard_name = vertically_integrated_x_momentum_flux_due_to_form_drag + long_name = integrated x momentum flux from form drag + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = out + optional = F +[dv_ofdcol] + standard_name = vertically_integrated_y_momentum_flux_due_to_form_drag + long_name = integrated y momentum flux from form drag + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = out + optional = F +[dudt_ngw] + standard_name = tendency_of_x_wind_due_to_nonorographic_gravity_wave_drag + long_name = zonal wind tendency due to non-stationary GWs + units = m s-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dvdt_ngw] + standard_name = tendency_of_y_wind_due_to_nonorographic_gravity_wave_drag + long_name = meridional wind tendency due to non-stationary GWs + units = m s-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dtdt_ngw] + standard_name = tendency_of_air_temperature_due_to_nonorographic_gravity_wave_drag + long_name = air temperature tendency due to non-stationary GWs + units = K s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[kdis_ngw] + standard_name = atmosphere_momentum_diffusivity_due_to_nonorographic_gravity_wave_drag + long_name = eddy mixing due to non-stationary GWs + units = m2 s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dudt_gw] + standard_name = tendency_of_x_wind_due_to_gravity_wave_drag + long_name = zonal wind tendency due to all GWs + units = m s-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dvdt_gw] + standard_name = tendency_of_y_wind_due_to_gravity_wave_drag + long_name = meridional wind tendency due to all GWs + units = m s-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dtdt_gw] + standard_name = tendency_of_air_temperature_due_to_gravity_wave_drag + long_name = air temperature tendency due to all GWs + units = K s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[kdis_gw] + standard_name = atmosphere_momentum_diffusivity_due_to_gravity_wave_drag + long_name = eddy mixing due to all GWs + units = m2 s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[tau_ogw] + standard_name = instantaneous_momentum_flux_due_to_orographic_gravity_wave_drag + long_name = momentum flux or stress due to orographic gravity wave drag + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = out + optional = F +[tau_ngw] + standard_name = instantaneous_momentum_flux_due_to_nonstationary_gravity_wave + long_name = momentum flux or stress due to nonstationary gravity waves + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = out + optional = F +[tau_oss] + standard_name = momentum_flux_due_to_subgrid_scale_orographic_gravity_wave_drag + long_name = momentum flux or stress due to SSO including OBL-OSS-OFD + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = out + optional = F +[zogw] + standard_name = height_of_launch_level_of_orographic_gravity_wave + long_name = height of launch level of orographic gravity waves + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = out + optional = F +[zlwb] + standard_name = height_of_low_level_wave_breaking + long_name = height of low level wave breaking for OGWs + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = out + optional = F +[zobl] + standard_name = height_of_mountain_blocking + long_name = height of mountain blocking drag_v1 + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = out + optional = F +[zngw] + standard_name = height_of_launch_level_of_nonorographic_gravity_waves + long_name = height of launch level of non-stationary GWs + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = out + optional = F +[dusfcg] + standard_name = instantaneous_x_stress_due_to_gravity_wave_drag + long_name = zonal surface stress due to orographic gravity wave drag + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = out + optional = F +[dvsfcg] + standard_name = instantaneous_y_stress_due_to_gravity_wave_drag + long_name = meridional surface stress due to orographic gravity wave drag + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = out + optional = F + intent = out + optional = F +[dudt] + standard_name = process_split_cumulative_tendency_of_x_wind + long_name = zonal wind tendency due to model physics + units = m s-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[dvdt] + standard_name = process_split_cumulative_tendency_of_y_wind + long_name = meridional wind tendency due to model physics + units = m s-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[dtdt] + standard_name = process_split_cumulative_tendency_of_air_temperature + long_name = air temperature tendency due to model physics + units = K s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[rdxzb] + standard_name = level_of_dividing_streamline + long_name = level of the dividing streamline + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = out + optional = F +[dtend] + standard_name = cumulative_change_of_state_variables + long_name = diagnostic tendencies for state variables + units = various + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_cumulative_change_processes) + type = real + kind = kind_phys + intent = inout + optional = F +[dtidx] + standard_name = cumulative_change_of_state_variables_outer_index + long_name = index of state-variable and process in last dimension of diagnostic tendencies array AKA cumulative_change_index + units = index + dimensions = (number_of_tracers_plus_one_hundred,number_of_cumulative_change_processes) + type = integer + intent = in + optional = F +[index_of_x_wind] + standard_name = index_of_x_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_y_wind] + standard_name = index_of_y_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_temperature] + standard_name = index_of_temperature_in_cumulative_change_index + long_name = index of temperature in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_process_orographic_gwd] + standard_name = index_of_orographic_gravity_wave_drag_process_in_cumulative_change_index + long_name = index of orographic gravity wave drag process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_process_nonorographic_gwd] + standard_name = index_of_nonorographic_gravity_wave_drag_process_in_cumulative_change_index + long_name = index of nonorographic gravity wave drag process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[lprnt] + standard_name = flag_print + long_name = control flag for diagnostic print out + units = flag + dimensions = () + type = logical + intent = in + optional = F +[ipr] + standard_name = horizontal_index_of_printed_column + long_name = horizontal index of printed column + units = index + dimensions = () + type = integer + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + + diff --git a/physics/ugwpv1_gsldrag_post.F90 b/physics/ugwpv1_gsldrag_post.F90 new file mode 100644 index 000000000..e9bdafa4e --- /dev/null +++ b/physics/ugwpv1_gsldrag_post.F90 @@ -0,0 +1,102 @@ +!> \file ugwpv1_gsldrag_post.F90 +!! This file contains +module ugwpv1_gsldrag_post + +contains + +!>\defgroup ugwpv1_gsldrag_post ugwpv1_gsldrag Scheme Post +!! @{ + + subroutine ugwpv1_gsldrag_post_init () + end subroutine ugwpv1_gsldrag_post_init + +!> \section arg_table_ugwpv1_gsldrag_post_run Argument Table +!! \htmlinclude ugwpv1_gsldrag_post_run.html +!! + subroutine ugwpv1_gsldrag_post_run ( im, levs, & + ldiag_ugwp, dtf, & + dudt_gw, dvdt_gw, dtdt_gw, du_ofdcol, du_oblcol, tau_ogw, & + tau_ngw, zobl, zlwb, zogw, dudt_obl, dudt_ofd, dudt_ogw, & + tot_zmtb, tot_zlwb, tot_zogw, & + tot_tofd, tot_mtb, tot_ogw, tot_ngw, & + du3dt_mtb,du3dt_ogw, du3dt_tms, du3dt_ngw, dv3dt_ngw, & + dtdt, dudt, dvdt, errmsg, errflg) + + use machine, only: kind_phys + + implicit none + + ! Interface variables + integer, intent(in) :: im, levs + real(kind=kind_phys), intent(in) :: dtf + logical, intent(in) :: ldiag_ugwp !< flag for CIRES UGWP Diagnostics + + real(kind=kind_phys), intent(in), dimension(:) :: zobl, zlwb, zogw + real(kind=kind_phys), intent(in), dimension(:) :: du_ofdcol, tau_ogw, du_oblcol, tau_ngw + real(kind=kind_phys), intent(inout), dimension(:) :: tot_mtb, tot_ogw, tot_tofd, tot_ngw + real(kind=kind_phys), intent(inout), dimension(:) :: tot_zmtb, tot_zlwb, tot_zogw + + real(kind=kind_phys), intent(in), dimension(:,:) :: dtdt_gw, dudt_gw, dvdt_gw + real(kind=kind_phys), intent(in), dimension(:,:) :: dudt_obl, dudt_ogw, dudt_ofd + real(kind=kind_phys), intent(inout), dimension(:,:) :: du3dt_mtb, du3dt_ogw, du3dt_tms, du3dt_ngw, dv3dt_ngw + + real(kind=kind_phys), intent(inout), dimension(:,:) :: dtdt, dudt, dvdt + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 +! +! post creates the "time-averaged" diagnostics" +! + + if (ldiag_ugwp) then + tot_zmtb = tot_zmtb + dtf *zobl + tot_zlwb = tot_zlwb + dtf *zlwb + tot_zogw = tot_zogw + dtf *zogw + + tot_tofd = tot_tofd + dtf *du_ofdcol + tot_mtb = tot_mtb + dtf *du_oblcol + tot_ogw = tot_ogw + dtf *tau_ogw + tot_ngw = tot_ngw + dtf *tau_ngw + + du3dt_mtb = du3dt_mtb + dtf *dudt_obl + du3dt_tms = du3dt_tms + dtf *dudt_ofd + du3dt_ogw = du3dt_ogw + dtf *dudt_ogw + du3dt_ngw = du3dt_ngw + dtf *dudt_gw + dv3dt_ngw = dv3dt_ngw + dtf *dvdt_gw + endif + +!===================================================================== +! Updates inside the ugwpv1_gsldrag.F90 +! +! dtdt = dtdt + dtdt_gw +! dudt = dudt + dudt_gw +! dvdt = dvdt + dvdt_gw +! +! "post" may also create the "time-averaged" diagnostics" +! +! if(ldiag3d .and. lssav .and. .not. flag_for_gwd_generic_tend) then +! do k=1,levs +! do i=1,im +! ldu3dt_ngw(i,k) = ldu3dt_ngw(i,k) + dudt_ngw(i,k)*dtf +! ldv3dt_ngw(i,k) = ldv3dt_ngw(i,k) + dvdt_ngw(i,k)*dtf +! ldt3dt_ngw(i,k) = ldt3dt_ngw(i,k) + dtdt_ngw(i,k)*dtf +! +! ldu3dt_ogw(i,k) = ldu3dt_ogw(i,k) + dudt_ogw(i,k)*dtf +! ldv3dt_ogw(i,k) = ldv3dt_ogw(i,k) + dvdt_ogw(i,k)*dtf +! ldt3dt_ogw(i,k) = ldt3dt_ogw(i,k) + dtdt_ogw(i,k)*dtf +! enddo +! enddo +! endif +! +!===================================================================== + end subroutine ugwpv1_gsldrag_post_run + + subroutine ugwpv1_gsldrag_post_finalize () + end subroutine ugwpv1_gsldrag_post_finalize + +!! @} +end module ugwpv1_gsldrag_post diff --git a/physics/ugwpv1_gsldrag_post.meta b/physics/ugwpv1_gsldrag_post.meta new file mode 100644 index 000000000..8b0716e8e --- /dev/null +++ b/physics/ugwpv1_gsldrag_post.meta @@ -0,0 +1,310 @@ +[ccpp-table-properties] + name = ugwpv1_gsldrag_post + type = scheme + dependencies = machine.F + +######################################################################## +[ccpp-arg-table] + name = ugwpv1_gsldrag_post_run + type = scheme +[im] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count + dimensions = () + type = integer + intent = in + optional = F +[levs] + standard_name = vertical_layer_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in + optional = F +[ldiag_ugwp] + standard_name = flag_for_unified_gravity_wave_physics_diagnostics + long_name = flag for CIRES UGWP Diagnostics + units = flag + dimensions = () + type = logical + intent = in + optional = F +[dtf] + standard_name = timestep_for_dynamics + long_name = dynamics timestep + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[dudt_gw] + standard_name = tendency_of_x_wind_due_to_gravity_wave_drag + long_name = zonal wind tendency due to all GWs + units = m s-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dvdt_gw] + standard_name = tendency_of_y_wind_due_to_gravity_wave_drag + long_name = meridional wind tendency due to all GWs + units = m s-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dtdt_gw] + standard_name = tendency_of_air_temperature_due_to_gravity_wave_drag + long_name = air temperature tendency due to all GWs + units = K s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[du_ofdcol] + standard_name = vertically_integrated_x_momentum_flux_due_to_form_drag + long_name = integrated x momentum flux from form drag + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[du_oblcol] + standard_name = vertically_integrated_x_momentum_flux_due_to_blocking_drag + long_name = integrated x momentum flux from blocking drag + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[tau_ogw] + standard_name = instantaneous_momentum_flux_due_to_orographic_gravity_wave_drag + long_name = momentum flux or stress due to orographic gravity wave drag + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[tau_ngw] + standard_name = instantaneous_momentum_flux_due_to_nonstationary_gravity_wave + long_name = momentum flux or stress due to nonstationary gravity waves + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[zobl] + standard_name = height_of_mountain_blocking + long_name = height of mountain blocking drag_v1 + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[zlwb] + standard_name = height_of_low_level_wave_breaking + long_name = height of low level wave breaking for OGWs + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in +[zogw] + standard_name = height_of_launch_level_of_orographic_gravity_wave + long_name = height of launch level of orographic gravity wave + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[dudt_obl] + standard_name = tendency_of_x_momentum_due_to_blocking_drag + long_name = x momentum tendency from blocking drag + units = m s-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dudt_ofd] + standard_name = tendency_of_x_momentum_due_to_form_drag + long_name = x momentum tendency from form drag + units = m s-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dudt_ogw] + standard_name = tendency_of_x_wind_due_to_mesoscale_orographic_gravity_wave_drag + long_name = x momentum tendency from meso scale ogw + units = m s-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[tot_zmtb] + standard_name = time_integral_of_height_of_mountain_blocking + long_name = time integral of height of mountain blocking drag + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[tot_zlwb] + standard_name = time_integral_of_height_of_low_level_wave_breaking + long_name = time integral of height of drag due to low level wave breaking + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[tot_zogw] + standard_name = time_integral_of_height_of_launch_level_of_orographic_gravity_wave + long_name = time integral of height of launch level of orographic gravity wave + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[tot_tofd] + standard_name = time_integral_of_momentum_flux_due_to_turbulent_orographic_form_drag + long_name = time integral of momentum flux due to TOFD + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[tot_mtb] + standard_name = time_integral_of_momentum_flux_due_to_mountain_blocking_drag + long_name = time integral of momentum flux due to mountain blocking drag + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[tot_ogw] + standard_name = time_integral_of_momentum_flux_due_to_orographic_gravity_wave_drag + long_name = time integral of momentum flux due to orographic gravity wave drag + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[tot_ngw] + standard_name = time_integral_of_momentum_flux_due_to_nonstationary_gravity_wave + long_name = time integral of momentum flux due to nonstationary gravity waves + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[du3dt_mtb] + standard_name = time_integral_of_change_in_x_wind_due_to_mountain_blocking_drag + long_name = time integral of change in x wind due to mountain blocking drag + units = m s-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[du3dt_ogw] + standard_name = time_integral_of_change_in_x_wind_due_to_orographic_gravity_wave_drag + long_name = time integral of change in x wind due to orographic gw drag + units = m s-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[du3dt_tms] + standard_name = time_integral_of_change_in_x_wind_due_to_turbulent_orographic_form_drag + long_name = time integral of change in x wind due to TOFD + units = m s-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[du3dt_ngw] + standard_name = time_integral_of_change_in_x_wind_due_to_nonstationary_gravity_wave + long_name = time integral of change in x wind due to NGW + units = m s-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[dv3dt_ngw] + standard_name = time_integral_of_change_in_y_wind_due_to_nonstationary_gravity_wave + long_name = time integral of change in y wind due to NGW + units = m s-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[dtdt] + standard_name = process_split_cumulative_tendency_of_air_temperature + long_name = air temperature tendency due to model physics + units = K s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[dudt] + standard_name = process_split_cumulative_tendency_of_x_wind + long_name = zonal wind tendency due to model physics + units = m s-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[dvdt] + standard_name = process_split_cumulative_tendency_of_y_wind + long_name = meridional wind tendency due to model physics + units = m s-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F diff --git a/physics/unified_ugwp.F90 b/physics/unified_ugwp.F90 index 5c0604f86..da79ecde8 100644 --- a/physics/unified_ugwp.F90 +++ b/physics/unified_ugwp.F90 @@ -1,5 +1,5 @@ !> \file unified_ugwp.F90 -!! This file combines three gravity wave drag schemes under one ("unified_ugwp") suite: +!! This file combines three two orographic GW-schemes cires_ugwp.F90 and drag_suite.F90 under "unified_ugwp" suite: !! 1) The "V0 CIRES UGWP" scheme (cires_ugwp.F90) as implemented in the FV3GFSv16 atmosphere model, which includes: !! a) the "traditional" EMC orograhic gravity wave drag and flow blocking scheme of gwdps.f !! b) the v0 cires ugwp non-stationary GWD scheme @@ -10,8 +10,6 @@ !! (Steeneveld et al, 2008 \cite steeneveld_et_al_2008; Tsiringakis et al, 2017 \cite tsiringakis_et_al_2017) !! c) turbulent orographic form drag -- active at horizontal grid ersolutions down to ~1km !! (Beljaars et al, 2004 \cite beljaars_et_al_2004) -!! 3) The "V1 CIRES UGWP" scheme developed by Valery Yudin (University of Colorado, CIRES) -!! See Valery Yudin's presentation at 2017 NGGPS PI meeting: !! Gravity waves (GWs): Mesoscale GWs transport momentum, energy (heat) , and create eddy mixing in the whole atmosphere domain; Breaking and dissipating GWs deposit: (a) momentum; (b) heat (energy); and create (c) turbulent mixing of momentum, heat, and tracers !! To properly incorporate GW effects (a-c) unresolved by DYCOREs we need GW physics !! "Unified": a) all GW effects due to both dissipation/breaking; b) identical GW solvers for all GW sources; c) ability to replace solvers. @@ -25,11 +23,10 @@ !! The choice of schemes is activated at runtime by the following namelist options (boolean): !! do_ugwp_v0 -- activates V0 CIRES UGWP scheme - both orographic and non-stationary GWD !! do_ugwp_v0_orog_only -- activates V0 CIRES UGWP scheme - orographic GWD only +!! do_ugwp_v0_nst_only -- activates V0 CIRES UGWP scheme - non-stationary GWD only !! do_gsl_drag_ls_bl -- activates RAP/HRRR (GSL) large-scale GWD and blocking !! do_gsl_drag_ss -- activates RAP/HRRR (GSL) small-scale GWD !! do_gsl_drag_tofd -- activates RAP/HRRR (GSL) turbulent orographic drag -!! do_ugwp_v1 -- activates V1 CIRES UGWP scheme - both orographic and non-stationary GWD -!! do_ugwp_v1_orog_only -- activates V1 CIRES UGWP scheme - orographic GWD only !! Note that only one "large-scale" scheme can be activated at a time. !! @@ -37,22 +34,12 @@ module unified_ugwp use machine, only: kind_phys - use cires_ugwp_module, only: knob_ugwp_version, cires_ugwp_mod_init, cires_ugwp_mod_finalize - - use cires_ugwp_module_v1, only: cires_ugwp_init_v1, cires_ugwp_finalize, calendar_ugwp - +! use cires_ugwp_module, only: knob_ugwp_version, cires_ugwp_mod_init, cires_ugwp_mod_finalize + use cires_ugwpv0_module, only: knob_ugwp_version, cires_ugwpv0_mod_init, cires_ugwpv0_mod_finalize use gwdps, only: gwdps_run use drag_suite, only: drag_suite_run - use cires_ugwp_orolm97_v1, only: gwdps_oro_v1 - - use cires_ugwp_triggers_v1, only: slat_geos5_tamp_v1 - - ! use cires_ugwp_ngw_utils, only: tau_limb_advance - - use cires_ugwp_solv2_v1_mod, only: cires_ugwp_solv2_v1 - implicit none private @@ -75,9 +62,9 @@ module unified_ugwp subroutine unified_ugwp_init (me, master, nlunit, input_nml_file, logunit, & fn_nml2, jdat, lonr, latr, levs, ak, bk, dtp, cdmbgwd, cgwf, & con_pi, con_rerth, pa_rf_in, tau_rf_in, con_p0, do_ugwp, & - do_ugwp_v0, do_ugwp_v0_orog_only, do_gsl_drag_ls_bl, & - do_gsl_drag_ss, do_gsl_drag_tofd, do_ugwp_v1, & - do_ugwp_v1_orog_only, errmsg, errflg) + do_ugwp_v0, do_ugwp_v0_orog_only, do_ugwp_v0_nst_only, & + do_gsl_drag_ls_bl, do_gsl_drag_ss, do_gsl_drag_tofd, gwd_opt, & + errmsg, errflg) !---- initialization of unified_ugwp implicit none @@ -87,20 +74,20 @@ subroutine unified_ugwp_init (me, master, nlunit, input_nml_file, logunit, & integer, intent (in) :: nlunit character(len=*), intent (in) :: input_nml_file(:) integer, intent (in) :: logunit - integer, intent(in) :: jdat(8) + integer, intent (in) :: jdat(:) integer, intent (in) :: lonr integer, intent (in) :: levs integer, intent (in) :: latr real(kind=kind_phys), intent (in) :: ak(:), bk(:) real(kind=kind_phys), intent (in) :: dtp - real(kind=kind_phys), intent (in) :: cdmbgwd(4), cgwf(2) ! "scaling" controls for "old" GFS-GW schemes + real(kind=kind_phys), intent (in) :: cdmbgwd(:), cgwf(:) ! "scaling" controls for "old" GFS-GW schemes real(kind=kind_phys), intent (in) :: pa_rf_in, tau_rf_in real(kind=kind_phys), intent (in) :: con_p0, con_pi, con_rerth logical, intent (in) :: do_ugwp logical, intent (in) :: do_ugwp_v0, do_ugwp_v0_orog_only, & + do_ugwp_v0_nst_only, & do_gsl_drag_ls_bl, do_gsl_drag_ss, & - do_gsl_drag_tofd, do_ugwp_v1, & - do_ugwp_v1_orog_only + do_gsl_drag_tofd character(len=*), intent (in) :: fn_nml2 !character(len=*), parameter :: fn_nml='input.nml' @@ -109,7 +96,8 @@ subroutine unified_ugwp_init (me, master, nlunit, input_nml_file, logunit, & logical :: exists real :: dxsg integer :: k - + + integer, intent(in) :: gwd_opt character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -117,20 +105,22 @@ subroutine unified_ugwp_init (me, master, nlunit, input_nml_file, logunit, & errmsg = '' errflg = 0 + ! Consistency checks + if (gwd_opt/=2 .and. gwd_opt/=22) then + write(errmsg,'(*(a))') "Logic error: namelist choice of gravity wave & + & drag is different from unified_ugwp scheme" + errflg = 1 + return + end if ! Test to make sure that at most only one large-scale/blocking ! orographic drag scheme is chosen - if ( (do_ugwp_v0.and.(do_ugwp_v0_orog_only.or.do_gsl_drag_ls_bl.or. & - do_ugwp_v1.or.do_ugwp_v1_orog_only)) .or. & - (do_ugwp_v0_orog_only.and.(do_gsl_drag_ls_bl.or.do_ugwp_v1.or. & - do_ugwp_v1_orog_only)) .or. & - (do_gsl_drag_ls_bl.and.(do_ugwp_v1.or.do_ugwp_v1_orog_only)) .or. & - (do_ugwp_v1.and.do_ugwp_v1_orog_only) ) then + if ( (do_ugwp_v0.and.(do_ugwp_v0_orog_only.or.do_gsl_drag_ls_bl)) .or. & + (do_ugwp_v0_orog_only.and.do_gsl_drag_ls_bl) ) then write(errmsg,'(*(a))') "Logic error: Only one large-scale& &/blocking scheme (do_ugwp_v0,do_ugwp_v0_orog_only,& - &do_gsl_drag_ls_bl,do_ugwp_v1 or & - &do_ugwp_v1_orog_only) can be chosen" + &do_gsl_drag_ls_bl can be chosen" errflg = 1 return @@ -140,28 +130,21 @@ subroutine unified_ugwp_init (me, master, nlunit, input_nml_file, logunit, & if (is_initialized) return - if ( do_ugwp_v0 ) then + if ( do_ugwp_v0 .or. do_ugwp_v0_nst_only ) then ! if (do_ugwp .or. cdmbgwd(3) > 0.0) then (deactivate effect of do_ugwp) if (cdmbgwd(3) > 0.0) then - call cires_ugwp_mod_init (me, master, nlunit, input_nml_file, logunit, & + call cires_ugwpv0_mod_init(me, master, nlunit, input_nml_file, logunit, & fn_nml2, lonr, latr, levs, ak, bk, con_p0, dtp, & cdmbgwd(1:2), cgwf, pa_rf_in, tau_rf_in) else write(errmsg,'(*(a))') "Logic error: cires_ugwp_mod_init called but & - &do_ugwp_v0 is true and cdmbgwd(3) <= 0" + &do_ugwp_v0 or do_ugwp_v0_nst_only is true and cdmbgwd(3) <= 0" errflg = 1 return end if end if - if ( do_ugwp_v1 ) then - call cires_ugwp_init_v1 (me, master, nlunit, logunit, jdat, con_pi, & - con_rerth, fn_nml2, lonr, latr, levs, ak, bk, & - con_p0, dtp, cdmbgwd(1:2), cgwf, pa_rf_in, & - tau_rf_in, errmsg, errflg) - end if - is_initialized = .true. end subroutine unified_ugwp_init @@ -177,11 +160,12 @@ end subroutine unified_ugwp_init !! \htmlinclude unified_ugwp_finalize.html !! - subroutine unified_ugwp_finalize(do_ugwp_v0,do_ugwp_v1,errmsg, errflg) + subroutine unified_ugwp_finalize(do_ugwp_v0,do_ugwp_v0_nst_only, & + errmsg, errflg) implicit none ! - logical, intent (in) :: do_ugwp_v0, do_ugwp_v1 + logical, intent (in) :: do_ugwp_v0, do_ugwp_v0_nst_only character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -191,9 +175,7 @@ subroutine unified_ugwp_finalize(do_ugwp_v0,do_ugwp_v1,errmsg, errflg) if (.not.is_initialized) return - if ( do_ugwp_v0 ) call cires_ugwp_mod_finalize() - - if ( do_ugwp_v1 ) call cires_ugwp_finalize() + if ( do_ugwp_v0 .or. do_ugwp_v0_nst_only ) call cires_ugwpv0_mod_finalize() is_initialized = .false. @@ -211,7 +193,7 @@ end subroutine unified_ugwp_finalize !>@brief These subroutines and modules execute the CIRES UGWP Version 0 !>\defgroup unified_ugwp_run Unified Gravity Wave Physics General Algorithm !> @{ -!! The physics of NGWs in the UGWP framework (Yudin et al. 2018 \cite yudin_et_al_2018) is represented by four GW-solvers, which is introduced in Lindzen (1981) \cite lindzen_1981, Hines (1997) \cite hines_1997, Alexander and Dunkerton (1999) \cite alexander_and_dunkerton_1999, and Scinocca (2003) \cite scinocca_2003. The major modification of these GW solvers is represented by the addition of the background dissipation of temperature and winds to the saturation criteria for wave breaking. This feature is important in the mesosphere and thermosphere for WAM applications and it considers appropriate scale-dependent dissipation of waves near the model top lid providing the momentum and energy conservation in the vertical column physics (Shaw and Shepherd 2009 \cite shaw_and_shepherd_2009). In the UGWP-v0, the modification of Scinocca (2003) \cite scinocca_2003 scheme for NGWs with non-hydrostatic and rotational effects for GW propagations and background dissipation is represented by the subroutine \ref fv3_ugwp_solv2_v0. In the next release of UGWP, additional GW-solvers will be implemented along with physics-based triggering of waves and stochastic approaches for selection of GW modes characterized by horizontal phase velocities, azimuthal directions and magnitude of the vertical momentum flux (VMF). +!! The physics of NGWs in the UGWP framework (Yudin et al. 2018 \cite yudin_et_al_2018) is represented by four GW-solvers, which is introduced in Lindzen (1981) \cite lindzen_1981, Hines (1997) \cite hines_1997, Alexander and Dunkerton (1999) \cite alexander_and_dunkerton_1999, and Scinocca (2003) \cite scinocca_2003. The major modification of these GW solvers is represented by the addition of the background dissipation of temperature and winds to the saturation criteria for wave breaking. This feature is important in the mesosphere and thermosphere for WAM applications and it considers appropriate scale-dependent dissipation of waves near the model top lid providing the momentum and energy conservation in the vertical column physics (Shaw and Shepherd 2009 \cite shaw_and_shepherd_2009). In the UGWP-v0, the modification of Scinocca (2003) \cite scinocca_2003 scheme for NGWs with non-hydrostatic and rotational effects for GW propagations and backgroufnd dissipation is represented by the subroutine \ref fv3_ugwp_solv2_v0. In the next release of UGWP, additional GW-solvers will be implemented along with physics-based triggering of waves and stochastic approaches for selection of GW modes characterized by horizontal phase velocities, azimuthal directions and magnitude of the vertical momentum flux (VMF). !! !! In UGWP-v0, the specification for the VMF function is adopted from the GEOS-5 global atmosphere model of GMAO NASA/GSFC, as described in Molod et al. (2015) \cite molod_et_al_2015 and employed in the MERRRA-2 reanalysis (Gelaro et al., 2017 \cite gelaro_et_al_2017). The Fortran subroutine \ref slat_geos5_tamp describes the latitudinal shape of VMF-function as displayed in Figure 3 of Molod et al. (2015) \cite molod_et_al_2015. It shows that the enhanced values of VMF in the equatorial region gives opportunity to simulate the QBO-like oscillations in the equatorial zonal winds and lead to more realistic simulations of the equatorial dynamics in GEOS-5 operational and MERRA-2 reanalysis products. For the first vertically extended version of FV3GFS in the stratosphere and mesosphere, this simplified function of VMF allows us to tune the model climate and to evaluate multi-year simulations of FV3GFS with the MERRA-2 and ERA-5 reanalysis products, along with temperature, ozone, and water vapor observations of current satellite missions. After delivery of the UGWP-code, the EMC group developed and tested approach to modulate the zonal mean NGW forcing by 3D-distributions of the total precipitation as a proxy for the excitation of NGWs by convection and the vertically-integrated (surface - tropopause) Turbulent Kinetic Energy (TKE). The verification scores with updated NGW forcing, as reported elsewhere by EMC researchers, display noticeable improvements in the forecast scores produced by FV3GFS configuration extended into the mesosphere. !! @@ -229,33 +211,39 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, ugrs, vgrs, tgrs, q1, prsi, prsl, prslk, phii, phil, & del, kpbl, dusfcg, dvsfcg, gw_dudt, gw_dvdt, gw_dtdt, gw_kdis, & tau_tofd, tau_mtb, tau_ogw, tau_ngw, zmtb, zlwb, zogw, & - dudt_mtb,dudt_ogw, dudt_tms, du3dt_mtb, du3dt_ogw, du3dt_tms, & + dudt_mtb, dudt_tms, du3dt_mtb, du3dt_ogw, du3dt_tms, & dudt, dvdt, dtdt, rdxzb, con_g, con_omega, con_pi, con_cp, con_rd, con_rv, & con_rerth, con_fvirt, rain, ntke, q_tke, dqdt_tke, lprnt, ipr, & - ldu3dt_ogw, ldv3dt_ogw, ldt3dt_ogw, ldu3dt_cgw, ldv3dt_cgw, ldt3dt_cgw, & + dtend, dtidx, index_of_temperature, index_of_x_wind, index_of_y_wind, & + index_of_process_orographic_gwd, index_of_process_nonorographic_gwd, & ldiag3d, lssav, flag_for_gwd_generic_tend, do_ugwp_v0, do_ugwp_v0_orog_only, & - do_gsl_drag_ls_bl, do_gsl_drag_ss, do_gsl_drag_tofd, do_ugwp_v1, & - do_ugwp_v1_orog_only, gwd_opt, errmsg, errflg) + do_ugwp_v0_nst_only, do_gsl_drag_ls_bl, do_gsl_drag_ss, do_gsl_drag_tofd, & + gwd_opt, errmsg, errflg) implicit none ! interface variables integer, intent(in) :: me, master, im, levs, ntrac, kdt, lonr, nmtvr integer, intent(in) :: gwd_opt - integer, intent(in), dimension(im) :: kpbl - real(kind=kind_phys), intent(in), dimension(im) :: oro, oro_uf, hprime, oc, theta, sigma, gamma - real(kind=kind_phys), intent(in), dimension(im) :: varss,oc1ss,dx - real(kind=kind_phys), intent(in), dimension(im,4) :: oa4ss,ol4ss - logical, intent(in) :: flag_for_gwd_generic_tend - ! elvmax is intent(in) for CIRES UGWP, but intent(inout) for GFS GWDPS - real(kind=kind_phys), intent(inout), dimension(im) :: elvmax - real(kind=kind_phys), intent(in), dimension(im, 4) :: clx, oa4 - real(kind=kind_phys), intent(in), dimension(im) :: xlat, xlat_d, sinlat, coslat, area - real(kind=kind_phys), intent(in), dimension(im, levs) :: del, ugrs, vgrs, tgrs, prsl, prslk, phil - real(kind=kind_phys), intent(in), dimension(im, levs+1) :: prsi, phii - real(kind=kind_phys), intent(in), dimension(im, levs) :: q1 - real(kind=kind_phys), intent(in) :: dtp, fhzero, cdmbgwd(4) - integer, intent(in) :: jdat(8) + integer, intent(in), dimension(:) :: kpbl + real(kind=kind_phys), intent(in), dimension(:) :: oro, oro_uf, hprime, oc, theta, sigma, gamma + real(kind=kind_phys), intent(in), dimension(:) :: varss,oc1ss, dx + +!vay-nov 2020 + real(kind=kind_phys), intent(in), dimension(:,:) :: oa4ss,ol4ss + + logical, intent(in) :: flag_for_gwd_generic_tend + + ! elvmax is intent(in) for CIRES UGWPv1, but intent(inout) for GFS GWDPS + + real(kind=kind_phys), intent(inout), dimension(:) :: elvmax + real(kind=kind_phys), intent(in), dimension(:,:) :: clx, oa4 + real(kind=kind_phys), intent(in), dimension(:) :: xlat, xlat_d, sinlat, coslat, area + real(kind=kind_phys), intent(in), dimension(:,:) :: del, ugrs, vgrs, tgrs, prsl, prslk, phil + real(kind=kind_phys), intent(in), dimension(:,:) :: prsi, phii + real(kind=kind_phys), intent(in), dimension(:,:) :: q1 + real(kind=kind_phys), intent(in) :: dtp, fhzero, cdmbgwd(:) + integer, intent(in) :: jdat(:) logical, intent(in) :: do_tofd, ldiag_ugwp !Output (optional): @@ -265,35 +253,36 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, & dusfc_ss(:),dvsfc_ss(:), & & dusfc_fd(:),dvsfc_fd(:) real(kind=kind_phys), intent(out) :: & - & dtaux2d_ls(:,:),dtauy2d_ls(:,:), & & dtaux2d_bl(:,:),dtauy2d_bl(:,:), & & dtaux2d_ss(:,:),dtauy2d_ss(:,:), & & dtaux2d_fd(:,:),dtauy2d_fd(:,:) - real(kind=kind_phys), intent(in) :: br1(im), & - & hpbl(im), & - & slmsk(im) - - real(kind=kind_phys), intent(out), dimension(im) :: dusfcg, dvsfcg - real(kind=kind_phys), intent(out), dimension(im) :: zmtb, zlwb, zogw, rdxzb - real(kind=kind_phys), intent(out), dimension(im) :: tau_mtb, tau_ogw, tau_tofd, tau_ngw - real(kind=kind_phys), intent(out), dimension(im, levs):: gw_dudt, gw_dvdt, gw_dtdt, gw_kdis - real(kind=kind_phys), intent(out), dimension(im, levs):: dudt_mtb, dudt_ogw, dudt_tms - - ! These arrays are only allocated if ldiag=.true. - real(kind=kind_phys), intent(inout), dimension(:,:) :: ldu3dt_ogw, ldv3dt_ogw, ldt3dt_ogw - real(kind=kind_phys), intent(inout), dimension(:,:) :: ldu3dt_cgw, ldv3dt_cgw, ldt3dt_cgw + real(kind=kind_phys), intent(in) :: br1(:), & + & hpbl(:), & + & slmsk(:) + + real(kind=kind_phys), intent(out), dimension(:) :: dusfcg, dvsfcg + real(kind=kind_phys), intent(out), dimension(:) :: zmtb, zlwb, zogw, rdxzb + real(kind=kind_phys), intent(out), dimension(:) :: tau_mtb, tau_ogw, tau_tofd, tau_ngw + real(kind=kind_phys), intent(out), dimension(:,:) :: gw_dudt, gw_dvdt, gw_dtdt, gw_kdis + real(kind=kind_phys), intent(out), dimension(:,:) :: dudt_mtb, dudt_tms + real(kind=kind_phys), intent(out), dimension(:,:) :: dtaux2d_ls, dtauy2d_ls + + real(kind=kind_phys), intent(inout) :: dtend(:,:,:) + integer, intent(in) :: dtidx(:,:), index_of_temperature, index_of_x_wind, & + index_of_y_wind, index_of_process_nonorographic_gwd, & + index_of_process_orographic_gwd logical, intent(in) :: ldiag3d, lssav ! These arrays only allocated if ldiag_ugwp = .true. - real(kind=kind_phys), intent(out), dimension(:,:) :: du3dt_mtb, du3dt_ogw, du3dt_tms + real(kind=kind_phys), intent(inout), dimension(:,:) :: du3dt_mtb, du3dt_ogw, du3dt_tms - real(kind=kind_phys), intent(inout), dimension(im, levs):: dudt, dvdt, dtdt + real(kind=kind_phys), intent(inout), dimension(:,:) :: dudt, dvdt, dtdt real(kind=kind_phys), intent(in) :: con_g, con_omega, con_pi, con_cp, con_rd, & con_rv, con_rerth, con_fvirt - real(kind=kind_phys), intent(in), dimension(im) :: rain + real(kind=kind_phys), intent(in), dimension(:) :: rain integer, intent(in) :: ntke real(kind=kind_phys), intent(in), dimension(:,:) :: q_tke, dqdt_tke @@ -303,9 +292,9 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, ! flags for choosing combination of GW drag schemes to run logical, intent (in) :: do_ugwp_v0, do_ugwp_v0_orog_only, & + do_ugwp_v0_nst_only, & do_gsl_drag_ls_bl, do_gsl_drag_ss, & - do_gsl_drag_tofd, do_ugwp_v1, & - do_ugwp_v1_orog_only + do_gsl_drag_tofd character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -315,13 +304,10 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, real(kind=kind_phys), dimension(im) :: sgh30 real(kind=kind_phys), dimension(im, levs) :: Pdvdt, Pdudt real(kind=kind_phys), dimension(im, levs) :: Pdtdt, Pkdis - real(kind=kind_phys), dimension(im, levs) :: ed_dudt, ed_dvdt, ed_dtdt - ! from ugwp_driver_v0.f -> cires_ugwp_initialize.F90 -> module ugwp_wmsdis_init + real(kind=kind_phys), parameter :: tamp_mpa=30.e-3 - ! switches that activate impact of OGWs and NGWs (WL* how to deal with them? *WL) - real(kind=kind_phys), parameter :: pogw=1., pngw=1., pked=1. - real(kind=kind_phys), parameter :: fw1_tau=1.0 - integer :: nmtvr_temp + + integer :: nmtvr_temp, idtend real(kind=kind_phys), dimension(:,:), allocatable :: tke real(kind=kind_phys), dimension(:), allocatable :: turb_fac, tem @@ -331,23 +317,6 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, real(kind=kind_phys), dimension(im, levs) :: zmet ! geopotential height at model Layer centers real(kind=kind_phys), dimension(im, levs+1) :: zmeti ! geopotential height at model layer interfaces - - ! ugwp_v1 local variables - integer :: y4, month, day, ddd_ugwp, curdate, curday - integer :: hour - real(kind=kind_phys) :: hcurdate, hcurday, fhour, fhrday - integer :: kdtrest - integer :: curday_ugwp - integer :: curday_save=20150101 - logical :: first_qbo=.true. - real :: hcurday_save =20150101.00 - save first_qbo, curday_save, hcurday_save - - - ! ugwp_v1 temporary (local) diagnostic variables from cires_ugwp_solv2_v1 - real(kind=kind_phys) :: tauabs(im,levs), wrms(im,levs), trms(im,levs) - - ! Initialize CCPP error handling variables errmsg = '' errflg = 0 @@ -355,8 +324,6 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, ! 1) ORO stationary GWs ! ------------------ - zlwb(:) = 0. - ! Run the appropriate large-scale (large-scale GWD + blocking) scheme ! Note: In case of GSL drag_suite, this includes ss and tofd @@ -372,43 +339,20 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, dusfc_ss,dvsfc_ss,dusfc_fd,dvsfc_fd, & slmsk,br1,hpbl,con_g,con_cp,con_rd,con_rv, & con_fvirt,con_pi,lonr, & - cdmbgwd(1:2),me,master,lprnt,ipr,rdxzb,dx,gwd_opt, & + cdmbgwd,me,master,lprnt,ipr,rdxzb,dx,gwd_opt, & do_gsl_drag_ls_bl,do_gsl_drag_ss,do_gsl_drag_tofd, & - errmsg,errflg) - - end if - - if ( do_ugwp_v1.or.do_ugwp_v1_orog_only ) then - - ! Valery's TOFD - ! topo paras - ! w/ orographic effects - if(nmtvr == 14)then - ! calculate sgh30 for TOFD - sgh30 = abs(oro - oro_uf) - ! w/o orographic effects - else - sgh30 = 0. - endif - - inv_g = 1./con_g - zmeti = phii*inv_g - zmet = phil*inv_g - - call gwdps_oro_v1 (im, levs, lonr, do_tofd, & - Pdvdt, Pdudt, Pdtdt, Pkdis, & - ugrs , vgrs, tgrs, q1, KPBL, prsi,del,prsl, & - prslk, zmeti, zmet, dtp, kdt, hprime, oc, oa4, & - clx, theta, sigma, gamma, elvmax, & - con_g, con_omega, con_rd, con_cp, con_rv,con_pi, & - con_rerth, con_fvirt, sgh30, DUSFCg, DVSFCg, & - xlat_d, sinlat, coslat, area,cdmbgwd(1:2), me, & - master, rdxzb, zmtb, zogw, tau_mtb, tau_ogw, & - tau_tofd, du3dt_mtb, du3dt_ogw, du3dt_tms) - + dtend, dtidx, index_of_process_orographic_gwd, & + index_of_temperature, index_of_x_wind, & + index_of_y_wind, ldiag3d, errmsg, errflg) +! +! put zeros due to xy GSL-drag style: dtaux2d_bl,dtauy2d_bl,dtaux2d_ss.......dusfc_ls,dvsfc_ls +! + tau_mtb = 0. ; tau_ogw = 0. ; tau_tofd = 0. + dudt_mtb = 0. ; dudt_tms = 0. + end if - if ( do_ugwp_v0.or.do_ugwp_v0_orog_only ) then + if ( do_ugwp_v0.or.do_ugwp_v0_orog_only.or.do_ugwp_v0_nst_only ) then do k=1,levs do i=1,im @@ -419,6 +363,10 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, enddo enddo + end if + + if ( do_ugwp_v0.or.do_ugwp_v0_orog_only ) then + if (cdmbgwd(1) > 0.0 .or. cdmbgwd(2) > 0.0) then ! Override nmtvr with nmtvr_temp = 14 for passing into gwdps_run if necessary @@ -446,13 +394,20 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, if(ldiag3d .and. lssav .and. .not. flag_for_gwd_generic_tend) then - do k=1,levs - do i=1,im - ldu3dt_ogw(i,k) = ldu3dt_ogw(i,k) + Pdudt(i,k)*dtp - ldv3dt_ogw(i,k) = ldv3dt_ogw(i,k) + Pdvdt(i,k)*dtp - ldt3dt_ogw(i,k) = ldt3dt_ogw(i,k) + Pdtdt(i,k)*dtp - enddo - enddo + idtend = dtidx(index_of_x_wind,index_of_process_orographic_gwd) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + Pdudt*dtp + endif + + idtend = dtidx(index_of_y_wind,index_of_process_orographic_gwd) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + Pdvdt*dtp + endif + + idtend = dtidx(index_of_temperature,index_of_process_orographic_gwd) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + Pdtdt*dtp + endif endif end if @@ -466,12 +421,12 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, ! ! ugwp_v0 non-stationary GW drag ! - if (do_ugwp_v0) then + if (do_ugwp_v0.or.do_ugwp_v0_nst_only) then if (cdmbgwd(3) > 0.0) then ! 2) non-stationary GW-scheme with GMAO/MERRA GW-forcing - call slat_geos5_tamp(im, tamp_mpa, xlat_d, tau_ngw) + call slat_geos5_tamp_v0(im, tamp_mpa, xlat_d, tau_ngw) if (abs(1.0-cdmbgwd(3)) > 1.0e-6) then if (cdmbgwd(4) > 0.0) then @@ -514,10 +469,10 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, do k=1,levs do i=1,im - gw_dtdt(i,k) = pngw*gw_dtdt(i,k)+ pogw*Pdtdt(i,k) - gw_dudt(i,k) = pngw*gw_dudt(i,k)+ pogw*Pdudt(i,k) - gw_dvdt(i,k) = pngw*gw_dvdt(i,k)+ pogw*Pdvdt(i,k) - gw_kdis(i,k) = pngw*gw_kdis(i,k)+ pogw*Pkdis(i,k) + gw_dtdt(i,k) = gw_dtdt(i,k)+ Pdtdt(i,k) + gw_dudt(i,k) = gw_dudt(i,k)+ Pdudt(i,k) + gw_dvdt(i,k) = gw_dvdt(i,k)+ Pdvdt(i,k) + gw_kdis(i,k) = gw_kdis(i,k)+ Pkdis(i,k) ! accumulation of tendencies for CCPP to replicate EMC-physics updates (!! removed in latest code commit to VLAB) !dudt(i,k) = dudt(i,k) +gw_dudt(i,k) !dvdt(i,k) = dvdt(i,k) +gw_dvdt(i,k) @@ -537,198 +492,25 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, enddo endif ! cdmbgwd(3) > 0.0 - - if (pogw == 0.0) then - tau_mtb = 0. ; tau_ogw = 0. ; tau_tofd = 0. - dudt_mtb = 0. ; dudt_ogw = 0. ; dudt_tms = 0. - endif - -#if 0 - !============================================================================= - ! make "ugwp eddy-diffusion" update for gw_dtdt/gw_dudt/gw_dvdt by solving - ! vert diffusion equations & update "Statein%tgrs, Statein%ugrs, Statein%vgrs" - !============================================================================= - ! 3) application of "eddy"-diffusion to "smooth" UGWP-related tendencies - !------------------------------------------------------------------------------ - do k=1,levs - do i=1,im - ed_dudt(i,k) = 0.0 ; ed_dvdt(i,k) = 0.0 ; ed_dtdt(i,k) = 0.0 - enddo - enddo - - call edmix_ugwp_v0(im, levs, dtp, tgrs, ugrs, vgrs, q1, & - del, prsl, prsi, phil, prslk, gw_dudt, gw_dvdt, gw_dtdt, gw_kdis, & - ed_dudt, ed_dvdt, ed_dtdt, me, master, kdt) - gw_dtdt = gw_dtdt*(1.-pked) + ed_dtdt*pked - gw_dvdt = gw_dvdt*(1.-pked) + ed_dvdt*pked - gw_dudt = gw_dudt*(1.-pked) + ed_dudt*pked -#endif - + if(ldiag3d .and. lssav .and. .not. flag_for_gwd_generic_tend) then - do k=1,levs - do i=1,im - ldu3dt_cgw(i,k) = ldu3dt_cgw(i,k) + (gw_dudt(i,k) - Pdudt(i,k))*dtp - ldv3dt_cgw(i,k) = ldv3dt_cgw(i,k) + (gw_dvdt(i,k) - Pdvdt(i,k))*dtp - ldt3dt_cgw(i,k) = ldt3dt_cgw(i,k) + (gw_dtdt(i,k) - Pdtdt(i,k))*dtp - enddo - enddo - endif - - end if ! do_ugwp_v0 - - - ! - ! ugwp_v1 non-stationary GW drag - ! - if (do_ugwp_v1) then - -! -------- -! 2) non-stationary GWs with GEOS-5/MERRA GW-forcing -! ---------------------------------------------- -!-------- -! GMAO GEOS-5/MERRA GW-forcing lat-dep -!-------- - call slat_geos5_tamp_v1(im, tamp_mpa, xlat_d, tau_ngw) - - y4 = jdat(1); month = jdat(2); day = jdat(3) ; hour = jdat(5) - - ! fhour = float(hour)+float(jdat(6))/60. + float(jdat(7))/3600. - fhour = (kdt-1)*dtp/3600. - fhrday = fhour/24. - nint(fhour/24.) - fhour = fhrday*24. - - call calendar_ugwp(y4, month, day, ddd_ugwp) - curdate = y4*1000 + ddd_ugwp - curday = y4*10000 + month*100 + day - hcurdate = float(curdate) + fhrday - hcurday = float(curday) + fhrday -! - if (mod(fhour,fhzero) == 0 .or. first_qbo) then - - ! call tau_limb_advance(me, master, im, levs, ddd_ugwp, curdate, & - ! j1_tau, j2_tau, ddy_j1tau, ddy_j2tau, tau_sat, kdt ) - - if (first_qbo) kdtrest = kdt - first_qbo = .false. - curday_save = curday - hcurday_save= hcurday - endif - - ! tau_ngw = fw1_tau*tau_ngw + tau_sat*(1.-fw1_tau) - -! goto 111 -! if (mod(fhour,fhzero) == 0 .or. first_qbo) then - -! call tau_qbo_advance(me, master, im, levs, ddd_ugwp, curdate, & -! j1_tau, j2_tau, ddy_j1tau, ddy_j2tau, j1_qbo, j2_qbo, & -! ddy_j1qbo, ddy_j2qbo, tau_sat, tau_qbo, uqbo, ax_qbo, kdt ) - - -! if (me == master) then -! print *, ' curday_save first_qbo ', curday, curday_save, kdt -! print *, ' hcurdays ', hcurdate, float(hour)/24. -! print *, jdat(5), jdat(6), jdat(7), (kdt-1)*dtp/3600., ' calendar ' -!! print *, ' curday curday_ugwp first_qbo ', hcurday, first_qbo -!! print *, ' vay_tau-limb U' , maxval(uqbo), minval(uqbo) -!! print *, ' vay_tau-limb TS' , maxval(tau_sat), minval(tau_sat) -!! print *, ' vay_tau-limb TQ' , maxval(tau_qbo), minval(tau_qbo) -! endif - - -! if (first_qbo) kdtrest = kdt -! first_qbo = .false. -! curday_save = curday -! hcurday_save= hcurday -! endif - - - - -! if (mod(kdt, 720) == 0 .and. me == master ) then -! print *, ' vay_qbo_U' , maxval(uqbo), minval(uqbo) , kdt -! endif + idtend = dtidx(index_of_x_wind,index_of_process_nonorographic_gwd) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + Pdudt*dtp + endif -! wqbo = dtp/taurel -! do k =1, levs -!! sdexpz = wqbo*vert_qbo(k) -! sdexpz = 0.25*vert_qbo(k) -! do i=1, im -!! if (dexpy(i) > 0.0) then -! dforc = 0.25 -!! ugrs(i,k) = ugrs(i,k)*(1.-dforc) + dforc*uqbo(i,levs+1-k) -!! tgrs(i,k) = tgrs(i,k)*(1.-dforc) + dforc*tqbo(i,levs+1-k) -!! endif -! enddo -! enddo - -! 111 continue - - - call cires_ugwp_solv2_v1(im, levs, dtp, & - tgrs, ugrs, vgrs, q1, prsl, prsi, & - zmet, zmeti,prslk, xlat_d, sinlat, coslat, & - con_g, con_cp, con_rd, con_rv, con_omega, & - con_pi, con_fvirt, & - gw_dudt, gw_dvdt, gw_dTdt, gw_kdis, & - tauabs, wrms, trms, tau_ngw, me, master, kdt) - - if (me == master .and. kdt < 2) then - print * - write(6,*)'FV3GFS finished fv3_ugwp_solv2_v1 in ugwp_driver_v0 ' - write(6,*) ' non-stationary GWs with GMAO/MERRA GW-forcing ' - print * - endif - - do k=1,levs - do i=1,im - gw_dtdt(i,k) = pngw*gw_dtdt(i,k) + pogw*Pdtdt(i,k) - gw_dudt(i,k) = pngw*gw_dudt(i,k) + pogw*Pdudt(i,k) - !+(uqbo(i,levs+1-k)-ugrs(i,k))/21600. - gw_dvdt(i,k) = pngw*gw_dvdt(i,k) + pogw*Pdvdt(i,k) - gw_kdis(i,k) = pngw*gw_kdis(i,k) ! + pogw*Pkdis(i,k) - enddo - enddo - - - - - if (pogw == 0.0) then -! zmtb = 0.; zogw =0. - tau_mtb = 0.0 ; tau_ogw = 0.0 ; tau_tofd = 0.0 - du3dt_mtb = 0.0 ; du3dt_ogw = 0.0 ; du3dt_tms= 0.0 - endif - -! return - -!============================================================================= -! make "ugwp eddy-diffusion" update for gw_dtdt/gw_dudt/gw_dvdt by solving -! vert diffusion equations & update "Statein%tgrs, Statein%ugrs, Statein%vgrs" -!============================================================================= -! -! 3) application of "eddy"-diffusion to "smooth" UGWP-related tendencies -!------------------------------------------------------------------------------ - -! ed_dudt(:,:) = 0.0 ; ed_dvdt(:,:) = 0.0 ; ed_dtdt(:,:) = 0.0 - - - -! call edmix_ugwp_v1(im, levs, dtp, & -! tgrs, ugrs, vgrs, q1, del, & -! prsl, prsi, phil, prslk, & -! gw_dudt, gw_dvdt, gw_dTdt, gw_kdis, & -! ed_dudt, ed_dvdt, ed_dTdt, -! me, master, kdt ) - -! do k=1,levs -! do i=1,im -! gw_dtdt(i,k) = gw_dtdt(i,k) + ed_dtdt(i,k)*pked -! gw_dvdt(i,k) = gw_dvdt(i,k) + ed_dvdt(i,k)*pked -! gw_dudt(i,k) = gw_dudt(i,k) + ed_dudt(i,k)*pked -! enddo -! enddo + idtend = dtidx(index_of_y_wind,index_of_process_nonorographic_gwd) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + Pdvdt*dtp + endif + idtend = dtidx(index_of_temperature,index_of_process_nonorographic_gwd) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + Pdtdt*dtp + endif + endif - end if ! do_ugwp_v1 + end if ! do_ugwp_v0.or.do_ugwp_v0_nst_only end subroutine unified_ugwp_run diff --git a/physics/unified_ugwp.meta b/physics/unified_ugwp.meta index 675a68edd..b2f35e45f 100644 --- a/physics/unified_ugwp.meta +++ b/physics/unified_ugwp.meta @@ -1,13 +1,10 @@ [ccpp-table-properties] name = unified_ugwp type = scheme - dependencies = machine.F,cires_ugwp_module.F90,ugwp_driver_v0.F,cires_ugwp_triggers.F90 - dependencies = cires_ugwp_initialize.F90,cires_ugwp_solvers.F90,cires_ugwp_utils.F90 - dependencies = cires_orowam2017.f,cires_vert_lsatdis.F90,cires_vert_orodis.F90 - dependencies = cires_vert_wmsdis.F90,cires_ugwp_module_v1.F90,cires_ugwp_triggers_v1.F90 - dependencies = cires_ugwp_initialize_v1.F90,cires_ugwp_solv2_v1_mod.F90 - dependencies = cires_ugwp_orolm97_v1.F90,cires_orowam2017.F90,cires_vert_orodis_v1.F90 - dependencies = gwdps.f,drag_suite.F90 + + dependencies=cires_ugwp_triggers.F90,cires_ugwp_initialize.F90 + dependencies=cires_orowam2017.f, cires_ugwp_module.F90,gwdps.f,machine.F,ugwp_driver_v0.F + dependencies=drag_suite.F90 ######################################################################## [ccpp-arg-table] @@ -30,7 +27,7 @@ intent = in optional = F [nlunit] - standard_name = iounit_namelist + standard_name = iounit_of_namelist long_name = fortran unit number for opening namelist file units = none dimensions = () @@ -38,16 +35,16 @@ intent = in optional = F [input_nml_file] - standard_name = namelist_filename_for_internal_file_reads + standard_name = filename_of_internal_namelist long_name = character string to store full namelist contents units = none - dimensions = (number_of_lines_of_namelist_filename_for_internal_file_reads) + dimensions = (number_of_lines_in_internal_namelist) type = character kind = len=* intent = in optional = F [logunit] - standard_name = iounit_log + standard_name = iounit_of_log long_name = fortran unit number for writing logfile units = none dimensions = () @@ -55,7 +52,7 @@ intent = in optional = F [fn_nml2] - standard_name = namelist_filename + standard_name = filename_of_namelist long_name = namelist filename for ugwp units = none dimensions = () @@ -64,11 +61,13 @@ intent = in optional = F [jdat] - standard_name = forecast_date_and_time + standard_name = date_and_time_of_forecast_in_united_states_order long_name = current forecast date and time units = none dimensions = (8) type = integer + intent = in + optional = F [lonr] standard_name = number_of_equatorial_longitude_points long_name = number of global points in x-dir (i) along the equator @@ -86,7 +85,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () @@ -94,25 +93,25 @@ intent = in optional = F [ak] - standard_name = a_parameter_of_the_hybrid_coordinate + standard_name = sigma_pressure_hybrid_coordinate_a_coefficient long_name = a parameter for sigma pressure level calculations units = Pa - dimensions = (number_of_vertical_layers_for_radiation_calculations_plus_one) + dimensions = (vertical_interface_dimension_for_radiation) type = real kind = kind_phys intent = in optional = F [bk] - standard_name = b_parameter_of_the_hybrid_coordinate + standard_name = sigma_pressure_hybrid_coordinate_b_coefficient long_name = b parameter for sigma pressure level calculations units = none - dimensions = (number_of_vertical_layers_for_radiation_calculations_plus_one) + dimensions = (vertical_interface_dimension_for_radiation) type = real kind = kind_phys intent = in optional = F [dtp] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics timestep units = s dimensions = () @@ -121,7 +120,7 @@ intent = in optional = F [cdmbgwd] - standard_name = multiplication_factors_for_mountain_blocking_and_orographic_gravity_wave_drag + standard_name = multiplicative_tunable_parameters_for_mountain_blocking_and_orographic_gravity_wave_drag long_name = multiplication factors for cdmb and gwd units = none dimensions = (4) @@ -130,7 +129,7 @@ intent = in optional = F [cgwf] - standard_name = multiplication_factors_for_convective_gravity_wave_drag + standard_name = tunable_parameters_for_convective_gravity_wave_drag long_name = multiplication factor for convective GWD units = none dimensions = (2) @@ -157,7 +156,7 @@ intent = in optional = F [pa_rf_in] - standard_name = pressure_cutoff_for_rayleigh_damping + standard_name = air_pressure_at_bottom_extent_of_rayleigh_damping long_name = pressure level from which Rayleigh Damping is applied units = Pa dimensions = () @@ -166,7 +165,7 @@ intent = in optional = F [tau_rf_in] - standard_name = time_scale_for_rayleigh_damping + standard_name = timescale_for_rayleigh_damping long_name = time scale for Rayleigh damping in days units = d dimensions = () @@ -184,7 +183,7 @@ intent = in optional = F [do_ugwp] - standard_name = do_ugwp + standard_name = flag_for_unified_gravity_wave_physics_gravity_wave_drag_scheme long_name = flag to activate CIRES UGWP units = flag dimensions = () @@ -192,7 +191,7 @@ intent = in optional = F [do_ugwp_v0] - standard_name = do_ugwp_v0 + standard_name = flag_for_ugwp_version_0 long_name = flag to activate ver 0 CIRES UGWP units = flag dimensions = () @@ -200,15 +199,23 @@ intent = in optional = F [do_ugwp_v0_orog_only] - standard_name = do_ugwp_v0_orog_only + standard_name = flag_for_ugwp_version_0_orographic_gwd long_name = flag to activate ver 0 CIRES UGWP - orographic GWD only units = flag dimensions = () type = logical intent = in optional = F +[do_ugwp_v0_nst_only] + standard_name = flag_for_ugwp_version_0_nonorographic_gwd + long_name = flag to activate ver 0 CIRES UGWP - non-stationary GWD only + units = flag + dimensions = () + type = logical + intent = in + optional = F [do_gsl_drag_ls_bl] - standard_name = do_gsl_drag_ls_bl + standard_name = flag_for_gsl_drag_suite_large_scale_orographic_and_blocking_drag long_name = flag to activate GSL drag suite - large-scale GWD and blocking units = flag dimensions = () @@ -216,7 +223,7 @@ intent = in optional = F [do_gsl_drag_ss] - standard_name = do_gsl_drag_ss + standard_name = flag_for_gsl_drag_suite_small_scale_orographic_drag long_name = flag to activate GSL drag suite - small-scale GWD units = flag dimensions = () @@ -224,27 +231,19 @@ intent = in optional = F [do_gsl_drag_tofd] - standard_name = do_gsl_drag_tofd + standard_name = flag_for_gsl_drag_suite_turbulent_orographic_form_drag long_name = flag to activate GSL drag suite - turb orog form drag units = flag dimensions = () type = logical intent = in optional = F -[do_ugwp_v1] - standard_name = do_ugwp_v1 - long_name = flag to activate ver 1 CIRES UGWP - units = flag - dimensions = () - type = logical - intent = in - optional = F -[do_ugwp_v1_orog_only] - standard_name = do_ugwp_v1_orog_only - long_name = flag to activate ver 1 CIRES UGWP - orographic GWD only +[gwd_opt] + standard_name = control_for_drag_suite_gravity_wave_drag + long_name = flag to choose gwd scheme units = flag dimensions = () - type = logical + type = integer intent = in optional = F [errmsg] @@ -270,16 +269,16 @@ name = unified_ugwp_finalize type = scheme [do_ugwp_v0] - standard_name = do_ugwp_v0 + standard_name = flag_for_ugwp_version_0 long_name = flag to activate ver 0 CIRES UGWP units = flag dimensions = () type = logical intent = in optional = F -[do_ugwp_v1] - standard_name = do_ugwp_v1 - long_name = flag to activate ver 1 CIRES UGWP +[do_ugwp_v0_nst_only] + standard_name = flag_for_ugwp_version_0_nonorographic_gwd + long_name = flag to activate ver 0 CIRES UGWP - non-stationary GWD only units = flag dimensions = () type = logical @@ -332,7 +331,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () @@ -348,7 +347,7 @@ intent = in optional = F [dtp] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = physics timestep units = s dimensions = () @@ -357,14 +356,16 @@ intent = in optional = F [fhzero] - standard_name = hours_between_clearing_of_diagnostic_buckets + standard_name = period_of_diagnostics_reset long_name = hours between clearing of diagnostic buckets units = h dimensions = () type = real kind = kind_phys + intent = in + optional = F [kdt] - standard_name = index_of_time_step + standard_name = index_of_timestep long_name = current forecast iteration units = index dimensions = () @@ -380,8 +381,8 @@ intent = in optional = F [oro] - standard_name = orography - long_name = orography + standard_name = height_above_mean_sea_level + long_name = height_above_mean_sea_level units = m dimensions = (horizontal_loop_extent) type = real @@ -389,8 +390,8 @@ intent = in optional = F [oro_uf] - standard_name = orography_unfiltered - long_name = unfiltered orography + standard_name = unfiltered_height_above_mean_sea_level + long_name = unfiltered height_above_mean_sea_level units = m dimensions = (horizontal_loop_extent) type = real @@ -399,7 +400,7 @@ optional = F [hprime] standard_name = standard_deviation_of_subgrid_orography - long_name = standard deviation of subgrid orography + long_name = standard deviation of subgrid height_above_mean_sea_level units = m dimensions = (horizontal_loop_extent) type = real @@ -416,7 +417,7 @@ optional = F [oc] standard_name = convexity_of_subgrid_orography - long_name = convexity of subgrid orography + long_name = convexity of subgrid height_above_mean_sea_level units = none dimensions = (horizontal_loop_extent) type = real @@ -434,7 +435,7 @@ optional = F [sigma] standard_name = slope_of_subgrid_orography - long_name = slope of subgrid orography + long_name = slope of subgrid height_above_mean_sea_level units = none dimensions = (horizontal_loop_extent) type = real @@ -443,7 +444,7 @@ optional = F [gamma] standard_name = anisotropy_of_subgrid_orography - long_name = anisotropy of subgrid orography + long_name = anisotropy of subgrid height_above_mean_sea_level units = none dimensions = (horizontal_loop_extent) type = real @@ -452,7 +453,7 @@ optional = F [elvmax] standard_name = maximum_subgrid_orography - long_name = maximum of subgrid orography + long_name = maximum of subgrid height_above_mean_sea_level units = m dimensions = (horizontal_loop_extent) type = real @@ -461,7 +462,7 @@ optional = F [clx] standard_name = fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height - long_name = horizontal fraction of grid box covered by subgrid orography higher than critical height + long_name = horizontal fraction of grid box covered by subgrid height_above_mean_sea_level higher than critical height units = frac dimensions = (horizontal_loop_extent,4) type = real @@ -470,7 +471,7 @@ optional = F [oa4] standard_name = asymmetry_of_subgrid_orography - long_name = asymmetry of subgrid orography + long_name = asymmetry of subgrid height_above_mean_sea_level units = none dimensions = (horizontal_loop_extent,4) type = real @@ -479,7 +480,7 @@ optional = F [varss] standard_name = standard_deviation_of_subgrid_orography_small_scale - long_name = standard deviation of subgrid orography small scale + long_name = standard deviation of subgrid height_above_mean_sea_level small scale units = m dimensions = (horizontal_loop_extent) type = real @@ -488,7 +489,7 @@ optional = F [oc1ss] standard_name = convexity_of_subgrid_orography_small_scale - long_name = convexity of subgrid orography small scale + long_name = convexity of subgrid height_above_mean_sea_level small scale units = none dimensions = (horizontal_loop_extent) type = real @@ -497,7 +498,7 @@ optional = F [oa4ss] standard_name = asymmetry_of_subgrid_orography_small_scale - long_name = asymmetry of subgrid orography small scale + long_name = asymmetry of subgrid height_above_mean_sea_level small scale units = none dimensions = (horizontal_loop_extent,4) type = real @@ -506,7 +507,7 @@ optional = F [ol4ss] standard_name = fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height_small_scale - long_name = horizontal fraction of grid box covered by subgrid orography higher than critical height small scale + long_name = horizontal fraction of grid box covered by subgrid height_above_mean_sea_level higher than critical height small scale units = frac dimensions = (horizontal_loop_extent,4) type = real @@ -514,7 +515,7 @@ intent = in optional = F [dx] - standard_name = cell_size + standard_name = characteristic_grid_lengthscale long_name = size of the grid cell units = m dimensions = (horizontal_loop_extent) @@ -523,145 +524,145 @@ intent = in optional = F [dusfc_ls] - standard_name = integrated_x_momentum_flux_from_large_scale_gwd + standard_name = vertically_integrated_x_momentum_flux_due_to_mesoscale_orographic_gravity_wave_drag long_name = integrated x momentum flux from large scale gwd - units = Pa s + units = Pa dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out optional = F [dvsfc_ls] - standard_name = integrated_y_momentum_flux_from_large_scale_gwd + standard_name = vertically_integrated_y_momentum_flux_due_to_mesoscale_orographic_gravity_wave_drag long_name = integrated y momentum flux from large scale gwd - units = Pa s + units = Pa dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out optional = F [dusfc_bl] - standard_name = integrated_x_momentum_flux_from_blocking_drag + standard_name = vertically_integrated_x_momentum_flux_due_to_blocking_drag long_name = integrated x momentum flux from blocking drag - units = Pa s + units = Pa dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out optional = F [dvsfc_bl] - standard_name = integrated_y_momentum_flux_from_blocking_drag + standard_name = vertically_integrated_y_momentum_flux_due_to_blocking_drag long_name = integrated y momentum flux from blocking drag - units = Pa s + units = Pa dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out optional = F [dusfc_ss] - standard_name = integrated_x_momentum_flux_from_small_scale_gwd + standard_name = vertically_integrated_x_momentum_flux_due_to_small_scale_gravity_wave_drag long_name = integrated x momentum flux from small scale gwd - units = Pa s + units = Pa dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out optional = F [dvsfc_ss] - standard_name = integrated_y_momentum_flux_from_small_scale_gwd + standard_name = vertically_integrated_y_momentum_flux_due_to_small_scale_gravity_wave_drag long_name = integrated y momentum flux from small scale gwd - units = Pa s + units = Pa dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out optional = F [dusfc_fd] - standard_name = integrated_x_momentum_flux_from_form_drag + standard_name = vertically_integrated_x_momentum_flux_due_to_form_drag long_name = integrated x momentum flux from form drag - units = Pa s + units = Pa dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out optional = F [dvsfc_fd] - standard_name = integrated_y_momentum_flux_from_form_drag + standard_name = vertically_integrated_y_momentum_flux_due_to_form_drag long_name = integrated y momentum flux from form drag - units = Pa s + units = Pa dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out optional = F [dtaux2d_ls] - standard_name = x_momentum_tendency_from_large_scale_gwd - long_name = x momentum tendency from large scale gwd + standard_name = tendency_of_x_wind_due_to_mesoscale_orographic_gravity_wave_drag + long_name = instantaneous change in x wind due to orographic gw drag units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [dtauy2d_ls] - standard_name = y_momentum_tendency_from_large_scale_gwd - long_name = y momentum tendency from large scale gwd + standard_name = tendency_of_y_wind_due_to_mesoscale_orographic_gravity_wave_drag + long_name = instantaneous change in y wind due to orographic gw drag units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [dtaux2d_bl] - standard_name = x_momentum_tendency_from_blocking_drag + standard_name = tendency_of_x_momentum_due_to_blocking_drag long_name = x momentum tendency from blocking drag units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [dtauy2d_bl] - standard_name = y_momentum_tendency_from_blocking_drag + standard_name = tendency_of_y_momentum_due_to_blocking_drag long_name = y momentum tendency from blocking drag units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [dtaux2d_ss] - standard_name = x_momentum_tendency_from_small_scale_gwd + standard_name = tendency_of_x_momentum_due_to_small_scale_gravity_wave_drag long_name = x momentum tendency from small scale gwd units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [dtauy2d_ss] - standard_name = y_momentum_tendency_from_small_scale_gwd + standard_name = tendency_of_y_momentum_due_to_small_scale_gravity_wave_drag long_name = y momentum tendency from small scale gwd units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [dtaux2d_fd] - standard_name = x_momentum_tendency_from_form_drag + standard_name = tendency_of_x_momentum_due_to_form_drag long_name = x momentum tendency from form drag units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [dtauy2d_fd] - standard_name = y_momentum_tendency_from_form_drag + standard_name = tendency_of_y_momentum_due_to_form_drag long_name = y momentum tendency from form drag units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -685,7 +686,7 @@ intent = in optional = F [slmsk] - standard_name = sea_land_ice_mask_real + standard_name = area_type long_name = landmask: sea/land/ice=0/1/2 units = flag dimensions = (horizontal_loop_extent) @@ -694,7 +695,7 @@ intent = in optional = F [do_tofd] - standard_name = turb_oro_form_drag_flag + standard_name = flag_for_turbulent_orographic_form_drag_in_unified_gravity_wave_physics_gravitiy_wave_drag_scheme long_name = flag for turbulent orographic form drag units = flag dimensions = () @@ -702,7 +703,7 @@ intent = in optional = F [ldiag_ugwp] - standard_name = diag_ugwp_flag + standard_name = flag_for_unified_gravity_wave_physics_diagnostics long_name = flag for CIRES UGWP Diagnostics units = flag dimensions = () @@ -710,7 +711,7 @@ intent = in optional = F [cdmbgwd] - standard_name = multiplication_factors_for_mountain_blocking_and_orographic_gravity_wave_drag + standard_name = multiplicative_tunable_parameters_for_mountain_blocking_and_orographic_gravity_wave_drag long_name = multiplication factors for cdmb and gwd units = none dimensions = (4) @@ -719,11 +720,13 @@ intent = in optional = F [jdat] - standard_name = forecast_date_and_time + standard_name = date_and_time_of_forecast_in_united_states_order long_name = current forecast date and time units = none dimensions = (8) type = integer + intent = in + optional = F [xlat] standard_name = latitude long_name = grid latitude @@ -773,7 +776,7 @@ standard_name = x_wind long_name = zonal wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -782,7 +785,7 @@ standard_name = y_wind long_name = meridional wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -791,16 +794,16 @@ standard_name = air_temperature long_name = model layer mean temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [q1] - standard_name = water_vapor_specific_humidity + standard_name = specific_humidity long_name = mid-layer specific humidity of water vapor units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -809,7 +812,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -818,16 +821,16 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [prslk] - standard_name = dimensionless_exner_function_at_model_layers + standard_name = dimensionless_exner_function long_name = dimensionless Exner function at model layer centers units = none - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -836,7 +839,7 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -845,7 +848,7 @@ standard_name = geopotential long_name = geopotential at model layer centers units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -854,7 +857,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = air pressure difference between midlayers units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -888,37 +891,37 @@ intent = out optional = F [gw_dudt] - standard_name = tendency_of_x_wind_due_to_ugwp + standard_name = tendency_of_x_wind_due_to_gravity_wave_drag long_name = zonal wind tendency due to UGWP units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [gw_dvdt] - standard_name = tendency_of_y_wind_due_to_ugwp + standard_name = tendency_of_y_wind_due_to_gravity_wave_drag long_name = meridional wind tendency due to UGWP units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [gw_dtdt] - standard_name = tendency_of_air_temperature_due_to_ugwp + standard_name = tendency_of_air_temperature_due_to_gravity_wave_drag long_name = air temperature tendency due to UGWP units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [gw_kdis] - standard_name = eddy_mixing_due_to_ugwp + standard_name = atmosphere_momentum_diffusivity_due_to_gravity_wave_drag long_name = eddy mixing due to UGWP units = m2 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -990,25 +993,16 @@ standard_name = instantaneous_change_in_x_wind_due_to_mountain_blocking_drag long_name = instantaneous change in x wind due to mountain blocking drag units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = out - optional = F -[dudt_ogw] - standard_name = instantaneous_change_in_x_wind_due_to_orographic_gravity_wave_drag - long_name = instantaneous change in x wind due to orographic gw drag - units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out optional = F [dudt_tms] - standard_name = instantaneous_change_in_x_wind_due_to_turbulent_orographic_form_drag + standard_name = tendency_of_x_wind_due_to_turbulent_orographic_form_drag long_name = instantaneous change in x wind due to TOFD units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = out @@ -1017,7 +1011,7 @@ standard_name = time_integral_of_change_in_x_wind_due_to_mountain_blocking_drag long_name = time integral of change in x wind due to mountain blocking drag units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -1026,7 +1020,7 @@ standard_name = time_integral_of_change_in_x_wind_due_to_orographic_gravity_wave_drag long_name = time integral of change in x wind due to orographic gw drag units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -1035,34 +1029,34 @@ standard_name = time_integral_of_change_in_x_wind_due_to_turbulent_orographic_form_drag long_name = time integral of change in x wind due to TOFD units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [dudt] - standard_name = tendency_of_x_wind_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_x_wind long_name = zonal wind tendency due to model physics units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [dvdt] - standard_name = tendency_of_y_wind_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_y_wind long_name = meridional wind tendency due to model physics units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [dtdt] - standard_name = tendency_of_air_temperature_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_air_temperature long_name = air temperature tendency due to model physics units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -1113,7 +1107,7 @@ intent = in optional = F [con_rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -1158,7 +1152,7 @@ intent = in optional = F [ntke] - standard_name = index_for_turbulent_kinetic_energy + standard_name = index_of_turbulent_kinetic_energy_in_tracer_concentration_array long_name = tracer index for turbulent kinetic energy units = index dimensions = () @@ -1169,16 +1163,16 @@ standard_name = turbulent_kinetic_energy long_name = turbulent kinetic energy units = J - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [dqdt_tke] - standard_name = tendency_of_turbulent_kinetic_energy_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_turbulent_kinetic_energy long_name = turbulent kinetic energy tendency due to model physics units = J s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -1199,70 +1193,73 @@ type = integer intent = in optional = F -[ldu3dt_ogw] - standard_name = cumulative_change_in_x_wind_due_to_orographic_gravity_wave_drag - long_name = cumulative change in x wind due to orographic gravity wave drag - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[ldiag3d] + standard_name = flag_for_diagnostics_3D + long_name = flag for 3d diagnostic fields + units = flag + dimensions = () + type = logical + intent = in optional = F -[ldv3dt_ogw] - standard_name = cumulative_change_in_y_wind_due_to_orographic_gravity_wave_drag - long_name = cumulative change in y wind due to orographic gravity wave drag - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) +[dtend] + standard_name = cumulative_change_of_state_variables + long_name = diagnostic tendencies for state variables + units = various + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_cumulative_change_processes) type = real kind = kind_phys intent = inout optional = F -[ldt3dt_ogw] - standard_name = cumulative_change_in_temperature_due_to_orographic_gravity_wave_drag - long_name = cumulative change in temperature due to orographic gravity wave drag - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[dtidx] + standard_name = cumulative_change_of_state_variables_outer_index + long_name = index of state-variable and process in last dimension of diagnostic tendencies array AKA cumulative_change_index + units = index + dimensions = (number_of_tracers_plus_one_hundred,number_of_cumulative_change_processes) + type = integer + intent = in optional = F -[ldu3dt_cgw] - standard_name = cumulative_change_in_x_wind_due_to_convective_gravity_wave_drag - long_name = cumulative change in x wind due to convective gravity wave drag - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[index_of_temperature] + standard_name = index_of_temperature_in_cumulative_change_index + long_name = index of temperature in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in optional = F -[ldv3dt_cgw] - standard_name = cumulative_change_in_y_wind_due_to_convective_gravity_wave_drag - long_name = cumulative change in y wind due to convective gravity wave drag - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[index_of_x_wind] + standard_name = index_of_x_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in optional = F -[ldt3dt_cgw] - standard_name = cumulative_change_in_temperature_due_to_convective_gravity_wave_drag - long_name = cumulative change in temperature due to convective gravity wave drag - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout +[index_of_y_wind] + standard_name = index_of_y_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in optional = F -[ldiag3d] - standard_name = flag_diagnostics_3D - long_name = flag for 3d diagnostic fields - units = flag +[index_of_process_orographic_gwd] + standard_name = index_of_orographic_gravity_wave_drag_process_in_cumulative_change_index + long_name = index of orographic gravity wave drag process in second dimension of array cumulative change index + units = index dimensions = () - type = logical + type = integer + intent = in + optional = F +[index_of_process_nonorographic_gwd] + standard_name = index_of_nonorographic_gravity_wave_drag_process_in_cumulative_change_index + long_name = index of nonorographic gravity wave drag process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer intent = in optional = F [lssav] - standard_name = flag_diagnostics + standard_name = flag_for_diagnostics long_name = logical flag for storing diagnostics units = flag dimensions = () @@ -1270,7 +1267,7 @@ intent = in optional = F [flag_for_gwd_generic_tend] - standard_name = flag_for_generic_gravity_wave_drag_tendency + standard_name = flag_for_generic_tendency_due_to_gravity_wave_drag long_name = true if GFS_GWD_generic should calculate tendencies units = flag dimensions = () @@ -1278,7 +1275,7 @@ intent = in optional = F [do_ugwp_v0] - standard_name = do_ugwp_v0 + standard_name = flag_for_ugwp_version_0 long_name = flag to activate ver 0 CIRES UGWP units = flag dimensions = () @@ -1286,15 +1283,23 @@ intent = in optional = F [do_ugwp_v0_orog_only] - standard_name = do_ugwp_v0_orog_only + standard_name = flag_for_ugwp_version_0_orographic_gwd long_name = flag to activate ver 0 CIRES UGWP - orographic GWD only units = flag dimensions = () type = logical intent = in optional = F +[do_ugwp_v0_nst_only] + standard_name = flag_for_ugwp_version_0_nonorographic_gwd + long_name = flag to activate ver 0 CIRES UGWP - non-stationary GWD only + units = flag + dimensions = () + type = logical + intent = in + optional = F [do_gsl_drag_ls_bl] - standard_name = do_gsl_drag_ls_bl + standard_name = flag_for_gsl_drag_suite_large_scale_orographic_and_blocking_drag long_name = flag to activate GSL drag suite - large-scale GWD and blocking units = flag dimensions = () @@ -1302,7 +1307,7 @@ intent = in optional = F [do_gsl_drag_ss] - standard_name = do_gsl_drag_ss + standard_name = flag_for_gsl_drag_suite_small_scale_orographic_drag long_name = flag to activate GSL drag suite - small-scale GWD units = flag dimensions = () @@ -1310,31 +1315,15 @@ intent = in optional = F [do_gsl_drag_tofd] - standard_name = do_gsl_drag_tofd + standard_name = flag_for_gsl_drag_suite_turbulent_orographic_form_drag long_name = flag to activate GSL drag suite - turb orog form drag units = flag dimensions = () type = logical intent = in optional = F -[do_ugwp_v1] - standard_name = do_ugwp_v1 - long_name = flag to activate ver 1 CIRES UGWP - units = flag - dimensions = () - type = logical - intent = in - optional = F -[do_ugwp_v1_orog_only] - standard_name = do_ugwp_v1_orog_only - long_name = flag to activate ver 1 CIRES UGWP - orographic GWD only - units = flag - dimensions = () - type = logical - intent = in - optional = F [gwd_opt] - standard_name = gwd_opt + standard_name = control_for_drag_suite_gravity_wave_drag long_name = flag to choose gwd scheme units = flag dimensions = () diff --git a/physics/unified_ugwp_post.meta b/physics/unified_ugwp_post.meta index 85a6bff8e..a340c8c1d 100644 --- a/physics/unified_ugwp_post.meta +++ b/physics/unified_ugwp_post.meta @@ -8,7 +8,7 @@ name = unified_ugwp_post_run type = scheme [ldiag_ugwp] - standard_name = diag_ugwp_flag + standard_name = flag_for_unified_gravity_wave_physics_diagnostics long_name = flag for CIRES UGWP Diagnostics units = flag dimensions = () @@ -16,7 +16,7 @@ intent = in optional = F [dtf] - standard_name = time_step_for_dynamics + standard_name = timestep_for_dynamics long_name = dynamics timestep units = s dimensions = () @@ -33,7 +33,7 @@ intent = in optional = F [levs] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = number of vertical levels units = count dimensions = () @@ -41,28 +41,28 @@ intent = in optional = F [gw_dtdt] - standard_name = tendency_of_air_temperature_due_to_ugwp + standard_name = tendency_of_air_temperature_due_to_gravity_wave_drag long_name = air temperature tendency due to UGWP units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [gw_dudt] - standard_name = tendency_of_x_wind_due_to_ugwp + standard_name = tendency_of_x_wind_due_to_gravity_wave_drag long_name = zonal wind tendency due to UGWP units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [gw_dvdt] - standard_name = tendency_of_y_wind_due_to_ugwp + standard_name = tendency_of_y_wind_due_to_gravity_wave_drag long_name = meridional wind tendency due to UGWP units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -134,25 +134,25 @@ standard_name = instantaneous_change_in_x_wind_due_to_mountain_blocking_drag long_name = instantaneous change in x wind due to mountain blocking drag units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [dudt_ogw] - standard_name = instantaneous_change_in_x_wind_due_to_orographic_gravity_wave_drag + standard_name = tendency_of_x_wind_due_to_mesoscale_orographic_gravity_wave_drag long_name = instantaneous change in x wind due to orographic gw drag units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [dudt_tms] - standard_name = instantaneous_change_in_x_wind_due_to_turbulent_orographic_form_drag + standard_name = tendency_of_x_wind_due_to_turbulent_orographic_form_drag long_name = instantaneous change in x wind due to TOFD units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -224,7 +224,7 @@ standard_name = time_integral_of_change_in_x_wind_due_to_mountain_blocking_drag long_name = time integral of change in x wind due to mountain blocking drag units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -233,7 +233,7 @@ standard_name = time_integral_of_change_in_x_wind_due_to_orographic_gravity_wave_drag long_name = time integral of change in x wind due to orographic gw drag units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -242,7 +242,7 @@ standard_name = time_integral_of_change_in_x_wind_due_to_turbulent_orographic_form_drag long_name = time integral of change in x wind due to TOFD units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -251,7 +251,7 @@ standard_name = time_integral_of_change_in_x_wind_due_to_nonstationary_gravity_wave long_name = time integral of change in x wind due to NGW units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout @@ -260,34 +260,34 @@ standard_name = time_integral_of_change_in_y_wind_due_to_nonstationary_gravity_wave long_name = time integral of change in y wind due to NGW units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [dtdt] - standard_name = tendency_of_air_temperature_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_air_temperature long_name = air temperature tendency due to model physics units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [dudt] - standard_name = tendency_of_x_wind_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_x_wind long_name = zonal wind tendency due to model physics units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [dvdt] - standard_name = tendency_of_y_wind_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_y_wind long_name = meridional wind tendency due to model physics units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/ysuvdif.F90 b/physics/ysuvdif.F90 index 81e3a79b4..6c269d3b8 100644 --- a/physics/ysuvdif.F90 +++ b/physics/ysuvdif.F90 @@ -11,7 +11,22 @@ module ysuvdif contains - subroutine ysuvdif_init () + subroutine ysuvdif_init (do_ysu,errmsg,errflg) + + logical, intent(in) :: do_ysu + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + ! Consistency checks + if (.not. do_ysu) then + write(errmsg,fmt='(*(a))') 'Logic error: do_ysu = .false.' + errflg = 1 + return + end if end subroutine ysuvdif_init subroutine ysuvdif_finalize () @@ -34,8 +49,9 @@ subroutine ysuvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d,karman, & g,rd,cp,rv,ep1,ep2,xlv, & dusfc,dvsfc,dtsfc,dqsfc, & dt,kpbl1d,u10,v10,lssav,ldiag3d,qdiag3d, & - flag_for_pbl_generic_tend,ntoz,du3dt_PBL,dv3dt_PBL, & - dt3dt_PBL,dq3dt_PBL,do3dt_PBL,errmsg,errflg ) + flag_for_pbl_generic_tend,ntoz,ntqv,dtend,dtidx, & + index_of_temperature,index_of_x_wind,index_of_y_wind, & + index_of_process_pbl,errmsg,errflg ) use machine , only : kind_phys ! @@ -64,19 +80,19 @@ subroutine ysuvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d,karman, & integer, intent(in ) :: im,km,ntrac,ndiff,ntcw,ntiw,ntoz real(kind=kind_phys), intent(in ) :: g,cp,rd,rv,ep1,ep2,xlv,dt - real(kind=kind_phys), dimension( im,km ), & + real(kind=kind_phys), dimension( :,: ), & intent(in) :: pi2d,p2d,phil,ux,vx,swh,hlw,tx - real(kind=kind_phys), dimension( im,km,ntrac ) , & + real(kind=kind_phys), dimension( :,:,: ) , & intent(in ) :: qx - real(kind=kind_phys), dimension( im, km+1 ) , & + real(kind=kind_phys), dimension( :,: ) , & intent(in ) :: p2di,phii - real(kind=kind_phys), dimension( im ) , & + real(kind=kind_phys), dimension( : ) , & intent(in) :: stress,zorl,heat,evap,wspd,br,psim,psih,psfcpa, & u10,v10,xmu - integer, dimension(im) ,& + integer, dimension(:) ,& intent(in ) :: landmask logical, intent(in ) :: lssav, ldiag3d, qdiag3d, & flag_for_pbl_generic_tend @@ -84,18 +100,21 @@ subroutine ysuvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d,karman, & !---------------------------------------------------------------------------------- ! input/output variables ! - real(kind=kind_phys), dimension( im,km ) , & + real(kind=kind_phys), dimension( :,: ) , & intent(inout) :: utnp,vtnp,ttnp - real(kind=kind_phys), dimension( im,km,ntrac ) , & + real(kind=kind_phys), dimension( :,:,: ) , & intent(inout) :: qtnp - real(kind=kind_phys), dimension(im,km) , & - intent(inout) :: du3dt_PBL, dv3dt_PBL, dt3dt_PBL, dq3dt_PBL, do3dt_PBL + real(kind=kind_phys), optional, intent(inout) :: dtend(:,:,:) + integer, intent(in) :: dtidx(:,:), ntqv, index_of_temperature, & + index_of_x_wind, index_of_y_wind, index_of_process_pbl ! !--------------------------------------------------------------------------------- ! output variables - integer, dimension( im ), intent(out ) :: kpbl1d - real(kind=kind_phys), dimension( im ), & + integer, dimension( : ), intent(out ) :: kpbl1d + real(kind=kind_phys), dimension( : ), & intent(out) :: hpbl + real(kind=kind_phys), dimension( : ), & + intent(out) :: dusfc,dvsfc, dtsfc,dqsfc ! error messages character(len=*), intent(out) :: errmsg @@ -108,7 +127,7 @@ subroutine ysuvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d,karman, & real(kind=kind_phys), dimension( im ) :: hol real(kind=kind_phys), dimension( im, km+1 ) :: zq ! - real(kind=kind_phys), dimension( im, km ) :: & + real(kind=kind_phys), dimension( im, km ) :: & thx,thvx,thlix, & del, & dza, & @@ -117,7 +136,7 @@ subroutine ysuvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d,karman, & xkzoh, & za ! - real(kind=kind_phys), dimension( im ) :: & + real(kind=kind_phys), dimension( im ) :: & rhox, & govrth, & zl1,thermal, & @@ -125,8 +144,6 @@ subroutine ysuvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d,karman, & hgamt,hgamq, & brdn,brup, & phim,phih, & - dusfc,dvsfc, & - dtsfc,dqsfc, & prpbl, & wspd1,thermalli ! @@ -195,6 +212,7 @@ subroutine ysuvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d,karman, & dsdzu,dsdzv,wm3,dthx,dqx,wspd10,ross,tem1,dsig,tvcon,conpr, & prfac,prfac2,phim8z,radsum,tmp1,templ,rvls,temps,ent_eff, & rcldb,bruptmp,radflux + integer :: idtend ! !------------------------------------------------------------------------------- ! @@ -854,12 +872,10 @@ subroutine ysuvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d,karman, & enddo enddo if(lssav .and. ldiag3d .and. .not. flag_for_pbl_generic_tend) then - do k = km,1,-1 - do i = 1,im - ttend = (f1(i,k)-thx(i,k)+300.)*rdt*pi2d(i,k) - dt3dt_PBL(i,k) = dt3dt_PBL(i,k) + ttend*dtstep - enddo - enddo + idtend = dtidx(index_of_temperature,index_of_process_pbl) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + dtstep*(f1-thx+300.)*rdt*pi2d + endif endif ! ! compute tridiagonal matrix elements for moisture, clouds, and gases @@ -970,12 +986,10 @@ subroutine ysuvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d,karman, & enddo enddo if(lssav .and. ldiag3d .and. qdiag3d .and. .not. flag_for_pbl_generic_tend) then - do k = km,1,-1 - do i = 1,im - qtend = (f3(i,k,1)-qx(i,k,1))*rdt - dq3dt_PBL(i,k) = dq3dt_PBL(i,k) + qtend*dtstep - enddo - enddo + idtend = dtidx(ntqv+100,index_of_process_pbl) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + dtstep*(f3(:,:,1)-qx(:,:,1))*rdt + endif endif ! if(ndiff.ge.2) then @@ -989,13 +1003,10 @@ subroutine ysuvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d,karman, & enddo if(lssav .and. ldiag3d .and. ntoz>0 .and. qdiag3d .and. & & .not. flag_for_pbl_generic_tend) then - ic = ntoz - do k = km,1,-1 - do i = 1,im - qtend = f3(i,k,ic)-qx(i,k,ic) - do3dt_PBL(i,k) = do3dt_PBL(i,k)+qtend - enddo - enddo + idtend = dtidx(100+ntoz,index_of_process_pbl) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + f3(:,:,ntoz)-qx(:,:,ntoz) + endif endif endif ! @@ -1079,14 +1090,15 @@ subroutine ysuvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d,karman, & enddo enddo if(lssav .and. ldiag3d .and. .not. flag_for_pbl_generic_tend) then - do k = km,1,-1 - do i = 1,im - utend = (f1(i,k)-ux(i,k))*rdt - vtend = (f2(i,k)-vx(i,k))*rdt - du3dt_PBL(i,k) = du3dt_PBL(i,k) + utend*dtstep - dv3dt_PBL(i,k) = dv3dt_PBL(i,k) + vtend*dtstep - enddo - enddo + idtend = dtidx(index_of_x_wind,index_of_process_pbl) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + dtstep*(f1-ux)*rdt + endif + + idtend = dtidx(index_of_y_wind,index_of_process_pbl) + if(idtend>=1) then + dtend(:,:,idtend) = dtend(:,:,idtend) + dtstep*(f2-vx)*rdt + endif endif ! !---- end of vertical diffusion diff --git a/physics/ysuvdif.meta b/physics/ysuvdif.meta index b5bba603a..405b6a1e7 100644 --- a/physics/ysuvdif.meta +++ b/physics/ysuvdif.meta @@ -3,6 +3,36 @@ type = scheme dependencies = machine.F +######################################################################## +[ccpp-arg-table] + name = ysuvdif_init + type = scheme +[do_ysu] + standard_name = flag_for_ysu_pbl_scheme + long_name = flag for YSU PBL scheme + units = flag + dimensions = () + type = logical + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + ######################################################################## [ccpp-arg-table] name = ysuvdif_run @@ -16,7 +46,7 @@ intent = in optional = F [km] - standard_name = vertical_dimension + standard_name = vertical_layer_dimension long_name = vertical layer dimension units = count dimensions = () @@ -27,7 +57,7 @@ standard_name = x_wind long_name = x component of layer wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -36,7 +66,7 @@ standard_name = y_wind long_name = y component of layer wind units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -45,7 +75,7 @@ standard_name = air_temperature long_name = layer mean air temperature units = K - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -54,7 +84,7 @@ standard_name = tracer_concentration long_name = model layer mean tracer concentration units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = in @@ -63,7 +93,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -72,16 +102,16 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in optional = F [pi2d] - standard_name = dimensionless_exner_function_at_model_layers + standard_name = dimensionless_exner_function long_name = Exner function at layers units = none - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -94,56 +124,56 @@ type = real intent = in optional = F -[vtnp] - standard_name = tendency_of_y_wind_due_to_model_physics - long_name = updated tendency of the y wind +[utnp] + standard_name = process_split_cumulative_tendency_of_x_wind + long_name = updated tendency of the x wind units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F -[utnp] - standard_name = tendency_of_x_wind_due_to_model_physics - long_name = updated tendency of the x wind +[vtnp] + standard_name = process_split_cumulative_tendency_of_y_wind + long_name = updated tendency of the y wind units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [ttnp] - standard_name = tendency_of_air_temperature_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_air_temperature long_name = updated tendency of the temperature units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = inout optional = F [qtnp] - standard_name = tendency_of_tracers_due_to_model_physics + standard_name = process_split_cumulative_tendency_of_tracers long_name = updated tendency of the tracers due to model physics units = kg kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys intent = inout optional = F [swh] - standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_timestep long_name = total sky shortwave heating rate units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in optional = F [hlw] - standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step + standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_timestep long_name = total sky longwave heating rate units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -174,7 +204,7 @@ intent = in optional = F [ntcw] - standard_name = index_for_liquid_cloud_condensate + standard_name = index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array long_name = tracer index for cloud condensate (or liquid water) units = index dimensions = () @@ -182,7 +212,7 @@ intent = in optional = F [ntiw] - standard_name = index_for_ice_cloud_condensate + standard_name = index_of_cloud_ice_mixing_ratio_in_tracer_concentration_array long_name = tracer index for ice water units = index dimensions = () @@ -193,7 +223,7 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -202,7 +232,7 @@ standard_name = geopotential long_name = geopotential at model layer centers units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys intent = in @@ -270,8 +300,8 @@ intent = in optional = F [heat] - standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness - long_name = kinematic surface upward sensible heat flux + standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness_and_vegetation + long_name = kinematic surface upward sensible heat flux reduced by surface roughness and vegetation units = K m s-1 dimensions = (horizontal_loop_extent) type = real @@ -279,7 +309,7 @@ intent = in optional = F [evap] - standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness + standard_name = surface_upward_specific_humidity_flux long_name = kinematic surface upward latent heat flux units = kg kg-1 m s-1 dimensions = (horizontal_loop_extent) @@ -315,7 +345,7 @@ intent = in optional = F [rd] - standard_name = gas_constant_dry_air + standard_name = gas_constant_of_dry_air long_name = ideal gas constant for dry air units = J kg-1 K-1 dimensions = () @@ -405,7 +435,7 @@ intent = out optional = F [dt] - standard_name = time_step_for_physics + standard_name = timestep_for_physics long_name = time step for physics units = s dimensions = () @@ -440,81 +470,98 @@ intent = in optional = F [lssav] - standard_name = flag_diagnostics + standard_name = flag_for_diagnostics long_name = logical flag for storing diagnostics units = flag dimensions = () type = logical intent = in [ldiag3d] - standard_name = flag_diagnostics_3D + standard_name = flag_for_diagnostics_3D long_name = flag for 3d diagnostic fields units = flag dimensions = () type = logical intent = in [qdiag3d] - standard_name = flag_tracer_diagnostics_3D + standard_name = flag_for_tracer_diagnostics_3D long_name = flag for 3d tracer diagnostic fields units = flag dimensions = () type = logical intent = in [flag_for_pbl_generic_tend] - standard_name = flag_for_generic_planetary_boundary_layer_tendency + standard_name = flag_for_generic_tendency_due_to_planetary_boundary_layer long_name = true if GFS_PBL_generic should calculate tendencies units = flag dimensions = () type = logical intent = in [ntoz] - standard_name = index_for_ozone + standard_name = index_of_ozone_mixing_ratio_in_tracer_concentration_array long_name = tracer index for ozone mixing ratio units = index dimensions = () type = integer intent = in optional = F -[du3dt_PBL] - standard_name = cumulative_change_in_x_wind_due_to_PBL - long_name = cumulative change in x wind due to PBL - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[dv3dt_PBL] - standard_name = cumulative_change_in_y_wind_due_to_PBL - long_name = cumulative change in y wind due to PBL - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[dt3dt_PBL] - standard_name = cumulative_change_in_temperature_due_to_PBL - long_name = cumulative change in temperature due to PBL - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[dq3dt_PBL] - standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL - long_name = cumulative change in water vapor specific humidity due to PBL - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[do3dt_PBL] - standard_name = cumulative_change_in_ozone_mixing_ratio_due_to_PBL - long_name = cumulative change in ozone mixing ratio due to PBL - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) +[ntqv] + standard_name = index_of_specific_humidity_in_tracer_concentration_array + long_name = tracer index for water vapor (specific humidity) + units = index + dimensions = () + type = integer + intent = in + optional = F +[dtend] + standard_name = cumulative_change_of_state_variables + long_name = diagnostic tendencies for state variables + units = various + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_cumulative_change_processes) type = real kind = kind_phys - intent = inout + intent = in + optional = F +[dtidx] + standard_name = cumulative_change_of_state_variables_outer_index + long_name = index of state-variable and process in last dimension of diagnostic tendencies array AKA cumulative_change_index + units = index + dimensions = (number_of_tracers_plus_one_hundred,number_of_cumulative_change_processes) + type = integer + intent = in + optional = F +[index_of_temperature] + standard_name = index_of_temperature_in_cumulative_change_index + long_name = index of temperature in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_x_wind] + standard_name = index_of_x_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_y_wind] + standard_name = index_of_y_wind_in_cumulative_change_index + long_name = index of x-wind in first dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F +[index_of_process_pbl] + standard_name = index_of_subgrid_scale_vertical_mixing_process_in_cumulative_change_index + long_name = index of subgrid scale vertical mixing process in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP