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

GitFlow: Merge Develop into main for 2.35 release #1996

Merged
merged 144 commits into from
Mar 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
144 commits
Select commit Hold shift + click to select a range
9468c66
pmn: first attemp at SunGetLocalSolarHourAngle function
dr0cloud Jan 3, 2023
e3eab8e
Update MAPL_sun_uc.F90
adarmenov Jan 4, 2023
ebb5f16
Merge pull request #1900 from GEOS-ESM/feature/adarmenov/#1882-add-so…
dr0cloud Jan 4, 2023
02790cb
pmn: bug fix
dr0cloud Jan 4, 2023
c1e8fe7
Bump actions/checkout from 3.2.0 to 3.3.0
dependabot[bot] Jan 5, 2023
a08d1f0
Merge pull request #1905 from GEOS-ESM/dependabot/github_actions/deve…
mathomp4 Jan 6, 2023
8cb2933
fix typo in the range of halo in LatLonGridfactory
weiyuan-jiang Jan 7, 2023
fb9e000
more bugs on fill_east of halo
weiyuan-jiang Jan 8, 2023
b1343dd
Merge pull request #1909 from GEOS-ESM/bugfix/wjiang/halo_index
tclune Jan 9, 2023
4425dbf
correct values in the halo corner of LatLon
weiyuan-jiang Jan 9, 2023
6a80583
added senrecv real scalar
weiyuan-jiang Jan 9, 2023
91c426b
pmn: add FORCE_MLSHA optional argument
dr0cloud Jan 9, 2023
79a1513
Update base/MAPL_sun_uc.F90
tclune Jan 9, 2023
b6d124f
Update base/MAPL_sun_uc.F90
tclune Jan 9, 2023
ea71f46
Update base/MAPL_sun_uc.F90
tclune Jan 9, 2023
3200046
Merge branch 'develop' into feature/pnorris/#1882-add-solar-noon-diag…
tclune Jan 9, 2023
2f16dd3
Update CHANGELOG.md
mathomp4 Jan 9, 2023
3e22be5
Merge pull request #1913 from GEOS-ESM/feature/pnorris/#1882-add-sola…
mathomp4 Jan 9, 2023
b9e7adf
Fixes #1912. Fixes for ACG Cmake code
mathomp4 Jan 9, 2023
5135c50
Merge branch 'develop' into bugfix/wjiang/halo_corner
mathomp4 Jan 9, 2023
8ac4f06
Merge pull request #1911 from GEOS-ESM/bugfix/wjiang/halo_corner
mathomp4 Jan 9, 2023
52c7e38
Merge branch 'develop' into feature/mathomp4/1912-fix-acg-cmake
mathomp4 Jan 9, 2023
10b45e2
pmn: first crack not compiling
dr0cloud Jan 10, 2023
8d60a35
Fixes #1888. Identity metadata fix
mathomp4 Jan 10, 2023
ccd71ee
A better way thanks to @tclune
mathomp4 Jan 10, 2023
7d90490
pmn: compiles now
dr0cloud Jan 10, 2023
ff0c9ad
pmn: cosmetic only, removing defunct commented lines, no need to test
dr0cloud Jan 10, 2023
c34f7bb
pmn: change log record
dr0cloud Jan 10, 2023
40ef616
Merge branch 'develop' into feature/pnorris/#1915-all-MAPL-Orbital-pa…
mathomp4 Jan 10, 2023
62de617
pmn: minor changes to comments, no recompilation needed
dr0cloud Jan 11, 2023
f701a3a
Fixes to actually get identity set
mathomp4 Jan 12, 2023
e1cf73c
No need for setter method
mathomp4 Jan 12, 2023
936a213
Remove unneeded declarations
mathomp4 Jan 12, 2023
9731a77
Merge pull request #1920 from GEOS-ESM/feature/pnorris/#1915-all-MAPL…
mathomp4 Jan 12, 2023
20fa5df
Merge branch 'develop' into feature/mathomp4/1912-fix-acg-cmake
mathomp4 Jan 12, 2023
de5120b
Merge branch 'develop' into bugfix/mathomp4/1888-identity-method-fix
mathomp4 Jan 12, 2023
f7d7c80
Merge pull request #1916 from GEOS-ESM/feature/mathomp4/1912-fix-acg-…
tclune Jan 13, 2023
d9987b2
Merge branch 'develop' into bugfix/mathomp4/1888-identity-method-fix
mathomp4 Jan 13, 2023
5a21ae9
Merge pull request #1927 from GEOS-ESM/main
mathomp4 Jan 13, 2023
cafef07
Merge branch 'develop' into bugfix/mathomp4/1888-identity-method-fix
mathomp4 Jan 13, 2023
ed0b8dd
Merge pull request #1922 from GEOS-ESM/bugfix/mathomp4/1888-identity-…
mathomp4 Jan 13, 2023
55f014d
Refactor MAPL_GetResource to base (largely)
darianboggs Jan 18, 2023
4d31f8b
Merge branch 'main' into develop
mathomp4 Jan 19, 2023
f5b1b0f
Create MAPL.profiler logger
mathomp4 Jan 19, 2023
49ff2bb
Commit first successful compile run
darianboggs Jan 20, 2023
6df02cb
test optional argument arrdes before using it
weiyuan-jiang Jan 20, 2023
400f6be
Update comments
darianboggs Jan 20, 2023
eeb9f5f
Update CHANGELOG.md
darianboggs Jan 20, 2023
1b95788
Merge branch 'develop' into feature/wdboggs/refactor_mapl_resource
darianboggs Jan 20, 2023
205f4af
change the offset type to INT64 for large file
weiyuan-jiang Jan 23, 2023
6bedbf8
Add _RETURN(_SUCCESS) to subroutine intrinsic_to_string
darianboggs Jan 24, 2023
3b49c85
Move component_name check; add _RETURN(_SUCCESS)
darianboggs Jan 25, 2023
1597dfc
Fix unknown bug
darianboggs Jan 25, 2023
9ebfe11
Reorder arguments for MAPL_GetResource_config_array; add unusable
darianboggs Jan 25, 2023
29de4b4
Added check for compname
darianboggs Jan 25, 2023
42eb052
Update StringVector version; eliminate unnecessary size check for Str…
darianboggs Jan 25, 2023
27177c6
Correct incorrect component_name variables
darianboggs Jan 25, 2023
1e0cd8a
add more log info when data size is too big
weiyuan-jiang Jan 25, 2023
d94e8c0
Add _UNUSED_DUMMY to procedures; add missing _RETURN(_SUCCESS) statem…
darianboggs Jan 25, 2023
10a0699
Update pfio/MessageVector.F90
weiyuan-jiang Jan 26, 2023
0cb8eba
Update pfio/ForwardDataAndMessage.F90
weiyuan-jiang Jan 26, 2023
011083a
Update select type blocks to use macros to reduce boilerplate code
darianboggs Jan 27, 2023
d37a39f
Modify macro line terminators
darianboggs Jan 30, 2023
2ef87d3
reduce a copy of large attribute
weiyuan-jiang Jan 30, 2023
2d35564
Merge branch 'feature/wjiang/large_output' of github.com:GEOS-ESM/MAP…
weiyuan-jiang Jan 30, 2023
883a98e
Update CMakeLists.txt to use gFTLv2; updated macros
darianboggs Jan 31, 2023
61c1b9d
Fix character string array initialization
darianboggs Jan 31, 2023
42a9fe6
Add shavemantissa f2py code
mathomp4 Jan 31, 2023
34f645a
Merge pull request #1943 from GEOS-ESM/feature/wdboggs/refactor_mapl_…
tclune Feb 1, 2023
e7a5314
Merge branch 'develop' into feature/mathomp4/1930-profiler-output
mathomp4 Feb 1, 2023
525fdc7
Remove comment
mathomp4 Feb 1, 2023
36af93e
fixes #1941
bena-nasa Feb 1, 2023
dbe70b8
Merge branch 'develop' into feature/bmauer/fixes-#1941
tclune Feb 1, 2023
f039139
Merge pull request #1947 from GEOS-ESM/feature/bmauer/fixes-#1941
tclune Feb 1, 2023
852ead6
Merge branch 'develop' into feature/mathomp4/1930-profiler-output
mathomp4 Feb 1, 2023
09c9217
Update build like UFS CI test
mathomp4 Feb 2, 2023
46fe6a2
PC - some constants were defined after where they were needed. Also …
patricia-nasa Feb 2, 2023
e20feb1
Merge branch 'develop' into feature/mathomp4/add-shavemantissa-python
mathomp4 Feb 2, 2023
d42853e
Merge pull request #1950 from GEOS-ESM/feature/mathomp4/update-build-…
tclune Feb 2, 2023
b682ce6
Update CHANGELOG.md
mathomp4 Feb 2, 2023
74a476a
Merge branch 'develop' into feature/mathomp4/add-shavemantissa-python
mathomp4 Feb 2, 2023
5611f58
Fixes #1952. Remove _VERIFY from History GC
mathomp4 Feb 2, 2023
8125461
Clean up some __STAT__ calls
mathomp4 Feb 2, 2023
1fd9612
Update changelog
mathomp4 Feb 2, 2023
ee89ed5
Fix missing status
mathomp4 Feb 3, 2023
44bac8c
Fix some warnings from Intel
mathomp4 Feb 3, 2023
1f56767
Fix warning from Intel
mathomp4 Feb 3, 2023
cb80189
We can't check some statuses
mathomp4 Feb 3, 2023
7db6fed
Add debugging
darianboggs Feb 6, 2023
9b5dab0
Change MAPL_GetResourceFrom... to not verify rc values coming from lo…
darianboggs Feb 6, 2023
776f403
Add status & replace return with _RETURN(_SUCCESS) in print_resource
darianboggs Feb 7, 2023
f4aa596
Removed debug prints; changed _RETURN(_SUCCESS) to return
darianboggs Feb 8, 2023
f67de24
Merge branch 'develop' into feature/wjiang/large_output
weiyuan-jiang Feb 8, 2023
20eb411
Add _RETURN(_SUCCESS)
darianboggs Feb 8, 2023
5726e7c
Add value_is_found flag to maintain compatibility
darianboggs Feb 9, 2023
32d57c2
Modify to use _RC macro (again)
darianboggs Feb 10, 2023
6dd9554
Modify to simple return when value is not set: Some codes uses the RC…
darianboggs Feb 10, 2023
675ae6d
Add _RETURN(_SUCCESS) to print_output; changed _RC to _VERIFY after c…
darianboggs Feb 10, 2023
b472f51
Update comments
darianboggs Feb 11, 2023
d43438a
Updated CHANGELOG.md with bugfix
darianboggs Feb 13, 2023
10197e3
Merge pull request #1962 from GEOS-ESM/bugfix/wdboggs/fix_refactor_error
tclune Feb 13, 2023
502ed5e
Merge branch 'main' into develop
mathomp4 Feb 13, 2023
a8488b6
Merge branch 'develop' into feature/mathomp4/1930-profiler-output
mathomp4 Feb 13, 2023
f621adb
Merge branch 'develop' into bugfix/wjiang/test_optional_arrdes
mathomp4 Feb 13, 2023
e3e29ff
Merge branch 'develop' into feature/wjiang/large_output
mathomp4 Feb 13, 2023
8e88266
Merge branch 'develop' into feature/mathomp4/add-shavemantissa-python
mathomp4 Feb 13, 2023
363d089
Merge branch 'develop' into feature/mathomp4/1952-refactor-verify-his…
mathomp4 Feb 13, 2023
4eb6fe2
Merge pull request #1940 from GEOS-ESM/bugfix/wjiang/test_optional_ar…
mathomp4 Feb 13, 2023
cb4f929
Merge branch 'develop' into feature/wjiang/large_output
mathomp4 Feb 13, 2023
0b0d2ce
Merge pull request #1944 from GEOS-ESM/feature/wjiang/large_output
mathomp4 Feb 13, 2023
4b4ce21
Merge branch 'develop' into feature/mathomp4/add-shavemantissa-python
mathomp4 Feb 13, 2023
f6abb87
Merge branch 'develop' into feature/mathomp4/1952-refactor-verify-his…
mathomp4 Feb 13, 2023
2232a49
Merge branch 'develop' into feature/mathomp4/1930-profiler-output
mathomp4 Feb 13, 2023
4b0d4a3
Merge pull request #1953 from GEOS-ESM/feature/mathomp4/1952-refactor…
mathomp4 Feb 13, 2023
23e71b0
Merge branch 'develop' into feature/mathomp4/1930-profiler-output
mathomp4 Feb 13, 2023
4e17985
Merge pull request #1938 from GEOS-ESM/feature/mathomp4/1930-profiler…
mathomp4 Feb 13, 2023
e795956
Merge branch 'develop' into feature/mathomp4/add-shavemantissa-python
mathomp4 Feb 13, 2023
1ea7b1e
Bump devops-infra/action-pull-request from 0.5.3 to 0.5.5
dependabot[bot] Feb 14, 2023
116e815
Merge pull request #1971 from GEOS-ESM/dependabot/github_actions/deve…
mathomp4 Feb 14, 2023
06af0e5
Merge branch 'main' into develop
mathomp4 Feb 14, 2023
2ab305d
Merge branch 'develop' into feature/mathomp4/add-shavemantissa-python
mathomp4 Feb 14, 2023
64dadc7
Update to use REAL32
mathomp4 Feb 14, 2023
59f2349
add variable through file formatter
weiyuan-jiang Feb 15, 2023
0fc8f92
Update CHANGELOG.md
weiyuan-jiang Feb 15, 2023
46df44c
tests pass for intel ifort
weiyuan-jiang Feb 15, 2023
28a87d3
Merge branch 'feature/wjiang/add_var_formatter' of github.com:GEOS-ES…
weiyuan-jiang Feb 15, 2023
ffa1e22
Merge pull request #1945 from GEOS-ESM/feature/mathomp4/add-shavemant…
mathomp4 Feb 16, 2023
5fcdba8
add redef and enddef to add variable when open
weiyuan-jiang Feb 17, 2023
3b89f08
Merge branch 'develop' into feature/wjiang/add_var_formatter
weiyuan-jiang Feb 22, 2023
41a816a
add a routine to calculate spherical areas to our spherical geometry …
bena-nasa Feb 23, 2023
3d00170
Merge pull request #1984 from GEOS-ESM/feature/bmauer/add_get_area
atrayano Feb 23, 2023
68e807c
Merge branch 'develop' into feature/wjiang/add_var_formatter
mathomp4 Feb 23, 2023
6fc79f5
fixed and added subroutines to read and write char type in Netcdf file
weiyuan-jiang Feb 24, 2023
92af3b2
avoid GNU name conflict
weiyuan-jiang Feb 24, 2023
80c23a7
Let users specify the grid type
weiyuan-jiang Feb 27, 2023
8bef386
Merge pull request #1978 from GEOS-ESM/feature/wjiang/add_var_formatter
mathomp4 Feb 28, 2023
2e61f3a
Merge branch 'develop' into feature/wjiang/add_reading_writing_chars
mathomp4 Feb 28, 2023
395bd4b
Merge branch 'develop' into feature/wjiang/set_grid_users
mathomp4 Feb 28, 2023
b236885
Update NetCDF4_FileFormatter.F90
weiyuan-jiang Feb 28, 2023
ad2f1b8
Merge pull request #1986 from GEOS-ESM/feature/wjiang/add_reading_wri…
mathomp4 Feb 28, 2023
70e6ad9
Merge branch 'develop' into feature/wjiang/set_grid_users
mathomp4 Feb 28, 2023
52137b8
Merge pull request #1989 from GEOS-ESM/feature/wjiang/set_grid_users
mathomp4 Feb 28, 2023
0137745
Prepare for 2.35.0 Release
mathomp4 Feb 28, 2023
76d99ce
Merge pull request #1992 from GEOS-ESM/feature/mathomp4/prepare-for-2…
tclune Mar 1, 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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ workflows:
baselibs_version: *baselibs_version
repo: MAPL
mepodevelop: false
extra_cmake_options: "-DBUILD_WITH_FLAP=OFF -DBUILD_WITH_PFLOGGER=OFF -DBUILD_SHARED_MAPL=OFF"
extra_cmake_options: "-DBUILD_WITH_FLAP=OFF -DBUILD_WITH_PFLOGGER=OFF -DBUILD_WITH_FARGPARSE=OFF -DUSE_EXTDATA2G=OFF -DBUILD_SHARED_MAPL=OFF"
run_unit_tests: true
ctest_options: "-LE 'PERFORMANCE|EXTDATA1G_BIG_TESTS|EXTDATA2G_BIG_TESTS' --output-on-failure"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/push-to-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3.2.0
uses: actions/checkout@v3.3.0
with:
fetch-depth: 0
- name: Run the action
uses: devops-infra/action-pull-request@v0.5.3
uses: devops-infra/action-pull-request@v0.5.5
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
source_branch: develop
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/push-to-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3.2.0
uses: actions/checkout@v3.3.0
with:
fetch-depth: 0
- name: Run the action
uses: devops-infra/action-pull-request@v0.5.3
uses: devops-infra/action-pull-request@v0.5.5
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
source_branch: main
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-tarball.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3.2.0
uses: actions/checkout@v3.3.0
with:
path: ${{ github.event.repository.name }}-${{ github.event.release.tag_name }}

- name: Checkout mepo
uses: actions/checkout@v3.2.0
uses: actions/checkout@v3.3.0
with:
repository: GEOS-ESM/mepo
path: mepo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate_yaml_files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
validate-YAML:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.2.0
- uses: actions/checkout@v3.3.0
- id: yaml-lint
name: yaml-lint
uses: ibiqlik/action-yamllint@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v3.2.0
uses: actions/checkout@v3.3.0
with:
fetch-depth: 1
- name: Set all directories as git safe
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v3.2.0
uses: actions/checkout@v3.3.0
with:
fetch-depth: 1
- name: Set all directories as git safe
Expand Down
2 changes: 1 addition & 1 deletion Apps/Regrid_Util.F90
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ subroutine process_command_line(this,rc)
if (.not.allocated(this%tripolar_file_out)) then
this%tripolar_file_out = "empty"
end if
this%regridMethod = get_regrid_method(regridMth)
this%regridMethod = regrid_method_string_to_int(regridMth)
_ASSERT(this%regridMethod/=UNSPECIFIED_REGRID_METHOD,"improper regrid method chosen")

this%filenames = split_string(cfilenames,',')
Expand Down
47 changes: 47 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,53 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Deprecated

## [2.35.0] - 2023-03-01

### Added

- Added subroutines to read char type in Netcdf
- Added a subroutine add_variable to Netcdf4_Fileformatter
- Add a function to get the area of a spherical polygon to the spherical geometry module
- Created layout independent version of the "DownBit"/"pFIO_ShaveMantissa" routines when running in MPI codes
- Added subroutine `MAPL_SunGetLocalSolarHourAngle()` in `base/MAPL_sun_uc.F90`. This
provides a convenient local solar hour angle diagnostic which will be used to detect local
solar noon via the `EXAMPLE OF USE` in the subroutine header. See `DESCRIPTION` in code
for more details. Provides the TRUE local solar hour angle (i.e., with equation of time
included), but can also provide the MEAN value (without EOT) via `FORCE_MLSHA=.TRUE.`
optional argument.
- Add `shavemantissa` f2py code. This is used by AeroApps.
- NOTE: If you do not have a need for this code, build with `-DUSE_F2PY=OFF`. Note that even if you try to build the f2py code, it might fail anyway due to issues with the Python stack on the machine. ESMA_cmake has code that "tests" if f2py works. If it doesn't, it should failover gracefully.

### Changed

- Changed set_grid method so users have a chance to specify the grid type
- Renamed `get_regrid_method` and `translate_regrid_method` to `regrid_method_string_to_int` and `regrid_method_int_to_string`
respectively in `RegridMethods.F90`. This was done so we could add `get_regrid_method` to the AbstractRegridder. The new names
more accurately reflect what the RegridMethods functions do.
- Changed call to `MAPL_SunOrbitCreate()` inside `MAPL_Generic.F90` to call to new function
`MAPL_SunOrbitCreateFromConfig()`, the latter which get the orbital parameters from the MAPL
state's Config. In this way no default orbital parameter values need appear in `MAPL_Generic.F90`.
Rather, these default values are encapsulated where they belong in `Sun_Mod` in `base/MAPL_sun_uc.F90`
and are now explicitly named and commented on at the head of the module. This is a structural
zero-diff change.
- Created `MAPL.profiler` logger and moved throughput, per-component, and global timers to use it
- Moved most of the MAPL_GetResource generic subroutine to a new module, MAPL_ResourceMod, in base.
The specific subroutines remain in MAPL_GenericMod to maintain the interface in one module, but
most of the functionality is in MAPL_ResourceMod now.
- Update "build like UFS" CI test
- Converted the History Gridded Component to use `_RC` and `_STAT` macros

### Fixed

- Changed the type of output counters to INT64 for large file.
- Tested optional arguments arrdes in MAPL_WriteVars
- Added the correct values to halo corner of LatLon grid
- Fixed range in halo of LatLonGridFactory
- Corrected issue with native output having metadata saying it was bilinearly regridded. Now sets these files to have
`regrid_method: identity`
- Fix bug in `mapl_acg.cmake` that caused unnecessary rebuilds
- Fixed error handling for refactored MAPL_GetResource

## [2.34.3] - 2023-02-14

### Added
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cmake_policy (SET CMP0054 NEW)

project (
MAPL
VERSION 2.34.3
VERSION 2.35.0
LANGUAGES Fortran CXX C) # Note - CXX is required for ESMF

# Set the default build type to release
Expand Down
20 changes: 20 additions & 0 deletions MAPL_cfio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,23 @@ if (precision MATCHES "r8")
target_compile_options (${lib} PRIVATE $<$<COMPILE_LANGUAGE:Fortran>:${flag}>)
endforeach ()
endif ()

if (USE_F2PY)
if (precision STREQUAL "r4")
find_package(F2PY2)
if (F2PY2_FOUND)
esma_add_f2py2_module(ShaveMantissa_
SOURCES ShaveMantissa_py.F90 ShaveMantissa.c
DESTINATION lib/Python/${this}
INCLUDEDIRS ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR}/lib ${include_${this}}
)
add_dependencies(ShaveMantissa_ ${this})

# Install the Python files
install (
FILES shavemantissa.py
DESTINATION lib/Python/${this}
)
endif ()
endif ()
endif ()
26 changes: 26 additions & 0 deletions MAPL_cfio/ShaveMantissa_py.F90
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
subroutine Shave32 ( a_shaved, a, n, xbits, has_undef, undef, chunksize, rc )

!
! Simple cover for f2py.
!
use iso_fortran_env, only: REAL32
implicit NONE
integer, intent(in) :: n ! array size
real(kind=REAL32), intent(in) :: a(n) ! array to be shaved, usually 2D
integer, intent(in) :: xbits ! number of mantissa bits to zero (out of 24)
integer, intent(in) :: has_undef ! set to 1 if undef is present, 0 otherwise
real(kind=REAL32), intent(in) :: undef ! undef value
integer, intent(in) :: chunksize ! find mid-range over chunksizes

real(kind=REAL32), intent(out) :: a_shaved(n) ! shaved array
integer, intent(out) :: rc ! error code

! ---

integer, external :: ShaveMantissa32

rc = ShaveMantissa32(a_shaved,a,n,xbits,has_undef,undef,chunksize)

end subroutine Shave32


36 changes: 36 additions & 0 deletions MAPL_cfio/shavemantissa.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
"""
SImple python interface to the ShaveMantissa function
"""

MISSING = 1.0E15

from ShaveMantissa_ import shave32

def shave(a,xbits=12,has_undef=0,undef=MISSING,chunksize=-1):
"""
Shaves bits from mantissa of float point array for better netCDF4 compression
using gzip.

a_shaved = shave(a,...)

xbits --- number of bits to shave
has_undef --- set to 1 if undefs are present
undef --- undef value
chunksize --- for scaling of array to be shaved: find mid-range value
over chunksizes. If negative, set to len(a)

Typically this function is used for a single vertical slice at time.


"""

n = len(a)
if chunksize<0: chunksize = n

a_shaved, rc = shave32(a,xbits,has_undef,undef,chunksize)

if rc:
raise ValueError, 'shave: error on return from ShaveMantissa_.shave32: %d'%rc

return a_shaved

5 changes: 3 additions & 2 deletions Python/MAPL/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@
MAPL_DEGREES_TO_RADIANS = MAPL_PI / 180.0
MAPL_RADIANS_TO_DEGREES = 180.0 / MAPL_PI

MAPL_UNDEF = 1.0e15

MAPL_PSDRY = 98305.0 # dry surface pressure [Pa]
MAPL_SECONDS_PER_SIDEREAL_DAY = 86164.0 #s
MAPL_GRAV = 9.80665 # m^2/s
MAPL_RADIUS = 6371.0E3 # m
MAPL_OMEGA = 2.0*MAPL_PI/MAPL_SECONDS_PER_SIDEREAL_DAY # 1/s
MAPL_RUNIV = 8314.47 # J/(Kmole K)
MAPL_H2OMW = 18.015 # kg/Kmole
MAPL_EARTH_ECCENTRICITY = 8.1819190842622E-2 # --
MAPL_EARTH_SEMIMAJOR_AXIS = 6378137 # m
MAPL_KM_PER_DEG = (1.0/(MAPL_RADIUS/1000.)) * MAPL_RADIANS_TO_DEGREES
Expand Down Expand Up @@ -48,9 +51,7 @@

MAPL_STFBOL = 5.6734E-8 # W/(m^2 K^4)
MAPL_AVOGAD = 6.023E26 # 1/kmol
MAPL_RUNIV = 8314.47 # J/(Kmole K)

MAPL_H2OMW = 18.015 # kg/Kmole
MAPL_O3MW = 47.9982 # kg/Kmole
MAPL_ALHL = 2.4665E6 # J/kg @15C
MAPL_ALHF = 3.3370E5 # J/kg
Expand Down
22 changes: 12 additions & 10 deletions base/ApplicationSupport.F90
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ subroutine MAPL_Initialize(unusable,comm,logging_config,rc)

character(:), allocatable :: logging_configuration_file
integer :: comm_world,status

_UNUSED_DUMMY(unusable)

if (present(logging_config)) then
Expand Down Expand Up @@ -55,7 +55,7 @@ subroutine MAPL_Finalize(unusable,comm,rc)
integer :: comm_world,status

_UNUSED_DUMMY(unusable)

if (present(comm)) then
comm_world = comm
else
Expand Down Expand Up @@ -137,7 +137,7 @@ subroutine initialize_pflogger(unusable,comm,logging_config,rc)

if (rank == 0) then
lgr => logging%get_logger('MAPL')
call lgr%warning('No configure file specified for logging layer. Using defaults.')
call lgr%warning('No configure file specified for logging layer. Using defaults.')
end if

end if
Expand All @@ -158,6 +158,7 @@ subroutine report_global_profiler(unusable,comm,rc)
integer :: npes, my_rank, ierror
character(1) :: empty(0)
class (BaseProfiler), pointer :: t_p
type(Logger), pointer :: lgr

_UNUSED_DUMMY(unusable)
if (present(comm)) then
Expand Down Expand Up @@ -185,13 +186,14 @@ subroutine report_global_profiler(unusable,comm,rc)
call MPI_Comm_Rank(world_comm, my_rank, ierror)

if (my_rank == 0) then
report_lines = reporter%generate_report(t_p)
write(*,'(a,1x,i0)')'Report on process: ', my_rank
do i = 1, size(report_lines)
write(*,'(a)') report_lines(i)
end do
end if
call MPI_Barrier(world_comm, ierror)
report_lines = reporter%generate_report(t_p)
lgr => logging%get_logger('MAPL.profiler')
call lgr%info('Report on process: %i0', my_rank)
do i = 1, size(report_lines)
call lgr%info('%a', report_lines(i))
end do
end if
call MPI_Barrier(world_comm, ierror)

end subroutine report_global_profiler

Expand Down
1 change: 1 addition & 0 deletions base/Base.F90
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ module MAPLBase_Mod
use MAPL_FileMetadataUtilsMod
use MAPL_VerticalDataMod
use MAPL_FieldUtilities
use MAPL_SphericalGeometry
logical, save, private :: mapl_is_initialized = .false.

end module MAPLBase_Mod
4 changes: 3 additions & 1 deletion base/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,16 @@ set (srcs
TimeStringConversion.F90
MAPL_ISO8601_DateTime_ESMF.F90
FieldUtilities.F90
MAPL_Resource.F90
# Orphaned program: should not be in this library.
# tstqsat.F90
)


esma_add_library(
${this} SRCS ${srcs}
DEPENDENCIES MAPL.shared MAPL.constants MAPL.profiler MAPL.pfio MAPL_cfio_r4 PFLOGGER::pflogger GFTL_SHARED::gftl-shared
DEPENDENCIES MAPL.shared MAPL.constants MAPL.profiler MAPL.pfio MAPL_cfio_r4 PFLOGGER::pflogger
GFTL_SHARED::gftl-shared-v2 GFTL_SHARED::gftl-shared-v1 GFTL::gftl-v2 GFTL::gftl-v1
esmf NetCDF::NetCDF_Fortran MPI::MPI_Fortran
TYPE ${MAPL_LIBRARY_TYPE})

Expand Down
Loading