diff --git a/physics/GFS_suite_interstitial.F90 b/physics/GFS_suite_interstitial.F90 index 0462fcf2b..689c29751 100644 --- a/physics/GFS_suite_interstitial.F90 +++ b/physics/GFS_suite_interstitial.F90 @@ -672,7 +672,7 @@ subroutine GFS_suite_interstitial_4_run (im, levs, ltaerosol, cplchm, tracers_to 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,imp_physics_fer_hires + imp_physics_zhao_carr, imp_physics_zhao_carr_pdf logical, intent(in) :: ltaerosol, cplchm @@ -685,8 +685,8 @@ subroutine GFS_suite_interstitial_4_run (im, levs, ltaerosol, cplchm, tracers_to real(kind=kind_phys), dimension(im,levs,nn), intent(inout) :: clw ! dqdti may not be allocated real(kind=kind_phys), dimension(:,:), intent(inout) :: dqdti - integer, intent(in) :: mpirank - integer, intent(in) :: mpiroot + !integer, intent(in) :: mpirank + !integer, intent(in) :: mpiroot character(len=*), intent(out) :: errmsg diff --git a/physics/GFS_suite_interstitial.meta b/physics/GFS_suite_interstitial.meta index d497d1389..44696dcb0 100644 --- a/physics/GFS_suite_interstitial.meta +++ b/physics/GFS_suite_interstitial.meta @@ -1638,50 +1638,6 @@ type = integer intent = in optional = F -[imp_physics_fer_hires] - standard_name = flag_for_fer_hires_microphysics_scheme - long_name = choice of Ferrier-Aligo microphysics scheme - units = flag - dimensions = () - type = integer - intent = in - optional = F -[cwm] - 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_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[f_ice] - standard_name = fraction_of_ice_water_cloud - long_name = fraction of ice water cloud - units = frac - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - 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) - type = real - kind = kind_phys - intent = inout - optional = F -[f_rimef] - standard_name = rime_factor - long_name = rime factor - units = frac - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F [dtf] standard_name = time_step_for_dynamics long_name = dynamics timestep @@ -1718,15 +1674,6 @@ kind = kind_phys intent = in optional = F -[epsq] - standard_name = minimum_value_of_specific_humidity - long_name = floor value for specific humidity - units = kg kg-1 - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F [gq0] standard_name = tracer_concentration_updated_by_physics long_name = tracer concentration updated by physics @@ -1754,22 +1701,6 @@ kind = kind_phys intent = inout optional = F -[mpirank] - standard_name = mpi_rank - long_name = current MPI-rank - units = index - dimensions = () - type = integer - intent = in - optional = F -[mpiroot] - standard_name = mpi_root - long_name = master MPI-rank - 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/HAFS_update_moist.F90 b/physics/HAFS_update_moist.F90 new file mode 100644 index 000000000..dd81ecd55 --- /dev/null +++ b/physics/HAFS_update_moist.F90 @@ -0,0 +1,138 @@ +!>\file HAFS_update_moist.F90 +!! This file contains CCPP-compliant UPDATE_MOIST() in HWRF. +!! +!! In HWRF , this subroutine should be called before: +!! - radiation() +!! - CUCNVC() +!! - TURBLE() + +!> This module contains the CCPP-compliant UPDATE_MOIST for Ferrier-Aligo MP. + module HAFS_update_moist + + implicit none + + private + + public :: HAFS_update_moist_init, HAFS_update_moist_run, & + HAFS_update_moist_finalize + + contains + + subroutine HAFS_update_moist_init () + end subroutine HAFS_update_moist_init + + subroutine HAFS_update_moist_finalize () + end subroutine HAFS_update_moist_finalize + +!> \defgroup hafs_update_moist HAFS Update Moist Module +!! This subroutine is to update water array with CWM, F_RAIN, and F_ICE +!! and convert moist mixing ratio to dry mixing ratio +!! \section arg_table_HAFS_update_moist_run Argument Table +!! \htmlinclude HAFS_update_moist_run.html +!! + subroutine HAFS_update_moist_run (CWM,QV, F_ICE,F_RAIN & + ,qc,qi,qr & + ,imp_physics & + ,imp_physics_fer_hires & + ,qv_r, qc_r,qr_r,qi_r & !-output: dry mixing ratioes for HWRF physics + ,qs_r, qg_r & + ,spec_adv & + ,LM,IME,errmsg,errflg ) + + USE MACHINE , only : kind_phys + IMPLICIT NONE + +!---------------------- +!-- Argument Variables +!---------------------- +! + INTEGER,INTENT(IN) :: LM,IME +! + + LOGICAL,INTENT(IN) :: SPEC_ADV + REAL(kind=kind_phys),DIMENSION(1:IME,1:LM),INTENT(IN) :: CWM,QV, & + QC,QI, & + QR + REAL(kind=kind_phys),DIMENSION(1:IME,1:LM),INTENT(IN) :: & + F_ICE, & + F_RAIN + integer, intent(in) :: imp_physics + integer, intent(in) :: imp_physics_fer_hires + + !dry mixing ratio used in HWRF RRTMG/TURBL/FER + REAL(kind=kind_phys),DIMENSION(1:IME,1:LM),INTENT(OUT) :: qv_r, & + qc_r, & + qi_r, & + qr_r, & + qs_r, & + qg_r + +! +!-------------------- +!-- Local Variables +!-------------------- +! + INTEGER :: I,K + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg +! +!----------------------------------------------------------------------- +!*********************************************************************** +!----------------------------------------------------------------------- + +! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + +!-- Update WATER arrays when advecting only total condensate (spec_adv=F) +!-- and F_* or at the initial time step + if (imp_physics == imp_physics_fer_hires) then + if (spec_adv) then + qv_r (i,k)=qv(i,k)/(1.-qv(i,k)) + qc_r (i,k)=qc(i,k)/(1.-qv(i,k)) + qi_r (i,k)=qi(i,k)/(1.-qv(i,k)) + qr_r (i,k)=qr(i,k)/(1.-qv(i,k)) + qs_r (i,k)= 0. + qg_r (i,k)= 0. + + else ! .not.spec_adv + DO K=1,LM + DO I=1,IME + !!MZ: HWRF::UPDATE_MOIST() solution + !calculate dry mixing ratio of all q + qv_r (i,k)=qv(i,k)/(1.-qv(i,k)) + qi_r(I,K) =0. + qr_r(I,K) =0. + qc_r(I,K) =0. + IF(F_ICE(I,K)>=1.) THEN + qi_r(I,K) = CWM(i,k) + ELSEIF(F_ICE(I,K)<=0.) THEN + qc_r(I,K) = CWM(I,K) + ELSE + qi_r(I,K) = F_ICE(I,K)*CWM(I,K) + qc_r(I,K) = CWM(I,K)-qi_r(I,K) + ENDIF + + IF(qc_r(I,K)>0. .AND. F_RAIN(I,K)>0.) THEN + IF(F_RAIN(I,K)>=1.)THEN + qr_r(I,K)=qc_r(I,K) + qc_r(I,K)=0. + ELSE + qr_r(I,K)=F_RAIN(I,K)*qc_r(I,K) + qc_r(I,K)=qc_r(I,K)-qr_r(I,K) + ENDIF + ENDIF + qs_r (I,K) = 0. + qg_r (I,K) = 0. + ENDDO + ENDDO + end if + else !.not. fer_hires + write(errmsg,'(*(a))') "Logic error: HAFS_update_moist only works for HWRF physics" + errflg = 1 + return + end if + + end subroutine HAFS_update_moist_run + + end module HAFS_update_moist diff --git a/physics/HAFS_update_moist.meta b/physics/HAFS_update_moist.meta new file mode 100644 index 000000000..0b7b6846e --- /dev/null +++ b/physics/HAFS_update_moist.meta @@ -0,0 +1,185 @@ +[ccpp-arg-table] + name = HAFS_update_moist_run + type = scheme +[cwm] + 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_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[qv] + standard_name = water_vapor_specific_humidity_updated_by_physics + long_name = water vapor specific humidity updated by physics + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[f_ice] + standard_name = fraction_of_ice_water_cloud + long_name = fraction of ice water cloud + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + 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) + type = real + kind = kind_phys + intent = in + optional = F +[qc] + standard_name = cloud_condensed_water_mixing_ratio_updated_by_physics + long_name = moist (dry+vapor, no condensates) mixing ratio of cloud condensed water updated by physics + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[qi] + standard_name = ice_water_mixing_ratio_updated_by_physics + long_name = moist (dry+vapor, no condensate) mixing ratio of ice water updated by physics + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[qr] + standard_name = rain_water_mixing_ratio_updated_by_physics + long_name = moist (dry+vapor, no condensates) mixing ratio of rain water updated by physics + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + 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_fer_hires] + standard_name = flag_for_fer_hires_microphysics_scheme + long_name = choice of Ferrier-Aligo microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[qv_r] + standard_name = humidity_mixing_ratio + long_name = the ratio of the mass of water vapor to the mass of dry air + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[qc_r] + standard_name = cloud_liquid_water_mixing_ratio + long_name = the ratio of the mass of liquid water to the mass of dry air + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[qr_r] + standard_name = cloud_rain_water_mixing_ratio + long_name = the ratio of the mass rain water to the mass of dry air + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[qi_r] + standard_name = cloud_ice_mixing_ratio + long_name = the ratio of the mass of ice to mass of dry air + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[qs_r] + standard_name = cloud_snow_mixing_ratio + long_name = the ratio of the mass of snow to mass of dry air + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[qg_r] + standard_name = cloud_graupel_mixing_ratio + long_name = the ratio of the mass of graupel to mass of dry air + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[spec_adv] + standard_name = flag_for_individual_cloud_species_advected + long_name = flag for individual cloud species advected + units = flag + dimensions = () + type = logical + intent = in + optional = F +[lm] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in + optional = F +[ime] + standard_name = horizontal_dimension + long_name = horizontal dimension + 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 = HAFS_update_moist_finalize + type = scheme +######################################################################## +[ccpp-arg-table] + name = HAFS_update_moist_init + type = scheme diff --git a/physics/module_mp_fer_hires_pre.F90 b/physics/module_mp_fer_hires_pre.F90 deleted file mode 100644 index fdbf87464..000000000 --- a/physics/module_mp_fer_hires_pre.F90 +++ /dev/null @@ -1,148 +0,0 @@ -!>\file module_mp_fer_hires_pre.F90 -!! This file contains a wrap around UPDATE_WATER in NAM/module_MICROPHYSICS.F90 -!! which should be called the first in the physics suite using Ferrier-Aligo MP -!! scheme. - -!> This module contains the CCPP-compliant UPDATE_WATER for Ferrier-Aligo MP. - module mp_fer_hires_pre - - implicit none - - private - - public :: mp_fer_hires_pre_init, mp_fer_hires_pre_run, & - mp_fer_hires_pre_finalize - - contains - - subroutine mp_fer_hires_pre_init () - end subroutine mp_fer_hires_pre_init - - subroutine mp_fer_hires_pre_finalize () - end subroutine mp_fer_hires_pre_finalize - -!> \defgroup hafs_fa_update HAFS Ferrier-Aligo MP Scheme Update Water Module -!! \ingroup hafs_famp -!! This subroutine is to update water array with CWM, F_RAIN, and F_ICE -!! for Ferrier-Aligo MP scheme. -!! \section arg_table_mp_fer_hires_pre_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |----------------|-------------------------------------------------------|--------------------------------------------------------------------------------------------|---------|------|-----------|-----------|--------|----------| -!! | cwm | total_cloud_condensate_mixing_ratio_updated_by_physics| total cloud condensate mixing ratio (except water vapor) updated by physics | kg kg-1 | 2 | real | kind_phys | inout | F | -!! | f_ice | fraction_of_ice_water_cloud | fraction of ice water cloud | frac | 2 | real | kind_phys | inout | F | -!! | f_rain | fraction_of_rain_water_cloud | fraction of rain water cloud | frac | 2 | real | kind_phys | inout | F | -!! | f_rimef | rime_factor | rime factor | frac | 2 | real | kind_phys | inout | F | -!! | epsq | minimum_value_of_specific_humidity | floor value for specific humidity | kg kg-1 | 0 | real | kind_phys | in | F | -!! | t | air_temperature | model layer mean temperature | K | 2 | real | kind_phys | inout | F | -!! | qc | cloud_condensed_water_mixing_ratio_updated_by_physics | moist (dry+vapor, no condensates) mixing ratio of cloud condensed water updated by physics | kg kg-1 | 2 | real | kind_phys | inout | F | -!! | qr | rain_water_mixing_ratio_updated_by_physics | moist (dry+vapor, no condensates) mixing ratio of rain water updated by physics | kg kg-1 | 2 | real | kind_phys | inout | F | -!! | qi | ice_water_mixing_ratio_updated_by_physics | moist (dry+vapor, no condensates) mixing ratio of ice water updated by physics | kg kg-1 | 2 | real | kind_phys | inout | F | -!! | qg | mass_weighted_rime_factor_updated_by_physics | mass weighted rime factor updaed by physics | kg kg-1 | 2 | real | kind_phys | inout | F | -!! | spec_adv | flag_for_individual_cloud_species_advected | flag for individual cloud species advected | flag | 0 | logical | | in | F | -!! | kdt | index_of_time_step | current forecast interation | index | 0 | integer | | in | F | -!! | lm | vertical_dimension | number of vertical levels | count | 0 | integer | | in | F | -!! | ime | horizontal_dimension | horizontal dimension | count | 0 | integer | | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! - subroutine mp_fer_hires_pre_run (CWM,F_ICE,F_RAIN,F_RIMEF & - ,EPSQ & - ,T,QC,QR,QI,QG & - ,SPEC_ADV,kdt & - ,LM,IME,errmsg,errflg ) - - USE MACHINE , only : kind_phys - IMPLICIT NONE - - REAL(KIND=KIND_PHYS) :: EPSQ - -!---------------------- -!-- Argument Variables -!---------------------- -! - INTEGER,INTENT(IN) :: KDT,LM,IME -! - LOGICAL,INTENT(IN) :: SPEC_ADV -! - REAL(kind=kind_phys),DIMENSION(1:IME,1:LM),INTENT(INOUT) :: CWM & - ,F_ICE & - ,F_RAIN & - ,F_RIMEF & - ,T,QC,QR & - ,QI,QG ! QS -! -!-------------------- -!-- Local Variables -!-------------------- -! - INTEGER :: I,J,K - REAL(kind=kind_phys) :: FRACTION, LIQW, OLDCWM - LOGICAL :: CLD_INIT - LOGICAL :: deep_ice - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg -! -!----------------------------------------------------------------------- -!*********************************************************************** -!----------------------------------------------------------------------- - -! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - -! -!zm IF(NTIMESTEP<=1)THEN - IF(kdt<=2)THEN - CLD_INIT=.TRUE. - ELSE - CLD_INIT=.FALSE. - ENDIF - - - IF (.NOT.SPEC_ADV .OR. CLD_INIT) THEN -!-- Update WATER arrays when advecting only total condensate (spec_adv=F) -!-- and F_* or at the initial time step - DO K=1,LM - DO I=1,IME - !!CWM(I,K)=QC(I,K)+QR(I,K)+QI(I,K) - IF (CWM(I,K)>EPSQ) THEN - LIQW=(1.-F_ice(I,K))*CWM(I,K) - QC(I,K)=(1.-F_rain(I,K))*LIQW - QR(I,K)=F_rain(I,K)*LIQW - QI(I,K)=F_ice(I,K)*CWM(I,K) - QG(I,K)=F_RIMEF(I,K)*QI(I,K) - ELSE - QC(I,K)=0. - QR(I,K)=0. - QI(I,K)=0. - QG(I,K)=0. - ENDIF - ENDDO - ENDDO - - ELSE -!-- Update CWM,F_ICE,F_RAIN arrays from separate species advection (spec_adv=T) - DO K=1,LM - DO I=1,IME - CWM(I,K)=QC(I,K)+QR(I,K)+QI(I,K) - IF (QI(I,K)>EPSQ) THEN - !F_ICE(I,K)=QI(I,K)/CWM(I,K) - F_ICE(I,K) = MAX(0., MIN(1., QI(I,K)/CWM(I,K))) - !MZ: f_rimef= qrimef/qi - F_RIMEF(I,K) = QG(I,K)/QI(I,K) - ELSE - F_ICE(I,K)=0.0 - F_RIMEF(I,K) = 1.0 - ENDIF - IF (QR(I,K)>EPSQ) THEN - F_RAIN(I,K)=QR(I,K)/(QC(I,K)+QR(I,K)) - ELSE - F_RAIN(I,K)=0. - ENDIF - ENDDO - ENDDO - ENDIF - - end subroutine mp_fer_hires_pre_run - - end module mp_fer_hires_pre diff --git a/physics/mp_FA_update_moist.F90 b/physics/mp_FA_update_moist.F90 deleted file mode 100644 index 30b0e9c2a..000000000 --- a/physics/mp_FA_update_moist.F90 +++ /dev/null @@ -1,146 +0,0 @@ -!>\file mp_FA_update_moist.F90 -!! This file contains CCPP-compliant UPDATE_MOIST() in HWRF. -!! -!! In HWRF (.not.spec_adv), this subroutine should be called before: -!! - radiation() -!! - CUCNVC() -!! - TURBLE() - -!> This module contains the CCPP-compliant UPDATE_MOIST for Ferrier-Aligo MP. - module mp_FA_update_moist - - implicit none - - private - - public :: mp_FA_update_moist_init, mp_FA_update_moist_run, & - mp_FA_update_moist_finalize - - contains - - subroutine mp_FA_update_moist_init () - end subroutine mp_FA_update_moist_init - - subroutine mp_FA_update_moist_finalize () - end subroutine mp_FA_update_moist_finalize - -!> \defgroup hafs_fa_update HAFS Ferrier-Aligo MP Scheme Update Water Module -!! \ingroup hafs_famp -!! This subroutine is to update water array with CWM, F_RAIN, and F_ICE -!! for Ferrier-Aligo MP scheme. -!! \section arg_table_mp_FA_update_moist_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |----------------|-------------------------------------------------------|--------------------------------------------------------------------------------------------|---------|------|-----------|-----------|--------|----------| -!! | cwm | total_cloud_condensate_mixing_ratio_updated_by_physics| total cloud condensate mixing ratio (except water vapor) updated by physics | kg kg-1 | 2 | real | kind_phys | inout | F | -!! | f_ice | fraction_of_ice_water_cloud | fraction of ice water cloud | frac | 2 | real | kind_phys | in | F | -!! | f_rain | fraction_of_rain_water_cloud | fraction of rain water cloud | frac | 2 | real | kind_phys | in | F | -!! | qc | cloud_condensed_water_mixing_ratio_updated_by_physics | moist (dry+vapor, no condensates) mixing ratio of cloud condensed water updated by physics | kg kg-1 | 2 | real | kind_phys | out | F | -!! | qr | rain_water_mixing_ratio_updated_by_physics | moist (dry+vapor, no condensates) mixing ratio of rain water updated by physics | kg kg-1 | 2 | real | kind_phys | out | F | -!! | qi | ice_water_mixing_ratio_updated_by_physics | moist (dry+vapor, no condensates) mixing ratio of ice water updated by physics | kg kg-1 | 2 | real | kind_phys | out | F | -!! | qs | snow_water_mixing_ratio_updated_by_physics | moist (dry+vapor, no condensates) mixing ratio of snow water updated by physics | kg kg-1 | 2 | real | kind_phys | out | F | -!! | spec_adv | flag_for_individual_cloud_species_advected | flag for individual cloud species advected | flag | 0 | logical | | in | F | -!! | mpirank | mpi_rank | current MPI-rank | index | 0 | integer | | in | F | -!! | mpiroot | mpi_root | master MPI-rank | index | 0 | integer | | in | F | -!! | lm | vertical_dimension | number of vertical levels | count | 0 | integer | | in | F | -!! | ime | horizontal_dimension | horizontal dimension | count | 0 | integer | | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! - subroutine mp_FA_update_moist_run (CWM,F_ICE,F_RAIN & - ,QC,QR,QI,QS & - ,spec_adv & - ,mpirank,mpiroot & - ,LM,IME,errmsg,errflg ) - - USE MACHINE , only : kind_phys - IMPLICIT NONE - -!---------------------- -!-- Argument Variables -!---------------------- -! - INTEGER,INTENT(IN) :: LM,IME -! - integer, intent(in) :: mpirank - integer, intent(in) :: mpiroot - - LOGICAL,INTENT(IN) :: SPEC_ADV - REAL(kind=kind_phys),DIMENSION(1:IME,1:LM),INTENT(INOUT) :: CWM - REAL(kind=kind_phys),DIMENSION(1:IME,1:LM),INTENT(IN) :: & - F_ICE, & - F_RAIN - REAL(kind=kind_phys),DIMENSION(1:IME,1:LM),INTENT(OUT) :: QC,QR, & - QI,QS ! qs e in F-A -! -!-------------------- -!-- Local Variables -!-------------------- -! - INTEGER :: I,K - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg -! -!----------------------------------------------------------------------- -!*********************************************************************** -!----------------------------------------------------------------------- - -! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - -!MZ - IF (SPEC_ADV) then - - !if(mpirank == mpiroot) then - ! write(0,*) 'F-A update_moist:---------------' - ! write(0,*) 'max/min(cwm) = ',maxval(cwm),minval(cwm) - ! write(0,*) 'max/min(qc) = ',maxval(qc),minval(qc) - ! write(0,*) 'max/min(qr) = ',maxval(qr),minval(qr) - ! write(0,*) 'max/min(qi) = ',maxval(qi),minval(qi) - ! write(0,*) 'max/min(qs) = ',maxval(qs),minval(qs) - !endif - DO K=1,LM - DO I=1,IME - !MZ: need to check - CWM(I,K)=QC(I,K)+QR(I,K)+QI(I,K)+QS(I,K) - ENDDO - ENDDO - ELSE - -!-- Update WATER arrays when advecting only total condensate (spec_adv=F) -!-- and F_* or at the initial time step - DO K=1,LM - DO I=1,IME - !!MZ: HWRF::UPDATE_MOIST() solution - !mixing ratio of qv - !MOIST (i,k)=q(i,k)/(1.-q(i,k)) - QI(I,K) =0. - QR(I,K) =0. - QC(I,K) =0. - QS(I,K) =0. - IF(F_ICE(I,K)>=1.) THEN - QI(I,K) = CWM(i,k) - ELSEIF(F_ICE(I,K)<=0.) THEN - QC(I,K) = CWM(I,K) - ELSE - QI(I,K) = F_ICE(I,K)*CWM(I,K) - QC(I,K) = CWM(I,K)-QI(I,K) - ENDIF - - IF(QC(I,K)>0. .AND. F_RAIN(I,K)>0.) THEN - IF(F_RAIN(I,K)>=1.)THEN - QR(I,K)=QC(I,K) - QC(I,K)=0. - ELSE - QR(I,K)=F_RAIN(I,K)*QC(I,K) - QC(I,K)=QC(I,K)-QR(I,K) - ENDIF - ENDIF - !qi(i,k) = 0. - !qs(i,k) = qi(i,k) !MZ: qs contains total ice in HWRF - ENDDO - ENDDO - ENDIF - end subroutine mp_FA_update_moist_run - - end module mp_FA_update_moist diff --git a/physics/mp_fer_hires.F90 b/physics/mp_fer_hires.F90 index bf4de286d..8eb91d535 100644 --- a/physics/mp_fer_hires.F90 +++ b/physics/mp_fer_hires.F90 @@ -28,23 +28,7 @@ module mp_fer_hires !> This subroutine initialize constants & lookup tables for Ferrier-Aligao MP !! scheme. !> \section arg_table_mp_fer_hires_init Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-----------------------|-------------------------------------------|-----------------------------------------------------------|----------|------|-----------------------|-----------|--------|----------| -!! | ncol | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | -!! | nlev | vertical_dimension | number of vertical levels | count | 0 | integer | | in | F | -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | imp_physics | flag_for_microphysics_scheme | choice of microphysics scheme | flag | 0 | integer | | in | F | -!! | imp_physics_fer_hires | flag_for_fer_hires_microphysics_scheme | choice of Ferrier-Aligo microphysics scheme | flag | 0 | integer | | in | F | -!! | restart | flag_for_restart | flag for restart (warmstart) or coldstart | flag | 0 | logical | | in | F | -!! | f_ice | fraction_of_ice_water_cloud | fraction of ice water cloud | frac | 2 | real | kind_phys | out | T | -!! | f_rain | fraction_of_rain_water_cloud | fraction of rain water cloud | frac | 2 | real | kind_phys | out | T | -!! | f_rimef | rime_factor | rime factor | frac | 2 | real | kind_phys | out | T | -!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | -!! | mpirank | mpi_rank | current MPI-rank | index | 0 | integer | | in | F | -!! | mpiroot | mpi_root | master MPI-rank | index | 0 | integer | | in | F | -!! | threads | omp_threads | number of OpenMP threads available to scheme | count | 0 | integer | | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! \htmlinclude mp_fer_hires_init.html !! subroutine mp_fer_hires_init(NCOL, NLEV, Model, imp_physics, & imp_physics_fer_hires, & @@ -136,41 +120,7 @@ end subroutine mp_fer_hires_init !>\defgroup hafs_famp HAFS Ferrier-Aligo Cloud Microphysics Scheme !> This is the CCPP-compliant FER_HIRES driver module. !> \section arg_table_mp_fer_hires_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-------------|---------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------|------------|------|----------|-----------|--------|----------| -!! | ncol | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | -!! | nlev | vertical_dimension | number of vertical levels | count | 0 | integer | | in | F | -!! | dt | time_step_for_physics | physics timestep | s | 0 | real | kind_phys | in | F | -!! | spec_adv | flag_for_individual_cloud_species_advected | flag for individual cloud species_advected | flag | 0 | logical | | in | F | -!! | slmsk | sea_land_ice_mask_real | landmask: sea/land/ice=0/1/2 | flag | 1 | real | kind_phys | in | F | -!! | prsi | air_pressure_at_interface | air pressure at model layer interfaces | Pa | 2 | real | kind_phys | in | F | -!! | p_phy | air_pressure | mean layer pressure | Pa | 2 | real | kind_phys | in | F | -!! | t | air_temperature_updated_by_physics | temperature updated by physics | K | 2 | real | kind_phys | inout | F | -!! | q | water_vapor_specific_humidity_updated_by_physics | water vapor specific humidity updated by physics | kg kg-1 | 2 | real | kind_phys | inout | F | -!! | cwm | total_cloud_condensate_mixing_ratio_updated_by_physics | total cloud condensate mixing ratio (except water vapor) updated by physics | kg kg-1 | 2 | real | kind_phys | inout | F | -!! | train | accumulated_tendency_of_air_temperature_due_to_FA_scheme | accumulated tendency of air temperature due to FA MP scheme | K | 2 | real | kind_phys | inout | F | -!! | sr | ratio_of_snowfall_to_rainfall | snow ratio: ratio of snow to total precipitation (explicit only) | frac | 1 | real | kind_phys | out | F | -!! | f_ice | fraction_of_ice_water_cloud | fraction of ice water cloud | frac | 2 | real | kind_phys | inout | F | -!! | f_rain | fraction_of_rain_water_cloud | fraction of rain water cloud | frac | 2 | real | kind_phys | inout | F | -!! | f_rimef | rime_factor | rime factor | frac | 2 | real | kind_phys | inout | F | -!! | qc | cloud_condensed_water_mixing_ratio_updated_by_physics | moist (dry+vapor, no condensates) mixing ratio of cloud condensed water updated by physics | kg kg-1 | 2 | real | kind_phys | inout | F | -!! | qr | rain_water_mixing_ratio_updated_by_physics | moist (dry+vapor, no condensates) mixing ratio of rain water updated by physics | kg kg-1 | 2 | real | kind_phys | inout | F | -!! | qi | ice_water_mixing_ratio_updated_by_physics | moist (dry+vapor, no condensates) mixing ratio of ice water updated by physics | kg kg-1 | 2 | real | kind_phys | inout | F | -!! | qg | mass_weighted_rime_factor_updated_by_physics | mass weighted rime factor updated by physics | kg kg-1 | 2 | real | kind_phys | inout | F | -!! | prec | lwe_thickness_of_explicit_precipitation_amount | explicit precipitation (rain, ice, snow, graupel, ...) on physics timestep | m | 1 | real | kind_phys | inout | F | -!! | mpirank | mpi_rank | current MPI-rank | index | 0 | integer | | in | F | -!! | mpiroot | mpi_root | master MPI-rank | index | 0 | integer | | in | F | -!! | threads | omp_threads | number of OpenMP threads available to scheme | count | 0 | integer | | in | F | -!! | refl_10cm | radar_reflectivity_10cm | instantaneous refl_10cm | dBZ | 2 | real | kind_phys | inout | F | -!! | rhgrd | fa_threshold_relative_humidity_for_onset_of_condensation | relative humidity threshold parameter for condensation for FA scheme | none | 0 | real | kind_phys | in | F | -!! | dx | cell_size | relative dx for the grid cell | m | 1 | real | kind_phys | in | F | -!! | EPSQ | minimum_value_of_specific_humidity | floor value for specific humidity | kg kg-1 | 0 | real | kind_phys | in | F | -!! | R_D | gas_constant_dry_air | ideal gas constant for dry air | J kg-1 K-1 | 0 | real | kind_phys | in | F | -!! | P608 | ratio_of_vapor_to_dry_air_gas_constants_minus_one | (rv/rd) - 1 (rv = ideal gas constant for water vapor) | none | 0 | real | kind_phys | in | F | -!! | CP | specific_heat_of_dry_air_at_constant_pressure | specific heat of dry air at constant pressure | J kg-1 K-1 | 0 | real | kind_phys | in | F | -!! | G | gravitational_acceleration | gravitational acceleration | m s-2 | 0 | real | kind_phys | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character| len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! \htmlinclude mp_fer_hires_run.html !! SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & ,SLMSK & @@ -458,33 +408,6 @@ SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & ENDDO ENDDO - !if (mpirank==mpiroot) write(0,*)'af fer_hires: max/min(cwm)= ', & - ! maxval(cwm),minval(cwm) - !if (mpirank==mpiroot) write(0,*)'af fer_hires: max/min(t)= ', & - ! maxval(t),minval(t) - !if (mpirank==mpiroot) write(0,*)'af fer_hires: max/min(q)= ', & - ! maxval(q),minval(q) - !if (mpirank==mpiroot) write(0,*)'af fer_hires: max/min(qc)= ', & - ! maxval(qc),minval(qc) - !if (mpirank==mpiroot) write(0,*)'af fer_hires: max/min(qr)= ', & - ! maxval(qr),minval(qr) - !if (mpirank==mpiroot) write(0,*)'af fer_hires: max/min(qi)= ', & - ! maxval(qi),minval(qi) - !if (mpirank==mpiroot) write(0,*)'af fer_hires: max/min(qg)= ', & - ! maxval(qg),minval(qg) - !if (mpirank==mpiroot) write(0,*)'af fer_hires: max/min(f_rimef)= ', & - ! maxval(f_rimef),minval(f_rimef) - !if (mpirank==mpiroot) write(0,*)'af fer_hires: max/min(f_ice)= ', & - ! maxval(f_ice),minval(f_ice) - !if (mpirank==mpiroot) write(0,*)'af fer_hires: max/min(f_rain)= ', & - ! maxval(f_rain),minval(f_rain) - !if (mpirank==mpiroot) write(0,*)'af fer_hires: max/min(rainnc)= ', & - ! maxval(rainnc),minval(rainnc) - !if (mpirank==mpiroot) write(0,*)'af fer_hires: max/min(rainncv)= ', & - ! maxval(rainncv),minval(rainncv) - !if (mpirank==mpiroot) write(0,*)'af fer_hires: max/min(sr)= ', & - ! maxval(sr),minval(sr) - !....................................................................... !MZ$OMP end parallel do !....................................................................... diff --git a/physics/mp_fer_hires.meta b/physics/mp_fer_hires.meta new file mode 100644 index 000000000..731aeb967 --- /dev/null +++ b/physics/mp_fer_hires.meta @@ -0,0 +1,425 @@ +[ccpp-arg-table] + name = mp_fer_hires_init + type = scheme +[ncol] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count + dimensions = () + type = integer + intent = in + optional = F +[nlev] + standard_name = vertical_dimension + long_name = vertical layer dimension + units = count + dimensions = () + 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 + dimensions = () + type = GFS_control_type + 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_fer_hires] + standard_name = flag_for_fer_hires_microphysics_scheme + long_name = choice of Ferrier-Aligo microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[restart] + standard_name = flag_for_restart + long_name = flag for restart (warmstart) or coldstart + units = flag + dimensions = () + type = logical + intent = in + optional = F +[f_ice] + standard_name = fraction_of_ice_water_cloud + long_name = fraction of ice water cloud + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = T +[f_rain] + standard_name = fraction_of_rain_water_cloud + long_name = fraction of rain water cloud + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = T +[f_rimef] + standard_name = rime_factor + long_name = rime factor + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = T +[mpicomm] + standard_name = mpi_comm + long_name = MPI communicator + units = index + dimensions = () + type = integer + intent = in + optional = F +[mpirank] + standard_name = mpi_rank + long_name = current MPI-rank + units = index + dimensions = () + type = integer + intent = in + optional = F +[mpiroot] + standard_name = mpi_root + long_name = master MPI-rank + units = index + dimensions = () + type = integer + intent = in + optional = F +[threads] + standard_name = omp_threads + long_name = number of OpenMP threads available to scheme + 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 = mp_fer_hires_finalize + type = scheme +######################################################################## +[ccpp-arg-table] + name = mp_fer_hires_run + type = scheme +[ncol] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count + dimensions = () + type = integer + intent = in + optional = F +[nlev] + standard_name = vertical_dimension + long_name = vertical layer dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[dt] + standard_name = time_step_for_physics + long_name = physics time step + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[spec_adv] + standard_name = flag_for_individual_cloud_species_advected + long_name = flag for individual cloud species advected + units = flag + dimensions = () + type = logical + 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_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_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[p_phy] + standard_name = air_pressure + long_name = mean layer pressure + units = Pa + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[t] + standard_name = air_temperature_updated_by_physics + long_name = temperature updated by physics + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[q] + standard_name = water_vapor_specific_humidity_updated_by_physics + long_name = water vapor specific humidity updated by physics + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[cwm] + 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_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[train] + standard_name = accumulated_tendency_of_air_temperature_due_to_FA_scheme + long_name = accumulated tendency of air temperature due to FA MP scheme + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[sr] + standard_name = ratio_of_snowfall_to_rainfall + long_name = snow ratio: ratio of snow to total precipitation (explicit only) + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[f_ice] + standard_name = fraction_of_ice_water_cloud + long_name = fraction of ice water cloud + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + 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) + type = real + kind = kind_phys + intent = out + optional = F +[f_rimef] + standard_name = rime_factor + long_name = rime factor + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[qc] + standard_name = cloud_condensed_water_mixing_ratio_updated_by_physics + long_name = moist (dry+vapor, no condensates) mixing ratio of cloud condensed water updated by physics + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qr] + standard_name = rain_water_mixing_ratio_updated_by_physics + long_name = moist (dry+vapor, no condensates) mixing ratio of rain water updated by physics + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qi] + standard_name = ice_water_mixing_ratio_updated_by_physics + long_name = moist (dry+vapor, no condensate) mixing ratio of ice water updated by physics + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qg] + standard_name = mass_weighted_rime_factor_updated_by_physics + long_name = mass weighted rime factor updated by physics + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[prec] + standard_name = lwe_thickness_of_explicit_precipitation_amount + long_name = explicit precipitation ( rain, ice, snow, graupel, ...) on physics timestep + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[mpirank] + standard_name = mpi_rank + long_name = current MPI-rank + units = index + dimensions = () + type = integer + intent = in + optional = F +[mpiroot] + standard_name = mpi_root + long_name = master MPI-rank + units = index + dimensions = () + type = integer + intent = in + optional = F +[threads] + standard_name = omp_threads + long_name = number of OpenMP threads available to scheme + units = count + dimensions = () + type = integer + intent = in + optional = F +[refl_10cm] + standard_name = radar_reflectivity_10cm + long_name = instantaneous refl_10cm + units = dBZ + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[rhgrd] + standard_name = fa_threshold_relative_humidity_for_onset_of_condensation + long_name = relative humidity threshold parameter for condensation for FA scheme + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[dx] + standard_name = cell_size + long_name = relative dx for the grid cell + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[EPSQ] + standard_name = minimum_value_of_specific_humidity + long_name = floor value for specific humidity + units = kg kg-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[R_D] + standard_name = gas_constant_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 +[P608] + 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 +[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 +[G] + standard_name = gravitational_acceleration + long_name = gravitational acceleration + units = m s-2 + dimensions = () + type = real + kind = kind_phys + 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