100 module sat_vapor_pres_mod
181 use constants_mod,
only: tfreeze, rdgas, rvgas, hlv, es0
185 use mpp_mod,
only: input_nml_file
193 use platform_mod,
only: r4_kind, r8_kind
266 module procedure lookup_es_0d_r4, lookup_es_0d_r8
267 module procedure lookup_es_1d_r4, lookup_es_1d_r8
268 module procedure lookup_es_2d_r4, lookup_es_2d_r8
269 module procedure lookup_es_3d_r4, lookup_es_3d_r8
274 module procedure lookup_es_0d_r4, lookup_es_0d_r8
275 module procedure lookup_es_1d_r4, lookup_es_1d_r8
276 module procedure lookup_es_2d_r4, lookup_es_2d_r8
277 module procedure lookup_es_3d_r4, lookup_es_3d_r8
343 module procedure lookup_des_0d_r4, lookup_des_0d_r8
344 module procedure lookup_des_1d_r4, lookup_des_1d_r8
345 module procedure lookup_des_2d_r4, lookup_des_2d_r8
346 module procedure lookup_des_3d_r4, lookup_des_3d_r8
352 module procedure lookup_des_0d_r4, lookup_des_0d_r8
353 module procedure lookup_des_1d_r4, lookup_des_1d_r8
354 module procedure lookup_des_2d_r4, lookup_des_2d_r8
355 module procedure lookup_des_3d_r4, lookup_des_3d_r8
433 module procedure lookup_es_des_0d_r4, lookup_es_des_0d_r8
434 module procedure lookup_es_des_1d_r4, lookup_es_des_1d_r8
435 module procedure lookup_es_des_2d_r4, lookup_es_des_2d_r8
436 module procedure lookup_es_des_3d_r4, lookup_es_des_3d_r8
441 module procedure lookup_es2_0d_r4, lookup_es2_0d_r8
442 module procedure lookup_es2_1d_r4, lookup_es2_1d_r8
443 module procedure lookup_es2_2d_r4, lookup_es2_2d_r8
444 module procedure lookup_es2_3d_r4, lookup_es2_3d_r8
449 module procedure lookup_des2_0d_r4, lookup_des2_0d_r8
450 module procedure lookup_des2_1d_r4, lookup_des2_1d_r8
451 module procedure lookup_des2_2d_r4, lookup_des2_2d_r8
452 module procedure lookup_des2_3d_r4, lookup_des2_3d_r8
457 module procedure lookup_es2_des2_0d_r4, lookup_es2_des2_0d_r8
458 module procedure lookup_es2_des2_1d_r4, lookup_es2_des2_1d_r8
459 module procedure lookup_es2_des2_2d_r4, lookup_es2_des2_2d_r8
460 module procedure lookup_es2_des2_3d_r4, lookup_es2_des2_3d_r8
465 module procedure lookup_es3_0d_r4, lookup_es3_0d_r8
466 module procedure lookup_es3_1d_r4, lookup_es3_1d_r8
467 module procedure lookup_es3_2d_r4, lookup_es3_2d_r8
468 module procedure lookup_es3_3d_r4, lookup_es3_3d_r8
473 module procedure lookup_des3_0d_r4, lookup_des3_0d_r8
474 module procedure lookup_des3_1d_r4, lookup_des3_1d_r8
475 module procedure lookup_des3_2d_r4, lookup_des3_2d_r8
476 module procedure lookup_des3_3d_r4, lookup_des3_3d_r8
481 module procedure lookup_es3_des3_0d_r4, lookup_es3_des3_0d_r8
482 module procedure lookup_es3_des3_1d_r4, lookup_es3_des3_1d_r8
483 module procedure lookup_es3_des3_2d_r4, lookup_es3_des3_2d_r8
484 module procedure lookup_es3_des3_3d_r4, lookup_es3_des3_3d_r8
582 module procedure compute_qs_0d_r4, compute_qs_0d_r8
583 module procedure compute_qs_1d_r4, compute_qs_1d_r8
584 module procedure compute_qs_2d_r4, compute_qs_2d_r8
585 module procedure compute_qs_3d_r4, compute_qs_3d_r8
684 module procedure compute_mrs_0d_r4, compute_mrs_0d_r8
685 module procedure compute_mrs_1d_r4, compute_mrs_1d_r8
686 module procedure compute_mrs_2d_r4, compute_mrs_2d_r8
687 module procedure compute_mrs_3d_r4, compute_mrs_3d_r8
720 module procedure check_1d_r4, check_1d_r8
724 module procedure check_2d_r4, check_2d_r8
729 module procedure temp_check_1d_r4, temp_check_1d_r8
730 module procedure temp_check_2d_r4, temp_check_2d_r8
731 module procedure temp_check_3d_r4, temp_check_3d_r8
736 module procedure show_all_bad_0d_r4, show_all_bad_0d_r8
737 module procedure show_all_bad_1d_r4, show_all_bad_1d_r8
738 module procedure show_all_bad_2d_r4, show_all_bad_2d_r8
739 module procedure show_all_bad_3d_r4, show_all_bad_3d_r8
746 #include<file_version.h>
748 logical :: module_is_initialized = .false.
753 real(r8_kind),
parameter :: EPSILO = real(rdgas,r8_kind)/real(rvgas, r8_kind)
754 real(r8_kind),
parameter :: ZVIR = real(rvgas,r8_kind)/real(rdgas,r8_kind) - 1.0_r8_kind
759 integer,
public :: tcmin = -160
760 integer,
public :: tcmax = 100
761 integer :: esres = 10
765 integer :: stdoutunit=0
768 real(r8_kind) :: tmin, dtinv, teps
771 logical :: show_bad_value_count_by_slice=.true.
772 logical :: show_all_bad_values=.false.
773 logical :: use_exact_qs = .false.
774 logical :: do_simple =.false.
775 logical :: construct_table_wrt_liq = .false.
776 logical :: construct_table_wrt_liq_and_ice = .false.
778 namelist / sat_vapor_pres_nml / show_bad_value_count_by_slice, show_all_bad_values, &
779 use_exact_qs, do_simple, &
780 construct_table_wrt_liq, &
781 construct_table_wrt_liq_and_ice
785 subroutine sat_vapor_pres_init(err_msg)
802 character(len=*),
intent(out),
optional :: err_msg
803 character(len=128) :: err_msg_local
804 integer :: iunit, ierr, io
807 if (module_is_initialized)
return
810 read (input_nml_file, sat_vapor_pres_nml, iostat=io)
817 if (
mpp_pe() == mpp_root_pe())
write (iunit, nml=sat_vapor_pres_nml)
823 nsize = (tcmax-tcmin)*esres+1
826 real(TFREEZE,r8_kind),
real(HLV,r8_kind),&
827 real(RVGAS,r8_kind),
real(ES0,r8_kind), err_msg_local, use_exact_qs, do_simple,&
828 construct_table_wrt_liq, &
829 construct_table_wrt_liq_and_ice, &
831 if ( err_msg_local ==
'' )
then
832 if(
present(err_msg)) err_msg =
''
837 module_is_initialized = .true.
839 end subroutine sat_vapor_pres_init
841 #include "sat_vapor_pres_r4.fh"
842 #include "sat_vapor_pres_r8.fh"
923 end module sat_vapor_pres_mod
integer function, public check_nml_error(IOSTAT, NML_NAME)
Checks the iostat argument that is returned after reading a namelist and determines if the error code...
subroutine, public write_version_number(version, tag, unit)
Prints to the log file (or a specified unit) the version id string and tag name.
logical function, public fms_error_handler(routine, message, err_msg)
Facilitates the control of fatal error conditions.
subroutine, public error_mesg(routine, message, level)
Print notes, warnings and error messages; terminates program for warning and error messages....
integer function stdout()
This function returns the current standard fortran unit numbers for output.
integer function stdlog()
This function returns the current standard fortran unit numbers for log messages. Log messages,...
integer function mpp_pe()
Returns processor ID.
For the given temperatures, pressures and optionally vapor mixing ratio, returns the vapor mixing rat...
For the given temperatures, pressures and optionally vapor specific humidity, returns the specific hu...
Provided for backward compatibility (to be removed soon)
Provided for backward compatibility (to be removed soon)
For the given temperatures, returns the derivative of saturation vapor pressure with respect to tempe...
For the given temperatures, returns the saturation vapor pressures.
For the given temperatures, returns the saturation vapor pressure and the derivative of saturation va...