-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add source codes for the repair job #77
Conversation
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.
some minor comments that are hopefully very easy to fix.
@@ -0,0 +1,538 @@ | |||
program gefs_6h_ave_1mem |
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.
This is a f90 code, so it does not need to have 6 spaces. The modern compiler will understand.
call get_environment_variable("file_dir", file_dir) | ||
call get_environment_variable("out_dir", out_dir) |
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.
please lets not use environment variables. Either use a namelist or command-line argument.
src/gefs_6h_ave_1mem.fd/prlevel.f
Outdated
@@ -0,0 +1,286 @@ | |||
subroutine prlevel(ipdtn,ipdtmpl,labbrev) |
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.
Can we make this prlevel.f90
I have fixed the first two comments. Not sure what you mean for the last
comment "can we make this prlevel.f90". Thanks!
…On Fri, Sep 13, 2024 at 9:39 PM Rahul Mahajan ***@***.***> wrote:
***@***.**** requested changes on this pull request.
some minor comments that are hopefully very easy to fix.
------------------------------
In src/gefs_6h_ave_1mem.fd/gefs_6h_ave_1mem.f90
<#77 (comment)>:
> @@ -0,0 +1,538 @@
+ program gefs_6h_ave_1mem
This is a f90 code, so it does not need to have 6 spaces. The modern
compiler will understand.
------------------------------
In src/gefs_6h_ave_1mem.fd/gefs_6h_ave_1mem.f90
<#77 (comment)>:
> + call get_environment_variable("file_dir", file_dir)
+ call get_environment_variable("out_dir", out_dir)
please lets not use environment variables. Either use a namelist or
command-line argument.
------------------------------
In src/gefs_6h_ave_1mem.fd/prlevel.f
<#77 (comment)>:
> @@ -0,0 +1,286 @@
+ subroutine prlevel(ipdtn,ipdtmpl,labbrev)
Can we make this prlevel.f90
—
Reply to this email directly, view it on GitHub
<#77 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AVLBRUT7WKT53I356MBOKXTZWOHWJAVCNFSM6AAAAABM6X2MB6VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDGMBUGM2DKNBXGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Thanks @HongGuan-NOAA |
if( ifh == 003 ) then | ||
datafile(nfi)=trim(datapath)//'gefs.t00z.master.grb2f'//trim(sfh) ! only control data avail | ||
else | ||
datafile(nfi)=trim(datapath)//'gefs.t00z.master.grb2f'//trim(sfh) | ||
endif |
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 if and else are identical
if (nfi /= 3 ) then | ||
jpdtn = pdt%npdt(ifid) !template version num. | ||
jpdt(1) = pdt%icat(ifid) | ||
jpdt(2) = pdt%iprm(ifid) | ||
jpdt(10) = pdt%iffs(ifid) | ||
jdisc = disc(ifid) | ||
else | ||
! ifid1=ifid + nfield1/2 | ||
jpdtn =11 !template version num. | ||
jpdt(1) = pdt%icat(ifid) | ||
jpdt(2) = pdt%iprm(ifid) | ||
jpdt(10) = pdt%iffs(ifid) | ||
jdisc = disc(ifid) | ||
!! if (ifid ==14 ) jpdt(10) = 10 | ||
endif |
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.
Line 171 and 178 are the only conditional dependent here. There others can be outside the if-else structure.
Already fixed the issues you pointed out. Thanks!
…On Mon, Sep 16, 2024 at 2:55 PM Rahul Mahajan ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/gefs_6h_ave_1mem.fd/gefs_6h_ave_1mem.f90
<#77 (comment)>:
> + if (nfi /= 3 ) then
+ jpdtn = pdt%npdt(ifid) !template version num.
+ jpdt(1) = pdt%icat(ifid)
+ jpdt(2) = pdt%iprm(ifid)
+ jpdt(10) = pdt%iffs(ifid)
+ jdisc = disc(ifid)
+ else
+! ifid1=ifid + nfield1/2
+ jpdtn =11 !template version num.
+ jpdt(1) = pdt%icat(ifid)
+ jpdt(2) = pdt%iprm(ifid)
+ jpdt(10) = pdt%iffs(ifid)
+ jdisc = disc(ifid)
+!! if (ifid ==14 ) jpdt(10) = 10
+ endif
Line 171 and 178 are the only conditional dependent here. There others can
be outside the if-else structure.
—
Reply to this email directly, view it on GitHub
<#77 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AVLBRUR7DXRV5O6JEDFPZQ3ZW4SQHAVCNFSM6AAAAABM6X2MB6VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDGMBXGQ4TEMBSHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
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.
I think you can remove some of the commented code, otherwise it looks good.
! if (var_save(i,1).gt.1.E20.and.var_save(i,3).gt.1.E20) var_save_acc(i)=var_save(i,3) | ||
! if (var_save(i,1).gt.1.E20.and.var_save(i,3).lt.1.E20) var_save_acc(i)=var_save(i,3) | ||
! if (var_save(i,1).lt.1.E20.and.var_save(i,3).gt.1.E20) var_save_acc(i)=var_save(i,1) | ||
! if (var_save(i,1).lt.1.E20.and.var_save(i,3).lt.1.E20) then |
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.
I think you can remove these commented lines.
!output 6h variables | ||
|
||
!reasign gfldo%fld | ||
! gfldo%fld=var_save_acc(:) |
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.
This commented code can be removed.
Already changed as you mentioned and also some other comment lines are
removed.
…On Tue, Sep 17, 2024 at 10:57 AM Eric Sinsky - NOAA < ***@***.***> wrote:
***@***.**** approved this pull request.
I think you can remove some of the commented code, otherwise it looks good.
------------------------------
In src/gefs_6h_ave_1mem.fd/gefs_6h_ave_1mem.f90
<#77 (comment)>:
> +! if (var_save(i,1).gt.1.E20.and.var_save(i,3).gt.1.E20) var_save_acc(i)=var_save(i,3)
+! if (var_save(i,1).gt.1.E20.and.var_save(i,3).lt.1.E20) var_save_acc(i)=var_save(i,3)
+! if (var_save(i,1).lt.1.E20.and.var_save(i,3).gt.1.E20) var_save_acc(i)=var_save(i,1)
+! if (var_save(i,1).lt.1.E20.and.var_save(i,3).lt.1.E20) then
I think you can remove these commented lines.
------------------------------
In src/gefs_6h_ave_1mem.fd/gefs_6h_ave_1mem.f90
<#77 (comment)>:
> +
+ if(pabbrev=='TMAX') then
+ do i =1,maxgrd
+ if(var_save(i,3).gt.var_save(i,2)) then
+ var_save_acc(i)=var_save(i,3)
+ else
+ var_save_acc(i)=var_save(i,2)
+ endif
+ enddo
+ endif
+ endif
+
+!output 6h variables
+
+!reasign gfldo%fld
+! gfldo%fld=var_save_acc(:)
This commented code can be removed.
—
Reply to this email directly, view it on GitHub
<#77 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AVLBRUSM24QJWOOIJQAP6PDZXA7MNAVCNFSM6AAAAABM6X2MB6VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDGMBXGYYDEOBXGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@HongGuan-NOAA Have you made any progress building with the newer g2 library? We have been using 3.4.5 since we moved code to this separate repository, so at least two years. |
I can build the code for both 3.4.1 and 3.4.4 but not for 3.4.5. I have
generated a ticket to WCOSS2 help desk. Hopefully they can make some help.
This code was used for the GEFSv12 reforecast about 4 years ago. This is
the first time to adapt to the global workflow. Thanks!
…On Mon, Sep 23, 2024 at 7:56 AM Walter Kolczynski - NOAA < ***@***.***> wrote:
@HongGuan-NOAA <https://github.com/HongGuan-NOAA> Have you made any
progress building with the newer g2 library? We have been using 3.4.5 since
we moved code to this separate repository, so at least two years.
—
Reply to this email directly, view it on GitHub
<#77 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AVLBRUT6VF4ZVYR2X5HME7DZX76XDAVCNFSM6AAAAABM6X2MB6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRXHE4TQMBSGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@HongGuan-NOAA Have you tried building with g2 3.4.5 on other platforms such as Hera? |
Not yet. I will take a look. Thanks!
…On Mon, Sep 23, 2024 at 8:10 AM Eric Sinsky - NOAA ***@***.***> wrote:
@HongGuan-NOAA <https://github.com/HongGuan-NOAA> Have you tried building
with g2 3.4.5 on other platforms such as Hera?
—
Reply to this email directly, view it on GitHub
<#77 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AVLBRUV5KKCYREZZAD2NU4TZYAAJLAVCNFSM6AAAAABM6X2MB6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRYGAZTAMBTG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I have done some modifications to my code. Now it works with the current
g2=3.4.5 without error. I will do a couple of tests and make a push soon.
Thanks!
On Mon, Sep 23, 2024 at 9:17 AM Hong Guan - NOAA Affiliate <
***@***.***> wrote:
… Not yet. I will take a look. Thanks!
On Mon, Sep 23, 2024 at 8:10 AM Eric Sinsky - NOAA <
***@***.***> wrote:
> @HongGuan-NOAA <https://github.com/HongGuan-NOAA> Have you tried
> building with g2 3.4.5 on other platforms such as Hera?
>
> —
> Reply to this email directly, view it on GitHub
> <#77 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AVLBRUV5KKCYREZZAD2NU4TZYAAJLAVCNFSM6AAAAABM6X2MB6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRYGAZTAMBTG4>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
|
Just push the updated code. Thanks!
On Mon, Sep 23, 2024 at 12:38 PM Hong Guan - NOAA Affiliate <
***@***.***> wrote:
… I have done some modifications to my code. Now it works with the current
g2=3.4.5 without error. I will do a couple of tests and make a push soon.
Thanks!
On Mon, Sep 23, 2024 at 9:17 AM Hong Guan - NOAA Affiliate <
***@***.***> wrote:
> Not yet. I will take a look. Thanks!
>
> On Mon, Sep 23, 2024 at 8:10 AM Eric Sinsky - NOAA <
> ***@***.***> wrote:
>
>> @HongGuan-NOAA <https://github.com/HongGuan-NOAA> Have you tried
>> building with g2 3.4.5 on other platforms such as Hera?
>>
>> —
>> Reply to this email directly, view it on GitHub
>> <#77 (comment)>,
>> or unsubscribe
>> <https://github.com/notifications/unsubscribe-auth/AVLBRUV5KKCYREZZAD2NU4TZYAAJLAVCNFSM6AAAAABM6X2MB6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRYGAZTAMBTG4>
>> .
>> You are receiving this because you were mentioned.Message ID:
>> ***@***.***>
>>
>
|
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.
looks good.
Description
Add the repair source code into the gfs-utils. This source code is needed for the repair job. Global-workflow PR #2838 depends on this PR.
Type of change
Change characteristics
How has this been tested?
Checklist