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

jmax_segments #54

Open
PeterHjortLauritzen opened this issue May 31, 2023 · 1 comment
Open

jmax_segments #54

PeterHjortLauritzen opened this issue May 31, 2023 · 1 comment

Comments

@PeterHjortLauritzen
Copy link
Collaborator

For low resolution grids (e.g. ne16, mpas480) source code change is needed:

replace

jmax_segments = MIN( jmax_segments, 10000 )!for low resolution grids this line needs to be uncommented (makes code slow!)

with

jmax_segments = MIN( jmax_segments,100000 )!for low resolution grids, e.g., mpasa480

in cube_to_target.F90.

Note: if jmax_segments is large then high resolution grids make the model run very slow ...!

Maybe jmax_segments could be optional argument?

@adamrher
Copy link
Collaborator

adamrher commented May 31, 2023

Can you remind me what is "nrank" in invoking the dynamic option? Does nrank==1 refer to unstructured grids? Your case above does not invoke dynamic but rather the fall back value of 10000, right?

    if (nrank == 1) then
      da_min_ncube  = 4.0*pi/(6.0*DBLE(ncube*ncube))
      da_min_target = MAXVAL(target_area)
      if (da_min_target==0) then !bug with MPAS files
        write(*,*) "ERROR: da_min_target =",da_min_target
        stop
      else
        write(*,*) "using dynamic estimate for jmax_segments " 
        !++ jtb : Increased by 4x. Needed for c1440 FV3
        !jmax_segments = 10 * ncorner*NINT(da_min_target/da_min_ncube)!phl - FAILS for MPAS ~3km
        jmax_segments = 4 * ncorner*NINT(da_min_target/da_min_ncube)
      end if
      write(*,*) "ncorner, da_min_target, da_min_ncube =", ncorner, da_min_target, da_min_ncube
      write(*,*) "jmax_segments",jmax_segments,da_min_target,da_min_ncube
    else
      jmax_segments = 100000   !can be tweaked
    end if

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants