Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mixed precision mosaic2 #1074

Merged
merged 51 commits into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from 43 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
d21a051
edited mosaic2 ; removed class from grid2
mlee03 Nov 16, 2022
81abf96
edited mosaic2 but failing makecheck
mlee03 Nov 18, 2022
da8f1bc
cleanup
mlee03 Nov 22, 2022
9ec3cbc
more cleanup
mlee03 Nov 22, 2022
c1eb902
git restore test files
mlee03 Nov 22, 2022
33e30e0
remove sourceme
mlee03 Nov 22, 2022
8beef03
edit to make gcc pass; include dir in mosaic2 ; cmakefile edit
mlee03 Nov 22, 2022
f9f1ce7
add public license to header files
mlee03 Nov 22, 2022
eb8837b
add include file; add license info
mlee03 Nov 22, 2022
0bf059a
files that didnt get deleted in previous commit
mlee03 Nov 22, 2022
c86db03
change mo to mos
mlee03 Nov 22, 2022
7b7c20d
add doxygen comments
mlee03 Nov 23, 2022
e51d091
will it undo the spacing issue?
mlee03 Nov 23, 2022
5912d8b
cmakelist changes
mlee03 Nov 28, 2022
009e203
switch extension .fh and .inc files
mlee03 Nov 29, 2022
c3bfab6
fix Makefile for extension switch
mlee03 Nov 29, 2022
90986cb
Merge branch 'mixedmode' into mosaic2
mlee03 Nov 29, 2022
45dc8ae
coupler pass
mlee03 Dec 7, 2022
d550ec2
undo passing r8 in calc_mosaic_grid_area
mlee03 Dec 7, 2022
ba5d542
update to base
mlee03 Dec 8, 2022
5c147c3
get rid of lingering valid_types
mlee03 Dec 9, 2022
67ba1ca
add to group in grid2
mlee03 Dec 9, 2022
0fdac36
bra-ket to quotes
mlee03 Dec 12, 2022
bcc75af
Merge remote-tracking branch 'fms/mixedmode' into mosaic2
Feb 14, 2023
5a233fa
add corrections
Apr 12, 2023
ebeee7a
merge in mixedmode
Apr 12, 2023
8a8243b
first round of unit tests
Apr 13, 2023
84dd12f
add inside_polygon test
Apr 13, 2023
2be3dae
add grid ug tests
Jul 24, 2023
48a1df8
update to mixedmode
Jul 24, 2023
457b13a
update global_area
Aug 18, 2023
9a7707e
cmake fix
Aug 18, 2023
bd721fc
get read of _r8 arrays, just to real(,r8_kind) directly
Aug 18, 2023
87b7513
Merge remote-tracking branch 'fms/mixedmode' into mosaic2_newunittests
Aug 18, 2023
7d19c22
make tests simpler
Aug 29, 2023
da3fa52
mosaic test cleanup
Aug 30, 2023
fc2ae8e
cleanup module use in test_mosaic
Aug 30, 2023
64b30c8
update tests
Aug 30, 2023
0ca67dd
update grid2 to get/compute r8_kind areas
Aug 31, 2023
efa916d
update test
Aug 31, 2023
297673b
Merge remote-tracking branch 'fms/mixedmode' into mosaic2
Aug 31, 2023
e4c1d49
remove printf statements
Aug 31, 2023
991520d
update cmake
Aug 31, 2023
e973ab4
make write_files work
Sep 5, 2023
a4e65bb
changes to test
Sep 5, 2023
77e7f9c
add comments
Sep 5, 2023
2282e1e
trying to skip tests again
Sep 5, 2023
78be2c6
try skipping tests one more time
Sep 5, 2023
8d42512
restore read_mosaic
Sep 6, 2023
503e57d
further cleanup from get_global_area
Sep 6, 2023
110433a
missed area in r8_kind
Sep 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ list(APPEND fms_c_src_files
mosaic/gradient_c2l.c
mosaic/interp.c
mosaic/mosaic_util.c
mosaic/read_mosaic.c
mosaic/get_global_area.c
mpp/mpp_memuse.c
parser/yaml_parser_binding.c
parser/yaml_output_functions.c
Expand Down Expand Up @@ -314,6 +314,7 @@ foreach(kind ${kinds})
constants4
topography/include
axis_utils/include
mosaic2/include
constants
astronomy/include
field_manager/include
Expand Down Expand Up @@ -363,6 +364,7 @@ foreach(kind ${kinds})
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/sat_vapor_pres/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/field_manager/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/horiz_interp/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/mosaic2/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/string_utils/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/mpp/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/topography/include>
Expand All @@ -372,6 +374,7 @@ foreach(kind ${kinds})
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/tracer_manager/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/interpolator/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/coupler/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/mosaic2/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/data_override/include>)


Expand Down
10 changes: 5 additions & 5 deletions mosaic/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,22 @@ create_xgrid.c \
gradient_c2l.c \
interp.c \
mosaic_util.c \
read_mosaic.c \
get_global_area.c \
constant.h \
create_xgrid.h \
gradient_c2l.h \
interp.h \
mosaic_util.h \
read_mosaic.h
get_global_area.h

# Some mods are dependant on other mods in this dir.
grid_mod.$(FC_MODEXT): mosaic_mod.$(FC_MODEXT)

# Mod files are built and then installed as headers.
MODFILES = \
mosaic_mod.$(FC_MODEXT) \
grid_mod.$(FC_MODEXT) \
gradient_mod.$(FC_MODEXT)
mosaic_mod.$(FC_MODEXT) \
grid_mod.$(FC_MODEXT) \
gradient_mod.$(FC_MODEXT)
nodist_include_HEADERS = $(MODFILES)
BUILT_SOURCES = $(MODFILES)

Expand Down
43 changes: 43 additions & 0 deletions mosaic/get_global_area.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/***********************************************************************
* GNU Lesser General Public License
*
* This file is part of the GFDL Flexible Modeling System (FMS).
*
* FMS is free software: you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at
* your option) any later version.
*
* FMS is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FMS. If not, see <http://www.gnu.org/licenses/>.
**********************************************************************/
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <string.h>
#include "get_global_area.h"
#include "constant.h"

/** \file
* \ingroup mosaic
* \brief Compute global area
*/

double get_global_area(void)
{
double garea;
garea = 4*M_PI*RADIUS*RADIUS;
return garea;
}

double get_global_area_(void)
{
double garea;
garea = 4*M_PI*RADIUS*RADIUS;
return garea;
}
27 changes: 27 additions & 0 deletions mosaic/get_global_area.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/***********************************************************************
* GNU Lesser General Public License
*
* This file is part of the GFDL Flexible Modeling System (FMS).
*
* FMS is free software: you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at
* your option) any later version.
*
* FMS is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FMS. If not, see <http://www.gnu.org/licenses/>.
**********************************************************************/
#ifndef GET_GLOBAL_AREA_
#define GET_GLOBAL_AREA_

/* get global area */

double get_global_area(void);
double get_global_area_(void);

#endif
1 change: 0 additions & 1 deletion mosaic/mosaic_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,6 @@ double great_circle_area(int n, const double *x, const double *y, const double *

/* compute angle for pnt1 */
sum += spherical_angle(pnt1, pnt2, pnt0);

}
area = (sum - (n-2.)*M_PI) * RADIUS* RADIUS;
return area;
Expand Down
Loading
Loading