SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
mode_thermos.F90
Go to the documentation of this file.
1 !SFX_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier
2 !SFX_LIC This is part of the SURFEX software governed by the CeCILL-C licence
3 !SFX_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
4 !SFX_LIC for details. version 1.
5 ! ######spl
6  MODULE mode_thermos
7 ! ####################
8 !
9 !!**** *MODE_THERMO* -
10 !!
11 !! PURPOSE
12 !! -------
13 !
14 !
15 !!
16 !!** IMPLICIT ARGUMENTS
17 !! ------------------
18 !! NONE
19 !!
20 !! REFERENCE
21 !! ---------
22 !!
23 !!
24 !! AUTHOR
25 !! ------
26 !! V. Ducrocq * Meteo France *
27 !!
28 !! MODIFICATIONS
29 !! -------------
30 !! Original 28/08/94
31 !! Modified 01/2006 : sea flux parameterization.
32 !! B. Decharme 05/2013 : Qsat function of XTT
33 !! so, Qsat=Qsati if Tg <= XTT and inversely
34 !! S. Belamari 03/2014 : new formula (QSAT_SEAWATER2) for sat. air pressure
35 !! over seawater (with explicit salinity dependency)
36 !!
37 !--------------------------------------------------------------------------------
38 !
39 !* 0. DECLARATIONS
40 ! ------------
41 !
42 !-------------------------------------------------------------------------------
43 !
44 !
45 USE yomhook ,ONLY : lhook, dr_hook
46 USE parkind1 ,ONLY : jprb
47 !
48 INTERFACE psat
49  MODULE PROCEDURE psat_0d
50  MODULE PROCEDURE psat_1d
51  MODULE PROCEDURE psat_2d
52 END INTERFACE
53 INTERFACE dpsat
54  MODULE PROCEDURE dpsat_1d
55 END INTERFACE
56 
57 INTERFACE qsat
58  MODULE PROCEDURE qsatw_0d
59  MODULE PROCEDURE qsatw_1d
60  MODULE PROCEDURE qsatw_2d
61 END INTERFACE
62 INTERFACE qsat_seawater
63  MODULE PROCEDURE qsatseaw_1d
64 END INTERFACE
65 INTERFACE qsat_seawater2
66  MODULE PROCEDURE qsatseaw2_1d
67 END INTERFACE
68 INTERFACE dqsat
69  MODULE PROCEDURE dqsatw_o_dt_1d
70 END INTERFACE
71 INTERFACE qsati
72  MODULE PROCEDURE qsati_1d
73  MODULE PROCEDURE qsati_2d
74 END INTERFACE
75 INTERFACE dqsati
76  MODULE PROCEDURE dqsati_o_dt_1d
77 END INTERFACE
78  CONTAINS
79 !-------------------------------------------------------------------------------
80 ! ######################################
81  FUNCTION psat_0d(PT) RESULT(PPSAT)
82 ! ######################################
83 !-------------------------------------------------------------------------------
84 !
85 !* 0. DECLARATIONS
86 ! ------------
87 !
88 USE modd_csts
89 USE modd_reprod_oper, ONLY : cqsat
90 !
91 IMPLICIT NONE
92 !
93 !* 0.1 Declarations of arguments and results
94 !
95 !
96 REAL, INTENT(IN) :: pt ! Temperature (Kelvin)
97 REAL :: ppsat ! saturation vapor
98  ! specific humidity
99  ! with respect to
100  ! water (kg/kg)
101 !
102 REAL :: zalp, zbeta, zgam
103 !
104 REAL(KIND=JPRB) :: zhook_handle
105 !-------------------------------------------------------------------------------
106 IF (lhook) CALL dr_hook('MODE_THERMOS:PSAT_0D',0,zhook_handle)
107 !
108 !* 1. COMPUTE SATURATION VAPOR PRESSURE
109 ! ---------------------------------
110 !
111 zalp = xalpw
112 zbeta = xbetaw
113 zgam = xgamw
114 !
115 IF(cqsat=='NEW'.AND.pt<=xtt)THEN
116  zalp = xalpi
117  zbeta = xbetai
118  zgam = xgami
119 ENDIF
120 !
121 ppsat = exp( zalp - zbeta/pt - zgam*log(pt) )
122 !
123 !-------------------------------------------------------------------------------
124 IF (lhook) CALL dr_hook('MODE_THERMOS:PSAT_0D',1,zhook_handle)
125 !
126 END FUNCTION psat_0d
127 !-------------------------------------------------------------------------------
128 ! ######################################
129  FUNCTION psat_1d(PT) RESULT(PPSAT)
130 ! ######################################
131 !-------------------------------------------------------------------------------
132 !
133 !* 0. DECLARATIONS
134 ! ------------
135 !
136 USE modd_csts
137 USE modd_reprod_oper, ONLY : cqsat
138 !
139 IMPLICIT NONE
140 !
141 !* 0.1 Declarations of arguments and results
142 !
143 !
144 REAL, DIMENSION(:), INTENT(IN) :: pt ! Temperature (Kelvin)
145 REAL, DIMENSION(SIZE(PT)) :: ppsat ! saturation vapor pressure (Pa)
146 !
147 REAL, DIMENSION(SIZE(PT)) :: zalp, zbeta, zgam
148 !
149 INTEGER :: jj !loop index
150 REAL(KIND=JPRB) :: zhook_handle
151 !-------------------------------------------------------------------------------
152 IF (lhook) CALL dr_hook('MODE_THERMOS:PSAT_1D',0,zhook_handle)
153 !
154 !* 1. COMPUTE SATURATION VAPOR PRESSURE
155 ! ---------------------------------
156 !
157 zalp(:) = xalpw
158 zbeta(:) = xbetaw
159 zgam(:) = xgamw
160 !
161 IF(cqsat=='NEW')THEN
162  WHERE(pt<=xtt)
163  zalp(:) = xalpi
164  zbeta(:) = xbetai
165  zgam(:) = xgami
166  ENDWHERE
167 ENDIF
168 !
169 !cdir nodep
170 DO jj=1,SIZE(pt)
171  ppsat(jj) = exp( zalp(jj) - zbeta(jj)/pt(jj) - zgam(jj)*log(pt(jj)) )
172 ENDDO
173 !
174 !-------------------------------------------------------------------------------
175 IF (lhook) CALL dr_hook('MODE_THERMOS:PSAT_1D',1,zhook_handle)
176 !
177 END FUNCTION psat_1d
178 !-------------------------------------------------------------------------------
179 ! ######################################
180  FUNCTION psat_2d(PT,KMASK) RESULT(PPSAT)
181 ! ######################################
182 !-------------------------------------------------------------------------------
183 !
184 !* 0. DECLARATIONS
185 ! ------------
186 !
187 USE modd_csts
188 USE modd_reprod_oper, ONLY : cqsat
189 !
190 IMPLICIT NONE
191 !
192 !* 0.1 Declarations of arguments and results
193 !
194 !
195 REAL, DIMENSION(:,:), INTENT(IN) :: pt ! Temperature (Kelvin)
196 INTEGER, DIMENSION(:), INTENT(IN) :: kmask
197 !
198 REAL, DIMENSION(SIZE(PT,1),SIZE(PT,2)) :: ppsat ! saturation vapor pressure (Pa)
199 !
200 REAL, DIMENSION(SIZE(PT,1),SIZE(PT,2)) :: zalp, zbeta, zgam
201 !
202 INTEGER :: jj, jl, ini, inl, iwork !loop index
203 REAL(KIND=JPRB) :: zhook_handle
204 !-------------------------------------------------------------------------------
205 IF (lhook) CALL dr_hook('MODE_THERMOS:PSAT_2D',0,zhook_handle)
206 !
207 !* 1. COMPUTE SATURATION VAPOR PRESSURE
208 ! ---------------------------------
209 !
210 ini=SIZE(pt,1)
211 inl=SIZE(pt,2)
212 !
213 ppsat(:,:) = 0.0
214 !
215 zalp(:,:) = xalpw
216 zbeta(:,:) = xbetaw
217 zgam(:,:) = xgamw
218 !
219 IF(cqsat=='NEW')THEN
220  WHERE(pt(:,:)<=xtt)
221  zalp(:,:) = xalpi
222  zbeta(:,:) = xbetai
223  zgam(:,:) = xgami
224  ENDWHERE
225 ENDIF
226 !
227 DO jl=1,inl
228  DO jj=1,ini
229  iwork=kmask(jj)
230  IF(jl<=iwork)THEN
231  ppsat(jj,jl) = exp( zalp(jj,jl) - zbeta(jj,jl)/pt(jj,jl) - zgam(jj,jl)*log(pt(jj,jl)) )
232  ENDIF
233  ENDDO
234 ENDDO
235 !
236 !-------------------------------------------------------------------------------
237 IF (lhook) CALL dr_hook('MODE_THERMOS:PSAT_2D',1,zhook_handle)
238 !
239 END FUNCTION psat_2d
240 !-------------------------------------------------------------------------------
241 ! ######################################
242  FUNCTION dpsat_1d(PT) RESULT(PDPSAT)
243 ! ######################################
244 !-------------------------------------------------------------------------------
245 !
246 !* 0. DECLARATIONS
247 ! ------------
248 !
249 USE modd_csts
250 USE modd_reprod_oper, ONLY : cqsat
251 !
252 IMPLICIT NONE
253 !
254 !* 0.1 Declarations of arguments and results
255 !
256 !
257 REAL, DIMENSION(:), INTENT(IN) :: pt ! Temperature (Kelvin)
258 !
259 REAL, DIMENSION(SIZE(PT)) :: pdpsat
260 !
261 REAL, DIMENSION(SIZE(PT)) :: zbeta, zgam
262 !
263 REAL(KIND=JPRB) :: zhook_handle
264 !-------------------------------------------------------------------------------
265 !
266 IF (lhook) CALL dr_hook('MODE_THERMOS:DPSAT_1D',0,zhook_handle)
267 !
268 !* 1. COMPUTE SATURATION VAPOR PRESSURE
269 ! ---------------------------------
270 !
271 zbeta(:) = xbetaw
272 zgam(:) = xgamw
273 !
274 IF(cqsat=='NEW')THEN
275  WHERE(pt<=xtt)
276  zbeta(:) = xbetai
277  zgam(:) = xgami
278  ENDWHERE
279 ENDIF
280 !
281 pdpsat(:) = zbeta(:)/pt(:)**2 - zgam(:)/pt(:)
282 !
283 !-------------------------------------------------------------------------------
284 IF (lhook) CALL dr_hook('MODE_THERMOS:DPSAT_1D',1,zhook_handle)
285 !
286 END FUNCTION dpsat_1d
287 !-------------------------------------------------------------------------------
288 ! ######################################
289  FUNCTION qsatw_0d(PT,PP) RESULT(PQSAT)
290 ! ######################################
291 !
292 !!**** *QSATW * - function to compute saturation vapor humidity from
293 !! temperature
294 !!
295 !! PURPOSE
296 !! -------
297 ! The purpose of this function is to compute the saturation vapor
298 ! pressure from temperature
299 !
300 !
301 !!** METHOD
302 !! ------
303 !! Given temperature T (PT), the saturation vapor pressure es(T)
304 !! (FOES(PT)) is computed by integration of the Clapeyron equation
305 !! from the triple point temperature Tt (XTT) and the saturation vapor
306 !! pressure of the triple point es(Tt) (XESTT), i.e
307 !!
308 !! es(T)= EXP( alphaw - betaw /T - gammaw Log(T) )
309 !!
310 !! with :
311 !! alphaw (XALPW) = LOG(es(Tt))+ betaw/Tt + gammaw Log(Tt)
312 !! betaw (XBETAW) = Lv(Tt)/Rv + gammaw Tt
313 !! gammaw (XGAMW) = (Cl -Cpv) /Rv
314 !!
315 !! Then, the specific humidity at saturation is deduced.
316 !!
317 !!
318 !! EXTERNAL
319 !! --------
320 !! NONE
321 !!
322 !! IMPLICIT ARGUMENTS
323 !! ------------------
324 !! Module MODD_CST : comtains physical constants
325 !! XALPW : Constant for saturation vapor pressure function
326 !! XBETAW : Constant for saturation vapor pressure function
327 !! XGAMW : Constant for saturation vapor pressure function
328 !!
329 !! REFERENCE
330 !! ---------
331 !! Book2 of documentation of Meso-NH
332 !!
333 !!
334 !! AUTHOR
335 !! ------
336 !! V. Masson * Meteo France *
337 !!
338 !! MODIFICATIONS
339 !! -------------
340 !! Original 21/09/98
341 !-------------------------------------------------------------------------------
342 !
343 !* 0. DECLARATIONS
344 ! ------------
345 !
346 USE modd_csts
347 !
348 IMPLICIT NONE
349 !
350 !* 0.1 Declarations of arguments and results
351 !
352 !
353 REAL, INTENT(IN) :: pt ! Temperature (Kelvin)
354 REAL, INTENT(IN) :: pp ! Pressure (Pa)
355 REAL :: pqsat ! saturation vapor
356  ! specific humidity
357  ! with respect to
358  ! water (kg/kg)
359 !
360 !* 0.2 Declarations of local variables
361 !
362 REAL :: zfoes ! saturation vapor
363  ! pressure
364  ! (Pascal)
365 !
366 REAL :: zwork1
367 REAL :: zwork2
368 REAL(KIND=JPRB) :: zhook_handle
369 !-------------------------------------------------------------------------------
370 IF (lhook) CALL dr_hook('MODE_THERMOS:QSATW_0D',0,zhook_handle)
371 !
372 !* 1. COMPUTE SATURATION VAPOR PRESSURE
373 ! ---------------------------------
374 !
375 zfoes = psat(pt)
376 zwork1 = zfoes/pp
377 zwork2 = xrd/xrv
378 !
379 !* 2. COMPUTE SATURATION HUMIDITY
380 ! ---------------------------
381 !
382 pqsat = zwork2*zwork1 / (1.+(zwork2-1.)*zwork1)
383 !
384 !-------------------------------------------------------------------------------
385 IF (lhook) CALL dr_hook('MODE_THERMOS:QSATW_0D',1,zhook_handle)
386 !
387 END FUNCTION qsatw_0d
388 !-------------------------------------------------------------------------------
389 !
390 ! ######################################
391  FUNCTION qsatw_1d(PT,PP) RESULT(PQSAT)
392 ! ######################################
393 !
394 !!**** *QSATW * - function to compute saturation vapor humidity from
395 !! temperature
396 !!
397 !! PURPOSE
398 !! -------
399 ! The purpose of this function is to compute the saturation vapor
400 ! pressure from temperature
401 !
402 !
403 !!** METHOD
404 !! ------
405 !! Given temperature T (PT), the saturation vapor pressure es(T)
406 !! (FOES(PT)) is computed by integration of the Clapeyron equation
407 !! from the triple point temperature Tt (XTT) and the saturation vapor
408 !! pressure of the triple point es(Tt) (XESTT), i.e
409 !!
410 !! es(T)= EXP( alphaw - betaw /T - gammaw Log(T) )
411 !!
412 !! with :
413 !! alphaw (XALPW) = LOG(es(Tt))+ betaw/Tt + gammaw Log(Tt)
414 !! betaw (XBETAW) = Lv(Tt)/Rv + gammaw Tt
415 !! gammaw (XGAMW) = (Cl -Cpv) /Rv
416 !!
417 !! Then, the specific humidity at saturation is deduced.
418 !!
419 !!
420 !! EXTERNAL
421 !! --------
422 !! NONE
423 !!
424 !! IMPLICIT ARGUMENTS
425 !! ------------------
426 !! Module MODD_CST : comtains physical constants
427 !! XALPW : Constant for saturation vapor pressure function
428 !! XBETAW : Constant for saturation vapor pressure function
429 !! XGAMW : Constant for saturation vapor pressure function
430 !!
431 !! REFERENCE
432 !! ---------
433 !! Book2 of documentation of Meso-NH
434 !!
435 !!
436 !! AUTHOR
437 !! ------
438 !! V. Masson * Meteo France *
439 !!
440 !! MODIFICATIONS
441 !! -------------
442 !! Original 21/09/98
443 !-------------------------------------------------------------------------------
444 !
445 !* 0. DECLARATIONS
446 ! ------------
447 !
448 USE modd_csts
449 !
450 IMPLICIT NONE
451 !
452 !* 0.1 Declarations of arguments and results
453 !
454 !
455 REAL, DIMENSION(:), INTENT(IN) :: pt ! Temperature
456  ! (Kelvin)
457 REAL, DIMENSION(:), INTENT(IN) :: pp ! Pressure
458  ! (Pa)
459 REAL, DIMENSION(SIZE(PT)) :: pqsat ! saturation vapor
460  ! specific humidity
461  ! with respect to
462  ! water (kg/kg)
463 !
464 !* 0.2 Declarations of local variables
465 !
466 REAL, DIMENSION(SIZE(PT)) :: zfoes ! saturation vapor
467  ! pressure
468  ! (Pascal)
469 !
470 REAL, DIMENSION(SIZE(PT)) :: zwork1
471 REAL :: zwork2
472 REAL(KIND=JPRB) :: zhook_handle
473 !-------------------------------------------------------------------------------
474 !
475 IF (lhook) CALL dr_hook('MODE_THERMOS:QSATW_1D',0,zhook_handle)
476 !
477 !
478 !* 1. COMPUTE SATURATION VAPOR PRESSURE
479 ! ---------------------------------
480 !
481 zfoes(:) = psat(pt(:))
482 zwork1(:) = zfoes(:)/pp(:)
483 zwork2 = xrd/xrv
484 !
485 !* 2. COMPUTE SATURATION HUMIDITY
486 ! ---------------------------
487 !
488 pqsat(:) = zwork2*zwork1(:) / (1.+(zwork2-1.)*zwork1(:))
489 !
490 IF (lhook) CALL dr_hook('MODE_THERMOS:QSATW_1D',1,zhook_handle)
491 !
492 !-------------------------------------------------------------------------------
493 !
494 END FUNCTION qsatw_1d
495 !
496 !-------------------------------------------------------------------------------
497 !-------------------------------------------------------------------------------
498 !
499 ! ######################################
500  FUNCTION qsatw_2d(PT,PP,KMASK,KL) RESULT(PQSAT)
501 ! ######################################
502 !
503 !!**** *QSATW * - function to compute saturation vapor humidity from
504 !! temperature
505 !!
506 !! PURPOSE
507 !! -------
508 ! The purpose of this function is to compute the saturation vapor
509 ! pressure from temperature
510 !
511 !
512 !!** METHOD
513 !! ------
514 !! Given temperature T (PT), the saturation vapor pressure es(T)
515 !! (FOES(PT)) is computed by integration of the Clapeyron equation
516 !! from the triple point temperature Tt (XTT) and the saturation vapor
517 !! pressure of the triple point es(Tt) (XESTT), i.e
518 !!
519 !! es(T)= EXP( alphaw - betaw /T - gammaw Log(T) )
520 !!
521 !! with :
522 !! alphaw (XALPW) = LOG(es(Tt))+ betaw/Tt + gammaw Log(Tt)
523 !! betaw (XBETAW) = Lv(Tt)/Rv + gammaw Tt
524 !! gammaw (XGAMW) = (Cl -Cpv) /Rv
525 !!
526 !! Then, the specific humidity at saturation is deduced.
527 !!
528 !!
529 !! EXTERNAL
530 !! --------
531 !! NONE
532 !!
533 !! IMPLICIT ARGUMENTS
534 !! ------------------
535 !! Module MODD_CST : comtains physical constants
536 !! XALPW : Constant for saturation vapor pressure function
537 !! XBETAW : Constant for saturation vapor pressure function
538 !! XGAMW : Constant for saturation vapor pressure function
539 !!
540 !! REFERENCE
541 !! ---------
542 !! Book2 of documentation of Meso-NH
543 !!
544 !!
545 !! AUTHOR
546 !! ------
547 !! V. Masson * Meteo France *
548 !!
549 !! MODIFICATIONS
550 !! -------------
551 !! Original 21/09/98
552 !-------------------------------------------------------------------------------
553 !
554 !* 0. DECLARATIONS
555 ! ------------
556 !
557 USE modd_surf_par, ONLY : xundef
558 USE modd_csts
559 !
560 IMPLICIT NONE
561 !
562 !* 0.1 Declarations of arguments and results
563 !
564 !
565 REAL, DIMENSION(:,:), INTENT(IN) :: pt ! Temperature
566  ! (Kelvin)
567 REAL, DIMENSION(:,:), INTENT(IN) :: pp ! Pressure
568  ! (Pa)
569 !
570 INTEGER, DIMENSION(:), INTENT(IN), OPTIONAL :: kmask
571 ! KMASK = Number of soil moisture layers (DIF option)
572 INTEGER, INTENT(IN), OPTIONAL :: kl
573 ! KL = Max number of soil moisture layers (DIF option)
574 !
575 REAL, DIMENSION(SIZE(PT,1),SIZE(PT,2)) :: pqsat ! saturation vapor
576  ! specific humidity
577  ! with respect to
578  ! water (kg/kg)
579 !
580 !* 0.2 Declarations of local variables
581 !
582 REAL, DIMENSION(SIZE(PT,1),SIZE(PT,2)) :: zfoes
583 !
584 INTEGER, DIMENSION(SIZE(PT,1)) :: imask
585 !
586 INTEGER :: inl
587 REAL(KIND=JPRB) :: zhook_handle
588 !-------------------------------------------------------------------------------
589 !
590 IF (lhook) CALL dr_hook('MODE_THERMOS:QSATW_2D',0,zhook_handle)
591 !
592 IF(present(kmask).AND.present(kl))THEN
593  imask(:)=kmask(:)
594  inl=kl
595 ELSE
596  imask(:)=SIZE(pt,2)
597  inl=SIZE(pt,2)
598 ENDIF
599 !
600 pqsat(:,:)=xundef
601 zfoes(:,:)=0.0
602 !
603 !
604 !* 1. COMPUTE SATURATION VAPOR PRESSURE
605 ! ---------------------------------
606 !
607 zfoes(:,1:inl) = psat(pt(:,1:inl),imask(:))
608 !
609 !* 2. COMPUTE SATURATION HUMIDITY
610 ! ---------------------------
611 !
612 pqsat(:,:) = xrd/xrv*zfoes(:,:)/pp(:,:) / (1.+(xrd/xrv-1.)*zfoes(:,:)/pp(:,:))
613 !
614 IF (lhook) CALL dr_hook('MODE_THERMOS:QSATW_2D',1,zhook_handle)
615 !-------------------------------------------------------------------------------
616 !
617 END FUNCTION qsatw_2d
618 !
619 !-------------------------------------------------------------------------------
620 !
621 !-------------------------------------------------------------------------------
622 !
623 ! ######################################
624  FUNCTION qsatseaw_1d(PT,PP) RESULT(PQSAT)
625 ! ######################################
626 !
627 !!**** *QSATW * - function to compute saturation vapor humidity from
628 !! temperature
629 !!
630 !! PURPOSE
631 !! -------
632 ! The purpose of this function is to compute the saturation vapor
633 ! pressure from temperature over saline seawater
634 !
635 !
636 !!** METHOD
637 !! ------
638 !! Given temperature T (PT), the saturation vapor pressure es(T)
639 !! (FOES(PT)) is computed by integration of the Clapeyron equation
640 !! from the triple point temperature Tt (XTT) and the saturation vapor
641 !! pressure of the triple point es(Tt) (XESTT), i.e
642 !! The reduction due to salinity is compute with the factor 0.98 (reduction of 2%)
643 !!
644 !! es(T)= 0.98*EXP( alphaw - betaw /T - gammaw Log(T) )
645 !!
646 !! with :
647 !! alphaw (XALPW) = LOG(es(Tt))+ betaw/Tt + gammaw Log(Tt)
648 !! betaw (XBETAW) = Lv(Tt)/Rv + gammaw Tt
649 !! gammaw (XGAMW) = (Cl -Cpv) /Rv
650 !!
651 !! Then, the specific humidity at saturation is deduced.
652 !!
653 !!
654 !! EXTERNAL
655 !! --------
656 !! NONE
657 !!
658 !! IMPLICIT ARGUMENTS
659 !! ------------------
660 !! Module MODD_CST : comtains physical constants
661 !! XALPW : Constant for saturation vapor pressure function
662 !! XBETAW : Constant for saturation vapor pressure function
663 !! XGAMW : Constant for saturation vapor pressure function
664 !!
665 !! REFERENCE
666 !! ---------
667 !! Book2 of documentation of Meso-NH
668 !! Zeng, X., Zhao, M., and Dickinson, R. E., 1998 : Intercomparaison of bulk
669 !! aerodynamic algorithm for the computation of sea surface fluxes using
670 !! TOGA COARE and TAO data. Journal of Climate, vol 11, n°10, pp 2628--2644
671 !!
672 !!
673 !! AUTHOR
674 !! ------
675 !! C. Lebeaupin * Meteo France *
676 !!
677 !! MODIFICATIONS
678 !! -------------
679 !! Original 6/04/2005
680 !-------------------------------------------------------------------------------
681 !
682 !* 0. DECLARATIONS
683 ! ------------
684 !
685 USE modd_csts
686 !
687 IMPLICIT NONE
688 !
689 !* 0.1 Declarations of arguments and results
690 !
691 !
692 REAL, DIMENSION(:), INTENT(IN) :: pt ! Temperature
693  ! (Kelvin)
694 REAL, DIMENSION(:), INTENT(IN) :: pp ! Pressure
695  ! (Pa)
696 REAL, DIMENSION(SIZE(PT)) :: pqsat ! saturation vapor
697  ! specific humidity
698  ! with respect to
699  ! water (kg/kg)
700 !
701 !* 0.2 Declarations of local variables
702 !
703 REAL, DIMENSION(SIZE(PT)) :: zfoes ! saturation vapor
704  ! pressure
705  ! (Pascal)
706 !
707 REAL, DIMENSION(SIZE(PT)) :: zwork1
708 REAL :: zwork2
709 REAL(KIND=JPRB) :: zhook_handle
710 !-------------------------------------------------------------------------------
711 !
712 IF (lhook) CALL dr_hook('MODE_THERMOS:QSATSEAW_1D',0,zhook_handle)
713 !
714 zfoes(:) = psat(pt(:))
715 zfoes(:) = 0.98*zfoes(:)
716 ! vapor pressure reduction of 2% over saline seawater could have a significant
717 ! impact on the computation of surface latent heat flux under strong wind
718 ! conditions (Zeng et al, 1998).
719 !
720 zwork1(:) = zfoes(:)/pp(:)
721 zwork2 = xrd/xrv
722 !
723 !* 2. COMPUTE SATURATION HUMIDITY
724 ! ---------------------------
725 !
726 pqsat(:) = zwork2*zwork1(:) / (1.+(zwork2-1.)*zwork1(:))
727 !
728 IF (lhook) CALL dr_hook('MODE_THERMOS:QSATSEAW_1D',1,zhook_handle)
729 !-------------------------------------------------------------------------------
730 !
731 END FUNCTION qsatseaw_1d
732 !
733 !-------------------------------------------------------------------------------
734 !-------------------------------------------------------------------------------
735 !
736 ! ######################################
737  FUNCTION qsatseaw2_1d(PT,PP,PSSS) RESULT(PQSAT)
738 ! ######################################
739 !
740 !!**** *QSATW * - function to compute saturation vapor humidity from
741 !! temperature
742 !!
743 !! PURPOSE
744 !! -------
745 ! The purpose of this function is to compute the saturation vapor
746 ! pressure from temperature over saline seawater
747 !
748 !
749 !!** METHOD
750 !! ------
751 !! Given temperature T (PT) and salinity S (PSSS), the saturation vapor
752 !! pressure es(T,S) (FOES(PT,PSSS)) is computed following Weiss and Price
753 !! (1980).
754 !!
755 !! Then, the specific humidity at saturation is deduced.
756 !!
757 !!
758 !! EXTERNAL
759 !! --------
760 !! NONE
761 !!
762 !! IMPLICIT ARGUMENTS
763 !! ------------------
764 !! Module MODD_CST : contains physical constants
765 !!
766 !! REFERENCE
767 !! ---------
768 !! Weiss, R.F., and Price, B.A., 1980 : Nitrous oxide solubility in water
769 !! and seawater. Marine Chemistry, n°8, pp 347-359.
770 !!
771 !!
772 !! AUTHOR
773 !! ------
774 !! S. Belamari * Meteo France *
775 !!
776 !! MODIFICATIONS
777 !! -------------
778 !! Original 19/03/2014
779 !-------------------------------------------------------------------------------
780 !
781 !* 0. DECLARATIONS
782 ! ------------
783 !
784 USE modd_csts, ONLY : xrd, xrv
785 !
786 IMPLICIT NONE
787 !
788 !* 0.1 Declarations of arguments and results
789 !
790 !
791 REAL, DIMENSION(:), INTENT(IN) :: pt ! Temperature
792  ! (Kelvin)
793 REAL, DIMENSION(:), INTENT(IN) :: pp ! Pressure
794  ! (Pascal)
795 REAL, DIMENSION(:), INTENT(IN) :: psss ! Salinity
796  ! (g/kg)
797 REAL, DIMENSION(SIZE(PT)) :: pqsat ! saturation vapor
798  ! specific humidity
799  ! with respect to
800  ! water (kg/kg)
801 !
802 !* 0.2 Declarations of local variables
803 !
804 REAL, DIMENSION(SIZE(PT)) :: zfoes ! saturation vapor
805  ! pressure
806  ! (Pascal)
807 !
808 REAL, DIMENSION(SIZE(PT)) :: zwork1
809 REAL :: zwork2
810 REAL(KIND=JPRB) :: zhook_handle
811 !-------------------------------------------------------------------------------
812 !
813 IF (lhook) CALL dr_hook('MODE_THERMOS:QSATSEAW2_1D',0,zhook_handle)
814 !
815 !* 1. COMPUTE SATURATION VAPOR PRESSURE
816 ! ---------------------------------
817 !
818 zfoes(:) = exp( 24.4543 -67.4509*(100.0/pt(:)) -4.8489*log(pt(:)/100.0) &
819  -5.44e-04*(psss(:)/1.00472) ) !see Sharqawy et al (2010) Eq32 p368
820 zfoes(:) = zfoes(:)*1013.25e+02 !convert from atm to Pa
821 !
822 zwork1(:) = zfoes(:)/pp(:)
823 zwork2 = xrd/xrv
824 !
825 !* 2. COMPUTE SATURATION SPECIFIC HUMIDITY
826 ! ------------------------------------
827 !
828 pqsat(:) = zwork2*zwork1(:) / (1.0+(zwork2-1.0)*zwork1(:))
829 !
830 IF (lhook) CALL dr_hook('MODE_THERMOS:QSATSEAW2_1D',1,zhook_handle)
831 !-------------------------------------------------------------------------------
832 !
833 END FUNCTION qsatseaw2_1d
834 !
835 !-------------------------------------------------------------------------------
836 !-------------------------------------------------------------------------------
837 ! ##############################################################
838  FUNCTION dqsatw_o_dt_1d(PT,PP,PQSAT) RESULT(PDQSAT)
839 ! ##############################################################
840 !
841 !!**** *QSATW * - function to compute saturation vapor humidity from
842 !! temperature
843 !!
844 !! PURPOSE
845 !! -------
846 ! The purpose of this function is to compute the saturation vapor
847 ! pressure from temperature
848 !
849 !
850 !!** METHOD
851 !! ------
852 !! Given temperature T (PT), the saturation vapor pressure es(T)
853 !! (FOES(PT)) is computed by integration of the Clapeyron equation
854 !! from the triple point temperature Tt (XTT) and the saturation vapor
855 !! pressure of the triple point es(Tt) (XESTT), i.e
856 !!
857 !! es(T)= EXP( alphaw - betaw /T - gammaw Log(T) )
858 !!
859 !! with :
860 !! alphaw (XALPW) = LOG(es(Tt))+ betaw/Tt + gammaw Log(Tt)
861 !! betaw (XBETAW) = Lv(Tt)/Rv + gammaw Tt
862 !! gammaw (XGAMW) = (Cl -Cpv) /Rv
863 !!
864 !! Then, the specific humidity at saturation is deduced.
865 !!
866 !! Finally, dqsat / dT (T) is computed.
867 !!
868 !!
869 !! EXTERNAL
870 !! --------
871 !! NONE
872 !!
873 !! IMPLICIT ARGUMENTS
874 !! ------------------
875 !! Module MODD_CST : comtains physical constants
876 !! XALPW : Constant for saturation vapor pressure function
877 !! XBETAW : Constant for saturation vapor pressure function
878 !! XGAMW : Constant for saturation vapor pressure function
879 !!
880 !! REFERENCE
881 !! ---------
882 !! Book2 of documentation of Meso-NH
883 !!
884 !!
885 !! AUTHOR
886 !! ------
887 !! V. Masson * Meteo France *
888 !!
889 !! MODIFICATIONS
890 !! -------------
891 !! Original 21/09/98
892 !-------------------------------------------------------------------------------
893 !
894 !* 0. DECLARATIONS
895 ! ------------
896 !
897 USE modd_csts
898 !
899 IMPLICIT NONE
900 !
901 !* 0.1 Declarations of arguments and results
902 !
903 !
904 REAL, DIMENSION(:), INTENT(IN) :: pt ! Temperature
905  ! (Kelvin)
906 REAL, DIMENSION(:), INTENT(IN) :: pp ! Pressure
907  ! (Pa)
908 REAL, DIMENSION(:), INTENT(IN) :: pqsat ! saturation vapor
909  ! specific humidity
910  ! with respect to
911  ! water (kg/kg))
912 REAL, DIMENSION(SIZE(PT)) :: pdqsat ! derivative according
913  ! to temperature of
914  ! saturation vapor
915  ! specific humidity
916  ! with respect to
917  ! water (kg/kg))
918 !
919 !* 0.2 Declarations of local variables
920 !
921 REAL, DIMENSION(SIZE(PT)) :: zfoes ! saturation vapor
922  ! pressure
923  ! (Pascal)
924 !
925 REAL :: zwork1
926 REAL, DIMENSION(SIZE(PT)) :: zwork2
927 !
928 REAL(KIND=JPRB) :: zhook_handle
929 !-------------------------------------------------------------------------------
930 !
931 IF (lhook) CALL dr_hook('MODE_THERMOS:DQSATW_O_DT_1D',0,zhook_handle)
932 !
933 !
934 !* 1. COMPUTE SATURATION VAPOR PRESSURE
935 ! ---------------------------------
936 !
937 zwork1 = xrd/xrv
938 zfoes(:) = pp(:) / (1.+zwork1*(1./pqsat(:)-1.))
939 zwork2(:) = dpsat(pt(:))
940 !
941 !* 2. DERIVATION ACCORDING TO TEMPERATURE
942 ! -----------------------------------
943 !
944 pdqsat(:) = zwork2(:) * pqsat(:) / (1.+(zwork1-1.)*zfoes(:)/pp(:) )
945 !
946 IF (lhook) CALL dr_hook('MODE_THERMOS:DQSATW_O_DT_1D',1,zhook_handle)
947 !
948 !-------------------------------------------------------------------------------
949 !
950 END FUNCTION dqsatw_o_dt_1d
951 !
952 !-------------------------------------------------------------------------------
953 !-------------------------------------------------------------------------------
954 ! ##############################################################
955  FUNCTION dqsati_o_dt_1d(PT,PP,PQSAT) RESULT(PDQSAT)
956 ! ##############################################################
957 !
958 !!**** *QSATW * - function to compute saturation vapor humidity from
959 !! temperature (with respect to ice)
960 !!
961 !! PURPOSE
962 !! -------
963 ! The purpose of this function is to compute the saturation vapor
964 ! pressure from temperature
965 !
966 !
967 !!** METHOD
968 !! ------
969 !! Given temperature T (PT), the saturation vapor pressure es(T)
970 !! (FOES(PT)) is computed by integration of the Clapeyron equation
971 !! from the triple point temperature Tt (XTT) and the saturation vapor
972 !! pressure of the triple point es(Tt) (XESTT), i.e
973 !!
974 !! es(T)= EXP( alphaw - betaw /T - gammaw Log(T) )
975 !!
976 !! with :
977 !! alphaw (XALPW) = LOG(es(Tt))+ betaw/Tt + gammaw Log(Tt)
978 !! betaw (XBETAW) = Lv(Tt)/Rv + gammaw Tt
979 !! gammaw (XGAMW) = (Cl -Cpv) /Rv
980 !!
981 !! Then, the specific humidity at saturation is deduced.
982 !!
983 !! Finally, dqsat / dT (T) is computed.
984 !!
985 !!
986 !! EXTERNAL
987 !! --------
988 !! NONE
989 !!
990 !! IMPLICIT ARGUMENTS
991 !! ------------------
992 !! Module MODD_CST : comtains physical constants
993 !! XALPW : Constant for saturation vapor pressure function
994 !! XBETAW : Constant for saturation vapor pressure function
995 !! XGAMW : Constant for saturation vapor pressure function
996 !!
997 !! REFERENCE
998 !! ---------
999 !! Book2 of documentation of Meso-NH
1000 !!
1001 !!
1002 !! AUTHOR
1003 !! ------
1004 !! V. Masson * Meteo France *
1005 !!
1006 !! MODIFICATIONS
1007 !! -------------
1008 !! Original 21/09/98
1009 !-------------------------------------------------------------------------------
1010 !
1011 !* 0. DECLARATIONS
1012 ! ------------
1013 !
1014 USE modd_csts
1015 !
1016 IMPLICIT NONE
1017 !
1018 !* 0.1 Declarations of arguments and results
1019 !
1020 !
1021 REAL, DIMENSION(:), INTENT(IN) :: pt ! Temperature
1022  ! (Kelvin)
1023 REAL, DIMENSION(:), INTENT(IN) :: pp ! Pressure
1024  ! (Pa)
1025 REAL, DIMENSION(:), INTENT(IN) :: pqsat ! saturation vapor
1026  ! specific humidity
1027  ! with respect to
1028  ! water (kg/kg))
1029 REAL, DIMENSION(SIZE(PT)) :: pdqsat ! derivative according
1030  ! to temperature of
1031  ! saturation vapor
1032  ! specific humidity
1033  ! with respect to
1034  ! water (kg/kg))
1035 !
1036 !* 0.2 Declarations of local variables
1037 !
1038 REAL, DIMENSION(SIZE(PT)) :: zfoes ! saturation vapor
1039  ! pressure
1040  ! (Pascal)
1041 !
1042 REAL :: zwork1
1043 REAL, DIMENSION(SIZE(PT)) :: zwork2
1044 !
1045 REAL(KIND=JPRB) :: zhook_handle
1046 !-------------------------------------------------------------------------------
1047 !
1048 IF (lhook) CALL dr_hook('MODE_THERMOS:DQSATI_O_DT_1D',0,zhook_handle)
1049 !
1050 !
1051 !* 1. COMPUTE SATURATION VAPOR PRESSURE
1052 ! ---------------------------------
1053 !
1054 zwork1 = xrd/xrv
1055 zfoes(:) = pp(:) / (1.+zwork1*(1./pqsat(:)-1.))
1056 zwork2(:) = dpsat(pt(:))
1057 !
1058 !* 2. DERIVATION ACCORDING TO TEMPERATURE
1059 ! -----------------------------------
1060 !
1061 pdqsat(:) = zwork2(:) * pqsat(:) / (1.+(zwork1-1.)*zfoes(:)/pp(:) )
1062 !
1063 IF (lhook) CALL dr_hook('MODE_THERMOS:DQSATI_O_DT_1D',1,zhook_handle)
1064 !-------------------------------------------------------------------------------
1065 !
1066 END FUNCTION dqsati_o_dt_1d
1067 !
1068 !-------------------------------------------------------------------------------
1069 !-------------------------------------------------------------------------------
1070 !
1071 ! ######################################
1072  FUNCTION qsati_1d(PT,PP) RESULT(PQSAT)
1073 ! ######################################
1074 !
1075 !!**** *QSATI * - function to compute saturation vapor humidity from
1076 !! temperature
1077 !!
1078 !! PURPOSE
1079 !! -------
1080 ! The purpose of this function is to compute the saturation vapor
1081 ! pressure from temperature
1082 !
1083 !
1084 !!** METHOD
1085 !! ------
1086 !! Given temperature T (PT), the saturation vapor pressure es(T)
1087 !! (FOES(PT)) is computed by integration of the Clapeyron equation
1088 !! from the triple point temperature Tt (XTT) and the saturation vapor
1089 !! pressure of the triple point es(Tt) (XESTT), i.e
1090 !!
1091 !! es(T)= EXP( alphaw - betaw /T - gammaw Log(T) )
1092 !!
1093 !! with :
1094 !! alphaw (XALPI) = LOG(es(Tt))+ betaw/Tt + gammaw Log(Tt)
1095 !! betaw (XBETAI) = Lv(Tt)/Rv + gammaw Tt
1096 !! gammaw (XGAMI) = (Cl -Cpv) /Rv
1097 !!
1098 !! Then, the specific humidity at saturation is deduced.
1099 !!
1100 !!
1101 !! EXTERNAL
1102 !! --------
1103 !! NONE
1104 !!
1105 !! IMPLICIT ARGUMENTS
1106 !! ------------------
1107 !! Module MODD_CST : comtains physical constants
1108 !! XALPI : Constant for saturation vapor pressure function
1109 !! XBETAI : Constant for saturation vapor pressure function
1110 !! XGAMI : Constant for saturation vapor pressure function
1111 !!
1112 !! REFERENCE
1113 !! ---------
1114 !! Book2 of documentation of Meso-NH
1115 !!
1116 !!
1117 !! AUTHOR
1118 !! ------
1119 !! V. Masson * Meteo France *
1120 !!
1121 !! MODIFICATIONS
1122 !! -------------
1123 !! Original 21/09/98
1124 !-------------------------------------------------------------------------------
1125 !
1126 !* 0. DECLARATIONS
1127 ! ------------
1128 !
1129 USE modd_csts
1130 !
1131 IMPLICIT NONE
1132 !
1133 !* 0.1 Declarations of arguments and results
1134 !
1135 !
1136 REAL, DIMENSION(:), INTENT(IN) :: pt ! Temperature
1137  ! (Kelvin)
1138 REAL, DIMENSION(:), INTENT(IN) :: pp ! Pressure
1139  ! (Pa)
1140 REAL, DIMENSION(SIZE(PT)) :: pqsat ! saturation vapor
1141  ! specific humidity
1142  ! with respect to
1143  ! water (kg/kg)
1144 !
1145 !* 0.2 Declarations of local variables
1146 !
1147 REAL, DIMENSION(SIZE(PT)) :: zfoes ! saturation vapor
1148  ! pressure
1149  ! (Pascal)
1150 !
1151 REAL, DIMENSION(SIZE(PT)) :: zwork1
1152 REAL :: zwork2
1153 REAL(KIND=JPRB) :: zhook_handle
1154 !-------------------------------------------------------------------------------
1155 !
1156 IF (lhook) CALL dr_hook('MODE_THERMOS:QSATI_1D',0,zhook_handle)
1157 !
1158 !
1159 !* 1. COMPUTE SATURATION VAPOR PRESSURE
1160 ! ---------------------------------
1161 !
1162 zfoes(:) = psat(pt(:))
1163 zwork1(:) = zfoes(:)/pp(:)
1164 zwork2 = xrd/xrv
1165 !
1166 !* 2. COMPUTE SATURATION HUMIDITY
1167 ! ---------------------------
1168 !
1169 pqsat(:) = zwork2*zwork1(:) / (1.+(zwork2-1.)*zwork1(:))
1170 !
1171 IF (lhook) CALL dr_hook('MODE_THERMOS:QSATI_1D',1,zhook_handle)
1172 !-------------------------------------------------------------------------------
1173 !
1174 END FUNCTION qsati_1d
1175 !-------------------------------------------------------------------------------
1176 !-------------------------------------------------------------------------------
1177 !
1178 ! ######################################
1179  FUNCTION qsati_2d(PT,PP,KMASK,KL) RESULT(PQSAT)
1180 ! ######################################
1181 !
1182 !!**** *QSATI * - function to compute saturation vapor humidity from
1183 !! temperature
1184 !!
1185 !! PURPOSE
1186 !! -------
1187 ! The purpose of this function is to compute the saturation vapor
1188 ! pressure from temperature
1189 !
1190 !
1191 !!** METHOD
1192 !! ------
1193 !! Given temperature T (PT), the saturation vapor pressure es(T)
1194 !! (FOES(PT)) is computed by integration of the Clapeyron equation
1195 !! from the triple point temperature Tt (XTT) and the saturation vapor
1196 !! pressure of the triple point es(Tt) (XESTT), i.e
1197 !!
1198 !! es(T)= EXP( alphaw - betaw /T - gammaw Log(T) )
1199 !!
1200 !! with :
1201 !! alphaw (XALPI) = LOG(es(Tt))+ betaw/Tt + gammaw Log(Tt)
1202 !! betaw (XBETAI) = Lv(Tt)/Rv + gammaw Tt
1203 !! gammaw (XGAMI) = (Cl -Cpv) /Rv
1204 !!
1205 !! Then, the specific humidity at saturation is deduced.
1206 !!
1207 !!
1208 !! EXTERNAL
1209 !! --------
1210 !! NONE
1211 !!
1212 !! IMPLICIT ARGUMENTS
1213 !! ------------------
1214 !! Module MODD_CST : comtains physical constants
1215 !! XALPI : Constant for saturation vapor pressure function
1216 !! XBETAI : Constant for saturation vapor pressure function
1217 !! XGAMI : Constant for saturation vapor pressure function
1218 !!
1219 !! REFERENCE
1220 !! ---------
1221 !! Book2 of documentation of Meso-NH
1222 !!
1223 !!
1224 !! AUTHOR
1225 !! ------
1226 !! V. Masson * Meteo France *
1227 !!
1228 !! MODIFICATIONS
1229 !! -------------
1230 !! Original 21/09/98
1231 !-------------------------------------------------------------------------------
1232 !
1233 !* 0. DECLARATIONS
1234 ! ------------
1235 !
1236 USE modd_surf_par, ONLY : xundef
1237 USE modd_csts
1238 !
1239 IMPLICIT NONE
1240 !
1241 !* 0.1 Declarations of arguments and results
1242 !
1243 !
1244 REAL, DIMENSION(:,:), INTENT(IN) :: pt ! Temperature
1245  ! (Kelvin)
1246 REAL, DIMENSION(:,:), INTENT(IN) :: pp ! Pressure
1247  ! (Pa)
1248 !
1249 INTEGER, DIMENSION(:), INTENT(IN), OPTIONAL :: kmask
1250 ! KMASK = Number of soil moisture layers (DIF option)
1251 INTEGER, INTENT(IN), OPTIONAL :: kl
1252 ! KL = Max number of soil moisture layers (DIF option)
1253 !
1254 REAL, DIMENSION(SIZE(PT,1),SIZE(PT,2)) :: pqsat ! saturation vapor
1255  ! specific humidity
1256  ! with respect to
1257  ! water (kg/kg)
1258 !
1259 !* 0.2 Declarations of local variables
1260 !
1261 REAL, DIMENSION(SIZE(PT,1),SIZE(PT,2)) :: zfoes ! saturation vapor pressure (Pascal)
1262 !
1263 INTEGER, DIMENSION(SIZE(PT,1)) :: imask
1264 !
1265 INTEGER :: inl
1266 REAL(KIND=JPRB) :: zhook_handle
1267 !-------------------------------------------------------------------------------
1268 !
1269 IF (lhook) CALL dr_hook('MODE_THERMOS:QSATI_2D',0,zhook_handle)
1270 !
1271 IF(present(kmask))THEN
1272  imask(:)=kmask(:)
1273  inl=kl
1274 ELSE
1275  imask(:)=SIZE(pt,2)
1276  inl=SIZE(pt,2)
1277 ENDIF
1278 !
1279 pqsat(:,:)=xundef
1280 zfoes(:,:)=0.0
1281 !
1282 !
1283 !* 1. COMPUTE SATURATION VAPOR PRESSURE
1284 ! ---------------------------------
1285 !
1286 zfoes(:,1:inl) = psat(pt(:,1:inl),imask(:))
1287 !
1288 !* 2. COMPUTE SATURATION HUMIDITY
1289 ! ---------------------------
1290 !
1291 pqsat(:,:) = xrd/xrv*zfoes(:,:)/pp(:,:) / (1.+(xrd/xrv-1.)*zfoes(:,:)/pp(:,:))
1292 !
1293 IF (lhook) CALL dr_hook('MODE_THERMOS:QSATI_2D',1,zhook_handle)
1294 !-------------------------------------------------------------------------------
1295 !
1296 END FUNCTION qsati_2d
1297 !-------------------------------------------------------------------------------
1298 !-------------------------------------------------------------------------------
1299 END MODULE mode_thermos
real function, dimension(size(pt)) dpsat_1d(PT)
real function, dimension(size(pt, 1), size(pt, 2)) qsatw_2d(PT, PP, KMASK, KL)
real function psat_0d(PT)
real function, dimension(size(pt, 1), size(pt, 2)) qsati_2d(PT, PP, KMASK, KL)
real function, dimension(size(pt)) qsatseaw2_1d(PT, PP, PSSS)
real function, dimension(size(pt)) qsati_1d(PT, PP)
real function qsatw_0d(PT, PP)
real function, dimension(size(pt)) qsatw_1d(PT, PP)
real function, dimension(size(pt)) dqsati_o_dt_1d(PT, PP, PQSAT)
real function, dimension(size(pt)) qsatseaw_1d(PT, PP)
real function, dimension(size(pt)) dqsatw_o_dt_1d(PT, PP, PQSAT)
real function, dimension(size(pt)) psat_1d(PT)
real function, dimension(size(pt, 1), size(pt, 2)) psat_2d(PT, KMASK)