[MITgcm-support] Problem creating Binary Forcing Files for EXF

Stephen Hunter [EAR] S.Hunter at leeds.ac.uk
Mon May 18 06:44:12 EDT 2020


Firstly my apologies for the long query (my 2 questions are summarised at the bottom)

I have set up a CS96 model for a deep-time palaeo experiment. I am using 20 years of monthly surface climatology in a cyclical manner to run the model for 1500 years. The surface climatology is from a global high-resolution atmosphere-only model. I am using Matlab to generate the MITgcm boundary conditions (bathymetry) and forcing files.  I believe that I have MITgcm correctly set-up as I can run the model from these boundary conditions and forcing files for 1500 years without problems. Globally integrated temperature on ocean levels comes into equilibrium and I see a drift in globally integrated salinity (as I expect as I haven’t implemented a river scheme yet).

I generate my bathymetry binary on a CS96 grid using the lat-lon specification within the grid definitions. I am satisfied that this works as I expect because I can use the reverse of my regridding process to unwrap the MITgcm climatological average back to a regular lat-lon grid and the imprinted land sea mask comes out as expected.

Whilst the model is happy to run for 1500 years, the processed climatology from the final 50 years appears incorrect. Whilst the surface ocean temperature appears visually OK (latitudinal distribution of temperatures appears fine). It is when I look closer, things appear to be wrong. For example when I look at the surface ocean currents I have a lot of diverging currents where I would expect zonal equatorial currents. I also don’t have flow through ocean gateways and channels. I do get some western boundary currents and some upwelling, but these are inconsistent in some regions.

I suspect that this mishmash is because I am creating the Forcing binaries incorrectly.  I would therefore like to check if I am creating them correctly. Here is a simplified account of what I am doing….

For each climatological field I generate a binary file for each year of monthly data. I do this in Matlab by building a vector of the data and then saving this as a float64 binary.  Consider a year of climatological data is an array of size (360,180,12), in which longitude runs from -179.5 to 179.5 in 1-degree cells, and latitude runs from 89.5 to -89.5 in 1-degree cells. I then create a vector from this array with the following recipe (simplified pseudo code):

vec=zeros(360*180*12,1);
counter=1;
for month=1:1:12
  for lat=180:-1:1
   for lon=1:1:360
    vec(counter,1)=data(lon,lat,month)
    counter=counter+1
  end
end
end

I then write vec to a 64 bit binary. With regards to CPP options for EXF I am using configuration A1,B3 but currently without runoff. In data.exf I define Ustress, Vstress, atemp, aqh, precip, wspeed, swdown and lwdown to be read in from yearly binary files with lon0 and lat0 as -179.5 and -89.5. My non scalar fields are on slightly different grid but these are specified accordingly.

I cannot find a description of the ordering of cell data within binary forcing files for the EXF package. I have tried writing array data directly to binary file, transposing my input data, changing the ordering that I fill vec, but these appear wrong also. I have tried to write my forcing data to the CS96 grid (like I do for bathymetry) but I didn’t know how to order the data wrt to the time dimension. I would prefer to have EXF read and interpolate my lat-lon climatology.


My questions are therefore:

1) What is the ordering of the data within binary forcing files that EXF reads?
2) Currently I have MITgcm output monthly means of ocean variables but to help me understand my problem,  is it possible to have MITgcm write out the monthly averages of the Input Forcing Fields? (or at least the surface wind vectors)


Kind regards
Stephen




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mitgcm.org/pipermail/mitgcm-support/attachments/20200518/c3449a44/attachment.html>


More information about the MITgcm-support mailing list