Source code modifications in MPASO : need an integer for the day of year #6064
Replies: 2 comments 2 replies
-
You can get DOY using mpas_get_clock_time to first retrieve a time in a time type and then mpas_get_time with that time and the optional arg DOY to extract a doy. These are in the mpas framework timekeeping module. Interfaces are: ` subroutine mpas_get_time(curr_time, YYYY, MM, DD, DoY, H, M, S, S_n, S_d, dateTimeString, ierr)
` And ` type (MPAS_Time_type) function mpas_get_clock_time(clock, whichTime, ierr)
` |
Beta Was this translation helpful? Give feedback.
-
Hello again Phil, I'm getting some errors when attempting to pull the day of year from these two subroutines. Here's what I'm attempting in mpas_ocn_surface_bulk_forcing.f90. I've only included the code relevant to timekeeping.
The E3SM log returns a "Program received signal SIGSEGV: Segmentation fault - invalid memory reference," citing issues in ESMF_ClockMod.f90:518. I've attached my log files as well. |
Beta Was this translation helpful? Give feedback.
-
Hello!
Version: E3SMv2_1
Case: WCYCL1850
Res: ne30pg2_EC30to60E2r2
For my source code modifications which override some wind-anomalies to the daily climatology in MPASO, I need to use an integer to subset my array (365 days, ncells) which indicates the day of the Julian calendar year (365 day calendar). Is there a global or local variable for the day of year in MPASO like there is in POP2 (CESM2). In CESM2, i think you can simply use iday_of_year - but the only potential integer definition of the day of year i'm seeing might be in the orbit subroutine of mpas_ocn_vel_tidal_potential.f90 .
Thanks for any help,
Jacob
Beta Was this translation helpful? Give feedback.
All reactions