-
Notifications
You must be signed in to change notification settings - Fork 0
Sync generic working in UFS #17
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
base: generic_datamode
Are you sure you want to change the base?
Changes from all commits
e4663bd
bfbba9b
5775513
b1c8946
ad4282a
4eb7f24
7e2dc6c
f1ed1b8
c509d89
20df7e1
edaef5b
530c262
8e9672d
0d073f8
94acf25
30279a9
2aa6bfb
89603d1
3d7067a
fbdf684
1f9eaaa
26cb593
7a18189
395f9dd
c9d1dac
51f8cd2
34d1eab
c7ea491
2eccb9f
5868cdb
79edd44
132fa69
18f4255
9f53664
bcebd63
d466212
996aec0
4ead37f
ca4520d
9b4ab00
da882d7
ed0c192
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,5 +31,9 @@ | |
| *.out | ||
| *.app | ||
|
|
||
| # Externals | ||
| fox | ||
| share/genf90 | ||
|
|
||
| # ignore pycache | ||
| __pycache__ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,3 @@ | ||
| # This is a git-fleximod adapted .gitmodules file. Any field with a name starting in fx is a git-fleximod | ||
| # specific field. See https://github.com/ESMCI/git-fleximod for details. | ||
|
|
||
| [submodule "fox"] | ||
| path = fox | ||
| url = https://github.com/ESMCI/fox.git | ||
| fxtag = 4.1.2.4 | ||
| fxrequired = AlwaysRequired | ||
| fxDONOTUSEurl = https://github.com/ESMCI/fox.git | ||
|
|
||
| [submodule "genf90"] | ||
| path = share/genf90 | ||
| url = https://github.com/PARALLELIO/genf90 | ||
| fxtag = 4816965 | ||
| fxrequired = AlwaysRequired | ||
| fxDONOTUSEurl = https://github.com/PARALLELIO/genf90 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -188,7 +188,7 @@ end subroutine SetServices | |
| !=============================================================================== | ||
| subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc) | ||
| use shr_nl_mod, only: shr_nl_find_group_name | ||
|
|
||
| ! input/output variables | ||
| type(ESMF_GridComp) :: gcomp | ||
| type(ESMF_State) :: importState, exportState | ||
|
|
@@ -218,7 +218,7 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc) | |
|
|
||
| ! Obtain flds_scalar values, mpi values, multi-instance values and | ||
| ! set logunit and set shr logging to my log file | ||
| call dshr_init(gcomp, 'OCN', mpicom, my_task, inst_index, inst_suffix, & | ||
| call dshr_init(gcomp, sdat, 'OCN', mpicom, my_task, inst_index, inst_suffix, & | ||
| flds_scalar_name, flds_scalar_num, flds_scalar_index_nx, flds_scalar_index_ny, logunit, rc) | ||
| if (ChkErr(rc,__LINE__,u_FILE_u)) return | ||
|
|
||
|
|
@@ -260,6 +260,7 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc) | |
| if(skip_restart_read) bcasttmp(3) = 1 | ||
| if(export_all) bcasttmp(4) = 1 | ||
| rtmp(1) = sst_constant_value | ||
| if(export_all) bcasttmp(4) = 1 | ||
|
Comment on lines
262
to
+263
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| endif | ||
|
|
||
| ! Broadcast namelist input | ||
|
|
@@ -398,7 +399,7 @@ subroutine InitializeRealize(gcomp, importState, exportState, clock, rc) | |
| if (ChkErr(rc,__LINE__,u_FILE_u)) return | ||
| end if | ||
|
|
||
| call dshr_mesh_init(gcomp, sdat, nullstr, logunit, 'OCN', nx_global, ny_global, & | ||
| call dshr_mesh_init(gcomp, nullstr, logunit, 'OCN', nx_global, ny_global, & | ||
| model_meshfile, model_maskfile, model_mesh, model_mask, model_frac, restart_read, rc=rc) | ||
| if (ChkErr(rc,__LINE__,u_FILE_u)) return | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,7 @@ module dshr_generic_mod | |
|
|
||
| use ESMF , only : ESMF_SUCCESS, ESMF_State, & | ||
| ESMF_LogWrite, ESMF_LOGMSG_INFO, ESMF_LOGMSG_WARNING | ||
| use NUOPC , only : NUOPC_Advertise | ||
| use shr_kind_mod , only : r8=>shr_kind_r8, cl=>shr_kind_cl | ||
| use dshr_fldlist_mod, only : fldlist_type, dshr_fldlist_add | ||
| use dshr_strdata_mod, only : shr_strdata_type, shr_strdata_get_stream_pointer | ||
|
|
@@ -32,13 +33,16 @@ module dshr_generic_mod | |
| contains | ||
|
|
||
| ! ======================================================================= | ||
| subroutine datamode_generic_advertise(fldsExport, sdat, rc) | ||
| subroutine datamode_generic_advertise(exportState, fldsExport, sdat, flds_scalar_name, rc) | ||
| type(ESMF_State) , intent(inout) :: exportState | ||
| type(fldList_type), pointer :: fldsExport | ||
| type(shr_strdata_type), intent(in) :: sdat | ||
| character(len=*) , intent(in) :: flds_scalar_name | ||
| integer, intent(out), optional :: rc | ||
|
|
||
| integer :: i, n | ||
| character(len=CL) :: fieldName | ||
| type(fldlist_type), pointer :: fldList | ||
|
|
||
| if (present(rc)) rc = ESMF_SUCCESS | ||
|
Comment on lines
41
to
47
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In |
||
|
|
||
|
|
@@ -58,14 +62,24 @@ subroutine datamode_generic_advertise(fldsExport, sdat, rc) | |
| endif | ||
| end do | ||
| endif | ||
| ! Handle cpl_scalars | ||
| call dshr_fldList_add(fldsExport, trim(flds_scalar_name)) | ||
|
|
||
| fldlist => fldsExport ! the head of the linked list | ||
| do while (associated(fldlist)) | ||
| call NUOPC_Advertise(exportState, standardName=fldlist%stdname, rc=rc) | ||
| if (ChkErr(rc,__LINE__,u_FILE_u)) return | ||
| call ESMF_LogWrite('(datm_comp_advertise): Fr_atm'//trim(fldList%stdname), ESMF_LOGMSG_INFO) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The log message hardcodes |
||
| fldList => fldList%next | ||
| enddo | ||
|
|
||
| end subroutine datamode_generic_advertise | ||
|
|
||
| ! ======================================================================= | ||
| subroutine datamode_generic_init_pointers(exportState, sdat, rc) | ||
| type(ESMF_State), intent(inout) :: exportState | ||
| type(shr_strdata_type), intent(in) :: sdat | ||
| integer, intent(out), :: rc | ||
| integer, intent(out) :: rc | ||
|
|
||
| integer :: i, n, total_vars, cache_idx | ||
| character(len=CL) :: fieldName | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variables
isPresentandisSetare declared inInitializeAdvertisebut never used. They should be removed to keep the code clean.