Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
fvcom-toolbox
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
FVCOM
fvcom-toolbox
Commits
c5209c2f
Commit
c5209c2f
authored
May 19, 2015
by
Pierre Cazenave
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into pica
parents
d48b49b3
5b304a3c
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
605 additions
and
0 deletions
+605
-0
fvcom_prepro/get_CFS_forcing.m
fvcom_prepro/get_CFS_forcing.m
+576
-0
utilities/qair2rh.m
utilities/qair2rh.m
+29
-0
No files found.
fvcom_prepro/get_CFS_forcing.m
0 → 100644
View file @
c5209c2f
This diff is collapsed.
Click to expand it.
utilities/qair2rh.m
0 → 100644
View file @
c5209c2f
function
rh
=
qair2rh
(
qair
,
temp
,
varargin
)
% Convert specific humitidy to relative humidity.
%
% INPUTS:
% qair - Specific humidity. Dimensionless ratio of water mass /
% total air mass.
% temp - Temperature. Celsius.
% press - Pressure, optional. Millibar. Assume as 1013.25 if
% missing.
%
% OUTPUT:
% rh - relative humidity, ratio of actual water mixing ratio to
% saturation mixing ratio.
%
% NOTES:
% Translated from the R code here:
% http://earthscience.stackexchange.com/questions/2360
%
% Author(s):
% Pierre Cazenave (Plymouth Marine Laboratory)
if
nargin
==
2
press
=
1013.25
;
end
es
=
6.112
*
exp
((
17.67
*
temp
)
/
(
temp
+
243.5
));
e
=
qair
*
press
/
(
0.378
*
qair
+
0.622
);
rh
=
e
/
es
;
rh
(
rh
>
1
)
=
1
;
rh
(
rh
<
0
)
=
0
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment