NOAA-GFDL / FMS

GFDL's Flexible Modeling System
Other
92 stars 134 forks source link

Attempt to write out u_atm, etc. fails when using a mask_table #1508

Closed kshedstrom closed 4 months ago

kshedstrom commented 5 months ago

For a BOEM contract, I would like to write out ice, ocean velocities plus winds. This diag_table works:

"boem_hourly",               1, "hours",   1, "hours", "time"
"ocean_model", "ssu_east",     "ssu_east",         "boem_hourly", "all", .false., "none",2
"ocean_model", "ssv_north",    "ssv_north",        "boem_hourly", "all", .false., "none",2
"ice_model",   "ui_east",      "ui_east",          "boem_hourly", "all", .false., "none",2
"ice_model",   "vi_north",     "vi_north",         "boem_hourly", "all", .false., "none",2
"flux",        "u_atm",        "u_atm",            "boem_hourly", "all", .false., "none",2
"flux",        "v_atm",        "v_atm",            "boem_hourly", "all", .false., "none",2

if my ice and ocean layout files contain only: #override IO_LAYOUT = 1, 1

If the ice and ocean layout files also contain:

LAYOUT = 5,10
MASKTABLE = "mask_table.2.5x10"

then the model fails with:

FATAL from PE     0: file:19930101.boem_hourly.nc and variable:u_atm The data is not on the compute domain or the data domain

Is there a way to provide a layout file to the coupler?

To Reproduce Turn on the ice and ocean mask_table.

Expected behavior I would like the combined model to output one file per year, and to run with the mask_table on.

System Environment This happens on both gaea with Intel and on chinook with gfortran.

Additional context I could set you up with an example on gaea.

uramirez8707 commented 5 months ago

@kshedstrom Can you set up an example on GAEA?

kshedstrom commented 4 months ago

I have it here: /gpfs/f5/gfdl_med/scratch/Katherine.Hedstrom/Bering

If I ask for only the atmospheric fields, it runs but doesn't know about #override IO_LAYOUT = 1, 1 from MOM_layout and/or SIS_layout.

uramirez8707 commented 4 months ago

ohh I see, where you getting a file for each of the PEs?

Can you try adding this

call mpp_define_io_domain(Atmos%domain, (/1,1/))

before this line in atmos_model.F90? https://github.com/NOAA-GFDL/atmos_null/blob/master/atmos_model.F90#L429

kshedstrom commented 4 months ago

Yes, I was getting one file per core without the land mask, with only asking for atmospheric fields. With that line (and the corresponding use statement), I still get:

FATAL from PE    36: file:20110903.boem_hourly.nc and variable:u_atm The data is not on the compute domain or the data domain
kshedstrom commented 4 months ago

If I ask for two different output files, one for atmosphere, one for the rest, I do now get the output I need without having to deal with the zillion small files. Thanks.

uramirez8707 commented 4 months ago

Just to confirm, you do need the code update in atmos_null, correct?

kshedstrom commented 4 months ago

Yes, I do.

uramirez8707 commented 4 months ago

I opened a PR in atmos_null to fix this. Thank you for catching this! https://github.com/NOAA-GFDL/atmos_null/pull/6

Closing this issue.