Skip to content

Commit 01f8e86

Browse files
authored
Merge pull request #155 from GEOS-ESM/develop
Merge Develop into Main for release
2 parents c2b9511 + 4a7c519 commit 01f8e86

File tree

4 files changed

+84
-48
lines changed

4 files changed

+84
-48
lines changed

.circleci/config.yml

Lines changed: 36 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -34,26 +34,26 @@ workflows:
3434
compiler: [gfortran, ifort]
3535
context:
3636
- docker-hub-creds
37-
- make-FV3-exp:
38-
name: make-FV3-exp-on-<< matrix.compiler >>
39-
matrix:
40-
parameters:
41-
compiler: [gfortran, ifort]
42-
context:
43-
- docker-hub-creds
44-
requires:
45-
- build-GEOSgcm-on-<< matrix.compiler >>
46-
- run-FV3:
47-
name: run-FV3-on-<< matrix.compiler >>
48-
matrix:
49-
parameters:
50-
compiler: [gfortran, ifort]
51-
context:
52-
- docker-hub-creds
53-
requires:
54-
- make-FV3-exp-on-<< matrix.compiler >>
55-
56-
37+
###################################################
38+
# - make-FV3-exp: #
39+
# name: make-FV3-exp-on-<< matrix.compiler >> #
40+
# matrix: #
41+
# parameters: #
42+
# compiler: [gfortran, ifort] #
43+
# context: #
44+
# - docker-hub-creds #
45+
# requires: #
46+
# - build-GEOSgcm-on-<< matrix.compiler >> #
47+
# - run-FV3: #
48+
# name: run-FV3-on-<< matrix.compiler >> #
49+
# matrix: #
50+
# parameters: #
51+
# compiler: [gfortran, ifort] #
52+
# context: #
53+
# - docker-hub-creds #
54+
# requires: #
55+
# - make-FV3-exp-on-<< matrix.compiler >> #
56+
###################################################
5757

5858
commands:
5959
versions:
@@ -67,6 +67,14 @@ commands:
6767
command: |
6868
mpirun --version && << parameters.compiler >> --version && echo $BASEDIR && pwd && ls && echo "$(nproc)"
6969
70+
compress_artifacts:
71+
description: "Compress artifacts"
72+
steps:
73+
- run:
74+
name: "Compress artifacts"
75+
command: |
76+
gzip -9 /logfiles/*
77+
7078
checkout_fixture:
7179
description: "Checkout fixture"
7280
parameters:
@@ -178,12 +186,15 @@ jobs:
178186
compiler: << parameters.compiler >>
179187
- buildinstall:
180188
repo: GEOSgcm
189+
- compress_artifacts
181190
- store_artifacts:
182191
path: /logfiles
183-
- persist_to_workspace:
184-
root: workspace
185-
paths:
186-
- install-GEOSgcm
192+
###########################
193+
# - persist_to_workspace: #
194+
# root: workspace #
195+
# paths: #
196+
# - install-GEOSgcm #
197+
###########################
187198

188199
make-FV3-exp:
189200
parameters:
@@ -260,6 +271,7 @@ jobs:
260271
echo "EGRESS not found!"
261272
exit 1
262273
fi
274+
- compress_artifacts
263275
- store_artifacts:
264276
path: /logfiles
265277

fv_regrid_c2c.F90

Lines changed: 41 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,48 @@ module fv_regrid_c2c
5959
integer :: IUNIT=15
6060
integer :: OUNIT=16
6161

62+
interface read_topo_file
63+
module procedure read_topo_file_r4
64+
module procedure read_topo_file_r8
65+
end interface
66+
6267
contains
68+
69+
subroutine read_topo_file_r4(fname,output,grid,rc)
70+
character(len=*), intent(in) :: fname
71+
type(ESMF_Grid), intent(in) :: grid
72+
real(real4), intent(inout) :: output(:,:)
73+
integer, intent(out), optional :: rc
74+
75+
integer :: status,dims(3),funit
76+
real, allocatable :: input(:,:)
77+
call MAPL_GridGet(grid,globalCellCountPerDim=dims,_RC)
78+
allocate(input(dims(1),dims(2)))
79+
open(newunit=funit,file=trim(fname),form='unformatted',iostat=status)
80+
_VERIFY(status)
81+
read(funit)input
82+
call ArrayScatter(local_array=output,global_array=input,grid=grid,_RC)
83+
_RETURN(_SUCCESS)
84+
end subroutine read_topo_file_r4
85+
86+
subroutine read_topo_file_r8(fname,output,grid,rc)
87+
character(len=*), intent(in) :: fname
88+
type(ESMF_Grid), intent(in) :: grid
89+
real(real8), intent(inout) :: output(:,:)
90+
integer, intent(out), optional :: rc
91+
92+
integer :: status,dims(3),funit
93+
real, allocatable :: input(:,:)
94+
real(real8), allocatable :: input_r8(:,:)
95+
call MAPL_GridGet(grid,globalCellCountPerDim=dims,_RC)
96+
allocate(input(dims(1),dims(2)),input_r8(dims(2),dims(2)))
97+
open(newunit=funit,file=trim(fname),form='unformatted',iostat=status)
98+
_VERIFY(status)
99+
read(funit)input
100+
input_r8 = input
101+
call ArrayScatter(local_array=output,global_array=input_r8,grid=grid,_RC)
102+
_RETURN(_SUCCESS)
103+
end subroutine read_topo_file_r8
63104

64105
subroutine get_geos_ic( Atm, extra_rst, rstcube, gridOut)
65106

@@ -1880,23 +1921,6 @@ end subroutine mpp_domain_decomp
18801921
!
18811922
! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ !
18821923
!-------------------------------------------------------------------------------
1883-
1884-
subroutine read_topo_file(fname,output,grid,rc)
1885-
character(len=*), intent(in) :: fname
1886-
type(ESMF_Grid), intent(in) :: grid
1887-
real(real4), intent(inout) :: output(:,:)
1888-
integer, intent(out), optional :: rc
18891924

1890-
integer :: status,dims(3),funit
1891-
real, allocatable :: input(:,:)
1892-
call MAPL_GridGet(grid,globalCellCountPerDim=dims,_RC)
1893-
allocate(input(dims(1),dims(2)))
1894-
open(newunit=funit,file=trim(fname),form='unformatted',iostat=status)
1895-
_VERIFY(status)
1896-
read(funit)input
1897-
call ArrayScatter(local_array=output,global_array=input,grid=grid,_RC)
1898-
_RETURN(_SUCCESS)
1899-
end subroutine read_topo_file
1900-
19011925
end module fv_regrid_c2c
19021926

fv_regrid_c2c_bin.F90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,14 @@ subroutine get_geos_ic_bin( Atm, extra_rst, rstcube, gridOut)
9797
if (extra_rst(i)%have_descriptor) then
9898
do j=1,size(extra_rst(i)%vars)
9999
if (extra_rst(i)%vars(j)%nLev/=1) then
100-
allocate(extra_rst(i)%vars(j)%ptr3d(isd:ied,jsd:jed,extra_rst(i)%vars(j)%nLev),source=0.0 )
100+
allocate(extra_rst(i)%vars(j)%ptr3d(isd:ied,jsd:jed,extra_rst(i)%vars(j)%nLev),source=0.0_FVPRC )
101101
else
102-
allocate(extra_rst(i)%vars(j)%ptr2d(isd:ied,jsd:jed), source=0.0 )
102+
allocate(extra_rst(i)%vars(j)%ptr2d(isd:ied,jsd:jed), source=0.0_FVPRC )
103103
end if
104104
enddo
105105
else
106106
do j=1,size(extra_rst(i)%vars)
107-
allocate(extra_rst(i)%vars(j)%ptr3d(isd:ied,jsd:jed,extra_rst(i)%vars(j)%nLev),source=0.0 )
107+
allocate(extra_rst(i)%vars(j)%ptr3d(isd:ied,jsd:jed,extra_rst(i)%vars(j)%nLev),source=0.0_FVPRC )
108108
enddo
109109
end if
110110
enddo

fv_regridding_utils.F90

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,25 +73,25 @@ subroutine alloc_var(this,is,ie,js,je,km,rc)
7373
integer :: km_use
7474

7575
if (this%rank==2) then
76-
allocate(this%ptr2d(is:ie,js:je),source=0.0)
76+
allocate(this%ptr2d(is:ie,js:je),source=0.0_FVPRC)
7777
else if (this%rank==3) then
7878
if (this%n_ungrid > 0) then
79-
allocate(this%ptr3d(is:ie,js:je,this%n_ungrid),source=0.0)
79+
allocate(this%ptr3d(is:ie,js:je,this%n_ungrid),source=0.0_FVPRC)
8080
else if (this%n_ungrid == 0) then
8181
if (present(km)) then
8282
km_use = km
8383
else
8484
km_use = this%nlev
8585
end if
86-
allocate(this%ptr3d(is:ie,js:je,km_use),source=0.0)
86+
allocate(this%ptr3d(is:ie,js:je,km_use),source=0.0_FVPRC)
8787
end if
8888
else if (this%rank == 4) then
8989
if (present(km)) then
9090
km_use = km
9191
else
9292
km_use = this%nlev
9393
end if
94-
allocate(this%ptr4d(is:ie,js:je,km_use,this%n_ungrid),source=0.0)
94+
allocate(this%ptr4d(is:ie,js:je,km_use,this%n_ungrid),source=0.0_FVPRC)
9595
end if
9696
_RETURN(_SUCCESS)
9797

0 commit comments

Comments
 (0)