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

Cherry pick ice_in and year_align changes from MOM6-CICE6 repo #15

Merged
merged 3 commits into from
Feb 1, 2024

Conversation

anton-seaice
Copy link
Contributor

@anton-seaice anton-seaice commented Jan 16, 2024

I cherry picked recent config changes from MOM6-CICE6 repo:

I noted two things when running this:

  • Do we need to set the dates in 'ww3_shel.nml' now we have changed them in datm/drof streams xml files?
  • The dates on the history output are wrong:
ncdump archive/output001/GMOM_JRA_WD.ww3.hi.1900-01-03-00000.nc | grep time
        time = UNLIMITED ; // (1 currently)
        double time(time) ;
                time:units = "seconds since 1900-01-02 00:00:00" ;
                time:calendar = "noleap" ;
        int mapsta(time, ny, nx) ;
        float UAX(time, ny, nx) ;
        float UAY(time, ny, nx) ;
        float ICE(time, ny, nx) ;
        float HS(time, ny, nx) ;
        float T02(time, ny, nx) ;
        float T0M1(time, ny, nx) ;
        float T01(time, ny, nx) ;
        float FP0(time, ny, nx) ;
        float THM(time, ny, nx) ;
        float EF(time, freq, ny, nx) ;
        float USSX(time, ny, nx) ;
        float USSY(time, ny, nx) ;
 time = 172800 ;

Note the time:units are seconds since 1900-01-02, but the the time is 172800 (= 2 days). This gives a date of 1900-01-04 00:00:00, however the expected result is the output represents the average from 1900-01-02 00:00:00 to 1900-01-02 24:00:00. Is this a known issue @ezhilsabareesh8 ?

(n.b., I set nuopc.runconfig stop and restart to 1 day, and wav history_n to 1 day, and ran twice in Payu)

* Copy OM2 CICE Config

* updates for icefields which are on by default

* address review comments

* review comments

* review comments

(cherry picked from MOM6-CICE6 commit c45fb289997d82a719b4edc44ab9f2edd729d16e)
(cherry picked from MOM6-CICE6 commit ec47d8a216746efbf62bfdcb3604b3c39308204e)
@anton-seaice
Copy link
Contributor Author

xarray also interprets this with the 1900-01-04 date

array([cftime.DatetimeNoLeap(1900, 1, 4, 0, 0, 0, 0, has_year_zero=True)],
      dtype=object)

@ezhilsabareesh8
Copy link

  • Do we need to set the dates in 'ww3_shel.nml' now we have changed them in datm/drof streams xml files?

For gridded outputs the dates in ww3_shel.nml need not to be changed, since the dates from the nuopc.runconfig file will be used for the output.

  • The dates on the history output are wrong:

Upon checking your configuration I also found that the history_options = nmonths is not changed to ndays when you run the simulation for 1 day. The history options in these lines to be changed.

@anton-seaice
Copy link
Contributor Author

anton-seaice commented Jan 16, 2024

For gridded outputs the dates in ww3_shel.nml need not to be changed, since the dates from the nuopc.runconfig file will be used for the output.

And non-gridded output? (Can we delete those lines from ww3_shel.nml? )

  • The dates on the history output are wrong:

Upon checking your configuration I also found that the history_options = nmonths is not changed to ndays when you run the simulation for 1 day. The history options in these lines to be changed.

Yeah I did that, which gave me the daily output above, but the dates in that output are set wrong.

@ezhilsabareesh8
Copy link

ezhilsabareesh8 commented Jan 16, 2024

And non-gridded output? (Can we delete those lines from ww3_shel.nml?)

The point output feature is not fully implemented in the current RYF configuration since the point outputs are binary files and I am currently using it only for testing purposes. The stride is currently set to zero (refer here), preventing the generation of any point outputs. Nevertheless, it's essential to include these lines as we plan to incorporate this feature in the future.

@aekiss
Copy link
Contributor

aekiss commented Jan 16, 2024

why is it

                time:units = "seconds since 1900-01-02 00:00:00" ;

rather than

                time:units = "seconds since 1900-01-01 00:00:00" ;

?

@anton-seaice
Copy link
Contributor Author

why is it

                time:units = "seconds since 1900-01-02 00:00:00" ;

rather than

                time:units = "seconds since 1900-01-01 00:00:00" ;

?

It looks like the time:units get set based on current time before the model is run:

https://github.com/ESCOMP/WW3/blob/97740a1abb36b7ba6e52a7d6f7a37dd06f915633/model/src/wav_comp_nuopc.F90#L607

but then the elapsed time used for the time value is based on the model start time:

https://github.com/ESCOMP/WW3/blob/97740a1abb36b7ba6e52a7d6f7a37dd06f915633/model/src/wav_comp_nuopc.F90#L1063

Ill investigate more!

@aekiss
Copy link
Contributor

aekiss commented Jan 16, 2024

So does that mean the units will be different for each successive run of an experiment? I'm wondering whether xarray would handle concatenation in that case.

@anton-seaice
Copy link
Contributor Author

So does that mean the units will be different for each successive run of an experiment?

That's what it looks like. e.g., if a run is 1 day long, the first run would be correct (day 1 + 1 day), the second would be day 2 + 2 days (i.e. day 4) , the third would be day 3 + 3 days (i.e. day 6) etc.

I'm wondering whether xarray would handle concatenation in that case.

I think it handles different time-steps ok, as long as they don't overlap. i.e. I have concatenated monthly and daily data before.

@anton-seaice
Copy link
Contributor Author

I raised ESCOMP/WW3#17

As its specific to the nuopc cap, we might need a patch. I guess we should also raise an issue in the access-om3 repo.

I think I am happy enough this all works otherwise. and the history output problem is unrelated to this change. I suggest we turn on floe size distribution in a subsequent PR (rather than this one).

@anton-seaice anton-seaice marked this pull request as ready for review January 17, 2024 04:39
@anton-seaice
Copy link
Contributor Author

@aekiss @ezhilsabareesh8 :- Can you review please? :)

Copy link

@ezhilsabareesh8 ezhilsabareesh8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me.

restart_pond_topo = .false.
restart_snow = .false.
tr_aero = .false.
tr_fsd = .false.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tr_fsd is required for floe size distribution, we can include it in the next PR

Copy link
Contributor

@aekiss aekiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks @anton-seaice

@aekiss
Copy link
Contributor

aekiss commented Jan 24, 2024

Happy for you to merge @anton-seaice

@anton-seaice
Copy link
Contributor Author

I dont have write permission :)

@anton-seaice anton-seaice merged commit 627d0ce into ACCESS-NRI:1deg_jra55do_ryf Feb 1, 2024
@anton-seaice anton-seaice deleted the cherry-pick branch February 1, 2024 00:11
@micaeljtoliveira micaeljtoliveira added the 1deg_jra55do_ryf 1deg_jra55do_ryf configuration label Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1deg_jra55do_ryf 1deg_jra55do_ryf configuration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants