Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
237 commits
Select commit Hold shift + click to select a range
37363ad
remove perf_mod dependancy
jedwards4b Jul 16, 2020
06a00b9
not yet working
jedwards4b Jul 16, 2020
db398b4
fix standalone build
jedwards4b Jul 21, 2020
b0820dc
update pio path
jedwards4b Jul 21, 2020
de999e6
add tskn, lwnet and wind speed, fix swnet
uturuncoglu Jul 27, 2020
eb8e465
more bld changes
jedwards4b Jul 27, 2020
b916a5d
check fields in the state before returning pointers
uturuncoglu Jul 27, 2020
44549e5
add test for ERA5
uturuncoglu Jul 28, 2020
6ac93fa
put extra log if it cannot find the field in the state
uturuncoglu Jul 29, 2020
067293e
Merge pull request #7 from ESCOMP/update_era5_v2
uturuncoglu Jul 29, 2020
5f9a655
bug fixes
Jul 30, 2020
317c8ae
first changes for 3d input capability
Aug 1, 2020
13a2708
updates to have DLND compset working and bfb
Aug 2, 2020
e7b4958
fix for fldptr return mode
uturuncoglu Aug 4, 2020
f5fef94
Merge pull request #10 from ESCOMP/fix_fldptr
uturuncoglu Aug 4, 2020
cb47276
addition of 3d functionality
Aug 5, 2020
6ed43c2
add fox as a submodule of cdeps
jedwards4b Aug 6, 2020
4f5499d
cleanup
Aug 6, 2020
54b6bb7
Merge branch 'master' into feature/bug_fixes
Aug 6, 2020
1c6624d
add fox submodule
jedwards4b Aug 6, 2020
fac382c
remove more t_barriers
jedwards4b Aug 6, 2020
13676a2
Merge pull request #12 from jedwards4b/add_fox_submodule
jedwards4b Aug 6, 2020
3bfc100
build fixes
jedwards4b Aug 7, 2020
a6a682a
update fox
jedwards4b Aug 7, 2020
7a0c37f
Create extbuild.yml
jedwards4b Aug 6, 2020
85f4ee2
untar pio
jedwards4b Aug 6, 2020
56784aa
no tabs allowed
jedwards4b Aug 6, 2020
17b9a45
add cdeps build
jedwards4b Aug 6, 2020
b355a68
try again
jedwards4b Aug 6, 2020
e4b1062
add esmf build
jedwards4b Aug 6, 2020
83c2a60
no tabs
jedwards4b Aug 6, 2020
dcc1d52
more workflow stuff
jedwards4b Aug 6, 2020
5759f6c
fix again
jedwards4b Aug 6, 2020
b2d5f3a
fix format
jedwards4b Aug 6, 2020
d17f05d
add :
jedwards4b Aug 6, 2020
f16271c
try again
jedwards4b Aug 6, 2020
6080602
try again
jedwards4b Aug 6, 2020
b2977c9
try again
jedwards4b Aug 6, 2020
e7581b9
try again
jedwards4b Aug 6, 2020
908f61d
redo esmf build
jedwards4b Aug 7, 2020
ba35a4b
redo esmf build
jedwards4b Aug 7, 2020
07c0ba9
redo esmf build
jedwards4b Aug 7, 2020
69683b9
put it together
jedwards4b Aug 7, 2020
4969e1d
tabs again
jedwards4b Aug 7, 2020
7eb7169
whitespace cleanup
jedwards4b Aug 7, 2020
b0fc9fe
reindent and try again
jedwards4b Aug 7, 2020
dd647f0
try a smaller piece
jedwards4b Aug 7, 2020
c47d196
fix indentation issues
jedwards4b Aug 7, 2020
516e500
more indentation issues
jedwards4b Aug 7, 2020
32cb41d
update fox cmake defaults
jedwards4b Aug 7, 2020
968b57c
try again
jedwards4b Aug 7, 2020
cda2c88
getting closer
jedwards4b Aug 7, 2020
c561e94
add pio build
jedwards4b Aug 7, 2020
3f972b8
add pnetcdf path
jedwards4b Aug 7, 2020
5daac89
add netcdf-fortran
jedwards4b Aug 7, 2020
08c67e9
fix syntax error
jedwards4b Aug 7, 2020
973bd40
find netcdf version
jedwards4b Aug 7, 2020
5195033
need netcdf-fortran 4.5.2
jedwards4b Aug 7, 2020
e6dc151
remove debug statement
jedwards4b Aug 7, 2020
b34d98d
another typo fixed
jedwards4b Aug 7, 2020
b116576
debug commit
jedwards4b Aug 7, 2020
88462dd
debug commit
jedwards4b Aug 7, 2020
34e4cea
update paths
jedwards4b Aug 7, 2020
981487d
restoring caches
jedwards4b Aug 7, 2020
dd95f0f
restoring caches
jedwards4b Aug 7, 2020
31e6767
add outputs
jedwards4b Aug 7, 2020
febee8e
add outputs
jedwards4b Aug 7, 2020
18294ea
add outputs
jedwards4b Aug 7, 2020
9d75383
Revert "add outputs"
jedwards4b Aug 7, 2020
59f7047
add outputs
jedwards4b Aug 7, 2020
d4bfc92
add outputs
jedwards4b Aug 7, 2020
e4aeaf9
one job?
jedwards4b Aug 7, 2020
9d8a59a
try again
jedwards4b Aug 7, 2020
654d660
now build cdeps
jedwards4b Aug 7, 2020
e937028
now build cdeps
jedwards4b Aug 7, 2020
06acde9
now build cdeps
jedwards4b Aug 7, 2020
42bcb08
add build flags
jedwards4b Aug 7, 2020
f172b16
add build flags
jedwards4b Aug 7, 2020
8de2f8d
add build flags
jedwards4b Aug 7, 2020
73dec14
add build flags
jedwards4b Aug 7, 2020
f38484d
add build flags
jedwards4b Aug 7, 2020
fbb0e1e
fix a real error
jedwards4b Aug 7, 2020
2fa1125
Merge pull request #13 from ESCOMP/add-github-actions
jedwards4b Aug 7, 2020
28c0644
more bug fixes
Aug 8, 2020
3e483ac
updates to latest cdeps
Aug 8, 2020
bfa92e3
more bug fixes
Aug 8, 2020
bb79a7f
Merge branch 'master' into feature/bug_fixes
jedwards4b Aug 8, 2020
339112c
Merge pull request #15 from ESCOMP/feature/bug_fixes
jedwards4b Aug 8, 2020
d7b8a4c
remove unused variables
jedwards4b Aug 8, 2020
5a1b060
more cleanup
jedwards4b Aug 8, 2020
b1b2697
changes to get 3d stream input working
Aug 10, 2020
246644a
clean up wav comp
jedwards4b Aug 10, 2020
9d716f9
more cleanup
jedwards4b Aug 10, 2020
1245cfa
more cleanup
jedwards4b Aug 10, 2020
f2126a3
fix errors
jedwards4b Aug 10, 2020
13c94c7
fix error
jedwards4b Aug 10, 2020
994aaa8
fix error
jedwards4b Aug 10, 2020
abd5508
fix error
jedwards4b Aug 10, 2020
dc2c91f
fix error
jedwards4b Aug 10, 2020
b798586
fix error
jedwards4b Aug 10, 2020
3db6586
fix error
jedwards4b Aug 10, 2020
b4e99c9
fix errors
jedwards4b Aug 10, 2020
7de813a
more fixes
jedwards4b Aug 10, 2020
8d55901
fix another issue
jedwards4b Aug 10, 2020
7eb6ede
use ymd instead of date
jedwards4b Aug 10, 2020
08ea63c
use ymd instead of date
jedwards4b Aug 10, 2020
23fedf3
replace bias_correction
jedwards4b Aug 10, 2020
cac4613
make esmf version env var
jedwards4b Aug 10, 2020
a680ed4
add versions to dependencies
jedwards4b Aug 10, 2020
e1f555f
fix workflow error
jedwards4b Aug 10, 2020
7c65629
fix workflow
jedwards4b Aug 10, 2020
fc1a331
Merge pull request #16 from ESCOMP/minimize_compiler_warnings
jedwards4b Aug 10, 2020
18b1d3b
merge to cdeps master
Aug 11, 2020
6a35dea
updates for documentation
Aug 11, 2020
db0a90e
Merge branch 'master' of https://github.com/ESCOMP/CDEPS
Aug 11, 2020
8ed166f
udpates for PR requests
Aug 11, 2020
60a7486
Merge branch 'master' into mvertens/cdeps3d_works
jedwards4b Aug 11, 2020
cfc5345
Merge pull request #19 from ESCOMP/mvertens/cdeps3d_works
jedwards4b Aug 11, 2020
6f33826
new stream_definition_xxx.xml
Aug 15, 2020
2023267
changes to fix aux_cdeps tests and bring in stream_cdeps.py and strea…
Aug 19, 2020
45b7a85
fixed bugs
Aug 19, 2020
d808b7c
addressed PR issues raised by Jim Edwards
Aug 20, 2020
e99ec4f
Merge pull request #21 from ESCOMP/new_stream_schema
jedwards4b Aug 20, 2020
2480ebb
fix find compiler with cime
jedwards4b Aug 26, 2020
82a2974
improve the build, remove hardcoded path
jedwards4b Sep 18, 2020
b9a3fa8
Merge pull request #27 from ESCOMP/build_improvements
jedwards4b Sep 25, 2020
8508f59
build improvements
jedwards4b Sep 25, 2020
d4394fa
fixed bug in drof JRA55 specfication for mesh file
Oct 2, 2020
e9a9660
fix GPTL issue
Oct 12, 2020
977bfda
fix stdout format issue
jedwards4b Oct 30, 2020
2c2a2be
add code to avoid clashes when building multiple cases at once
jedwards4b Nov 16, 2020
a15b267
Merge branch 'master' of https://github.com/ESCOMP/CDEPS
jedwards4b Nov 16, 2020
dc6e3f6
increase wait time
jedwards4b Nov 16, 2020
8f0a405
simplify locking
jedwards4b Nov 16, 2020
6de6963
fix issue with CMAKE_INSTALL_PATH
jedwards4b Nov 17, 2020
3726ebb
cleanup;
jedwards4b Nov 17, 2020
3985a73
fix for pgi build
jedwards4b Nov 24, 2020
f9da2a6
feature/perf_updates
Dec 4, 2020
c669b39
Merge pull request #33 from ESCOMP/feature/perf_updates
jedwards4b Dec 7, 2020
3e6b717
fix for finding PIO
Dec 11, 2020
d94eeca
fix docn if the stream only provides SST
Dec 11, 2020
6f88a90
fixes to get datm working with dynamic fraction calculation in clm
Jan 4, 2021
b38ae62
changes to get docn working with dynamic fraction calculation if mask…
Jan 4, 2021
5808cb1
fix cmake build to work with HAFS
Jan 7, 2021
2cec07f
update cmake files for dice, dlnd, drof and dwav
Jan 8, 2021
47d9ec1
update dependencies
Jan 8, 2021
0831048
fixed problem for single point cases - no mapping file will be create…
Jan 10, 2021
1739751
fixed problems related to taxmode and dtlimit for DATM%PTCLM versus j…
Jan 10, 2021
f4bec30
finished adding datm_datamode_cplhist_mod.F90
Jan 10, 2021
dd2e5d2
changes to fix memory growth problem
Jan 11, 2021
a843a9b
Merge commit 'dd2e5d2' into mvertens/dynfrac
Jan 11, 2021
f286f51
removed debug write statement
Jan 11, 2021
e66fde4
updated missing stream mesh files
Jan 13, 2021
2e77890
fixed creation of ocean mask/frac when it needs to be created
Jan 14, 2021
c6be719
Merge branch 'master' into feature/hafs_cdeps_pr
uturuncoglu Jan 14, 2021
c39dc6a
add only clause i dshr_fldlist_mod and dshr_stream_mod
jedwards4b Jan 19, 2021
bf4f9da
add only to dshr_dfield_mod
jedwards4b Jan 19, 2021
1a5f6a1
add only clause to dshr_tinterp_mod
jedwards4b Jan 19, 2021
fc49812
add only to dshr_strdata_mod
jedwards4b Jan 19, 2021
92ec4b6
Merge pull request #41 from ESCOMP/mvertens/dynfrac
mvertens Jan 19, 2021
ee60a78
Merge branch 'master' into feature/hafs_cdeps_pr
uturuncoglu Jan 19, 2021
c64e7a2
add only clause to dshr_methods_mod
jedwards4b Jan 19, 2021
5374de6
add only clause
jedwards4b Jan 19, 2021
44b8864
add more only clauses
jedwards4b Jan 19, 2021
0ef2a44
add more only clauses
jedwards4b Jan 19, 2021
736766b
add more only clauses
jedwards4b Jan 19, 2021
63f1654
add more only clauses
jedwards4b Jan 19, 2021
64337ef
add more only clauses
jedwards4b Jan 19, 2021
4dc756e
add more only clauses
jedwards4b Jan 19, 2021
ca70972
add more only clauses
jedwards4b Jan 19, 2021
5393a13
Merge branch 'master' of https://github.com/ESCOMP/CDEPS into add_onl…
jedwards4b Jan 19, 2021
05458c0
more only clauses
jedwards4b Jan 19, 2021
bc84182
more only clauses
jedwards4b Jan 19, 2021
0b3a68e
Merge pull request #43 from jedwards4b/add_only_clause
jedwards4b Jan 19, 2021
1d8b5ce
fix make build under CESM
Jan 20, 2021
7cc6735
Merge branch 'master' into feature/hafs_cdeps_pr
uturuncoglu Jan 20, 2021
c138337
more fix for cmake build under CESM
Jan 20, 2021
5da53f4
fix the standalone build outside of any application
Jan 20, 2021
3b1ec5a
Merge pull request #40 from hafs-community/feature/hafs_cdeps_pr
uturuncoglu Jan 20, 2021
e077e7f
fix typo in cmake build
uturuncoglu Jan 22, 2021
6830f20
Merge pull request #46 from ESCOMP/fix_cmake_typo
jedwards4b Jan 22, 2021
447e1b6
Merge pull request #1 from ESCOMP/master
uturuncoglu Jan 22, 2021
18d1db2
Merge branch 'master' into HEAD
Jan 25, 2021
983ae46
Merge commit '18d1db2'
Jan 25, 2021
a843433
fixed bug if scripts_regression_test
Jan 25, 2021
63fd3d5
Merge pull request #47 from ESCOMP/mvertens/bugfix
jedwards4b Jan 25, 2021
8c6b1ac
replace datm_clmncep_yr and datm_cplhist_yr with datm_yr
jedwards4b Feb 1, 2021
f36b2fe
namelist cleanup
jedwards4b Feb 1, 2021
bcd7efe
replace musgs with mg37 in cdeps tests
jedwards4b Feb 1, 2021
5db7611
Merge pull request #48 from jedwards4b/update_testlist
jedwards4b Feb 1, 2021
52b8b40
Merge branch 'master' into jedwards/namelist_cleanup
jedwards4b Feb 1, 2021
b9bb065
remove scol_mode
jedwards4b Feb 1, 2021
b278ec1
update logic for single column
jedwards4b Feb 2, 2021
1f02a73
Merge pull request #49 from jedwards4b/jedwards/namelist_cleanup
jedwards4b Feb 4, 2021
bd6b3e6
enable component level PIO initialization
Feb 18, 2021
690592a
shr_pio_mod needs to be used only with CESM
Feb 18, 2021
f6b00c6
fix for inline data components and CESM tests
Feb 19, 2021
ee0aa4c
change pio defaults and clean print statements
Feb 23, 2021
92b08b8
add support to set pio debug level
Feb 26, 2021
d5fe83d
Merge branch 'master' into feature/pio_fix_comp
uturuncoglu Feb 26, 2021
378028e
Merge pull request #52 from hafs-community/feature/pio_fix_comp
uturuncoglu Feb 27, 2021
2f11cb3
bugfixes for iradsw > 1
Feb 22, 2021
49ec807
updates to have SOMAQP working correctly
Feb 23, 2021
8517ebb
fixes for jra forcing for datm and drof
Mar 1, 2021
e4b9c55
updates for single column
Mar 9, 2021
e8c1d58
bug fixes
Mar 9, 2021
6fc0398
port to nag 6.1 fortran compiler
jedwards4b Feb 16, 2021
da0bd42
nag port
jedwards4b Feb 17, 2021
6ab7044
update include paths
jedwards4b Feb 17, 2021
b10ca28
ret should be int
jedwards4b Mar 11, 2021
4bbc650
nag port
jedwards4b Feb 17, 2021
fee300a
update include paths
jedwards4b Feb 17, 2021
76c5f04
avoid unassociated pointer
jedwards4b Mar 12, 2021
b476091
bug fixes to get single column working
Mar 12, 2021
81d24f4
replace 1x1 forcing data interpolation to bilinear from nn to be cons…
Mar 14, 2021
b91e418
Merge pull request #51 from jedwards4b/nag_port
jedwards4b Mar 15, 2021
7afec93
merge to master
Mar 15, 2021
6e89ecf
fix of argument type
Mar 16, 2021
7eedc05
removal of white space
Mar 16, 2021
87236b3
added new consistency checks for pts_lat and pts_lon
Mar 16, 2021
87b2464
fixed bug in buildnml
Mar 17, 2021
aef5362
clean up logic for single column not allowed
Mar 17, 2021
dc1b2a3
more bug fixes
Mar 17, 2021
0683261
add bumpversion to workflow
jedwards4b Mar 17, 2021
8c10dec
removed unnecessary rc check
Mar 19, 2021
65ee404
remove unneeded rc checks
jedwards4b Mar 19, 2021
ee28644
Merge pull request #54 from ESCOMP/mvertens/scol
jedwards4b Mar 19, 2021
ac51658
Merge branch 'master' into add_bump_version
jedwards4b Mar 19, 2021
6dcb4df
Merge pull request #56 from jedwards4b/add_bump_version
jedwards4b Mar 19, 2021
1954a46
add genf90 as a submodule
jedwards4b Mar 23, 2021
a7bd80d
point to genf90.pl in source
jedwards4b Mar 23, 2021
07003cd
update fox external for nag
jedwards4b Mar 24, 2021
b83be60
remove download of genf90
jedwards4b Mar 24, 2021
35c5650
Merge pull request #59 from jedwards4b/add_genf90_submodule
jedwards4b Mar 24, 2021
0961a16
Merge pull request #60 from jedwards4b/fox_nag_port
mvertens Mar 25, 2021
032fdd6
Update CDEPS
binli2337 Mar 29, 2021
f8dceb1
Update fox.
binli2337 Mar 29, 2021
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
20 changes: 20 additions & 0 deletions .github/workflows/bumpversion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Bump version
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: Bump version and push tag
uses: anothrNick/github-tag-action@1.26.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
DEFAULT_BUMP: minor
RELEASE_BRANCHES: master
DRY_RUN: False
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "fox"]
path = fox
url = https://github.com/ESMCI/fox.git
[submodule "share/genf90"]
path = share/genf90
url = https://github.com/PARALLELIO/genf90
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ if(BLD_STANDALONE)
list(APPEND EXTRA_LIBS cdeps_share)
list(APPEND EXTRA_INCLUDES "${CMAKE_BINARY_DIR}/share" )
endif()

if("${COMPILER}" STREQUAL "nag")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -D__NAG__")
endif()
add_subdirectory(fox)
add_subdirectory(streams)
add_subdirectory(dshr)
Expand Down
2 changes: 1 addition & 1 deletion cime_config/buildlib
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def buildlib(bldroot, libroot, case, compname=None):
expect(time_counter <= time_to_wait," Timeout waiting for {}".format(dwav_lib))
print("HERE exeroot {} bldroot {}".format(exe_root, bldroot))

s,o,e = run_cmd("make install DESTDIR={}".format(libroot), from_dir=bldroot, verbose=True)
s,o,e = run_cmd("make install VERBOSE=1 DESTDIR={}".format(libroot), from_dir=bldroot, verbose=True)
expect(not s,"ERROR from make output={}, error={}".format(o,e))

# Link the CDEPS component directories to the location expected by cime
Expand Down
2 changes: 2 additions & 0 deletions datm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ set(SRCFILES atm_comp_nuopc.F90
datm_datamode_cfsr_mod.F90
datm_datamode_era5_mod.F90)


foreach(FILE ${SRCFILES})
if(EXISTS "${CASEROOT}/SourceMods/src.datm/${FILE}")
list(REMOVE_ITEM SRCFILES ${FILE})
Expand All @@ -27,3 +28,4 @@ target_include_directories (datm PRIVATE ${CMAKE_SOURCE_DIR})
target_include_directories (datm PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/share)
target_include_directories (datm PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/streams)
target_include_directories (datm PRIVATE ${PIO_Fortran_INCLUDE_DIR})
target_include_directories (datm PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/../fox/include)
118 changes: 54 additions & 64 deletions datm/atm_comp_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module atm_comp_nuopc
use shr_kind_mod , only : r8=>shr_kind_r8, i8=>shr_kind_i8, cl=>shr_kind_cl, cs=>shr_kind_cs
use shr_const_mod , only : shr_const_cday
use shr_sys_mod , only : shr_sys_abort
use shr_cal_mod , only : shr_cal_ymd2date, shr_cal_ymd2julian, shr_cal_date2julian
use shr_cal_mod , only : shr_cal_ymd2date
use shr_mpi_mod , only : shr_mpi_bcast
use dshr_methods_mod , only : dshr_state_diagnose, chkerr, memcheck
use dshr_strdata_mod , only : shr_strdata_type, shr_strdata_init_from_xml, shr_strdata_advance
Expand Down Expand Up @@ -115,7 +115,6 @@ module atm_comp_nuopc
character(CL) :: dataMode = nullstr ! flags physics options wrt input data
character(CL) :: model_meshfile = nullstr ! full pathname to model meshfile
character(CL) :: model_maskfile = nullstr ! full pathname to obtain mask from
character(CL) :: model_createmesh_fromfile = nullstr ! full pathname to obtain mask from
integer :: iradsw = 0 ! radiation interval (input namelist)
character(CL) :: factorFn_mesh = 'null' ! file containing correction factors mesh
character(CL) :: factorFn_data = 'null' ! file containing correction factors data
Expand Down Expand Up @@ -218,7 +217,7 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
!-------------------------------------------------------------------------------

namelist / datm_nml / datamode, &
model_meshfile, model_maskfile, model_createmesh_fromfile, &
model_meshfile, model_maskfile, &
nx_global, ny_global, restfilm, iradsw, factorFn_data, factorFn_mesh, &
flds_presaero, flds_co2, flds_wiso, bias_correct, anomaly_forcing

Expand Down Expand Up @@ -252,7 +251,6 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
call shr_mpi_bcast(datamode , mpicom, 'datamode')
call shr_mpi_bcast(model_meshfile , mpicom, 'model_meshfile')
call shr_mpi_bcast(model_maskfile , mpicom, 'model_maskfile')
call shr_mpi_bcast(model_createmesh_fromfile , mpicom, 'model_createmesh_fromfile')
call shr_mpi_bcast(nx_global , mpicom, 'nx_global')
call shr_mpi_bcast(ny_global , mpicom, 'ny_global')
call shr_mpi_bcast(iradsw , mpicom, 'iradsw')
Expand All @@ -265,49 +263,21 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)

! write namelist input to standard out
if (my_task == master_task) then
write(logunit,F00)' case_name = ',trim(case_name)
write(logunit,F00)' datamode = ',trim(datamode)
if (model_createmesh_fromfile /= nullstr) then
write(logunit,F00)' model_create_meshfile_fromfile = ',trim(model_createmesh_fromfile)
else
write(logunit,F00)' model_meshfile = ',trim(model_meshfile)
write(logunit,F00)' model_maskfile = ',trim(model_maskfile)
end if
write(logunit,F01)' nx_global = ',nx_global
write(logunit,F01)' ny_global = ',ny_global
write(logunit,F00)' restfilm = ',trim(restfilm)
write(logunit,F01)' iradsw = ',iradsw
write(logunit,F00)' factorFn_data = ',trim(factorFn_data)
write(logunit,F00)' factorFn_mesh = ',trim(factorFn_mesh)
write(logunit,F02)' flds_presaero = ',flds_presaero
write(logunit,F02)' flds_co2 = ',flds_co2
write(logunit,F02)' flds_wiso = ',flds_wiso
write(logunit,F00)' case_name = ',trim(case_name)
write(logunit,F00)' datamode = ',trim(datamode)
write(logunit,F00)' model_meshfile = ',trim(model_meshfile)
write(logunit,F00)' model_maskfile = ',trim(model_maskfile)
write(logunit,F01)' nx_global = ',nx_global
write(logunit,F01)' ny_global = ',ny_global
write(logunit,F00)' restfilm = ',trim(restfilm)
write(logunit,F01)' iradsw = ',iradsw
write(logunit,F00)' factorFn_data = ',trim(factorFn_data)
write(logunit,F00)' factorFn_mesh = ',trim(factorFn_mesh)
write(logunit,F02)' flds_presaero = ',flds_presaero
write(logunit,F02)' flds_co2 = ',flds_co2
write(logunit,F02)' flds_wiso = ',flds_wiso
end if

! check that files exists
if (my_task == master_task) then
if (model_createmesh_fromfile /= nullstr) then
inquire(file=trim(model_createmesh_fromfile), exist=exists)
if (.not.exists) then
write(logunit, *)' ERROR: model_createmesh_fromfile '//&
trim(model_createmesh_fromfile)//' does not exist'
call shr_sys_abort(trim(subname)//' ERROR: model_createmesh_fromfile '//&
trim(model_createmesh_fromfile)//' does not exist')
end if
else
inquire(file=trim(model_meshfile), exist=exists)
if (.not.exists) then
write(logunit, *)' ERROR: model_meshfile '//trim(model_meshfile)//' does not exist'
call shr_sys_abort(trim(subname)//' ERROR: model_meshfile '//trim(model_meshfile)//' does not exist')
end if
inquire(file=trim(model_maskfile), exist=exists)
if (.not.exists) then
write(logunit, *)' ERROR: model_maskfile '//trim(model_maskfile)//' does not exist'
call shr_sys_abort(trim(subname)//' ERROR: model_maskfile '//trim(model_maskfile)//' does not exist')
end if
end if
endif

! Validate sdat datamode
if (masterproc) write(logunit,*) ' datm datamode = ',trim(datamode)
if ( trim(datamode) == 'CORE2_NYF' .or. &
Expand Down Expand Up @@ -378,6 +348,7 @@ subroutine InitializeRealize(gcomp, importState, exportState, clock, rc)
real(R8) :: orbLambm0 ! orb mean long of perhelion (radians)
real(R8) :: orbObliqr ! orb obliquity (radians)
logical :: isPresent, isSet
real(R8) :: dayofYear
character(len=*), parameter :: subname=trim(modName)//':(InitializeRealize) '
!-------------------------------------------------------------------------------

Expand All @@ -387,8 +358,7 @@ subroutine InitializeRealize(gcomp, importState, exportState, clock, rc)
! Initialize mesh, restart flag, compid, and logunit
call ESMF_TraceRegionEnter('datm_strdata_init')
call dshr_mesh_init(gcomp, sdat, nullstr, logunit, 'ATM', nx_global, ny_global, &
model_meshfile, model_maskfile, model_createmesh_fromfile, model_mesh, &
model_mask, model_frac, restart_read, rc=rc)
model_meshfile, model_maskfile, model_mesh, model_mask, model_frac, restart_read, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return

! Initialize stream data type
Expand All @@ -409,7 +379,8 @@ subroutine InitializeRealize(gcomp, importState, exportState, clock, rc)
! Get the time to interpolate the stream data to
call ESMF_ClockGet( clock, currTime=currTime, timeStep=timeStep, advanceCount=stepno, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call ESMF_TimeGet(currTime, yy=current_year, mm=current_mon, dd=current_day, s=current_tod, rc=rc )
call ESMF_TimeGet(currTime, yy=current_year, mm=current_mon, dd=current_day, s=current_tod, &
dayofYear_r8=dayofYear, rc=rc )
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call shr_cal_ymd2date(current_year, current_mon, current_day, current_ymd)

Expand Down Expand Up @@ -444,7 +415,7 @@ subroutine InitializeRealize(gcomp, importState, exportState, clock, rc)
call shr_sys_abort(subname//'Need to set attribute ScalarFieldIdxNextSwCday')
endif

nextsw_cday = getNextRadCDay( current_ymd, current_tod, stepno, idt, iradsw, sdat%model_calendar )
nextsw_cday = getNextRadCDay(dayofYear, current_tod, stepno, idt, iradsw)
call dshr_state_SetScalar(nextsw_cday, flds_scalar_index_nextsw_cday, exportState, flds_scalar_name, flds_scalar_num, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return

Expand Down Expand Up @@ -474,6 +445,7 @@ subroutine ModelAdvance(gcomp, rc)
real(R8) :: orbMvelpp ! orb moving vernal eq (radians)
real(R8) :: orbLambm0 ! orb mean long of perhelion (radians)
real(R8) :: orbObliqr ! orb obliquity (radians)
real(R8) :: dayofYear
character(len=*),parameter :: subname=trim(modName)//':(ModelAdvance) '
!-------------------------------------------------------------------------------

Expand All @@ -492,7 +464,7 @@ subroutine ModelAdvance(gcomp, rc)
call ESMF_ClockGet( clock, currTime=currTime, timeStep=timeStep, advanceCount=stepno, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
nextTime = currTime + timeStep
call ESMF_TimeGet( nextTime, yy=yr, mm=mon, dd=day, s=next_tod, rc=rc )
call ESMF_TimeGet( nextTime, yy=yr, mm=mon, dd=day, s=next_tod, dayofYear_r8=dayofYear, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call shr_cal_ymd2date(yr, mon, day, next_ymd)

Expand Down Expand Up @@ -522,7 +494,9 @@ subroutine ModelAdvance(gcomp, rc)

! Update nextsw_cday for scalar data
! Use nextYMD and nextTOD here since since the component - clock is advance at the END of the time interval
nextsw_cday = getNextRadCDay( next_ymd, next_tod, stepno, idt, iradsw, sdat%model_calendar )

nextsw_cday = getNextRadCDay(dayofYear, next_tod, stepno, idt, iradsw)

call dshr_state_SetScalar(nextsw_cday, flds_scalar_index_nextsw_cday, exportState, flds_scalar_name, flds_scalar_num, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return

Expand Down Expand Up @@ -796,31 +770,47 @@ end subroutine datm_init_dfields
end subroutine datm_comp_run

!===============================================================================
real(R8) function getNextRadCDay( ymd, tod, stepno, dtime, iradsw, calendar )

! Return the calendar day of the next radiation time-step.
! General Usage: nextswday = getNextRadCDay(curr_date)
real(R8) function getNextRadCDay( julday, tod, stepno, dtime, iradsw )

! Return the calendar day of the next radiation time-step.
! General Usage: nextswday = getNextRadCDay(curr_date) iradsw is
! the frequency to update the next shortwave. in number of steps
! (or hours if negative) Julian date.
! -- values greater than 1 set
! the next radiation to the present time plus 2 timesteps every iradsw
! -- values less than 0 turn set the next radiation to the present time
! plus two timesteps every -iradsw hours.
! -- if iradsw is zero, the next radiation time is the
! present time plus 1 timestep.

! input/output variables
integer , intent(in) :: ymd
integer , intent(in) :: tod
integer(i8), intent(in) :: stepno
integer , intent(in) :: dtime
integer , intent(in) :: iradsw
character(*),intent(in) :: calendar
real(r8) , intent(in) :: julday
integer , intent(in) :: tod
integer(i8) , intent(in) :: stepno
integer , intent(in) :: dtime
integer , intent(in) :: iradsw

! local variables
real(R8) :: nextsw_cday
real(R8) :: julday
integer :: liradsw
integer :: delta_radsw
character(*),parameter :: subName = '(getNextRadCDay) '
!-------------------------------------------------------------------------------

! Note that stepno is obtained via the advancecount argument to
! ESMF_GetClock and is the number of times the ESMF_Clock has been
! advanced. The ESMF clock is actually advanced an additional time
! (in order to trigger alarms) in the routine dshr_set_runclock
! which is the specialized routine for the model_lable_SetRunClock.
! This is called each time the ModelAdvance phase is called. Hence
! stepno is not used to trigger the calculation of nextsw_cday.

liradsw = iradsw
if (liradsw < 0) liradsw = nint((-liradsw *3600._r8)/dtime)
call shr_cal_date2julian(ymd,tod,julday,calendar)

if (liradsw > 1) then
if (mod(stepno+1,liradsw) == 0 .and. stepno > 0) then
delta_radsw = liradsw * dtime
if (mod(tod+dtime,delta_radsw) == 0 .and. stepno > 0) then
nextsw_cday = julday + 2*dtime/shr_const_cday
else
nextsw_cday = -1._r8
Expand Down
17 changes: 13 additions & 4 deletions datm/cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,20 @@ def _create_namelists(case, confdir, inst_string, infile, nmlgen, data_list_path
config['datm_mode'] = datm_mode
config['datm_co2_tseries'] = datm_co2_tseries
config['datm_presaero'] = datm_presaero
config['cime_model'] = get_model()
if case.get_value('PTS_MODE'):
config['mode'] = 'single_column'

if case.get_value('PTS_LON'):
scol_lon = float(case.get_value('PTS_LON'))
else:
scol_lon = -999.
if case.get_value('PTS_LAT'):
scol_lat = float(case.get_value('PTS_LAT'))
else:
config['mode'] = case.get_value("ATM_DOMAIN_MESH")
scol_lat = -999.
if case.get_value('ATM_DOMAIN_FILE'):
if scol_lon > -999. and scol_lat > -999. and case.get_value("ATM_DOMAIN_FILE") != "UNSET":
config['single_column'] = 'true'
else:
config['single_column'] = 'false'

nmlgen.init_defaults(infile, config)

Expand Down
30 changes: 9 additions & 21 deletions datm/cime_config/namelist_definition_datm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,12 @@
<value datm_mode="CORE2_IAF" >
CORE2_IAF.GCGCS.PREC,CORE2_IAF.GISS.LWDN,CORE2_IAF.GISS.SWDN,CORE2_IAF.GISS.SWUP,CORE2_IAF.NCEP.DN10,CORE2_IAF.NCEP.Q_10,CORE2_IAF.NCEP.SLP_,CORE2_IAF.NCEP.T_10,CORE2_IAF.NCEP.U_10,CORE2_IAF.NCEP.V_10,CORE2_IAF.CORE2.ArcFactor
</value>
<value datm_mode="CORE_IAF_JRA_1p4_2018" >
CORE_IAF_JRA_1p4_2018.GCGCS.PREC,CORE_IAF_JRA_1p4_2018.GISS.LWDN,CORE_IAF_JRA_1p4_2018.GISS.SWDN,CORE_IAF_JRA_1p4_2018.NCEP.Q_10,CORE_IAF_JRA_1p4_2018.NCEP.SLP_,CORE_IAF_JRA_1p4_2018.NCEP.T_10,CORE_IAF_JRA_1p4_2018.NCEP.U_10,CORE_IAF_JRA_1p4_2018.NCEP.V_10
</value>
<value datm_mode="CORE_IAF_JRA" >
CORE_IAF_JRA.PREC,CORE_IAF_JRA.LWDN,CORE_IAF_JRA.SWDN,CORE_IAF_JRA.Q_10,CORE_IAF_JRA.SLP_,CORE_IAF_JRA.T_10,CORE_IAF_JRA.U_10,CORE_IAF_JRA.V_10,CORE_IAF_JRA.CORE2.ArcFactor
CORE_IAF_JRA.PREC,CORE_IAF_JRA.LWDN,CORE_IAF_JRA.SWDN,CORE_IAF_JRA.Q_10,CORE_IAF_JRA.SLP_,CORE_IAF_JRA.T_10,CORE_IAF_JRA.U_10,CORE_IAF_JRA.V_10
</value>
<value datm_mode="CORE_IAF_JRA_1p4_2018" >CORE_IAF_JRA_1p4_2018.GCGCS.PREC,CORE_IAF_JRA_1p4_2018.GISS.LWDN,CORE_IAF_JRA_1p4_2018.GISS.SWDN,CORE_IAF_JRA_1p4_2018.NCEP.Q_10,CORE_IAF_JRA_1p4_2018.NCEP.SLP_,CORE_IAF_JRA_1p4_2018.NCEP.T_10,CORE_IAF_JRA_1p4_2018.NCEP.U_10,CORE_IAF_JRA_1p4_2018.NCEP.V_10</value>
<value datm_mode="CORE2_IAF" model_grid="01col" >
CORE2_IAF.NCEP.DENS.SOFS,CORE2_IAF.NCEP.PSLV.SOFS,CORE2_IAF.PREC.SOFS.DAILY,CORE2_IAF.LWDN.SOFS.DAILY,CORE2_IAF.SWDN.SOFS.DAILY,CORE2_IAF.SWUP.SOFS.DAILY,CORE2_IAF.SHUM.SOFS.6HOUR,CORE2_IAF.TBOT.SOFS.6HOUR,CORE2_IAF.U.SOFS.6HOUR,CORE2_IAF.V.SOFS.6HOUR,CORE2_IAF.CORE2.ArcFactor
</value>
Expand Down Expand Up @@ -133,8 +135,7 @@
</desc>
<values>
<value>$ATM_DOMAIN_MESH</value>
<value mode='scol'>null</value>
<value mode='create_mesh'>null</value>
<value single_column='true'>null</value>
</values>
</entry>

Expand All @@ -148,23 +149,7 @@
</desc>
<values>
<value>$ATM_DOMAIN_MESH</value>
<value mode='scol'>$ATM_DOMAIN_PATH/$ATM_DOMAIN_FILE</value>
<value mode='create_mesh'>$ATM_DOMAIN_PATH/$ATM_DOMAIN_FILE</value>
</values>
</entry>

<entry id="model_createmesh_fromfile">
<type>char</type>
<category>streams</category>
<input_pathname>abs</input_pathname>
<group>datm_nml</group>
<desc>
file specifying model mesh
</desc>
<values>
<value>null</value>
<value mode='scol'>$ATM_DOMAIN_PATH/$ATM_DOMAIN_FILE</value>
<value mode='create_mesh'>$ATM_DOMAIN_PATH/$ATM_DOMAIN_FILE</value>
<value single_column='true'>null</value>
</values>
</entry>

Expand All @@ -177,6 +162,7 @@
</desc>
<values>
<value>$ATM_NX</value>
<value single_column='true'>1</value>
</values>
</entry>

Expand All @@ -189,8 +175,10 @@
</desc>
<values>
<value>$ATM_NY</value>
<value single_column='true'>1</value>
</values>
</entry>

<entry id="bias_correct" skip_default_entry="true"><!--- anomaly forcing - bias correction -->
<type>char</type>
<category>datm</category>
Expand Down
Loading